Changeset 3518458
- Timestamp:
- 04/29/2026 01:01:32 PM (5 weeks ago)
- Location:
- cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk
- Files:
-
- 28 added
- 7 deleted
- 42 edited
-
cloudinary.php (modified) (3 diffs)
-
css/asset-edit.css (deleted)
-
css/cloudinary.css (modified) (1 diff)
-
css/cloudinary.css.map (added)
-
css/edit-overlay.css (deleted)
-
css/fonts/cloudinary.3b839e5145ad58edde01.woff (added)
-
css/fonts/cloudinary.3b839e5145ad58edde0191367a5a96f0.woff (deleted)
-
css/fonts/cloudinary.d1a91c7f695026fd2097.eot (added)
-
css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot (deleted)
-
css/fonts/cloudinary.d8de6736f15e12f71ac2.ttf (added)
-
css/fonts/cloudinary.d8de6736f15e12f71ac22a2d374002e5.ttf (deleted)
-
css/front-overlay.css (modified) (1 diff)
-
css/front-overlay.css.map (added)
-
css/gallery-ui.css (modified) (1 diff)
-
css/gallery-ui.css.map (added)
-
css/images/chart-placeholder.svg (added)
-
css/images/circle.svg (added)
-
css/images/warning.svg (added)
-
css/syntax-highlight.css (deleted)
-
css/video.css (modified) (1 diff)
-
css/video.css.map (added)
-
js/asset-edit.js (modified) (1 diff)
-
js/asset-edit.js.map (added)
-
js/asset-manager.js (modified) (1 diff)
-
js/asset-manager.js.map (added)
-
js/block-editor.asset.php (modified) (1 diff)
-
js/block-editor.js (modified) (1 diff)
-
js/block-editor.js.map (added)
-
js/breakpoints-preview.js (modified) (1 diff)
-
js/breakpoints-preview.js.map (added)
-
js/cloudinary.js (modified) (1 diff)
-
js/cloudinary.js.map (added)
-
js/deactivate.asset.php (modified) (1 diff)
-
js/deactivate.js (modified) (1 diff)
-
js/deactivate.js.map (added)
-
js/edit-overlay.js (deleted)
-
js/front-overlay.js (modified) (1 diff)
-
js/front-overlay.js.map (added)
-
js/gallery-block.asset.php (modified) (1 diff)
-
js/gallery-block.js (modified) (1 diff)
-
js/gallery-block.js.map (added)
-
js/gallery-init.asset.php (modified) (1 diff)
-
js/gallery-init.js (modified) (1 diff)
-
js/gallery-init.js.map (added)
-
js/gallery.asset.php (modified) (1 diff)
-
js/gallery.js (modified) (1 diff)
-
js/gallery.js.map (added)
-
js/inline-loader.asset.php (modified) (1 diff)
-
js/inline-loader.js (modified) (1 diff)
-
js/inline-loader.js.map (added)
-
js/lazy-load.asset.php (modified) (1 diff)
-
js/lazy-load.js (modified) (1 diff)
-
js/lazy-load.js.map (added)
-
js/lazyload-preview.js (modified) (1 diff)
-
js/lazyload-preview.js.map (added)
-
js/media-modal.asset.php (modified) (1 diff)
-
js/media-modal.js (modified) (1 diff)
-
js/media-modal.js.map (added)
-
js/syntax-highlight.js (modified) (1 diff)
-
js/syntax-highlight.js.map (added)
-
js/terms-order.asset.php (modified) (1 diff)
-
js/terms-order.js (modified) (1 diff)
-
js/terms-order.js.map (added)
-
js/video-init.asset.php (modified) (1 diff)
-
js/video-init.js (modified) (1 diff)
-
js/video-init.js.map (added)
-
js/wp-color-picker-alpha.js (modified) (1 diff)
-
js/wp-color-picker-alpha.js.map (added)
-
php/class-assets.php (modified) (4 diffs)
-
php/class-delivery.php (modified) (7 diffs)
-
php/class-media.php (modified) (3 diffs)
-
php/class-utils.php (modified) (6 diffs)
-
php/media/class-woocommercegallery.php (modified) (4 diffs)
-
php/relate/class-relationship.php (modified) (1 diff)
-
php/traits/trait-params.php (modified) (1 diff)
-
php/ui/component/class-crops.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/cloudinary.php
r3467487 r3518458 4 4 * Plugin URI: https://cloudinary.com/documentation/wordpress_integration 5 5 * Description: With the Cloudinary plugin, you can upload and manage your media assets in the cloud, then deliver them to your users through a fast content delivery network, improving your website’s loading speed and overall user experience. Apply multiple transformations and take advantage of a full digital asset management solution without leaving WordPress. 6 * Version: 3.3. 26 * Version: 3.3.3 7 7 * Author: Cloudinary Ltd., XWP 8 8 * Author URI: https://cloudinary.com/ … … 37 37 define( 'CLDN_PATH', plugin_dir_path( __FILE__ ) ); 38 38 39 if ( version_compare( phpversion(), ' 5.6', '>=' ) ) {39 if ( version_compare( phpversion(), '7.4', '>=' ) ) { 40 40 require_once __DIR__ . '/instance.php'; 41 41 register_activation_hook( __FILE__, array( 'Cloudinary\Utils', 'install' ) ); … … 61 61 */ 62 62 function php_version_text() { 63 return __( 'Cloudinary plugin error: Your version of PHP is too old to run this plugin. You must be running PHP 5.6or higher.', 'cloudinary' );63 return __( 'Cloudinary plugin error: Your version of PHP is too old to run this plugin. You must be running PHP 7.4 or higher.', 'cloudinary' ); 64 64 } -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/css/cloudinary.css
r3454408 r3518458 1 .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity;white-space:normal}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}@font-face{font-family:cloudinary;font-style:normal;font-weight:500;src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot);src:url(../css/fonts/cloudinary.d1a91c7f695026fd20974570349bc540.eot#iefix) format("embedded-opentype"),url(../css/fonts/cloudinary.3b839e5145ad58edde0191367a5a96f0.woff) format("woff"),url(../css/fonts/cloudinary.d8de6736f15e12f71ac22a2d374002e5.ttf) format("truetype"),url(../css/images/cloudinary.svg#cloudinary) format("svg")}.dashicons-cloudinary{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none}.dashicons-cloudinary:before{content:"\e900";font-family:cloudinary,monospace!important}.dashicons-cloudinary-media:before{content:"\e905";font-family:cloudinary,monospace!important}.dashicons-cloudinary-dam:before{content:"\e906";font-family:cloudinary,monospace!important}.dashicons-cloudinary.success{color:#558b2f}.dashicons-cloudinary.error{color:#dd2c00}.dashicons-cloudinary.error:before{content:"\e901"}.dashicons-cloudinary.uploading{color:#fd9d2c}.dashicons-cloudinary.uploading:before{content:"\e902"}.dashicons-cloudinary.info{color:#0071ba}.dashicons-cloudinary.downloading:before{content:"\e903"}.dashicons-cloudinary.syncing:before{content:"\e904"}.dashicons-cloudinary.media:before{content:"\e905"}.dashicons-cloudinary.dam:before{content:"\e906"}.column-cld_status{width:5.5em}.column-cld_status .dashicons-cloudinary,.column-cld_status .dashicons-cloudinary-dam{display:inline-block}.column-cld_status .dashicons-cloudinary-dam:before,.column-cld_status .dashicons-cloudinary:before{font-size:1.8rem}.form-field .error-notice,.form-table .error-notice{color:#dd2c00;display:none}.form-field input.cld-field:invalid,.form-table input.cld-field:invalid{border-color:#dd2c00}.form-field input.cld-field:invalid+.error-notice,.form-table input.cld-field:invalid+.error-notice{display:inline-block}.cloudinary-welcome{background-image:url(../css/images/logo.svg);background-position:top 12px right 20px;background-repeat:no-repeat;background-size:153px}.cloudinary-stats{display:inline-block;margin-left:25px}.cloudinary-stat{cursor:help}.cloudinary-percent{color:#0071ba;font-size:.8em;vertical-align:top}.cld_transformations__icons{color:#333b4c;display:flex;gap:20px;margin-block:5px}.cld_transformations__icons:hover{color:#333b4c}.cld_transformations__icon{opacity:.5}.cld_transformations__icon--active{color:#0071ba;opacity:1}.cld_transformations__icon svg{height:18px;width:18px}.cld_transformations__icon svg path{fill:currentColor}.settings-image{max-width:100%;padding-top:5px}.settings-tabs>li{display:inline-block}.settings-tabs>li a{padding:.6em}.settings-tabs>li a.active{background-color:#fff}.settings-tab-section{max-width:1030px;padding:20px 0 0;position:relative}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard{align-content:flex-start;align-items:flex-start;display:flex;margin-top:40px}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-description{margin:0 auto 0 0;width:55%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content{margin:0 auto;width:35%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content .dashicons{color:#9ea3a8}.settings-tab-section.cloudinary-welcome .settings-tab-section-card{margin-top:0}.settings-tab-section-fields .field-heading th{color:#23282d;display:block;font-size:1.1em;margin:1em 0;width:auto}.settings-tab-section-fields .field-heading td{display:none;visibility:hidden}.settings-tab-section-fields .regular-textarea{height:60px;width:100%}.settings-tab-section-fields .dashicons{text-decoration:none;vertical-align:middle}.settings-tab-section-fields a .dashicons{color:#5f5f5f}.settings-tab-section-fields-dashboard-error{color:#5f5f5f;font-size:1.2em}.settings-tab-section-fields-dashboard-error.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-error .dashicons{color:#ac0000}.settings-tab-section-fields-dashboard-error .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success{color:#23282d;font-size:1.2em}.settings-tab-section-fields-dashboard-success.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-success .dashicons{color:#4fb651}.settings-tab-section-fields-dashboard-success .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success .description{color:#5f5f5f;font-weight:400;margin-top:12px}.settings-tab-section-card{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px 0 rgba(0,0,0,.07);box-sizing:border-box;margin-top:12px;padding:20px 23px}.settings-tab-section-card .dashicons{font-size:1.4em}.settings-tab-section-card h2{font-size:1.8em;font-weight:400;margin-top:0}.settings-tab-section-card.pull-right{float:right;padding:12px;position:relative;width:450px;z-index:10}.settings-tab-section-card.pull-right img.settings-image{border:1px solid #979797;box-shadow:0 2px 4px 0 rgba(0,0,0,.5);margin-top:12px}.settings-tab-section-card.pull-right h3,.settings-tab-section-card.pull-right h4{margin-top:0}.settings-tab-section .field-row-cloudinary_url,.settings-tab-section .field-row-signup{display:block}.settings-tab-section .field-row-cloudinary_url td,.settings-tab-section .field-row-cloudinary_url th,.settings-tab-section .field-row-signup td,.settings-tab-section .field-row-signup th{display:block;padding:10px 0 0;width:auto}.settings-tab-section .field-row-cloudinary_url td .sign-up,.settings-tab-section .field-row-cloudinary_url th .sign-up,.settings-tab-section .field-row-signup td .sign-up,.settings-tab-section .field-row-signup th .sign-up{vertical-align:baseline}.settings-tab-section.connect .form-table{display:inline-block;max-width:580px;width:auto}.settings-valid{color:#558b2f;font-size:30px}.settings-valid-field{border-color:#558b2f!important}.settings-invalid-field{border-color:#dd2c00!important}.settings-alert{box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block;padding:5px 7px}.settings-alert-info{background-color:#e9faff;border:1px solid #ccd0d4;border-left:4px solid #00a0d2}.settings-alert-warning{background-color:#fff5e9;border:1px solid #f6e7b6;border-left:4px solid #e3be38}.settings-alert-error{background-color:#ffe9e9;border:1px solid #d4cccc;border-left:4px solid #d20000}.field-radio input[type=radio].cld-field{margin:0 5px 0 0}.field-radio label{margin-right:10px}.settings-tab-section h2{margin:0}.cloudinary-collapsible{background-color:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;margin:20px 0;padding:10px;width:95%}.cloudinary-collapsible__toggle{cursor:pointer;display:flex}.cloudinary-collapsible__toggle h2{margin:0!important}.cloudinary-collapsible__toggle button{background-color:inherit;border:none;cursor:pointer;margin:0 0 0 auto;padding:0;width:auto}.cloudinary-collapsible__toggle .cld-ui-icon{margin-right:6px;width:24px}.cloudinary-collapsible__content .cld-ui-title{margin:3em 0 1em}.cloudinary-collapsible__content .cld-more-details{margin-top:2em}.sync .spinner{display:inline-block;float:none;margin:0 5px 0 0;visibility:visible}.sync-media,.sync-media-progress{display:none}.sync-media-progress-outer{background-color:#e5e5e5;height:20px;margin:20px 0 10px;position:relative;width:500px}.sync-media-progress-outer .progress-bar{background-color:#558b2f;height:20px;transition:width .25s;width:0}.sync-media-progress-notice{color:#dd2c00}.sync-media-resource{display:inline-block;width:100px}.sync-media-error{color:#dd2c00}.sync-count{font-weight:700}.sync-details{margin-top:10px}.sync .button.start-sync,.sync .button.stop-sync{display:none;padding:0 16px}.sync .button.start-sync .dashicons,.sync .button.stop-sync .dashicons{line-height:2.2}.sync .progress-text{display:inline-block;font-weight:700;padding:12px 4px 12px 12px}.sync .completed{display:none;max-width:300px}.sync-status-disabled{color:#dd2c00}.sync-status-enabled{color:#558b2f}.sync-status-button.button{vertical-align:baseline}.cloudinary-widget{height:100%}.cloudinary-widget-wrapper{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:150px;height:100%;overflow:hidden}.attachment-actions .button.edit-attachment,.attachment-info .edit-attachment{display:none}.setting.cld-overwrite input[type=checkbox]{margin-top:0}.global-transformations-preview{max-width:600px;position:relative}.global-transformations-spinner{display:none}.global-transformations-button.button-primary{display:none;position:absolute;z-index:100}.global-transformations-url{margin-bottom:5px;margin-top:5px}.global-transformations-url-transformation{color:#51a3ff;max-width:100px;overflow:hidden;text-overflow:ellipsis}.global-transformations-url-file{color:#f2d864}.global-transformations-url-link{background-color:#262c35;border-radius:6px;color:#fff;display:block;overflow:hidden;padding:16px;text-decoration:none;text-overflow:ellipsis}.global-transformations-url-link:hover{color:#888;text-decoration:underline}.cld-tax-order-list-item{background-color:#fff;border:1px solid #efefef;margin:0 0 -1px;padding:4px}.cld-tax-order-list-item.no-items{color:#888;display:none;text-align:center}.cld-tax-order-list-item.no-items:last-child{display:block}.cld-tax-order-list-item.ui-sortable-helper{box-shadow:0 2px 5px rgba(0,0,0,.2)}.cld-tax-order-list-item-placeholder{background-color:#efefef;height:45px;margin:0}.cld-tax-order-list-item-handle{color:#999;cursor:grab;margin-right:4px}.cld-tax-order-list-type{display:inline-block;margin-right:8px}.cld-tax-order-list-type input{margin-right:4px!important}.cloudinary-media-library{margin-left:-20px;position:relative}@media screen and (max-width:782px){.cloudinary-media-library{margin-left:-10px}}.cld-ui-suffix{background-color:#e8e8e8;border-radius:4px;color:#999;display:inline-block;font-family:Courier New,Courier,monospace;font-size:12px;font-weight:700;line-height:1.7em;margin-left:13px;padding:4px 6px}.cld-ui-preview .cld-ui-header{margin-top:-1px}.cld-ui-preview .cld-ui-header:first-child{margin-top:13px}.cld-ui-collapse{align-self:center;cursor:pointer;padding:0 .45rem}.cld-ui-title{font-size:12px}.cld-ui-title h2{font-size:15px;font-weight:700;margin:6px 0 1px}.cld-ui-title.collapsible{cursor:pointer}.cld-ui-conditional .closed,.cld-ui-wrap .closed{display:none}.cld-ui-wrap .description{color:rgba(0,0,1,.5);font-size:12px}.cld-ui-wrap .cloudname{font-style:italic}.cld-ui-wrap .button:not(.wp-color-result){background-color:#3448c5;border:0;border-radius:4px;color:#fff;display:inline-block;font-size:11px;font-weight:700;margin:0;min-height:28px;padding:5px 14px;text-decoration:none}.cld-ui-wrap .button:active,.cld-ui-wrap .button:hover{background-color:#1e337f}.cld-ui-wrap .button:focus{background-color:#3448c5;border-color:#3448c5;box-shadow:0 0 0 1px #fff,0 0 0 3px #3448c5}.cld-ui-wrap .button.button-small,.cld-ui-wrap .button.button-small:hover{font-size:11px;line-height:2.18181818;min-height:26px;padding:0 8px}.cld-ui-wrap .button.wp-color-result{border-color:#d0d0d0}.cld-ui-wrap .button.hidden{display:none}.cld-ui-error{color:#dd2c00}.cld-referrer-link{display:inline-block;margin:12px 0 0;text-decoration:none}.cld-referrer-link span{margin-right:5px}.cld-special-offer{background-color:#ff5050;border-radius:4px 4px 0 0;color:#fff;font-size:14px;font-weight:700;margin:2em 0 0;padding:5px 14px;text-decoration:none}.cld-settings{margin-left:-20px}.cld-page-tabs{background-color:#fff;border-bottom:1px solid #e5e5e5;display:none;flex-wrap:nowrap;justify-content:center;margin:-20px -18px 20px;padding:0!important}@media only screen and (max-width:1200px){.cld-page-tabs{display:flex}}.cld-page-tabs-tab{list-style:none;margin-bottom:0;text-indent:0;width:100%}.cld-page-tabs-tab button{background:transparent;border:0;color:#000001;cursor:pointer;display:block;font-weight:500;padding:1rem 2rem;text-align:center;white-space:nowrap;width:100%}.cld-page-tabs-tab button.is-active{border-bottom:2px solid #3448c5;color:#3448c5}.cld-page-header{align-items:center;background-color:#3448c5;display:flex;flex-direction:column;justify-content:space-between;margin-bottom:0;padding:16px}@media only screen and (min-width:783px){.cld-page-header{flex-direction:row}}.cld-page-header img{width:150px}.cld-page-header-button{background-color:#1e337f;border-radius:4px;color:#fff;display:inline-block;font-weight:700;margin:1em 0 0 9px;padding:5px 14px;text-decoration:none}@media only screen and (min-width:783px){.cld-page-header-button{margin-top:0}}.cld-page-header-button:focus,.cld-page-header-button:hover{color:#fff;text-decoration:none}.cld-page-header-logo{align-items:center;display:flex}.cld-page-header-logo .version{color:#fff;font-size:10px;margin-left:12px}.cld-page-header p{font-size:11px;margin:0}.cld-cron,.cld-info-box,.cld-panel,.cld-panel-short{background-color:#fff;border:1px solid #c6d1db;margin-top:13px;padding:23px 24px}.cld-panel.full-width,.full-width.cld-cron,.full-width.cld-info-box,.full-width.cld-panel-short{max-width:100%}.cld-panel.has-heading,.has-heading.cld-cron,.has-heading.cld-info-box,.has-heading.cld-panel-short{border-top:0;margin-top:0}.cld-panel-heading{display:flex;justify-content:space-between;padding:19px 23px;position:relative}.cld-panel-heading.full-width{max-width:100%}.cld-panel-heading img{margin-right:.6rem}.cld-panel-heading.collapsible{cursor:pointer;padding-right:1rem}.cld-panel-inner{background-color:hsla(0,0%,86%,.2);border:1px solid #e5e5e5;margin:1em 0;padding:1.3rem}.cld-panel-inner h2{color:#3273ab}.cld-cron hr,.cld-info-box hr,.cld-panel hr,.cld-panel-short hr{border-top:1px solid #e5e5e5;clear:both;margin:19px 0 20px}.cld-cron ul,.cld-info-box ul,.cld-panel ul,.cld-panel-short ul{list-style:initial;padding:0 3em}.cld-cron .stat-boxes,.cld-info-box .stat-boxes,.cld-panel .stat-boxes,.cld-panel-short .stat-boxes{border:1px solid #e5e5e5;font-size:1.2em}.cld-cron .stat-boxes .box,.cld-info-box .stat-boxes .box,.cld-panel .stat-boxes .box,.cld-panel-short .stat-boxes .box{border-bottom:1px solid #e5e5e5;padding:2rem;text-align:center}.cld-cron .stat-boxes .box:last-of-type,.cld-info-box .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type{border-bottom:none}.cld-cron .stat-boxes .box .cld-ui-icon,.cld-info-box .stat-boxes .box .cld-ui-icon,.cld-panel .stat-boxes .box .cld-ui-icon,.cld-panel-short .stat-boxes .box .cld-ui-icon{height:35px;width:35px}.cld-cron .stat-boxes .icon,.cld-info-box .stat-boxes .icon,.cld-panel .stat-boxes .icon,.cld-panel-short .stat-boxes .icon{height:50px;margin-right:.5em;width:50px}.cld-cron .stat-boxes h3,.cld-info-box .stat-boxes h3,.cld-panel .stat-boxes h3,.cld-panel-short .stat-boxes h3{margin-bottom:1.5rem;margin-top:2.4rem}.cld-cron .stat-boxes .limit,.cld-info-box .stat-boxes .limit,.cld-panel .stat-boxes .limit,.cld-panel-short .stat-boxes .limit{font-size:2em;font-weight:700;margin-right:.5em;white-space:nowrap}.cld-cron .stat-boxes .usage,.cld-info-box .stat-boxes .usage,.cld-panel .stat-boxes .usage,.cld-panel-short .stat-boxes .usage{color:#3273ab;font-size:1.5em;font-weight:400}@media only screen and (min-width:783px){.cld-cron .stat-boxes,.cld-info-box .stat-boxes,.cld-panel .stat-boxes,.cld-panel-short .stat-boxes{display:flex;flex-wrap:nowrap;font-size:1em}.cld-cron .stat-boxes .box,.cld-info-box .stat-boxes .box,.cld-panel .stat-boxes .box,.cld-panel-short .stat-boxes .box{border-bottom:none;border-right:1px solid #e5e5e5;flex-grow:1}.cld-cron .stat-boxes .box:last-of-type,.cld-info-box .stat-boxes .box:last-of-type,.cld-panel .stat-boxes .box:last-of-type,.cld-panel-short .stat-boxes .box:last-of-type{border-right:none}}@media only screen and (min-width:1200px){.cld-cron .stat-boxes,.cld-info-box .stat-boxes,.cld-panel .stat-boxes,.cld-panel-short .stat-boxes{font-size:1.2em}}.cld-cron .img-connection-string,.cld-info-box .img-connection-string,.cld-panel .img-connection-string,.cld-panel-short .img-connection-string{width:100%}.cld-cron .media-status-box,.cld-cron .stat-boxes,.cld-info-box .media-status-box,.cld-info-box .stat-boxes,.cld-panel .media-status-box,.cld-panel .stat-boxes,.cld-panel-short .media-status-box,.cld-panel-short .stat-boxes{border:1px solid #e5e5e5}.cld-cron .media-status-box,.cld-info-box .media-status-box,.cld-panel .media-status-box,.cld-panel-short .media-status-box{padding:2rem;text-align:center}.cld-cron .media-status-box .status,.cld-info-box .media-status-box .status,.cld-panel .media-status-box .status,.cld-panel-short .media-status-box .status{font-size:2rem;font-weight:700;margin-right:.5em}.cld-cron .media-status-box .cld-ui-icon,.cld-info-box .media-status-box .cld-ui-icon,.cld-panel .media-status-box .cld-ui-icon,.cld-panel-short .media-status-box .cld-ui-icon{height:35px;width:35px}.cld-cron .notification,.cld-info-box .notification,.cld-panel .notification,.cld-panel-short .notification{display:inline-flex;font-weight:700;padding:1.5rem}.cld-cron .notification-success,.cld-info-box .notification-success,.cld-panel .notification-success,.cld-panel-short .notification-success{background-color:rgba(32,184,50,.2);border:2px solid #20b832}.cld-cron .notification-success:before,.cld-info-box .notification-success:before,.cld-panel .notification-success:before,.cld-panel-short .notification-success:before{color:#20b832}.cld-cron .notification-syncing,.cld-info-box .notification-syncing,.cld-panel .notification-syncing,.cld-panel-short .notification-syncing{background-color:rgba(50,115,171,.2);border:2px solid #3273ab;color:#444;text-decoration:none}.cld-cron .notification-syncing:before,.cld-info-box .notification-syncing:before,.cld-panel .notification-syncing:before,.cld-panel-short .notification-syncing:before{-webkit-animation:spin 1s infinite running;-moz-animation:spin 1s linear infinite;animation:spin 1s linear infinite;color:#3273ab}@keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cld-cron .notification:before,.cld-info-box .notification:before,.cld-panel .notification:before,.cld-panel-short .notification:before{margin-right:.5em}.cld-cron .help-wrap,.cld-info-box .help-wrap,.cld-panel .help-wrap,.cld-panel-short .help-wrap{align-items:stretch;display:flex;flex-direction:row;flex-grow:1;justify-content:flex-start}@media only screen and (max-width:783px){.cld-cron .help-wrap,.cld-info-box .help-wrap,.cld-panel .help-wrap,.cld-panel-short .help-wrap{flex-direction:column;gap:20px}}.cld-cron .help-wrap .help-box .large-button,.cld-info-box .help-wrap .help-box .large-button,.cld-panel .help-wrap .help-box .large-button,.cld-panel-short .help-wrap .help-box .large-button{background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(0,0,0,.3);color:initial;display:block;height:100%;text-decoration:none}.cld-cron .help-wrap .help-box .large-button:hover,.cld-info-box .help-wrap .help-box .large-button:hover,.cld-panel .help-wrap .help-box .large-button:hover,.cld-panel-short .help-wrap .help-box .large-button:hover{background-color:#eaecfa;box-shadow:0 1px 8px 0 rgba(0,0,0,.5)}.cld-cron .help-wrap .help-box .large-button .cld-ui-wrap,.cld-info-box .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel .help-wrap .help-box .large-button .cld-ui-wrap,.cld-panel-short .help-wrap .help-box .large-button .cld-ui-wrap{padding-bottom:.5em}.cld-cron .help-wrap .help-box img,.cld-info-box .help-wrap .help-box img,.cld-panel .help-wrap .help-box img,.cld-panel-short .help-wrap .help-box img{border-radius:4px 4px 0 0;width:100%}.cld-cron .help-wrap .help-box div,.cld-cron .help-wrap .help-box h4,.cld-info-box .help-wrap .help-box div,.cld-info-box .help-wrap .help-box h4,.cld-panel .help-wrap .help-box div,.cld-panel .help-wrap .help-box h4,.cld-panel-short .help-wrap .help-box div,.cld-panel-short .help-wrap .help-box h4{padding:0 12px}.cld-panel-short{display:inline-block;min-width:270px;width:auto}.cld-info-box{align-items:stretch;border-radius:4px;display:flex;margin:0 0 19px;max-width:500px;padding:0}@media only screen and (min-width:783px){.cld-info-box{flex-direction:row}}.cld-info-box .cld-ui-title h2{font-size:15px;margin:0 0 6px}.cld-info-box .cld-info-icon{background-color:#eaecfa;border-radius:4px 0 0 4px;display:flex;justify-content:center;text-align:center;vertical-align:center;width:49px}.cld-info-box .cld-info-icon img{width:24px}.cld-info-box a.button,.cld-info-box img{align-self:center}.cld-info-box .cld-ui-body{display:inline-block;font-size:12px;line-height:normal;margin:0 auto;padding:12px 9px;width:100%}.cld-info-box-text{color:rgba(0,0,1,.5);font-size:12px}.cld-submit,.cld-switch-cloud{background-color:#fff;border:1px solid #c6d1db;border-top:0;padding:1.2rem 1.75rem}.cld-panel.closed+.cld-submit,.cld-panel.closed+.cld-switch-cloud,.closed.cld-cron+.cld-submit,.closed.cld-cron+.cld-switch-cloud,.closed.cld-info-box+.cld-submit,.closed.cld-info-box+.cld-switch-cloud,.closed.cld-panel-short+.cld-submit,.closed.cld-panel-short+.cld-switch-cloud{display:none}.cld-stat-percent{align-items:center;display:flex;justify-content:flex-start;line-height:1}.cld-stat-percent h2{color:#54c8db;font-size:48px;margin:0 12px 0 0}.cld-stat-percent-text{font-weight:700}.cld-stat-legend{display:flex;font-weight:700;margin:0 0 16px 12px;min-width:200px}.cld-stat-legend-dot{border-radius:50%;display:inline-block;height:20px;margin-right:6px;width:20px}.cld-stat-legend-dot.blue-dot{background-color:#2e49cd}.cld-stat-legend-dot.aqua-dot{background-color:#54c8db}.cld-stat-legend-dot.red-dot{background-color:#e12600}.cld-stat-text{font-weight:700;margin:.75em 0}.cld-stat-text.cld-link-button{margin:.75em 0}.cld-loading{background-image:url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3Bpbm5lciIgdmlld0JveD0iLTQgLTQgMTUxIDEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PCFbQ0RBVEFbCiAgICAgIEBrZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhGRjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OEZGOyB9CiAgICAgIH0KCiAgICAgIEBrZXlmcmFtZXMgZGFzaCB7CiAgICAgICAwJSB7IHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgIDUwJSB7CiAgICAgICAgICBzdHJva2UtZGFzaG9mZnNldDogMDsKICAgICAgIH0KICAgICAgIDEwMCUgeyAgIHN0cm9rZS1kYXNob2Zmc2V0OiA1NjA7IH0KICAgICAgfQogICAgICBALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzIHsKICAgICAgICAwJSB7IHN0cm9rZTogIzAwNzhmZjsgfQogICAgICAgICAgNTAlIHsgc3Ryb2tlOiAjMGUyZjVhOyB9CiAgICAgICAgICAxMDAlIHsgc3Ryb2tlOiAjMDA3OGZmOyB9CiAgICAgIH0KCiAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBkYXNoIHsKICAgICAgIDAlIHsgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsgfQogICAgICAgNTAlIHsKICAgICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgfQogICAgICAgMTAwJSB7ICAgc3Ryb2tlLWRhc2hvZmZzZXQ6IDU2MDsKICAgICAgIH0KICAgICAgfQogICAgICAucGF0aCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMjgwOwogICAgICAgIHN0cm9rZS1kYXNob2Zmc2V0OiAwOwogICAgICAgIHRyYW5zZm9ybS1vcmlnaW46IGNlbnRlcjsKICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjoKICAgICAgICAgIGRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsIGNvbG9ycyA4cyBlYXNlLWluLW91dCBpbmZpbml0ZTsKICAgICAgICBhbmltYXRpb246CiAgICAgICAgICBkYXNoIDJzIGVhc2UtaW4tb3V0IGluZmluaXRlLCBjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7CiAgICAgIH0KICAgIF1dPjwvc3R5bGU+CiAgPHBhdGggY2xhc3M9InBhdGgiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3Ryb2tlLXdpZHRoPSI5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K);background-position:50%;background-repeat:no-repeat;background-size:50px 50px;height:100px;width:auto}.cld-loading.tree-branch{background-position:25px;background-size:50px 50px}.cld-syncing{background:url(../css/images/loading.svg) no-repeat 50%;display:inline-block;height:20px;margin-left:12px;padding:4px;width:30px}.cld-dashboard-placeholder{align-content:center;align-items:center;background-color:#eff5f8;display:flex;flex-direction:column;justify-content:center;min-height:120px}.cld-dashboard-placeholder h4{margin:12px 0 0}.cld-chart-stat{padding-bottom:2em}.cld-chart-stat canvas{max-height:100%;max-width:100%}.cld-progress-circular{display:block;height:160px;margin:2em .5em 2em 0;position:relative;width:160px}.cld-progress-circular .progressbar-text{color:#222;font-size:1em;font-weight:bolder;left:50%;margin:0;padding:0;position:absolute;text-align:center;text-transform:capitalize;top:50%;transform:translate(-50%,-50%);width:100%}.cld-progress-circular .progressbar-text h2{font-size:48px;line-height:1;margin:0 0 .15em}.cld-progress-box{align-items:center;display:flex;justify-content:flex-start;margin:0 0 16px;width:100%}.cld-progress-box-title{font-size:15px;line-height:1.4;margin:12px 0 16px}.cld-progress-box-line{display:block;height:5px;min-width:1px;transition:width 2s;width:0}.cld-progress-box-line-value{font-weight:700;padding:0 0 0 8px;width:100px}.cld-progress-line{background-color:#c6d1db;display:block;height:3px;position:relative;width:100%}.cld-progress-header{font-weight:bolder}.cld-progress-header-titles{display:flex;font-size:12px;justify-content:space-between;margin-top:5px}.cld-progress-header-titles-left{color:#3448c5}.cld-progress-header-titles-right{color:#c6d1db;font-weight:400}.cld-line-stat{margin-bottom:15px}.cld-pagenav{color:#555;line-height:2.4em;margin-top:5px}.cld-pagenav-text{margin:0 2em}.cld-delete{color:#dd2c00;cursor:pointer;float:right}.cld-apply-action{float:right}.cld-table thead tr th.cld-table-th{line-height:1.8em}.cld-asset .cld-input-on-off{display:inline-block}.cld-asset .cld-input-label{display:inline-block;margin-bottom:0}.cld-asset-edit{align-items:flex-end;display:flex}.cld-asset-edit-button.button.button-primary{padding:3px 14px 4px}.cld-asset-preview-label{font-weight:bolder;margin-right:10px;width:100%}.cld-asset-preview-input{margin-top:6px;width:100%}.cld-link-button{background-color:#3448c5;border-radius:4px;display:inline-block;font-size:11px;font-weight:700;margin:0;padding:5px 14px}.cld-link-button,.cld-link-button:focus,.cld-link-button:hover{color:#fff;text-decoration:none}.cld-link-button.hidden{display:none}.cld-link-button-secondary{background-color:#c6d1db;border:1px solid #3448c5;color:rgba(0,0,1,.75)}.cld-link-button-secondary:focus,.cld-link-button-secondary:hover{background-color:#3448c5}.cld-link-button-secondary-error{border-color:#dd2c00}.cld-link-button-secondary-error:focus,.cld-link-button-secondary-error:hover{background-color:#dd2c00}.cld-tooltip{color:#999;font-size:12px;line-height:1.3em;margin:8px 0}.cld-tooltip .selected{color:rgba(0,0,1,.75)}.cld-notice-box{box-shadow:0 0 2px rgba(0,0,0,.1);margin-bottom:12px;margin-right:20px;position:relative}.cld-notice-box .cld-notice{padding:1rem 2.2rem .75rem 1.2rem}.cld-notice-box .cld-notice img.cld-ui-icon{height:100%}.cld-notice-box.is-dismissible{padding-right:38px}.cld-notice-box.has-icon{padding-left:38px}.cld-notice-box.is-created,.cld-notice-box.is-success,.cld-notice-box.is-updated{background-color:#ebf5ec;border-left:4px solid #42ad4f}.cld-notice-box.is-created .dashicons,.cld-notice-box.is-success .dashicons,.cld-notice-box.is-updated .dashicons{color:#2a0}.cld-notice-box.is-error{background-color:#f8e8e7;border-left:4px solid #cb3435}.cld-notice-box.is-error .dashicons{color:#dd2c00}.cld-notice-box.is-warning{background-color:#fff7e5;border-left:4px solid #f2ad4c}.cld-notice-box.is-warning .dashicons{color:#fd9d2c}.cld-notice-box.is-info{background-color:#e4f4f8;border-left:4px solid #2a95c3}.cld-notice-box.is-info .dashicons{color:#3273ab}.cld-notice-box.is-neutral{background-color:#fff;border-left:4px solid #ccd0d4}.cld-notice-box.is-neutral .dashicons{color:#90a0b3}.cld-notice-box.dismissed{overflow:hidden;transition:height .3s ease-out}.cld-notice-box .cld-ui-icon,.cld-notice-box .dashicons{left:19px;position:absolute;top:14px}.cld-connection-box{align-items:center;background-color:#303a47;border-radius:4px;color:#fff;display:flex;justify-content:space-around;max-width:500px;padding:20px 17px}.cld-connection-box h3{color:#fff;margin:0 0 5px}.cld-connection-box span{display:inline-block;padding:0 12px 0 0}.cld-connection-box .dashicons{font-size:30px;height:30px;margin:0;padding:0;width:30px}.cld-row{clear:both;display:flex;margin:0}.cld-row.align-center{align-items:center}@media only screen and (max-width:783px){.cld-row{flex-direction:column-reverse}}.cld-column{box-sizing:border-box;padding:0 0 0 13px;width:100%}.cld-column.column-min-w-50,.cld-column.column-video_settings{min-width:50%}@media only screen and (min-width:783px){.cld-column.column-45{width:45%}.cld-column.column-55{width:55%}.cld-column:last-child{padding-right:13px}}@media only screen and (max-width:783px){.cld-column{min-width:100%}.cld-column .cld-info-text{text-align:center}}@media only screen and (max-width:1200px){.cld-column.tabbed-content{display:none}.cld-column.tabbed-content.is-active{display:block}}.cld-column .cld-column{margin-right:16px;padding:0}.cld-column .cld-column:last-child{margin-left:auto;margin-right:0}.cld-center-column.cld-info-text{font-size:15px;font-weight:bolder;padding-left:2em}.cld-center-column.cld-info-text .description{font-size:12px;padding-top:8px}.cld-breakpoints-preview,.cld-image-preview,.cld-lazyload-preview,.cld-video-preview{border:1px solid #c6d1db;border-radius:4px;padding:9px}.cld-breakpoints-preview-wrapper,.cld-image-preview-wrapper,.cld-lazyload-preview-wrapper,.cld-video-preview-wrapper{position:relative}.cld-breakpoints-preview .cld-ui-title,.cld-image-preview .cld-ui-title,.cld-lazyload-preview .cld-ui-title,.cld-video-preview .cld-ui-title{font-weight:700;margin:5px 0 12px}.cld-breakpoints-preview img,.cld-image-preview img,.cld-lazyload-preview img,.cld-video-preview img{border-radius:4px;height:100%;width:100%}.cld.cld-ui-preview{max-width:322px}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .preview-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .preview-image{opacity:0}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image{opacity:1}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image img,.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image span,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image img,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image span{opacity:.4}.cld-breakpoints-preview .preview-image,.cld-lazyload-preview .preview-image{background-color:#222;border-radius:4px;bottom:0;box-shadow:2px -2px 3px rgba(0,0,0,.9);display:flex;left:0;position:absolute}.cld-breakpoints-preview .preview-image:hover,.cld-breakpoints-preview .preview-image:hover img,.cld-breakpoints-preview .preview-image:hover span,.cld-lazyload-preview .preview-image:hover,.cld-lazyload-preview .preview-image:hover img,.cld-lazyload-preview .preview-image:hover span{opacity:1!important}.cld-breakpoints-preview .preview-image.main-image,.cld-lazyload-preview .preview-image.main-image{box-shadow:none;position:relative}.cld-breakpoints-preview .preview-text,.cld-lazyload-preview .preview-text{background-color:#3448c5;color:#fff;padding:3px;position:absolute;right:0;text-shadow:0 0 3px #000;top:0}.cld-breakpoints-preview .global-transformations-url-link:hover,.cld-lazyload-preview .global-transformations-url-link:hover{color:#fff;text-decoration:none}.cld-lazyload-preview .progress-bar{background-color:#3448c5;height:2px;transition:width 1s;width:0}.cld-lazyload-preview .preview-image{background-color:#fff}.cld-lazyload-preview img{transition:opacity 1s}.cld-lazyload-preview .global-transformations-url-link{background-color:transparent}.cld-group .cld-group .cld-group{padding-left:4px}.cld-group .cld-group .cld-group hr{display:none}.cld-group-heading{display:flex;justify-content:space-between}.cld-group-heading h3{font-size:.9rem}.cld-group-heading h3 .description{font-size:.7rem;font-weight:400;margin-left:.7em}.cld-group .cld-ui-title-head{margin-bottom:1em}.cld-input{display:block;margin:0 0 23px;max-width:800px}.cld-input-label{display:block;margin-bottom:8px}.cld-input-label .cld-ui-title{font-size:14px;font-weight:700}.cld-input-label-link{color:#3448c5;font-size:12px;margin-left:8px}.cld-input-label-link:hover{color:#1e337f}.cld-input-radio-label{display:block}.cld-input-radio-label:not(:first-of-type){padding-top:8px}.cld-input .regular-number,.cld-input .regular-text{border:1px solid #d0d0d0;border-radius:3px;font-size:13px;padding:.1rem .5rem;width:100%}.cld-input .regular-number-small,.cld-input .regular-text-small{width:40%}.cld-input .regular-number{width:100px}.cld-input .regular-select{appearance:none;border:1px solid #d0d0d0;border-radius:3px;display:inline;font-size:13px;font-weight:600;min-width:150px;padding:2px 30px 2px 6px}.cld-input-on-off .description{color:inherit;font-size:13px;font-weight:600;margin:0}.cld-input-on-off .description.left{margin-left:0;margin-right:.4rem}.cld-input-on-off input[type=checkbox]~.spinner{background-size:12px 12px;float:none;height:12px;margin:2px;opacity:1;position:absolute;right:14px;top:0;transition:right .2s;visibility:visible;width:12px}.cld-input-on-off input[type=checkbox]:checked~.spinner{right:0}.cld-input-on-off-control{display:inline-block;height:16px;margin-right:.4rem;position:relative;width:30px}.cld-input-on-off-control input,.cld-input-on-off-control input:disabled{height:0;opacity:0;width:0}.cld-input-on-off-control-slider{background-color:#90a0b3;border-radius:10px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:background-color .3s}input:disabled+.cld-input-on-off-control-slider{opacity:.4;pointer-events:none}input:checked+.cld-input-on-off-control-slider{background-color:#3448c5!important}input:checked.partial+.cld-input-on-off-control-slider{background-color:#fd9d2c!important}input:checked.delete+.cld-input-on-off-control-slider{background-color:#dd2c00!important}.cld-input-on-off-control-slider:before{background-color:#fff;border-radius:50%;bottom:2px;content:"";display:block;height:12px;left:2px;position:absolute;transition:transform .2s;width:12px}input:checked+.cld-input-on-off-control-slider:before{transform:translateX(14px)}.mini input:checked+.cld-input-on-off-control-slider:before{transform:translateX(10px)}.cld-input-on-off-control.mini{height:10px;width:20px}.mini .cld-input-on-off-control-slider:before{bottom:1px;height:8px;left:1px;width:8px}.cld-input-icon-toggle{align-items:center;display:inline-flex}.cld-input-icon-toggle .description{margin:0 0 0 .4rem}.cld-input-icon-toggle .description.left{margin-left:0;margin-right:.4rem}.cld-input-icon-toggle-control{display:inline-block;position:relative}.cld-input-icon-toggle-control input{height:0;opacity:0;position:absolute;width:0}.cld-input-icon-toggle-control-slider .icon-on{display:none;visibility:hidden}.cld-input-icon-toggle-control-slider .icon-off,input:checked+.cld-input-icon-toggle-control-slider .icon-on{display:inline-block;visibility:visible}input:checked+.cld-input-icon-toggle-control-slider .icon-off{display:none;visibility:hidden}.cld-input-excluded-types div{display:flex}.cld-input-excluded-types .type{border:1px solid #c6d1db;border-radius:20px;display:flex;justify-content:space-between;margin-right:8px;min-width:50px;padding:3px 6px}.cld-input-excluded-types .dashicons{cursor:pointer}.cld-input-excluded-types .dashicons:hover{color:#dd2c00}.cld-input-tags{align-items:center;border:1px solid #d0d0d0;border-radius:3px;display:flex;flex-wrap:wrap;justify-content:flex-start;margin:5px 0 0;padding:2px 6px}.cld-input-tags-item{border:1px solid #c6d1db;border-radius:14px;box-shadow:inset -25px 0 0 #c6d1db;display:inline-flex;justify-content:space-between;margin:5px 6px 5px 0;opacity:1;overflow:hidden;padding:3px 4px 3px 8px;transition:opacity .25s,width .5s,margin .25s,padding .25s}.cld-input-tags-item-text{margin-right:8px}.cld-input-tags-item-delete{color:#90a0b3;cursor:pointer}.cld-input-tags-item-delete:hover{color:#3448c5}.cld-input-tags-item.pulse{animation:pulse-animation .5s infinite}.cld-input-tags-input{display:inline-block;min-width:100px;opacity:.4;overflow:visible;padding:10px 0;white-space:nowrap}.cld-input-tags-input:focus-visible{opacity:1;outline:none;padding:10px}@keyframes pulse-animation{0%{color:rgba(255,0,0,0)}50%{color:red}to{color:rgba(255,0,0,0)}}.cld-input-tags-input.pulse{animation:pulse-animation .5s infinite}.cld-input .prefixed{margin-left:6px;width:40%}.cld-input .suffixed{margin-right:6px;width:40%}.cld-input input::placeholder{color:#90a0b3}.cld-input .hidden{visibility:hidden}.cld-gallery-settings{box-sizing:border-box;display:flex;flex-wrap:wrap;padding:1rem 0;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings{margin-left:-1rem;margin-right:-1rem}}.cld-gallery-settings__column{box-sizing:border-box;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings__column{padding-left:1rem;padding-right:1rem;width:50%}}.cld-gallery-settings .components-color-palette__custom-color-button{border:none;border-radius:2px 2px 0 0;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);box-sizing:border-box;cursor:pointer;height:64px;outline:1px solid transparent;position:relative;width:100%}.cld-gallery-settings .components-color-palette__custom-color-text-wrapper{border-radius:0 0 2px 2px;box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.2),inset 1px 0 0 0 rgba(0,0,0,.2),inset -1px 0 0 0 rgba(0,0,0,.2);font-size:13px;padding:12px 16px;position:relative}.components-base-control__field select{display:block;margin:1rem 0}.components-range-control__wrapper{margin:0!important}.components-range-control__root{flex-direction:row-reverse;margin:1rem 0}.components-input-control.components-number-control.components-range-control__number{margin-left:0!important;margin-right:16px}.components-panel{border:0!important}.components-panel__body:first-child{border-top:0!important}.components-panel__body:last-child{border-bottom:0!important}.components-textarea-control__input{display:block;margin:.5rem 0;width:100%}.components-popover:not(.is-without-arrow):after,.components-popover:not(.is-without-arrow):before{content:none}table .cld-input{margin-bottom:0}tr .file-size.small{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px;margin-right:6px}td.tree{color:#212529;line-height:1.5;padding-top:0;position:relative}td.tree ul.striped>:nth-child(odd){background-color:#f6f7f7}td.tree ul.striped>:nth-child(2n){background-color:#fff}td.tree .success{color:#20b832}td+td.tree{padding-top:0}td.tree .cld-input{margin-bottom:0;vertical-align:text-bottom}td.tree .cld-search{font-size:.9em;height:26px;margin-right:12px;min-height:20px;padding:4px 6px;vertical-align:initial;width:300px}td.tree .file-size{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px}td.tree .fa-folder,td.tree .fa-folder-open{color:#007bff}td.tree .fa-html5{color:#f21f10}td.tree ul{list-style:none;margin:0;padding-left:5px}td.tree ul li{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding-bottom:5px;padding-left:25px;padding-top:5px;position:relative}td.tree ul li:before{height:1px;margin:auto;top:14px;width:20px}td.tree ul li:after,td.tree ul li:before{background-color:#666;content:"";left:0;position:absolute}td.tree ul li:after{bottom:0;height:100%;top:0;width:1px}td.tree ul li:after:nth-of-type(odd){background-color:#666}td.tree ul li:last-child:after{height:14px}td.tree ul a{cursor:pointer}td.tree ul a:hover{text-decoration:none}.cld-modal{align-content:center;align-items:center;background-color:rgba(0,0,0,.8);bottom:0;display:flex;flex-direction:row;flex-wrap:nowrap;left:0;opacity:0;position:fixed;right:0;top:0;transition:opacity .1s;visibility:hidden;z-index:10000}.cld-modal[data-cloudinary-only="1"] .modal-body,.cld-modal[data-cloudinary-only=true] .modal-body{display:none}.cld-modal[data-cloudinary-only="1"] [data-action=submit],.cld-modal[data-cloudinary-only=true] [data-action=submit]{cursor:not-allowed;opacity:.5;pointer-events:none}.cld-modal .warning{color:#dd2c00}.cld-modal .modal-header{margin-bottom:2em}.cld-modal .modal-uninstall{display:none}.cld-modal-box{background-color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;font-size:10.5px;font-weight:600;justify-content:space-between;margin:0 auto;max-width:80%;padding:25px;position:relative;transition:height 1s;width:500px}.cld-modal-box .modal-footer{align-items:stretch;display:flex;flex-direction:row;justify-content:flex-end}.cld-modal-box .more{display:none}.cld-modal-box input[type=radio]:checked~.more{color:#32373c;display:block;line-height:2;margin-left:2em;margin-top:.5em}.cld-modal-box input[type=radio]:checked{border:1px solid #3448c5}.cld-modal-box input[type=radio]:checked:before{background-color:#3448c5;border-radius:50%;content:"";height:.5rem;line-height:1.14285714;margin:.1875rem;width:.5rem}@media screen and (max-width:782px){.cld-modal-box input[type=radio]:checked:before{height:.5625rem;line-height:.76190476;margin:.4375rem;vertical-align:middle;width:.5625rem}}.cld-modal-box input[type=radio]:focus{border-color:#3448c5;box-shadow:0 0 0 1px #3448c5;outline:2px solid transparent}.cld-modal-box input[type=checkbox]~label{margin-left:.25em}.cld-modal-box input[type=email]{width:100%}.cld-modal-box textarea{font-size:inherit;resize:none;width:100%}.cld-modal-box ul{margin-bottom:21px}.cld-modal-box p{font-size:10.5px;margin:0 0 12px}.cld-modal-box .button:not(.button-link){background-color:#e9ecf9}.cld-modal-box .button{border:0;color:#000;font-size:9.5px;font-weight:700;margin:22px 0 0 10px;padding:4px 14px}.cld-modal-box .button.button-primary{background-color:#3448c5;color:#fff}.cld-modal-box .button.button-link{margin-left:0;margin-right:auto}.cld-modal-box .button.button-link:hover{background-color:transparent}.cld-optimisation{display:flex;font-size:12px;justify-content:space-between;line-height:2}.cld-optimisation:first-child{margin-top:7px}.cld-optimisation-item{color:#3448c5;font-weight:600}.cld-optimisation-item:hover{color:#1e337f}.cld-optimisation-item-active,.cld-optimisation-item-not-active{font-size:10px;font-weight:700}.cld-optimisation-item-active .dashicons,.cld-optimisation-item-not-active .dashicons{font-size:12px;line-height:2}.cld-optimisation-item-active{color:#2a0}.cld-optimisation-item-not-active{color:#c6d1db}.cld-ui-sidebar{width:100%}@media only screen and (min-width:783px){.cld-ui-sidebar{max-width:500px;min-width:400px;width:auto}}.cld-ui-sidebar .cld-cron,.cld-ui-sidebar .cld-info-box,.cld-ui-sidebar .cld-panel,.cld-ui-sidebar .cld-panel-short{padding:14px 18px}.cld-ui-sidebar .cld-ui-header{margin-top:-1px;padding:6px 14px}.cld-ui-sidebar .cld-ui-header:first-child{margin-top:13px}.cld-ui-sidebar .cld-ui-title h2{font-size:14px}.cld-ui-sidebar .cld-info-box{align-items:flex-start;border:0;margin:0;padding:0}.cld-ui-sidebar .cld-info-box .cld-ui-body{padding-top:0}.cld-ui-sidebar .cld-info-box .button{align-self:flex-start;cursor:default;line-height:inherit;opacity:.5}.cld-ui-sidebar .cld-info-icon{background-color:transparent}.cld-ui-sidebar .cld-info-icon img{width:40px}.cld-ui-sidebar .extension-item{border-bottom:1px solid #e5e5e5;border-radius:0;margin-bottom:18px}.cld-ui-sidebar .extension-item:last-of-type{border-bottom:none;margin-bottom:0}.cld-ui-sidebar .cld-ui-wrap .closed{border:none;display:flex;max-height:0;padding:0!important;visibility:hidden}.cld-plan{display:flex;flex-wrap:wrap}.cld-plan-item{display:flex;margin-bottom:25px;width:33%}.cld-plan-item img{margin-right:12px;width:24px}.cld-plan-item .description{font-size:12px}.cld-plan-item .cld-title{font-size:14px;font-weight:700}.cld-wizard{margin-left:auto;margin-right:auto;max-width:1100px}.cld-wizard-tabs{display:flex;flex-direction:row;font-size:15px;font-weight:600;width:50%}.cld-wizard-tabs-tab{align-items:center;display:flex;flex-direction:column;position:relative;width:33%}.cld-wizard-tabs-tab-count{align-items:center;background-color:rgba(52,72,197,.15);border:2px solid transparent;border-radius:50%;display:flex;height:32px;justify-content:center;width:32px}.active .cld-wizard-tabs-tab-count{border:2px solid #3448c5}.complete .cld-wizard-tabs-tab-count{background-color:#2a0;color:#2a0}.complete .cld-wizard-tabs-tab-count:before{color:#fff;content:"\f147";font-family:dashicons;font-size:30px;width:25px}.cld-wizard-tabs-tab.active{color:#3448c5}.cld-wizard-tabs-tab:after{border:1px solid rgba(52,72,197,.15);content:"";left:75%;position:absolute;top:16px;width:50%}.cld-wizard-tabs-tab.complete:after{border-color:#2a0}.cld-wizard-tabs-tab:last-child:after{display:none}.cld-wizard-intro{text-align:center}.cld-wizard-intro-welcome{border:2px solid #c6d1db;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0,0,0,.3);margin:27px auto;padding:19px;width:645px}.cld-wizard-intro-welcome img{width:100%}.cld-wizard-intro-welcome-info{background-color:#323a45;border-radius:0 0 4px 4px;color:#fff;display:flex;font-size:12px;margin:0 -19px -19px;padding:15px;text-align:left}.cld-wizard-intro-welcome-info img{margin-right:12px;width:25px}.cld-wizard-intro-welcome-info h2{color:#fff;font-size:14px}.cld-wizard-connect-connection{align-items:flex-end;display:flex;flex-direction:row;justify-content:flex-start}.cld-wizard-connect-connection-input{margin-right:10px;margin-top:20px;width:725px}.cld-wizard-connect-connection-input input{max-width:100%;width:100%}.cld-wizard-connect-status{align-items:center;border-radius:14px;display:none;font-weight:700;justify-content:space-between;margin-inline-start:1em;padding:5px 11px}.cld-wizard-connect-status.active{display:inline-flex}.cld-wizard-connect-status.success{background-color:#ccefc9;color:#2a0}.cld-wizard-connect-status.error{background-color:#f9cecd;color:#dd2c00}.cld-wizard-connect-status.working{background-color:#eaecfa;color:#1e337f;padding:5px}.cld-wizard-connect-status.working .spinner{margin:0;visibility:visible}.cld-wizard-connect-help{margin-top:50px}.cld-wizard-connect-help-image{border:1px solid #c6d1db;box-shadow:0 0 1em 1em rgba(0,0,0,.05);margin:2em;padding:1em}.cld-wizard-lock{cursor:pointer;display:flex}.cld-wizard-lock.hidden{display:none;height:0;width:0}.cld-wizard-lock .dashicons{color:#3448c5;font-size:25px;line-height:.7;margin-right:10px}.cld-wizard-optimize-settings.disabled{opacity:.4}.cld-wizard-complete{background-image:url(../css/images/confetti.png);background-position:50%;background-repeat:no-repeat;background-size:cover;margin:-23px;padding:98px;text-align:center}.cld-wizard-complete.hidden{display:none}.cld-wizard-complete.active{align-items:center;display:flex;flex-direction:column;justify-content:center;margin:-23px -24px;text-align:center}.cld-wizard-complete.active *{max-width:450px}.cld-wizard-complete-icons{display:flex;justify-content:center}.cld-wizard-complete-icons img{margin:30px 10px;width:70px}.cld-wizard-complete-icons .dashicons{background-color:#f1f1f1;border:4px solid #fff;border-radius:6px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);font-size:50px;height:70px;line-height:1.4;width:70px}.cld-wizard-complete-icons .dashicons-cloudinary{color:#3448c5;font-size:65px;line-height:.9}.cld-wizard-complete .cld-ui-title{margin-top:30px}.cld-wizard-complete .cld-ui-title h3{font-size:14px}.cld-wizard .cld-panel-heading{align-items:center}.cld-wizard .cld-ui-title{text-transform:none}.cld-wizard .cld-submit{align-items:center;display:flex;justify-content:space-between}.cld-wizard .cld-submit .button{margin-left:10px}.cld-import{display:none;height:100%;padding:0 10px;position:absolute;right:0;width:200px}.cld-import-item{align-items:center;display:flex;margin-top:10px;min-height:20px;opacity:0;transition:opacity .5s;white-space:nowrap}.cld-import-item .spinner{margin:0 6px 0 0;visibility:visible;width:24px}.cld-import-item-id{display:block;overflow:hidden;text-overflow:ellipsis}.cld-import-process{background-color:#fff;background-position:50%;border-radius:40px;float:none;opacity:1;padding:5px;visibility:visible}.media-library{margin-right:0;transition:margin-right .2s}.cld-sizes-preview{display:flex}.cld-sizes-preview .image-item{display:none;width:100%}.cld-sizes-preview .image-item img{max-width:100%}.cld-sizes-preview .image-item.show{align-content:space-between;display:flex;flex-direction:column;justify-content:space-around}.cld-sizes-preview .image-items{background-color:#e5e5e5;display:flex;padding:18px;width:100%}.cld-sizes-preview .image-preview-box{background-color:#90a0b3;background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:6px;height:100%;width:100%}.cld-sizes-preview input{color:#558b2f;margin-top:6px}.cld-sizes-preview input.invalid{border-color:#dd2c00;color:#dd2c00}.cld-crops{border-bottom:1px solid #e5e5e5;margin-bottom:6px;padding-bottom:6px}.cld-size-items-item{border:1px solid #e5e5e5;display:flex;flex-direction:column;margin-bottom:-1px;padding:8px}.cld-size-items-item .cld-ui-suffix{overflow:hidden;text-overflow:ellipsis;width:50%}.cld-size-items-item img{margin-bottom:8px;max-width:100%;object-fit:scale-down}.cld-size-items .crop-size-inputs{align-items:center;display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px;max-width:400px}.cld-size-items .cld-ui-input.regular-text{max-width:260px}.cld-size-items .cld-ui-input.regular-text[disabled]{background-color:#e5e5e5;opacity:.5}.cld-size-items .disable-toggle{margin:0}.cld-size-items .cld-input-on-off-control.medium{height:13px;margin-right:0;width:25px}.cld-size-items .cld-input-on-off-control.medium .cld-input-on-off-control-slider:before{bottom:2px;height:9px;left:2px;width:9px}.cld-size-items .cld-input-on-off-control.medium input:checked+.cld-input-on-off-control-slider:before{transform:translateX(12px)}.cld-size-items .cld-input-on-off-control-label{font-size:12px}.cld-size-items .button.clear-crop-input{align-items:center;background:transparent;border:none;box-shadow:none;color:#3448c5;cursor:pointer;display:inline-flex;font-size:14px;font-weight:600;gap:6px;margin-right:40px;padding:0}.cld-size-items .button.clear-crop-input svg{fill:currentColor;height:16px;width:16px}.cld-size-items .button.clear-crop-input:hover{background:transparent;opacity:.8}.cld-size-items .button.clear-crop-input:focus{box-shadow:none;outline:none}.cld-size-selector{border:1px solid #e5e5e5;border-radius:4px;display:flex;flex-wrap:nowrap;margin-bottom:42px;max-width:100%;overflow-x:scroll;padding:4px;scrollbar-width:thin;width:fit-content}.cld-size-selector-item{background-color:transparent;color:#333b4c;cursor:pointer;flex-shrink:0;font-weight:600;margin:0 3px -1px 0;padding:8px;white-space:nowrap}.cld-size-selector-item[data-selected]{background-color:rgba(52,72,197,.06);color:#3448c5}.cld-size-images{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:42px}.cld-cron{padding-block:13px;padding-inline:16px}.cld-cron h2,.cld-cron h4{margin:0}.cld-cron hr{margin-block:6px}.tippy-box[data-theme~=cloudinary]{background-color:rgba(0,0,0,.8);color:#fff;font-size:.8em}#poststuff .cld-info-box h2{font-weight:700;margin:0 0 6px;padding:0}.cloudinary-overwrite-transformations{padding:6px 0}.edit-overlay-grid{display:grid;gap:6px;grid-template-columns:repeat(3,30px);grid-template-rows:repeat(3,30px);margin-bottom:20px}.edit-overlay-grid__cell{align-items:center;background:#fff;border:1px solid #ccc;cursor:pointer;display:flex;height:30px;justify-content:center;width:30px}.edit-overlay-grid__cell:hover{opacity:.8}.edit-overlay-grid__cell--selected{border:2px solid #3448c5;position:relative}.edit-overlay-grid__cell--selected:after{color:#3448c5;content:"\2714";font-size:16px;position:absolute}.edit-overlay-range-input.regular-text{padding:0}.edit-overlay .cld-input-text{margin-bottom:0}.edit-overlay-offset{margin-bottom:20px}.edit-overlay-offset .suffixed{position:relative;top:5px;width:70%}.edit-overlay-offset .cld-input-text{margin-bottom:10px}.edit-overlay #edit-overlay-select-image-preview{margin-top:10px}.edit-overlay #edit-overlay-select-image-preview img{border:1px solid #ccc;height:auto;max-width:50%}.edit-overlay .cld-ui-wrap .button--remove{background-color:transparent;border:2px solid #dd2c00;color:#dd2c00}.edit-overlay .cld-ui-wrap .button--remove:hover{background-color:#c42700;color:#fff}.edit-overlay .cld-asset-edit-button.button-primary{margin-right:auto;padding:7px 14px}.edit-overlay .cld-ui-suffix{margin-inline-start:0}.edit-overlay .cld-ui-preview{box-sizing:border-box}@media only screen and (min-width:783px){.asset-edit-preview{align-self:flex-start;position:sticky;top:20px}}#asset-preview-transformation-string{background:#262c35;box-sizing:border-box;display:block;max-width:100%;overflow-wrap:normal;padding:10px;text-decoration:none;word-break:break-all}#asset-preview-transformation-string:hover span{text-decoration:underline}#asset-preview-transformation-string .string-preview-base{word-break:break-all}#asset-preview-transformation-string .string-preview-transformations{color:#fff}#asset-preview-transformation-string .string-preview-image-overlay{color:#51a3ff}#asset-preview-transformation-string .string-preview-text-overlay{color:#54c8db}#asset-preview-transformation-string .string-preview-public-id{color:#f2d864}#asset-preview-success-message{color:#558b2f}#asset-preview-success-message p{margin-bottom:0} 1 .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity;white-space:normal}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}@font-face{font-family:cloudinary;font-style:normal;font-weight:500;src:url(../css/fonts/cloudinary.d1a91c7f695026fd2097.eot);src:url(../css/fonts/cloudinary.d1a91c7f695026fd2097.eot#iefix) format("embedded-opentype"),url(../css/fonts/cloudinary.3b839e5145ad58edde01.woff) format("woff"),url(../css/fonts/cloudinary.d8de6736f15e12f71ac2.ttf) format("truetype"),url(../css/images/cloudinary.svg#cloudinary) format("svg")}.dashicons-cloudinary{speak:none;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.dashicons-cloudinary:before{content:"\e900";font-family:cloudinary,monospace!important}.dashicons-cloudinary-media:before{content:"\e905";font-family:cloudinary,monospace!important}.dashicons-cloudinary-dam:before{content:"\e906";font-family:cloudinary,monospace!important}.dashicons-cloudinary.success{color:#558b2f}.dashicons-cloudinary.error{color:#dd2c00}.dashicons-cloudinary.error:before{content:"\e901"}.dashicons-cloudinary.uploading{color:#fd9d2c}.dashicons-cloudinary.uploading:before{content:"\e902"}.dashicons-cloudinary.info{color:#0071ba}.dashicons-cloudinary.downloading:before{content:"\e903"}.dashicons-cloudinary.syncing:before{content:"\e904"}.dashicons-cloudinary.media:before{content:"\e905"}.dashicons-cloudinary.dam:before{content:"\e906"}.column-cld_status{width:5.5em}.column-cld_status .dashicons-cloudinary,.column-cld_status .dashicons-cloudinary-dam{display:inline-block}.column-cld_status .dashicons-cloudinary-dam:before,.column-cld_status .dashicons-cloudinary:before{font-size:1.8rem}.form-field .error-notice,.form-table .error-notice{color:#dd2c00;display:none}.form-field input.cld-field:invalid,.form-table input.cld-field:invalid{border-color:#dd2c00}.form-field input.cld-field:invalid+.error-notice,.form-table input.cld-field:invalid+.error-notice{display:inline-block}.cloudinary-welcome{background-image:url(../css/images/logo.svg);background-position:top 12px right 20px;background-repeat:no-repeat;background-size:153px}.cloudinary-stats{display:inline-block;margin-left:25px}.cloudinary-stat{cursor:help}.cloudinary-percent{color:#0071ba;font-size:.8em;vertical-align:top}.cld_transformations__icons{color:#333b4c;display:flex;gap:20px;margin-block:5px}.cld_transformations__icons:hover{color:#333b4c}.cld_transformations__icon{opacity:.5}.cld_transformations__icon--active{color:#0071ba;opacity:1}.cld_transformations__icon svg{height:18px;width:18px}.cld_transformations__icon svg path{fill:currentColor}.settings-image{max-width:100%;padding-top:5px}.settings-tabs>li{display:inline-block}.settings-tabs>li a{padding:.6em}.settings-tabs>li a.active{background-color:#fff}.settings-tab-section{max-width:1030px;padding:20px 0 0;position:relative}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard{align-content:flex-start;align-items:flex-start;display:flex;margin-top:40px}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-description{margin:0 auto 0 0;width:55%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content{margin:0 auto;width:35%}.settings-tab-section.cloudinary-welcome .settings-tab-section-fields-dashboard-content .dashicons{color:#9ea3a8}.settings-tab-section.cloudinary-welcome .settings-tab-section-card{margin-top:0}.settings-tab-section-fields .field-heading th{color:#23282d;display:block;font-size:1.1em;margin:1em 0;width:auto}.settings-tab-section-fields .field-heading td{display:none;visibility:hidden}.settings-tab-section-fields .regular-textarea{height:60px;width:100%}.settings-tab-section-fields .dashicons{text-decoration:none;vertical-align:middle}.settings-tab-section-fields a .dashicons{color:#5f5f5f}.settings-tab-section-fields-dashboard-error{color:#5f5f5f;font-size:1.2em}.settings-tab-section-fields-dashboard-error.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-error .dashicons{color:#ac0000}.settings-tab-section-fields-dashboard-error .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success{color:#23282d;font-size:1.2em}.settings-tab-section-fields-dashboard-success.expanded{margin-bottom:25px;padding-top:40px}.settings-tab-section-fields-dashboard-success .dashicons{color:#4fb651}.settings-tab-section-fields-dashboard-success .button{font-size:1.1em;height:40px;line-height:40px;padding-left:40px;padding-right:40px}.settings-tab-section-fields-dashboard-success .description{color:#5f5f5f;font-weight:400;margin-top:12px}.settings-tab-section-card{background-color:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px 0 rgba(0,0,0,.07);box-sizing:border-box;margin-top:12px;padding:20px 23px}.settings-tab-section-card .dashicons{font-size:1.4em}.settings-tab-section-card h2{font-size:1.8em;font-weight:400;margin-top:0}.settings-tab-section-card.pull-right{float:right;padding:12px;position:relative;width:450px;z-index:10}.settings-tab-section-card.pull-right img.settings-image{border:1px solid #979797;box-shadow:0 2px 4px 0 rgba(0,0,0,.5);margin-top:12px}.settings-tab-section-card.pull-right h3,.settings-tab-section-card.pull-right h4{margin-top:0}.settings-tab-section .field-row-cloudinary_url,.settings-tab-section .field-row-signup{display:block}.settings-tab-section .field-row-cloudinary_url td,.settings-tab-section .field-row-cloudinary_url th,.settings-tab-section .field-row-signup td,.settings-tab-section .field-row-signup th{display:block;padding:10px 0 0;width:auto}.settings-tab-section .field-row-cloudinary_url td .sign-up,.settings-tab-section .field-row-cloudinary_url th .sign-up,.settings-tab-section .field-row-signup td .sign-up,.settings-tab-section .field-row-signup th .sign-up{vertical-align:baseline}.settings-tab-section.connect .form-table{display:inline-block;max-width:580px;width:auto}.settings-valid{color:#558b2f;font-size:30px}.settings-valid-field{border-color:#558b2f!important}.settings-invalid-field{border-color:#dd2c00!important}.settings-alert{box-shadow:0 1px 1px rgba(0,0,0,.04);display:inline-block;padding:5px 7px}.settings-alert-info{background-color:#e9faff;border:1px solid #ccd0d4;border-left:4px solid #00a0d2}.settings-alert-warning{background-color:#fff5e9;border:1px solid #f6e7b6;border-left:4px solid #e3be38}.settings-alert-error{background-color:#ffe9e9;border:1px solid #d4cccc;border-left:4px solid #d20000}.field-radio input[type=radio].cld-field{margin:0 5px 0 0}.field-radio label{margin-right:10px}.settings-tab-section h2{margin:0}.cloudinary-collapsible{background-color:#fff;border:1px solid #ccd0d4;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;margin:20px 0;padding:10px;width:95%}.cloudinary-collapsible__toggle{cursor:pointer;display:flex}.cloudinary-collapsible__toggle h2{margin:0!important}.cloudinary-collapsible__toggle button{background-color:inherit;border:none;cursor:pointer;margin:0 0 0 auto;padding:0;width:auto}.cloudinary-collapsible__toggle .cld-ui-icon{margin-right:6px;width:24px}.cloudinary-collapsible__content .cld-ui-title{margin:3em 0 1em}.cloudinary-collapsible__content .cld-more-details{margin-top:2em}.sync .spinner{display:inline-block;float:none;margin:0 5px 0 0;visibility:visible}.sync-media,.sync-media-progress{display:none}.sync-media-progress-outer{background-color:#e5e5e5;height:20px;margin:20px 0 10px;position:relative;width:500px}.sync-media-progress-outer .progress-bar{background-color:#558b2f;height:20px;transition:width .25s;width:0}.sync-media-progress-notice{color:#dd2c00}.sync-media-resource{display:inline-block;width:100px}.sync-media-error{color:#dd2c00}.sync-count{font-weight:700}.sync-details{margin-top:10px}.sync .button.start-sync,.sync .button.stop-sync{display:none;padding:0 16px}.sync .button.start-sync .dashicons,.sync .button.stop-sync .dashicons{line-height:2.2}.sync .progress-text{display:inline-block;font-weight:700;padding:12px 4px 12px 12px}.sync .completed{display:none;max-width:300px}.sync-status-disabled{color:#dd2c00}.sync-status-enabled{color:#558b2f}.sync-status-button.button{vertical-align:baseline}.cloudinary-widget{height:100%}.cloudinary-widget-wrapper{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJzcGlubmVyIiB2aWV3Qm94PSItNCAtNCAxNTEgMTAwIj48c3R5bGU+QGtleWZyYW1lcyBjb2xvcnN7MCUsdG97c3Ryb2tlOiMwMDc4ZmZ9NTAle3N0cm9rZTojMGUyZjVhfX1Aa2V5ZnJhbWVzIGRhc2h7MCUsdG97c3Ryb2tlLWRhc2hvZmZzZXQ6NTYwfTUwJXtzdHJva2UtZGFzaG9mZnNldDowfX1ALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzezAlLHRve3N0cm9rZTojMDA3OGZmfTUwJXtzdHJva2U6IzBlMmY1YX19QC13ZWJraXQta2V5ZnJhbWVzIGRhc2h7MCUsdG97c3Ryb2tlLWRhc2hvZmZzZXQ6NTYwfTUwJXtzdHJva2UtZGFzaG9mZnNldDowfX08L3N0eWxlPjxwYXRoIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2Utd2lkdGg9IjkiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3R5bGU9InN0cm9rZS1kYXNoYXJyYXk6MjgwO3N0cm9rZS1kYXNob2Zmc2V0OjA7dHJhbnNmb3JtLW9yaWdpbjpjZW50ZXI7LXdlYmtpdC1hbmltYXRpb246ZGFzaCAycyBlYXNlLWluLW91dCBpbmZpbml0ZSxjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7YW5pbWF0aW9uOmRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsY29sb3JzIDhzIGVhc2UtaW4tb3V0IGluZmluaXRlIi8+PC9zdmc+);background-position:50%;background-repeat:no-repeat;background-size:150px;height:100%;overflow:hidden}.attachment-actions .button.edit-attachment,.attachment-info .edit-attachment{display:none}.setting.cld-overwrite input[type=checkbox]{margin-top:0}.global-transformations-preview{max-width:600px;position:relative}.global-transformations-spinner{display:none}.global-transformations-button.button-primary{display:none;position:absolute;z-index:100}.global-transformations-url{margin-bottom:5px;margin-top:5px}.global-transformations-url-transformation{color:#51a3ff;max-width:100px;overflow:hidden;text-overflow:ellipsis}.global-transformations-url-file{color:#f2d864}.global-transformations-url-link{background-color:#262c35;border-radius:6px;color:#fff;display:block;overflow:hidden;padding:16px;text-decoration:none;text-overflow:ellipsis}.global-transformations-url-link:hover{color:#888;text-decoration:underline}.cld-tax-order-list-item{background-color:#fff;border:1px solid #efefef;margin:0 0 -1px;padding:4px}.cld-tax-order-list-item.no-items{color:#888;display:none;text-align:center}.cld-tax-order-list-item.no-items:last-child{display:block}.cld-tax-order-list-item.ui-sortable-helper{box-shadow:0 2px 5px rgba(0,0,0,.2)}.cld-tax-order-list-item-placeholder{background-color:#efefef;height:45px;margin:0}.cld-tax-order-list-item-handle{color:#999;cursor:grab;margin-right:4px}.cld-tax-order-list-type{display:inline-block;margin-right:8px}.cld-tax-order-list-type input{margin-right:4px!important}.cloudinary-media-library{margin-left:-20px;position:relative}@media screen and (max-width:782px){.cloudinary-media-library{margin-left:-10px}}.cld-ui-suffix{background-color:#e8e8e8;border-radius:4px;color:#999;display:inline-block;font-family:Courier New,Courier,monospace;font-size:12px;font-weight:700;line-height:1.7em;margin-left:13px;padding:4px 6px}.cld-ui-preview .cld-ui-header{margin-top:-1px}.cld-ui-preview .cld-ui-header:first-child{margin-top:13px}.cld-ui-collapse{align-self:center;cursor:pointer;padding:0 .45rem}.cld-ui-title{font-size:12px}.cld-ui-title h2{font-size:15px;font-weight:700;margin:6px 0 1px}.cld-ui-title.collapsible{cursor:pointer}.cld-ui-conditional .closed,.cld-ui-wrap .closed{display:none}.cld-ui-wrap .description{color:rgba(0,0,1,.5);font-size:12px}.cld-ui-wrap .cloudname{font-style:italic}.cld-ui-wrap .button:not(.wp-color-result){background-color:#3448c5;border:0;border-radius:4px;color:#fff;display:inline-block;font-size:11px;font-weight:700;margin:0;min-height:28px;padding:5px 14px;text-decoration:none}.cld-ui-wrap .button:active,.cld-ui-wrap .button:hover{background-color:#1e337f}.cld-ui-wrap .button:focus{background-color:#3448c5;border-color:#3448c5;box-shadow:0 0 0 1px #fff,0 0 0 3px #3448c5}.cld-ui-wrap .button.button-small,.cld-ui-wrap .button.button-small:hover{font-size:11px;line-height:2.18181818;min-height:26px;padding:0 8px}.cld-ui-wrap .button.wp-color-result{border-color:#d0d0d0}.cld-ui-wrap .button.hidden{display:none}.cld-ui-error{color:#dd2c00}.cld-referrer-link{display:inline-block;margin:12px 0 0;text-decoration:none}.cld-referrer-link span{margin-right:5px}.cld-special-offer{background-color:#ff5050;border-radius:4px 4px 0 0;color:#fff;font-size:14px;font-weight:700;margin:2em 0 0;padding:5px 14px;text-decoration:none}.cld-row{clear:both;display:flex;margin:0}.cld-row.align-center{align-items:center}@media only screen and (max-width:783px){.cld-row{flex-direction:column-reverse}}.cld-column{box-sizing:border-box;padding:0 0 0 13px;width:100%}.cld-column.column-min-w-50,.cld-column.column-video_settings{min-width:50%}@media only screen and (min-width:783px){.cld-column.column-45{width:45%}.cld-column.column-55{width:55%}.cld-column:last-child{padding-right:13px}}@media only screen and (max-width:783px){.cld-column{min-width:100%}.cld-column .cld-info-text{text-align:center}}@media only screen and (max-width:1200px){.cld-column.tabbed-content{display:none}.cld-column.tabbed-content.is-active{display:block}}.cld-column .cld-column{margin-right:16px;padding:0}.cld-column .cld-column:last-child{margin-left:auto;margin-right:0}.cld-center-column.cld-info-text{font-size:15px;font-weight:bolder;padding-left:2em}.cld-center-column.cld-info-text .description{font-size:12px;padding-top:8px}.cld-settings{margin-left:-20px}.cld-page-header{align-items:center;background-color:#3448c5;display:flex;flex-direction:column;justify-content:space-between;margin-bottom:0;padding:16px}@media only screen and (min-width:783px){.cld-page-header{flex-direction:row}}.cld-page-header img{width:150px}.cld-page-header-button{background-color:#1e337f;border-radius:4px;color:#fff;display:inline-block;font-weight:700;margin:1em 0 0 9px;padding:5px 14px;text-decoration:none}@media only screen and (min-width:783px){.cld-page-header-button{margin-top:0}}.cld-page-header-button:focus,.cld-page-header-button:hover{color:#fff;text-decoration:none}.cld-page-header-logo{align-items:center;display:flex}.cld-page-header-logo .version{color:#fff;font-size:10px;margin-left:12px}.cld-page-header p{font-size:11px;margin:0}.cld-page-tabs{background-color:#fff;border-bottom:1px solid #e5e5e5;display:none;flex-wrap:nowrap;justify-content:center;margin:-20px -18px 20px;padding:0!important}@media only screen and (max-width:1200px){.cld-page-tabs{display:flex}}.cld-page-tabs-tab{list-style:none;margin-bottom:0;text-indent:0;width:100%}.cld-page-tabs-tab button{background:transparent;border:0;color:#000001;cursor:pointer;display:block;font-weight:500;padding:1rem 2rem;text-align:center;white-space:nowrap;width:100%}.cld-page-tabs-tab button.is-active{border-bottom:2px solid #3448c5;color:#3448c5}.cld-panel{background-color:#fff;border:1px solid #c6d1db}.cld-panel.full-width{max-width:100%}.cld-panel{margin-top:13px;padding:23px 24px}.cld-panel.has-heading{border-top:0;margin-top:0}.cld-panel-heading{display:flex;justify-content:space-between;padding:19px 23px;position:relative}.cld-panel-heading.full-width{max-width:100%}.cld-panel-heading img{margin-right:.6rem}.cld-panel-heading.collapsible{cursor:pointer;padding-right:1rem}.cld-panel-inner{background-color:hsla(0,0%,86%,.2);border:1px solid #e5e5e5;margin:1em 0;padding:1.3rem}.cld-panel-inner h2{color:#3273ab}.cld-panel hr{border-top:1px solid #e5e5e5;clear:both;margin:19px 0 20px}.cld-panel .help-wrap{align-items:stretch;display:flex;flex-direction:row;flex-grow:1;justify-content:flex-start}@media only screen and (max-width:783px){.cld-panel .help-wrap{flex-direction:column;gap:20px}}.cld-panel .help-wrap .help-box .large-button{background:#fff;border-radius:4px;box-shadow:0 1px 8px 0 rgba(0,0,0,.3);color:initial;display:block;height:100%;text-decoration:none}.cld-panel .help-wrap .help-box .large-button:hover{background-color:#eaecfa;box-shadow:0 1px 8px 0 rgba(0,0,0,.5)}.cld-panel .help-wrap .help-box .large-button .cld-ui-wrap{padding-bottom:.5em}.cld-panel .help-wrap .help-box img{border-radius:4px 4px 0 0;width:100%}.cld-panel .help-wrap .help-box div,.cld-panel .help-wrap .help-box h4{padding:0 12px}.cld-panel ul{list-style:initial;padding:0 3em}.cld-panel .stat-boxes{border:1px solid #e5e5e5;font-size:1.2em}.cld-panel .stat-boxes .box{border-bottom:1px solid #e5e5e5;padding:2rem;text-align:center}.cld-panel .stat-boxes .box:last-of-type{border-bottom:none}.cld-panel .stat-boxes .box .cld-ui-icon{height:35px;width:35px}.cld-panel .stat-boxes .icon{height:50px;margin-right:.5em;width:50px}.cld-panel .stat-boxes h3{margin-bottom:1.5rem;margin-top:2.4rem}.cld-panel .stat-boxes .limit{font-size:2em;font-weight:700;margin-right:.5em;white-space:nowrap}.cld-panel .stat-boxes .usage{color:#3273ab;font-size:1.5em;font-weight:400}@media only screen and (min-width:783px){.cld-panel .stat-boxes{display:flex;flex-wrap:nowrap;font-size:1em}.cld-panel .stat-boxes .box{border-bottom:none;border-right:1px solid #e5e5e5;flex-grow:1}.cld-panel .stat-boxes .box:last-of-type{border-right:none}}@media only screen and (min-width:1200px){.cld-panel .stat-boxes{font-size:1.2em}}.cld-panel .img-connection-string{width:100%}.cld-panel .media-status-box,.cld-panel .stat-boxes{border:1px solid #e5e5e5}.cld-panel .media-status-box{padding:2rem;text-align:center}.cld-panel .media-status-box .status{font-size:2rem;font-weight:700;margin-right:.5em}.cld-panel .media-status-box .cld-ui-icon{height:35px;width:35px}.cld-panel .notification{display:inline-flex;font-weight:700;padding:1.5rem}.cld-panel .notification-success{background-color:rgba(32,184,50,.2);border:2px solid #20b832}.cld-panel .notification-success:before{color:#20b832}.cld-panel .notification-syncing{background-color:rgba(50,115,171,.2);border:2px solid #3273ab;color:#444;text-decoration:none}.cld-panel .notification-syncing:before{-webkit-animation:spin 1s infinite running;-moz-animation:spin 1s linear infinite;animation:spin 1s linear infinite;color:#3273ab}@keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cld-panel .notification:before{margin-right:.5em}.cld-panel-short{display:inline-block;min-width:270px;width:auto}.cld-info-box,.cld-panel-short{background-color:#fff;border:1px solid #c6d1db}.cld-info-box{align-items:stretch;border-radius:4px;display:flex;margin:0 0 19px;max-width:500px;padding:0}@media only screen and (min-width:783px){.cld-info-box{flex-direction:row}}.cld-info-box .cld-ui-title h2{font-size:15px;margin:0 0 6px}.cld-info-box .cld-info-icon{background-color:#eaecfa;border-radius:4px 0 0 4px;display:flex;justify-content:center;text-align:center;vertical-align:center;width:49px}.cld-info-box .cld-info-icon img{width:24px}.cld-info-box a.button,.cld-info-box img{align-self:center}.cld-info-box .cld-ui-body{display:inline-block;font-size:12px;line-height:normal;margin:0 auto;padding:12px 9px;width:100%}.cld-info-box-text{color:rgba(0,0,1,.5);font-size:12px}.cld-submit,.cld-switch-cloud{background-color:#fff;border:1px solid #c6d1db;border-top:0;padding:1.2rem 1.75rem}.cld-panel.closed+.cld-submit,.cld-panel.closed+.cld-switch-cloud{display:none}.cld-stat-percent{align-items:center;display:flex;justify-content:flex-start;line-height:1}.cld-stat-percent h2{color:#54c8db;font-size:48px;margin:0 12px 0 0}.cld-stat-percent-text{font-weight:700}.cld-stat-legend{display:flex;font-weight:700;margin:0 0 16px 12px;min-width:200px}.cld-stat-legend-dot{border-radius:50%;display:inline-block;height:20px;margin-right:6px;width:20px}.cld-stat-legend-dot.blue-dot{background-color:#2e49cd}.cld-stat-legend-dot.aqua-dot{background-color:#54c8db}.cld-stat-legend-dot.red-dot{background-color:#e12600}.cld-stat-text{font-weight:700;margin:.75em 0}.cld-stat-text.cld-link-button{margin:.75em 0}.cld-loading{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJzcGlubmVyIiB2aWV3Qm94PSItNCAtNCAxNTEgMTAwIj48c3R5bGU+QGtleWZyYW1lcyBjb2xvcnN7MCUsdG97c3Ryb2tlOiMwMDc4ZmZ9NTAle3N0cm9rZTojMGUyZjVhfX1Aa2V5ZnJhbWVzIGRhc2h7MCUsdG97c3Ryb2tlLWRhc2hvZmZzZXQ6NTYwfTUwJXtzdHJva2UtZGFzaG9mZnNldDowfX1ALXdlYmtpdC1rZXlmcmFtZXMgY29sb3JzezAlLHRve3N0cm9rZTojMDA3OGZmfTUwJXtzdHJva2U6IzBlMmY1YX19QC13ZWJraXQta2V5ZnJhbWVzIGRhc2h7MCUsdG97c3Ryb2tlLWRhc2hvZmZzZXQ6NTYwfTUwJXtzdHJva2UtZGFzaG9mZnNldDowfX08L3N0eWxlPjxwYXRoIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2Utd2lkdGg9IjkiIGQ9Ik0xMjEuNjYzIDkwLjYzOGMtMS43OTYgMC05OS4zMy0uNDk4LTEwMS40NzQtMS40NzhDOC42ODUgODMuODc3IDEuMjUgNzIuMTk2IDEuMjUgNTkuMzk2YzAtMTYuNjU2IDEyLjc5Ny0zMC42MSAyOS4wNTItMzIuMzIzIDcuNDktMTUuNzA2IDIzLjE4Ni0yNS43MDcgNDAuNzE0LTI1LjcwNyAyMC45OCAwIDM5LjIxNSAxNC43NTIgNDMuOTQ1IDM0LjkwNyAxNS4wOS4yNDUgMjcuMjkgMTIuNjMgMjcuMjkgMjcuODIyIDAgMTEuOTY4LTcuNzM4IDIyLjU1LTE5LjI1NiAyNi4zMyIgc3R5bGU9InN0cm9rZS1kYXNoYXJyYXk6MjgwO3N0cm9rZS1kYXNob2Zmc2V0OjA7dHJhbnNmb3JtLW9yaWdpbjpjZW50ZXI7LXdlYmtpdC1hbmltYXRpb246ZGFzaCAycyBlYXNlLWluLW91dCBpbmZpbml0ZSxjb2xvcnMgOHMgZWFzZS1pbi1vdXQgaW5maW5pdGU7YW5pbWF0aW9uOmRhc2ggMnMgZWFzZS1pbi1vdXQgaW5maW5pdGUsY29sb3JzIDhzIGVhc2UtaW4tb3V0IGluZmluaXRlIi8+PC9zdmc+);background-position:50%;background-repeat:no-repeat;background-size:50px 50px;height:100px;width:auto}.cld-loading.tree-branch{background-position:25px;background-size:50px 50px}.cld-syncing{background:url(../css/images/loading.svg) no-repeat 50%;display:inline-block;height:20px;margin-left:12px;padding:4px;width:30px}.cld-dashboard-placeholder{align-content:center;align-items:center;background-color:#eff5f8;display:flex;flex-direction:column;justify-content:center;min-height:120px}.cld-dashboard-placeholder h4{margin:12px 0 0}.cld-optimisation:first-child{margin-top:7px}.cld-optimisation{display:flex;font-size:12px;justify-content:space-between;line-height:2}.cld-optimisation-item{color:#3448c5;font-weight:600}.cld-optimisation-item:hover{color:#1e337f}.cld-optimisation-item-active,.cld-optimisation-item-not-active{font-size:10px;font-weight:700}.cld-optimisation-item-active .dashicons,.cld-optimisation-item-not-active .dashicons{font-size:12px;line-height:2}.cld-optimisation-item-active{color:#2a0}.cld-optimisation-item-not-active{color:#c6d1db}.cld-ui-sidebar{width:100%}@media only screen and (min-width:783px){.cld-ui-sidebar{max-width:500px;min-width:400px;width:auto}}.cld-ui-sidebar .cld-panel{padding:14px 18px}.cld-ui-sidebar .cld-ui-header{margin-top:-1px;padding:6px 14px}.cld-ui-sidebar .cld-ui-header:first-child{margin-top:13px}.cld-ui-sidebar .cld-ui-title h2{font-size:14px}.cld-ui-sidebar .cld-info-box{align-items:flex-start;border:0;margin:0;padding:0}.cld-ui-sidebar .cld-info-box .cld-ui-body{padding-top:0}.cld-ui-sidebar .cld-info-box .button{align-self:flex-start;cursor:default;line-height:inherit;opacity:.5}.cld-ui-sidebar .cld-info-icon{background-color:transparent}.cld-ui-sidebar .cld-info-icon img{width:40px}.cld-ui-sidebar .extension-item{border-bottom:1px solid #e5e5e5;border-radius:0;margin-bottom:18px}.cld-ui-sidebar .extension-item:last-of-type{border-bottom:none;margin-bottom:0}.cld-ui-sidebar .cld-ui-wrap .closed{border:none;display:flex;max-height:0;padding:0!important;visibility:hidden}.cld-chart-stat{padding-bottom:2em}.cld-chart-stat canvas{max-height:100%;max-width:100%}.cld-progress-circular{display:block;height:160px;margin:2em .5em 2em 0;position:relative;width:160px}.cld-progress-circular .progressbar-text{color:#222;font-size:1em;font-weight:bolder;left:50%;margin:0;padding:0;position:absolute;text-align:center;text-transform:capitalize;top:50%;transform:translate(-50%,-50%);width:100%}.cld-progress-circular .progressbar-text h2{font-size:48px;line-height:1;margin:0 0 .15em}.cld-progress-box{align-items:center;display:flex;justify-content:flex-start;margin:0 0 16px;width:100%}.cld-progress-box-title{font-size:15px;line-height:1.4;margin:12px 0 16px}.cld-progress-box-line{display:block;height:5px;min-width:1px;transition:width 2s;width:0}.cld-progress-box-line-value{font-weight:700;padding:0 0 0 8px;width:100px}.cld-progress-line{background-color:#c6d1db;display:block;height:3px;position:relative;width:100%}.cld-progress-header{font-weight:bolder}.cld-progress-header-titles{display:flex;font-size:12px;justify-content:space-between;margin-top:5px}.cld-progress-header-titles-left{color:#3448c5}.cld-progress-header-titles-right{color:#c6d1db;font-weight:400}.cld-line-stat{margin-bottom:15px}.cld-pagenav{color:#555;line-height:2.4em;margin-top:5px}.cld-pagenav-text{margin:0 2em}.cld-delete{color:#dd2c00;cursor:pointer;float:right}.cld-apply-action{float:right}.cld-table thead tr th.cld-table-th{line-height:1.8em}.cld-asset .cld-input-on-off{display:inline-block}.cld-asset .cld-input-label{display:inline-block;margin-bottom:0}.cld-asset-edit{align-items:flex-end;display:flex}.cld-asset-edit-button.button.button-primary{padding:3px 14px 4px}.cld-asset-preview-label{font-weight:bolder;margin-right:10px;width:100%}.cld-asset-preview-input{margin-top:6px;width:100%}.cld-link-button{background-color:#3448c5;border-radius:4px;display:inline-block;font-size:11px;font-weight:700;margin:0;padding:5px 14px}.cld-link-button,.cld-link-button:focus,.cld-link-button:hover{color:#fff;text-decoration:none}.cld-link-button.hidden{display:none}.cld-link-button-secondary{background-color:#c6d1db;border:1px solid #3448c5;color:rgba(0,0,1,.75)}.cld-link-button-secondary:focus,.cld-link-button-secondary:hover{background-color:#3448c5}.cld-link-button-secondary-error{border-color:#dd2c00}.cld-link-button-secondary-error:focus,.cld-link-button-secondary-error:hover{background-color:#dd2c00}.cld-tooltip{color:#999;font-size:12px;line-height:1.3em;margin:8px 0}.cld-tooltip .selected{color:rgba(0,0,1,.75)}.cld-notice-box{box-shadow:0 0 2px rgba(0,0,0,.1);margin-bottom:12px;margin-right:20px;position:relative}.cld-notice-box .cld-notice{padding:1rem 2.2rem .75rem 1.2rem}.cld-notice-box .cld-notice img.cld-ui-icon{height:100%}.cld-notice-box.is-dismissible{padding-right:38px}.cld-notice-box.has-icon{padding-left:38px}.cld-notice-box.is-created,.cld-notice-box.is-success,.cld-notice-box.is-updated{background-color:#ebf5ec;border-left:4px solid #42ad4f}.cld-notice-box.is-created .dashicons,.cld-notice-box.is-success .dashicons,.cld-notice-box.is-updated .dashicons{color:#2a0}.cld-notice-box.is-error{background-color:#f8e8e7;border-left:4px solid #cb3435}.cld-notice-box.is-error .dashicons{color:#dd2c00}.cld-notice-box.is-warning{background-color:#fff7e5;border-left:4px solid #f2ad4c}.cld-notice-box.is-warning .dashicons{color:#fd9d2c}.cld-notice-box.is-info{background-color:#e4f4f8;border-left:4px solid #2a95c3}.cld-notice-box.is-info .dashicons{color:#3273ab}.cld-notice-box.is-neutral{background-color:#fff;border-left:4px solid #ccd0d4}.cld-notice-box.is-neutral .dashicons{color:#90a0b3}.cld-notice-box.dismissed{overflow:hidden;transition:height .3s ease-out}.cld-notice-box .cld-ui-icon,.cld-notice-box .dashicons{left:19px;position:absolute;top:14px}.cld-connection-box{align-items:center;background-color:#303a47;border-radius:4px;color:#fff;display:flex;justify-content:space-around;max-width:500px;padding:20px 17px}.cld-connection-box h3{color:#fff;margin:0 0 5px}.cld-connection-box span{display:inline-block;padding:0 12px 0 0}.cld-connection-box .dashicons{font-size:30px;height:30px;margin:0;padding:0;width:30px}.cld-breakpoints-preview,.cld-image-preview,.cld-lazyload-preview,.cld-video-preview{border:1px solid #c6d1db;border-radius:4px;padding:9px}.cld-breakpoints-preview-wrapper,.cld-image-preview-wrapper,.cld-lazyload-preview-wrapper,.cld-video-preview-wrapper{position:relative}.cld-breakpoints-preview .cld-ui-title,.cld-image-preview .cld-ui-title,.cld-lazyload-preview .cld-ui-title,.cld-video-preview .cld-ui-title{font-weight:700;margin:5px 0 12px}.cld-breakpoints-preview img,.cld-image-preview img,.cld-lazyload-preview img,.cld-video-preview img{border-radius:4px;height:100%;width:100%}.cld.cld-ui-preview{max-width:322px}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .preview-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .preview-image{opacity:0}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image{opacity:1}.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image img,.cld-breakpoints-preview .cld-image-preview-wrapper:hover .main-image span,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image img,.cld-lazyload-preview .cld-image-preview-wrapper:hover .main-image span{opacity:.4}.cld-breakpoints-preview .preview-image,.cld-lazyload-preview .preview-image{background-color:#222;border-radius:4px;bottom:0;box-shadow:2px -2px 3px rgba(0,0,0,.9);display:flex;left:0;position:absolute}.cld-breakpoints-preview .preview-image:hover,.cld-breakpoints-preview .preview-image:hover img,.cld-breakpoints-preview .preview-image:hover span,.cld-lazyload-preview .preview-image:hover,.cld-lazyload-preview .preview-image:hover img,.cld-lazyload-preview .preview-image:hover span{opacity:1!important}.cld-breakpoints-preview .preview-image.main-image,.cld-lazyload-preview .preview-image.main-image{box-shadow:none;position:relative}.cld-breakpoints-preview .preview-text,.cld-lazyload-preview .preview-text{background-color:#3448c5;color:#fff;padding:3px;position:absolute;right:0;text-shadow:0 0 3px #000;top:0}.cld-breakpoints-preview .global-transformations-url-link:hover,.cld-lazyload-preview .global-transformations-url-link:hover{color:#fff;text-decoration:none}.cld-lazyload-preview .progress-bar{background-color:#3448c5;height:2px;transition:width 1s;width:0}.cld-lazyload-preview .preview-image{background-color:#fff}.cld-lazyload-preview img{transition:opacity 1s}.cld-lazyload-preview .global-transformations-url-link{background-color:transparent}.cld-group .cld-group .cld-group{padding-left:4px}.cld-group .cld-group .cld-group hr{display:none}.cld-group-heading{display:flex;justify-content:space-between}.cld-group-heading h3{font-size:.9rem}.cld-group-heading h3 .description{font-size:.7rem;font-weight:400;margin-left:.7em}.cld-group .cld-ui-title-head{margin-bottom:1em}.cld-input{display:block;margin:0 0 23px;max-width:800px}.cld-input-label .cld-ui-title{font-size:14px;font-weight:700}.cld-input-label{display:block;margin-bottom:8px}.cld-input-label-link{color:#3448c5;font-size:12px;margin-left:8px}.cld-input-label-link:hover{color:#1e337f}.cld-input-radio-label{display:block}.cld-input-radio-label:not(:first-of-type){padding-top:8px}.cld-input .prefixed{margin-left:6px;width:40%}.cld-input .suffixed{margin-right:6px;width:40%}.cld-input input::placeholder{color:#90a0b3}.cld-input .hidden{visibility:hidden}.cld-input .regular-number,.cld-input .regular-text{border:1px solid #d0d0d0;border-radius:3px;font-size:13px;padding:.1rem .5rem;width:100%}.cld-input .regular-number-small,.cld-input .regular-text-small{width:40%}.cld-input .regular-number{width:100px}.cld-input .regular-select{appearance:none;border:1px solid #d0d0d0;border-radius:3px;display:inline;font-size:13px;font-weight:600;min-width:150px;padding:2px 30px 2px 6px}.cld-input-on-off .description{color:inherit;font-size:13px;font-weight:600;margin:0}.cld-input-on-off .description.left{margin-left:0;margin-right:.4rem}.cld-input-on-off input[type=checkbox]~.spinner{background-size:12px 12px;float:none;height:12px;margin:2px;opacity:1;position:absolute;right:14px;top:0;transition:right .2s;visibility:visible;width:12px}.cld-input-on-off input[type=checkbox]:checked~.spinner{right:0}.cld-input-on-off-control{display:inline-block;height:16px;margin-right:.4rem;position:relative;width:30px}.cld-input-on-off-control input,.cld-input-on-off-control input:disabled{height:0;opacity:0;width:0}.cld-input-on-off-control-slider{background-color:#90a0b3;border-radius:10px;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:background-color .3s}input:disabled+.cld-input-on-off-control-slider{opacity:.4;pointer-events:none}input:checked+.cld-input-on-off-control-slider{background-color:#3448c5!important}input:checked.partial+.cld-input-on-off-control-slider{background-color:#fd9d2c!important}input:checked.delete+.cld-input-on-off-control-slider{background-color:#dd2c00!important}.cld-input-on-off-control-slider:before{background-color:#fff;border-radius:50%;bottom:2px;content:"";display:block;height:12px;left:2px;position:absolute;transition:transform .2s;width:12px}input:checked+.cld-input-on-off-control-slider:before{transform:translateX(14px)}.mini input:checked+.cld-input-on-off-control-slider:before{transform:translateX(10px)}.cld-input-on-off-control.mini{height:10px;width:20px}.mini .cld-input-on-off-control-slider:before{bottom:1px;height:8px;left:1px;width:8px}.cld-input-icon-toggle{align-items:center;display:inline-flex}.cld-input-icon-toggle .description{margin:0 0 0 .4rem}.cld-input-icon-toggle .description.left{margin-left:0;margin-right:.4rem}.cld-input-icon-toggle-control{display:inline-block;position:relative}.cld-input-icon-toggle-control input{height:0;opacity:0;position:absolute;width:0}.cld-input-icon-toggle-control-slider .icon-on{display:none;visibility:hidden}.cld-input-icon-toggle-control-slider .icon-off,input:checked+.cld-input-icon-toggle-control-slider .icon-on{display:inline-block;visibility:visible}input:checked+.cld-input-icon-toggle-control-slider .icon-off{display:none;visibility:hidden}.cld-input-excluded-types div{display:flex}.cld-input-excluded-types .type{border:1px solid #c6d1db;border-radius:20px;display:flex;justify-content:space-between;margin-right:8px;min-width:50px;padding:3px 6px}.cld-input-excluded-types .dashicons{cursor:pointer}.cld-input-excluded-types .dashicons:hover{color:#dd2c00}.cld-input-tags{align-items:center;border:1px solid #d0d0d0;border-radius:3px;display:flex;flex-wrap:wrap;justify-content:flex-start;margin:5px 0 0;padding:2px 6px}.cld-input-tags-item{border:1px solid #c6d1db;border-radius:14px;box-shadow:inset -25px 0 0 #c6d1db;display:inline-flex;justify-content:space-between;margin:5px 6px 5px 0;opacity:1;overflow:hidden;padding:3px 4px 3px 8px;transition:opacity .25s,width .5s,margin .25s,padding .25s}.cld-input-tags-item-text{margin-right:8px}.cld-input-tags-item-delete{color:#90a0b3;cursor:pointer}.cld-input-tags-item-delete:hover{color:#3448c5}.cld-input-tags-item.pulse{animation:pulse-animation .5s infinite}.cld-input-tags-input{display:inline-block;min-width:100px;opacity:.4;overflow:visible;padding:10px 0;white-space:nowrap}.cld-input-tags-input:focus-visible{opacity:1;outline:none;padding:10px}@keyframes pulse-animation{0%{color:rgba(255,0,0,0)}50%{color:red}to{color:rgba(255,0,0,0)}}.cld-input-tags-input.pulse{animation:pulse-animation .5s infinite}.cld-gallery-settings{box-sizing:border-box;display:flex;flex-wrap:wrap;padding:1rem 0;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings{margin-left:-1rem;margin-right:-1rem}}.cld-gallery-settings__column{box-sizing:border-box;width:100%}@media only screen and (min-width:960px){.cld-gallery-settings__column{padding-left:1rem;padding-right:1rem;width:50%}}.cld-gallery-settings .components-color-palette__custom-color-button{border:none;border-radius:2px 2px 0 0;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);box-sizing:border-box;cursor:pointer;height:64px;outline:1px solid transparent;position:relative;width:100%}.cld-gallery-settings .components-color-palette__custom-color-text-wrapper{border-radius:0 0 2px 2px;box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.2),inset 1px 0 0 0 rgba(0,0,0,.2),inset -1px 0 0 0 rgba(0,0,0,.2);font-size:13px;padding:12px 16px;position:relative}.components-base-control__field select{display:block;margin:1rem 0}.components-range-control__wrapper{margin:0!important}.components-range-control__root{flex-direction:row-reverse;margin:1rem 0}.components-input-control.components-number-control.components-range-control__number{margin-left:0!important;margin-right:16px}.components-panel{border:0!important}.components-panel__body:first-child{border-top:0!important}.components-panel__body:last-child{border-bottom:0!important}.components-textarea-control__input{display:block;margin:.5rem 0;width:100%}.components-popover:not(.is-without-arrow):after,.components-popover:not(.is-without-arrow):before{content:none}table .cld-input{margin-bottom:0}tr .file-size.small{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px;margin-right:6px}td.tree{color:#212529;line-height:1.5;padding-top:0;position:relative}td.tree ul.striped>:nth-child(odd){background-color:#f6f7f7}td.tree ul.striped>:nth-child(2n){background-color:#fff}td.tree .success{color:#20b832}td+td.tree{padding-top:0}td.tree .cld-input{margin-bottom:0;vertical-align:text-bottom}td.tree .cld-search{font-size:.9em;height:26px;margin-right:12px;min-height:20px;padding:4px 6px;vertical-align:initial;width:300px}td.tree .file-size{color:#a8a8a8;font-size:.8em;font-style:italic;letter-spacing:.4px;margin-left:6px}td.tree .fa-folder,td.tree .fa-folder-open{color:#007bff}td.tree .fa-html5{color:#f21f10}td.tree ul{list-style:none;margin:0;padding-left:5px}td.tree ul li{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:0;padding-bottom:5px;padding-left:25px;padding-top:5px;position:relative}td.tree ul li:before{height:1px;margin:auto;top:14px;width:20px}td.tree ul li:after,td.tree ul li:before{background-color:#666;content:"";left:0;position:absolute}td.tree ul li:after{bottom:0;height:100%;top:0;width:1px}td.tree ul li:after:nth-of-type(odd){background-color:#666}td.tree ul li:last-child:after{height:14px}td.tree ul a{cursor:pointer}td.tree ul a:hover{text-decoration:none}.cld-modal{align-content:center;align-items:center;background-color:rgba(0,0,0,.8);bottom:0;display:flex;flex-direction:row;flex-wrap:nowrap;left:0;opacity:0;position:fixed;right:0;top:0;transition:opacity .1s;visibility:hidden;z-index:10000}.cld-modal[data-cloudinary-only="1"] .modal-body,.cld-modal[data-cloudinary-only=true] .modal-body{display:none}.cld-modal[data-cloudinary-only="1"] [data-action=submit],.cld-modal[data-cloudinary-only=true] [data-action=submit]{cursor:not-allowed;opacity:.5;pointer-events:none}.cld-modal .warning{color:#dd2c00}.cld-modal .modal-header{margin-bottom:2em}.cld-modal .modal-uninstall{display:none}.cld-modal-box{background-color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.5);display:flex;flex-direction:column;font-size:10.5px;font-weight:600;justify-content:space-between;margin:0 auto;max-width:80%;padding:25px;position:relative;transition:height 1s;width:500px}.cld-modal-box .modal-footer{align-items:stretch;display:flex;flex-direction:row;justify-content:flex-end}.cld-modal-box .more{display:none}.cld-modal-box input[type=radio]:checked~.more{color:#32373c;display:block;line-height:2;margin-left:2em;margin-top:.5em}.cld-modal-box input[type=radio]:checked{border:1px solid #3448c5}.cld-modal-box input[type=radio]:checked:before{background-color:#3448c5;border-radius:50%;content:"";height:.5rem;line-height:1.14285714;margin:.1875rem;width:.5rem}@media screen and (max-width:782px){.cld-modal-box input[type=radio]:checked:before{height:.5625rem;line-height:.76190476;margin:.4375rem;vertical-align:middle;width:.5625rem}}.cld-modal-box input[type=radio]:focus{border-color:#3448c5;box-shadow:0 0 0 1px #3448c5;outline:2px solid transparent}.cld-modal-box input[type=checkbox]~label{margin-left:.25em}.cld-modal-box input[type=email]{width:100%}.cld-modal-box textarea{font-size:inherit;resize:none;width:100%}.cld-modal-box ul{margin-bottom:21px}.cld-modal-box p{font-size:10.5px;margin:0 0 12px}.cld-modal-box .button:not(.button-link){background-color:#e9ecf9}.cld-modal-box .button{border:0;color:#000;font-size:9.5px;font-weight:700;margin:22px 0 0 10px;padding:4px 14px}.cld-modal-box .button.button-primary{background-color:#3448c5;color:#fff}.cld-modal-box .button.button-link{margin-left:0;margin-right:auto}.cld-modal-box .button.button-link:hover{background-color:transparent}.cld-plan{display:flex;flex-wrap:wrap}.cld-plan-item{display:flex;margin-bottom:25px;width:33%}.cld-plan-item img{margin-right:12px;width:24px}.cld-plan-item .description{font-size:12px}.cld-plan-item .cld-title{font-size:14px;font-weight:700}.cld-wizard{margin-left:auto;margin-right:auto;max-width:1100px}.cld-wizard .cld-panel-heading{align-items:center}.cld-wizard .cld-ui-title{text-transform:none}.cld-wizard .cld-submit{align-items:center;display:flex;justify-content:space-between}.cld-wizard .cld-submit .button{margin-left:10px}.cld-wizard-tabs{display:flex;flex-direction:row;font-size:15px;font-weight:600;width:50%}.cld-wizard-tabs-tab{align-items:center;display:flex;flex-direction:column;position:relative;width:33%}.cld-wizard-tabs-tab-count{align-items:center;background-color:rgba(52,72,197,.15);border:2px solid transparent;border-radius:50%;display:flex;height:32px;justify-content:center;width:32px}.active .cld-wizard-tabs-tab-count{border:2px solid #3448c5}.complete .cld-wizard-tabs-tab-count{background-color:#2a0;color:#2a0}.complete .cld-wizard-tabs-tab-count:before{color:#fff;content:"\f147";font-family:dashicons;font-size:30px;width:25px}.cld-wizard-tabs-tab.active{color:#3448c5}.cld-wizard-tabs-tab:after{border:1px solid rgba(52,72,197,.15);content:"";left:75%;position:absolute;top:16px;width:50%}.cld-wizard-tabs-tab.complete:after{border-color:#2a0}.cld-wizard-tabs-tab:last-child:after{display:none}.cld-wizard-intro{text-align:center}.cld-wizard-intro-welcome{border:2px solid #c6d1db;border-radius:4px;box-shadow:0 2px 10px 0 rgba(0,0,0,.3);margin:27px auto;padding:19px;width:645px}.cld-wizard-intro-welcome img{width:100%}.cld-wizard-intro-welcome-info{background-color:#323a45;border-radius:0 0 4px 4px;color:#fff;display:flex;font-size:12px;margin:0 -19px -19px;padding:15px;text-align:left}.cld-wizard-intro-welcome-info img{margin-right:12px;width:25px}.cld-wizard-intro-welcome-info h2{color:#fff;font-size:14px}.cld-wizard-connect-connection{align-items:flex-end;display:flex;flex-direction:row;justify-content:flex-start}.cld-wizard-connect-connection-input{margin-right:10px;margin-top:20px;width:725px}.cld-wizard-connect-connection-input input{max-width:100%;width:100%}.cld-wizard-connect-status{align-items:center;border-radius:14px;display:none;font-weight:700;justify-content:space-between;margin-inline-start:1em;padding:5px 11px}.cld-wizard-connect-status.active{display:inline-flex}.cld-wizard-connect-status.success{background-color:#ccefc9;color:#2a0}.cld-wizard-connect-status.error{background-color:#f9cecd;color:#dd2c00}.cld-wizard-connect-status.working{background-color:#eaecfa;color:#1e337f;padding:5px}.cld-wizard-connect-status.working .spinner{margin:0;visibility:visible}.cld-wizard-connect-help{margin-top:50px}.cld-wizard-connect-help-image{border:1px solid #c6d1db;box-shadow:0 0 1em 1em rgba(0,0,0,.05);margin:2em;padding:1em}.cld-wizard-lock{cursor:pointer;display:flex}.cld-wizard-lock.hidden{display:none;height:0;width:0}.cld-wizard-lock .dashicons{color:#3448c5;font-size:25px;line-height:.7;margin-right:10px}.cld-wizard-optimize-settings.disabled{opacity:.4}.cld-wizard-complete{background-image:url(../css/images/confetti.png);background-position:50%;background-repeat:no-repeat;background-size:cover;margin:-23px;padding:98px;text-align:center}.cld-wizard-complete.hidden{display:none}.cld-wizard-complete.active{align-items:center;display:flex;flex-direction:column;justify-content:center;margin:-23px -24px;text-align:center}.cld-wizard-complete.active *{max-width:450px}.cld-wizard-complete-icons{display:flex;justify-content:center}.cld-wizard-complete-icons img{margin:30px 10px;width:70px}.cld-wizard-complete-icons .dashicons{background-color:#f1f1f1;border:4px solid #fff;border-radius:6px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);font-size:50px;height:70px;line-height:1.4;width:70px}.cld-wizard-complete-icons .dashicons-cloudinary{color:#3448c5;font-size:65px;line-height:.9}.cld-wizard-complete .cld-ui-title{margin-top:30px}.cld-wizard-complete .cld-ui-title h3{font-size:14px}.cld-import{display:none;height:100%;padding:0 10px;position:absolute;right:0;width:200px}.cld-import-item{align-items:center;display:flex;margin-top:10px;min-height:20px;opacity:0;transition:opacity .5s;white-space:nowrap}.cld-import-item .spinner{margin:0 6px 0 0;visibility:visible;width:24px}.cld-import-item-id{display:block;overflow:hidden;text-overflow:ellipsis}.cld-import-process{background-color:#fff;background-position:50%;border-radius:40px;float:none;opacity:1;padding:5px;visibility:visible}.media-library{margin-right:0;transition:margin-right .2s}.cld-sizes-preview{display:flex}.cld-sizes-preview .image-item{display:none;width:100%}.cld-sizes-preview .image-item img{max-width:100%}.cld-sizes-preview .image-item.show{align-content:space-between;display:flex;flex-direction:column;justify-content:space-around}.cld-sizes-preview .image-items{background-color:#e5e5e5;display:flex;padding:18px;width:100%}.cld-sizes-preview .image-preview-box{background-color:#90a0b3;background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:6px;height:100%;width:100%}.cld-sizes-preview input{color:#558b2f;margin-top:6px}.cld-sizes-preview input.invalid{border-color:#dd2c00;color:#dd2c00}.cld-crops{border-bottom:1px solid #e5e5e5;margin-bottom:6px;padding-bottom:6px}.cld-size-items-item{border:1px solid #e5e5e5;display:flex;flex-direction:column;margin-bottom:-1px;padding:8px}.cld-size-items-item .cld-ui-suffix{overflow:hidden;text-overflow:ellipsis;width:50%}.cld-size-items-item img{margin-bottom:8px;max-width:100%;object-fit:scale-down}.cld-size-items .crop-size-inputs{align-items:center;display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px;max-width:400px}.cld-size-items .cld-ui-input.regular-text{max-width:260px}.cld-size-items .cld-ui-input.regular-text[disabled]{background-color:#e5e5e5;opacity:.5}.cld-size-items .disable-toggle{margin:0}.cld-size-items .cld-input-on-off-control.medium{height:13px;margin-right:0;width:25px}.cld-size-items .cld-input-on-off-control.medium .cld-input-on-off-control-slider:before{bottom:2px;height:9px;left:2px;width:9px}.cld-size-items .cld-input-on-off-control.medium input:checked+.cld-input-on-off-control-slider:before{transform:translateX(12px)}.cld-size-items .cld-input-on-off-control-label{font-size:12px}.cld-size-items .button.clear-crop-input{align-items:center;background:transparent;border:none;box-shadow:none;color:#3448c5;cursor:pointer;display:inline-flex;font-size:14px;font-weight:600;gap:6px;margin-right:40px;padding:0}.cld-size-items .button.clear-crop-input svg{fill:currentColor;height:16px;width:16px}.cld-size-items .button.clear-crop-input:hover{background:transparent;opacity:.8}.cld-size-items .button.clear-crop-input:focus{box-shadow:none;outline:none}.cld-size-selector{border:1px solid #e5e5e5;border-radius:4px;display:flex;flex-wrap:nowrap;margin-bottom:42px;max-width:100%;overflow-x:scroll;padding:4px;scrollbar-width:thin;width:fit-content}.cld-size-selector-item{background-color:transparent;color:#333b4c;cursor:pointer;flex-shrink:0;font-weight:600;margin:0 3px -1px 0;padding:8px;white-space:nowrap}.cld-size-selector-item[data-selected]{background-color:rgba(52,72,197,.06);color:#3448c5}.cld-size-images{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:42px}.cld-cron{background-color:#fff;border:1px solid #c6d1db;padding-block:13px;padding-inline:16px}.cld-cron h2,.cld-cron h4{margin:0}.cld-cron hr{margin-block:6px}.tippy-box[data-theme~=cloudinary]{background-color:rgba(0,0,0,.8);color:#fff;font-size:.8em}#poststuff .cld-info-box h2{font-weight:700;margin:0 0 6px;padding:0}.cloudinary-overwrite-transformations{padding:6px 0}.edit-overlay-grid{display:grid;gap:6px;grid-template-columns:repeat(3,30px);grid-template-rows:repeat(3,30px);margin-bottom:20px}.edit-overlay-grid__cell{align-items:center;background:#fff;border:1px solid #ccc;cursor:pointer;display:flex;height:30px;justify-content:center;width:30px}.edit-overlay-grid__cell:hover{opacity:.8}.edit-overlay-grid__cell--selected{border:2px solid #3448c5;position:relative}.edit-overlay-grid__cell--selected:after{color:#3448c5;content:"\2714";font-size:16px;position:absolute}.edit-overlay-range-input.regular-text{padding:0}.edit-overlay .cld-input-text{margin-bottom:0}.edit-overlay-offset{margin-bottom:20px}.edit-overlay-offset .suffixed{position:relative;top:5px;width:70%}.edit-overlay-offset .cld-input-text{margin-bottom:10px}.edit-overlay #edit-overlay-select-image-preview{margin-top:10px}.edit-overlay #edit-overlay-select-image-preview img{border:1px solid #ccc;height:auto;max-width:50%}.edit-overlay .cld-ui-wrap .button--remove{background-color:transparent;border:2px solid #dd2c00;color:#dd2c00}.edit-overlay .cld-ui-wrap .button--remove:hover{background-color:#c42700;color:#fff}.edit-overlay .cld-asset-edit-button.button-primary{margin-right:auto;padding:7px 14px}.edit-overlay .cld-ui-suffix{margin-inline-start:0}.edit-overlay .cld-ui-preview{box-sizing:border-box}@media only screen and (min-width:783px){.asset-edit-preview{align-self:flex-start;position:sticky;top:20px}}#asset-preview-transformation-string{background:#262c35;box-sizing:border-box;display:block;max-width:100%;overflow-wrap:normal;padding:10px;text-decoration:none;word-break:break-all}#asset-preview-transformation-string:hover span{text-decoration:underline}#asset-preview-transformation-string .string-preview-base{word-break:break-all}#asset-preview-transformation-string .string-preview-transformations{color:#fff}#asset-preview-transformation-string .string-preview-image-overlay{color:#51a3ff}#asset-preview-transformation-string .string-preview-text-overlay{color:#54c8db}#asset-preview-transformation-string .string-preview-public-id{color:#f2d864}#asset-preview-success-message{color:#558b2f}#asset-preview-success-message p{margin-bottom:0} 2 /*# sourceMappingURL=cloudinary.css.map*/ -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/css/front-overlay.css
r3439415 r3518458 1 1 .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity;white-space:normal}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}.overlay-tag{border-radius:0 0 4px 0;color:#fff;font-size:.8rem;padding:10px;position:absolute;text-align:right;z-index:9999}.overlay-tag.wp-tag{background-color:#dd2c00}.overlay-tag.cld-tag{background-color:#3448c5}[data-tippy-root] .tippy-box{max-width:none!important}[data-tippy-root] .tippy-content{background-color:#333;max-width:600px;min-width:250px;width:auto}[data-tippy-root] .tippy-content div{border-bottom:1px solid #555;display:flex;justify-content:space-between;margin-bottom:4px;padding:4px 0}[data-tippy-root] .tippy-content .title{margin-right:50px}[data-tippy-root] .tippy-content .edit-link{color:#fff;text-align:right;width:100%}[data-tippy-root] .tippy-content span:not(:first-child){word-break:break-all} 2 /*# sourceMappingURL=front-overlay.css.map*/ -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/css/gallery-ui.css
r2869397 r3518458 1 :root{--wp-admin-theme-color:#007cba;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-20:#005a87}.components-animate__appear{animation:components-animate__appear-animation .1s cubic-bezier(0,0,.2,1) 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-animate__appear{animation-duration:1ms}}.components-animate__appear.is-from-top,.components-animate__appear.is-from-top.is-from-left{transform-origin:top left}.components-animate__appear.is-from-top.is-from-right{transform-origin:top right}.components-animate__appear.is-from-bottom,.components-animate__appear.is-from-bottom.is-from-left{transform-origin:bottom left}.components-animate__appear.is-from-bottom.is-from-right{transform-origin:bottom right}@keyframes components-animate__appear-animation{0%{transform:translateY(-2em) scaleY(0) scaleX(0)}to{transform:translateY(0) scaleY(1) scaleX(1)}}.components-animate__slide-in{animation:components-animate__slide-in-animation .1s cubic-bezier(0,0,.2,1);animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-animate__slide-in{animation-duration:1ms}}.components-animate__slide-in.is-from-left{transform:translateX(100%)}.components-animate__slide-in.is-from-right{transform:translateX(-100%)}@keyframes components-animate__slide-in-animation{to{transform:translateX(0)}}.components-animate__loading{animation:components-animate__loading 1.6s ease-in-out infinite}@keyframes components-animate__loading{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.components-autocomplete__popover .components-popover__content>div{padding:16px}.components-autocomplete__result.components-button{display:flex;height:auto;min-height:36px;text-align:left;width:100%}.components-autocomplete__result.components-button.is-selected{box-shadow:0 0 0 2px #007cba;box-shadow:0 0 0 2px var(--wp-admin-theme-color)}.components-button-group{display:inline-block}.components-button-group .components-button{border-radius:0;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;display:inline-flex}.components-button-group .components-button+.components-button{margin-left:-1px}.components-button-group .components-button:first-child{border-radius:2px 0 0 2px}.components-button-group .components-button:last-child{border-radius:0 2px 2px 0}.components-button-group .components-button.is-primary,.components-button-group .components-button:focus{position:relative;z-index:1}.components-button-group .components-button.is-primary{box-shadow:inset 0 0 0 1px #1e1e1e}.components-button{align-items:center;-webkit-appearance:none;background:none;border:0;border-radius:2px;box-sizing:border-box;color:#1e1e1e;cursor:pointer;display:inline-flex;font-size:13px;height:36px;margin:0;padding:6px 12px;text-decoration:none;transition:box-shadow .1s linear}@media (prefers-reduced-motion:reduce){.components-button{transition-duration:0s}}.components-button:hover,.components-button[aria-expanded=true]{color:#007cba;color:var(--wp-admin-theme-color)}.components-button[aria-disabled=true]:hover{color:initial}.components-button:focus:not(:disabled){box-shadow:0 0 0 1.5px #007cba;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color);outline:1px solid transparent}.components-button.is-primary{background:#007cba;background:var(--wp-admin-theme-color);color:#fff;text-decoration:none;text-shadow:none;white-space:nowrap}.components-button.is-primary:hover:not(:disabled){background:#006ba1;background:var(--wp-admin-theme-color-darker-10);color:#fff}.components-button.is-primary:active:not(:disabled){background:#005a87;background:var(--wp-admin-theme-color-darker-20);border-color:#005a87;border-color:var(--wp-admin-theme-color-darker-20);color:#fff}.components-button.is-primary:focus:not(:disabled){box-shadow:inset 0 0 0 1px #fff,0 0 0 1.5px #007cba;box-shadow:inset 0 0 0 1px #fff,0 0 0 1.5px var(--wp-admin-theme-color);outline:1px solid transparent}.components-button.is-primary:disabled,.components-button.is-primary:disabled:active:enabled,.components-button.is-primary[aria-disabled=true],.components-button.is-primary[aria-disabled=true]:active:enabled,.components-button.is-primary[aria-disabled=true]:enabled{background:#007cba;background:var(--wp-admin-theme-color);border-color:#007cba;border-color:var(--wp-admin-theme-color);color:hsla(0,0%,100%,.4);opacity:1}.components-button.is-primary:disabled:active:enabled:focus:enabled,.components-button.is-primary:disabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:active:enabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:enabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:focus:enabled{box-shadow:0 0 0 1px #fff,0 0 0 3px #007cba;box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-button.is-primary.is-busy,.components-button.is-primary.is-busy:disabled,.components-button.is-primary.is-busy[aria-disabled=true]{background-image:linear-gradient(-45deg,#007cba 28%,#005a87 0,#005a87 72%,#007cba 0);background-image:linear-gradient(-45deg,var(--wp-admin-theme-color) 28%,var(--wp-admin-theme-color-darker-20) 28%,var(--wp-admin-theme-color-darker-20) 72%,var(--wp-admin-theme-color) 72%);background-size:100px 100%;border-color:#007cba;border-color:var(--wp-admin-theme-color);color:#fff}.components-button.is-secondary:active:not(:disabled),.components-button.is-tertiary:active:not(:disabled){background:#ddd;box-shadow:none;color:#006ba1;color:var(--wp-admin-theme-color-darker-10)}.components-button.is-secondary:hover:not(:disabled),.components-button.is-tertiary:hover:not(:disabled){box-shadow:inset 0 0 0 1px #006ba1;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color-darker-10);color:#006ba1;color:var(--wp-admin-theme-color-darker-10)}.components-button.is-secondary:disabled,.components-button.is-secondary[aria-disabled=true],.components-button.is-secondary[aria-disabled=true]:hover,.components-button.is-tertiary:disabled,.components-button.is-tertiary[aria-disabled=true],.components-button.is-tertiary[aria-disabled=true]:hover{background:#eaeaea;box-shadow:none;color:#828282;opacity:1;transform:none}.components-button.is-secondary{box-shadow:inset 0 0 0 1px #007cba;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color);outline:1px solid transparent}.components-button.is-secondary,.components-button.is-tertiary{background:transparent;color:#007cba;color:var(--wp-admin-theme-color);white-space:nowrap}.components-button.is-tertiary{outline:1px dotted transparent;padding:6px}.components-button.is-tertiary .dashicon{display:inline-block;flex:0 0 auto}.components-button.is-destructive{box-shadow:inset 0 0 0 1px #cc1818;color:#cc1818}.components-button.is-destructive:hover:not(:disabled){box-shadow:inset 0 0 0 1px #710d0d;color:#710d0d}.components-button.is-destructive:focus:not(:disabled){color:#007cba;color:var(--wp-admin-theme-color)}.components-button.is-destructive:active:not(:disabled){background:#ccc}.components-button.is-link{background:none;border:0;border-radius:0;box-shadow:none;color:#0073aa;height:auto;margin:0;outline:none;padding:0;text-align:left;text-decoration:underline;transition-duration:.05s;transition-property:border,background,color;transition-timing-function:ease-in-out}@media (prefers-reduced-motion:reduce){.components-button.is-link{transition-duration:0s}}.components-button.is-link:active:not(:disabled),.components-button.is-link:hover:not(:disabled){box-shadow:none;color:#00a0d2}.components-button.is-link:focus{box-shadow:0 0 0 1px #5b9dd9,0 0 1.5px 1px rgba(30,140,190,.8);color:#124964}.components-button.is-link.is-destructive{color:#cc1818}.components-button.is-link.is-destructive:active:not(:disabled),.components-button.is-link.is-destructive:hover:not(:disabled){background:none;color:#710d0d}.components-button.is-link.is-destructive:focus:not(:disabled){color:#007cba;color:var(--wp-admin-theme-color)}.components-button:not([aria-disabled=true]):active{color:inherit}.components-button:disabled,.components-button[aria-disabled=true]{cursor:default;opacity:.3}.components-button.is-busy,.components-button.is-secondary.is-busy,.components-button.is-secondary.is-busy:disabled,.components-button.is-secondary.is-busy[aria-disabled=true]{animation:components-button__busy-animation 2.5s linear infinite;background-image:linear-gradient(-45deg,#fafafa 28%,#e0e0e0 0,#e0e0e0 72%,#fafafa 0);background-size:100px 100%;opacity:1}.components-button.is-small{font-size:11px;height:24px;line-height:22px;padding:0 8px}.components-button.is-small.has-icon:not(.has-text){padding:0 8px;width:24px}.components-button.has-icon{justify-content:center;min-width:36px;padding:6px}.components-button.has-icon .dashicon{display:inline-block;flex:0 0 auto}.components-button.has-icon.has-text{justify-content:left}.components-button.has-icon.has-text svg{margin-right:8px}.components-button.is-pressed{background:#1e1e1e;color:#fff}.components-button.is-pressed:focus:not(:disabled){box-shadow:inset 0 0 0 1px #fff,0 0 0 1.5px #007cba;box-shadow:inset 0 0 0 1px #fff,0 0 0 1.5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-button.is-pressed:hover:not(:disabled){background:#1e1e1e;color:#fff}.components-button svg{fill:currentColor;outline:none}.components-button .components-visually-hidden{height:auto}@keyframes components-button__busy-animation{0%{background-position:200px 0}}.components-checkbox-control__input[type=checkbox]{-webkit-appearance:none;appearance:none;background:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:0 0 0 transparent;clear:none;color:#1e1e1e;cursor:pointer;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;height:24px;line-height:normal;line-height:0;margin:0 4px 0 0;outline:0;padding:6px 8px;padding:0!important;text-align:center;transition:box-shadow .1s linear;transition:none;transition:border-color .1s ease-in-out;vertical-align:top;width:24px}@media (min-width:600px){.components-checkbox-control__input[type=checkbox]{font-size:13px;line-height:normal}}.components-checkbox-control__input[type=checkbox]:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.components-checkbox-control__input[type=checkbox]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .components-checkbox-control__input[type=checkbox]::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .components-checkbox-control__input[type=checkbox]::-moz-placeholder{color:hsla(0,0%,100%,.65);opacity:1}.is-dark-theme .components-checkbox-control__input[type=checkbox]:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.components-checkbox-control__input[type=checkbox]:checked:before,.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{color:#fff;margin:-3px -5px}@media (min-width:782px){.components-checkbox-control__input[type=checkbox]:checked:before,.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{margin:-4px 0 0 -5px}}.components-checkbox-control__input[type=checkbox][aria-checked=mixed]{background:#007cba;background:var(--wp-admin-theme-color);border-color:#007cba;border-color:var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\f460";display:inline-block;float:left;font:normal 30px/1 dashicons;vertical-align:middle;width:16px}@media (min-width:782px){.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{float:none;font-size:21px}}@media (min-width:600px){.components-checkbox-control__input[type=checkbox]{height:20px;width:20px}}@media (prefers-reduced-motion:reduce){.components-checkbox-control__input[type=checkbox]{transition-duration:0s}}.components-checkbox-control__input[type=checkbox]:focus{box-shadow:0 0 0 2px #fff,0 0 0 3.5px #007cba;box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-checkbox-control__input[type=checkbox]:checked{background:#007cba;background:var(--wp-admin-theme-color);border-color:#007cba;border-color:var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox]:checked::-ms-check{opacity:0}.components-checkbox-control__input[type=checkbox]:checked:before{content:none}.components-checkbox-control__input-container{display:inline-block;height:24px;margin-right:12px;position:relative;vertical-align:middle;width:24px}@media (min-width:600px){.components-checkbox-control__input-container{height:20px;width:20px}}svg.components-checkbox-control__checked{fill:#fff;cursor:pointer;height:24px;left:0;pointer-events:none;position:absolute;top:0;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:24px}@media (min-width:600px){svg.components-checkbox-control__checked{left:-2px;top:-2px}}.components-circular-option-picker{display:inline-block;margin-right:-10px;width:100%}.components-circular-option-picker .components-circular-option-picker__custom-clear-wrapper{display:flex;justify-content:flex-end}.components-circular-option-picker .components-circular-option-picker__swatches{margin-right:-16px}.components-circular-option-picker__option-wrapper{display:inline-block;height:28px;margin-bottom:12px;margin-right:16px;transform:scale(1);transition:transform .1s ease;vertical-align:top;width:28px}@media (prefers-reduced-motion:reduce){.components-circular-option-picker__option-wrapper{transition-duration:0s}}.components-circular-option-picker__option-wrapper:hover{transform:scale(1.2)}.components-circular-option-picker__option-wrapper>div{height:100%;width:100%}.components-circular-option-picker__option-wrapper:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg width='28' height='28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8V6H4v2h2zm2 0V6h2v2H8zm2 8H8v-2h2v2zm2 0v-2h2v2h-2zm0 2v-2h-2v2H8v2h2v-2h2zm2 0v2h-2v-2h2zm2 0h-2v-2h2v2z' fill='%23555D65'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 18h2v-2h-2v-2h2v-2h-2v-2h2V8h-2v2h-2V8h-2v2h2v2h-2v2h2v2h2v2zm-2-4v-2h2v2h-2z' fill='%23555D65'/%3E%3Cpath d='M18 18v2h-2v-2h2z' fill='%23555D65'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 10V8H6v2H4v2h2v2H4v2h2v2H4v2h2v2H4v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2V4h-2v2h-2V4h-2v2h-2V4h-2v2h2v2h-2v2H8zm0 2v-2H6v2h2zm2 0v-2h2v2h-2zm0 2v-2H8v2H6v2h2v2H6v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h-2v2h-2V6h-2v2h-2v2h2v2h-2v2h-2z' fill='%23555D65'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 0H2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2H8V0H6v2H4V0zm0 4V2H2v2h2zm2 0V2h2v2H6zm0 2V4H4v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2H8v2H6z' fill='%23555D65'/%3E%3C/svg%3E");border-radius:50%;bottom:1px;content:"";left:1px;position:absolute;right:1px;top:1px;z-index:-1}.components-circular-option-picker__option{background:transparent;border:none;border-radius:50%;box-shadow:inset 0 0 0 14px;cursor:pointer;display:inline-block;height:100%;transition:box-shadow .1s ease;vertical-align:top;width:100%}@media (prefers-reduced-motion:reduce){.components-circular-option-picker__option{transition-duration:0s}}.components-circular-option-picker__option:hover{box-shadow:inset 0 0 0 14px!important}.components-circular-option-picker__option.is-pressed{box-shadow:inset 0 0 0 4px;overflow:visible;position:relative;z-index:1}.components-circular-option-picker__option.is-pressed+svg{border-radius:50%;left:2px;pointer-events:none;position:absolute;top:2px;z-index:2}.components-circular-option-picker__option:after{border:1px solid transparent;border-radius:50%;bottom:-1px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);content:"";left:-1px;position:absolute;right:-1px;top:-1px}.components-circular-option-picker__option:focus:after{border:2px solid #757575;border-radius:50%;box-shadow:inset 0 0 0 2px #fff;content:"";height:32px;left:-2px;position:absolute;top:-2px;width:32px}.components-circular-option-picker__option.components-button:focus{background-color:transparent;box-shadow:inset 0 0 0 14px;outline:none}.components-circular-option-picker__button-action .components-circular-option-picker__option{background:#fff;color:#fff}.components-circular-option-picker__dropdown-link-action{margin-right:16px}.components-circular-option-picker__dropdown-link-action .components-button{line-height:22px}.components-color-edit__color-option-main-area{align-items:center;display:flex}.components-color-edit__color-option-main-area .components-circular-option-picker__option-wrapper{margin:8px}.components-color-edit__color-option.is-hover{background:#e0e0e0}.components-color-edit__cancel-button{float:right}.components-color-edit__color-option-color-name{width:100%}.components-color-edit__label-and-insert-container{align-items:center;display:flex;justify-content:space-between}.components-color-edit__insert-button{margin-top:-8px}.components-color-edit__hidden-control{left:-9999px;position:relative}.components-color-edit__color-option-color-name-input .components-base-control__field{margin-bottom:0;margin-right:8px}.components-color-edit__slug-input{margin-left:8px}.component-color-indicator{border:1px solid #dadada;display:inline-block;height:16px;margin-left:.8rem;width:25px}.component-color-indicator+.component-color-indicator{margin-left:.5rem}.components-color-picker{width:100%}.components-color-picker *{box-sizing:border-box}.components-color-picker__saturation{padding-bottom:55%;position:relative;width:100%}.components-color-picker__body{padding:16px 16px 12px}.components-color-picker__controls{display:flex}.components-color-picker__alpha-pointer,.components-color-picker__hue-pointer,.components-color-picker__saturation-pointer{border:none;box-shadow:none;cursor:pointer;padding:0;position:absolute}.components-color-picker__swatch{background-image:linear-gradient(45deg,#ddd 25%,transparent 0),linear-gradient(-45deg,#ddd 25%,transparent 0),linear-gradient(45deg,transparent 75%,#ddd 0),linear-gradient(-45deg,transparent 75%,#ddd 0);background-position:0 0,0 5px,5px -5px,-5px 0;background-size:10px 10px;border-radius:50%;height:32px;margin-right:8px;overflow:hidden;position:relative;width:32px}.is-alpha-disabled .components-color-picker__swatch{height:12px;margin-top:0;width:12px}.components-color-picker__active{border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);z-index:2}.components-color-picker__active,.components-color-picker__saturation-black,.components-color-picker__saturation-color,.components-color-picker__saturation-white{bottom:0;left:0;position:absolute;right:0;top:0}.components-color-picker__saturation-color{overflow:visible}.components-color-picker__saturation-white{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.components-color-picker__saturation-black{background:linear-gradient(0deg,#000,transparent)}.components-button.components-color-picker__saturation-pointer{background-color:transparent;border-radius:50%;box-shadow:0 0 0 1px #fff,inset 0 0 0 1px #000,0 0 0 2px #000;height:14px;padding:0;transform:translate(-50%,-50%);width:14px}.components-button.components-color-picker__saturation-pointer:focus:not(:disabled){box-shadow:0 0 0 2px #fff,inset 0 0 0 1px #000,0 0 0 3px #000}.components-color-picker__toggles{flex:1}.components-color-picker__alpha{background-image:linear-gradient(45deg,#ddd 25%,transparent 0),linear-gradient(-45deg,#ddd 25%,transparent 0),linear-gradient(45deg,transparent 75%,#ddd 0),linear-gradient(-45deg,transparent 75%,#ddd 0);background-position:0 0,0 5px,5px -5px,-5px 0;background-size:10px 10px}.components-color-picker__alpha-gradient,.components-color-picker__hue-gradient{bottom:0;left:0;position:absolute;right:0;top:0}.components-color-picker__alpha,.components-color-picker__hue{height:12px;position:relative}.is-alpha-enabled .components-color-picker__hue{margin-bottom:8px}.components-color-picker__alpha-bar,.components-color-picker__hue-bar{height:100%;margin:0 3px;padding:0 2px;position:relative}.components-color-picker__hue-gradient{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.components-color-picker__alpha-pointer,.components-color-picker__hue-pointer{background:#fff;border-radius:50%;box-shadow:0 1px 4px 0 rgba(0,0,0,.37);height:14px;left:0;transform:translate(-7px,-1px);width:14px}.components-color-picker__hue-pointer,.components-color-picker__saturation-pointer{transition:box-shadow .1s linear}@media (prefers-reduced-motion:reduce){.components-color-picker__hue-pointer,.components-color-picker__saturation-pointer{transition-duration:0s}}.components-color-picker__saturation-pointer:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #007cba,0 0 5px 0 #007cba,inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4);box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color),0 0 5px 0 var(--wp-admin-theme-color),inset 0 0 1px 1px rgba(0,0,0,.3),0 0 1px 2px rgba(0,0,0,.4)}.components-color-picker__alpha-pointer:focus,.components-color-picker__hue-pointer:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 2px #007cba,0 0 3px 0 #007cba;box-shadow:0 0 0 2px var(--wp-admin-theme-color),0 0 3px 0 var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:-2px}.components-color-picker__inputs-wrapper{align-items:flex-end;display:flex;margin:0 -4px;min-width:255px;padding-top:16px}.components-color-picker__inputs-wrapper fieldset{border:none;flex:1;margin:0;padding:0}.components-color-picker__inputs-wrapper .components-color-picker__inputs-fields .components-text-control__input[type=number]{margin:0;padding:6px 3px}.components-color-picker__inputs-field{width:100%}.components-color-picker__inputs-fields{direction:ltr;display:flex;flex-grow:1;margin-right:4px}.components-color-picker__inputs-fields .components-base-control+.components-base-control{margin-top:0}.components-color-picker__inputs-fields .components-base-control__field{margin:0 2px}.components-color-picker__inputs-toggle{height:30px;padding:0 5px}.components-combobox-control{width:100%}input.components-combobox-control__input[type=text]{border:none;box-shadow:none;line-height:inherit;margin:0;min-height:auto;padding:2px;width:100%}input.components-combobox-control__input[type=text]:focus{box-shadow:none;outline:none}.components-combobox-control__suggestions-container{align-items:flex-start;border:1px solid #757575;border-radius:2px;box-shadow:0 0 0 transparent;display:flex;flex-wrap:wrap;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin:0 0 8px;padding:4px;transition:box-shadow .1s linear;width:100%}@media (prefers-reduced-motion:reduce){.components-combobox-control__suggestions-container{transition-duration:0s}}@media (min-width:600px){.components-combobox-control__suggestions-container{font-size:13px;line-height:normal}}.components-combobox-control__suggestions-container:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__suggestions-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.components-combobox-control__suggestions-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .components-combobox-control__suggestions-container::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .components-combobox-control__suggestions-container::-moz-placeholder{color:hsla(0,0%,100%,.65);opacity:1}.is-dark-theme .components-combobox-control__suggestions-container:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.components-combobox-control__suggestions-container:focus-within{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__reset.components-button{display:flex;height:24px;min-width:24px;padding:0}.components-custom-gradient-picker__gradient-bar:not(.has-gradient){opacity:.4}.components-custom-gradient-picker__gradient-bar{border-radius:36px;height:36px;margin-bottom:12px;margin-top:12px;padding-left:6px;padding-right:30px;width:100%}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__markers-container{position:relative}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point{background:#fff;border-radius:50%;color:#1e1e1e;height:24px;min-width:24px;padding:2px;position:relative;top:6px;width:24px}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point svg{height:100%;width:100%}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button{border:2px solid transparent;border-radius:50%;box-shadow:inset 0 0 0 1.5px #fff;height:24px;padding:0;position:absolute;top:6px;width:24px}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button.is-active,.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #1e1e1e}.components-custom-gradient-picker__color-picker-popover .components-custom-gradient-picker__remove-control-point{display:block;margin-bottom:8px;margin-left:auto;margin-right:auto}.components-custom-gradient-picker__inserter{width:100%}.components-custom-gradient-picker__liner-gradient-indicator{display:inline-block;flex:0 auto;height:20px;width:20px}.components-custom-gradient-picker .components-custom-gradient-picker__ui-line{margin-bottom:16px}.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-angle-picker,.components-custom-gradient-picker .components-custom-gradient-picker__ui-line .components-base-control.components-custom-gradient-picker__type-picker{margin-bottom:0}.components-custom-gradient-picker .components-custom-gradient-picker__toolbar{border:none}.components-custom-gradient-picker .components-custom-gradient-picker__toolbar>div+div{margin-left:1px}.components-custom-gradient-picker .components-custom-gradient-picker__toolbar button.is-pressed>svg{background:#fff;border:1px solid #949494;border-radius:2px}.components-custom-select-control{position:relative}.components-custom-select-control__label{display:block;margin-bottom:8px}.components-custom-select-control__button{border:1px solid #757575;border-radius:2px;min-height:30px;min-width:130px;position:relative;text-align:left}.components-custom-select-control__button.components-custom-select-control__button{padding-right:24px}.components-custom-select-control__button:focus:not(:disabled){border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.components-custom-select-control__button .components-custom-select-control__button-icon{height:100%;padding:0;position:absolute;right:0;top:0}.components-custom-select-control__menu{background-color:#fff;max-height:400px;min-width:100%;overflow:auto;padding:0;position:absolute;z-index:1000000}.components-custom-select-control__menu:focus{border:1px solid #1e1e1e;border-radius:2px;outline:none;transition:none}.components-custom-select-control__item{align-items:center;cursor:default;display:flex;list-style-type:none;padding:10px 5px 10px 25px}.components-custom-select-control__item.is-highlighted{background:#ddd}.components-custom-select-control__item-icon{margin-left:-20px;margin-right:0}.PresetDateRangePicker_panel{padding:0 22px 11px}.PresetDateRangePicker_button{background:0 0;border:2px solid #00a699;box-sizing:border-box;color:#00a699;cursor:pointer;font:inherit;font-weight:700;height:100%;line-height:normal;margin-right:8px;overflow:visible;padding:4px 12px;position:relative;text-align:center}.PresetDateRangePicker_button:active{outline:0}.PresetDateRangePicker_button__selected{background:#00a699;color:#fff}.SingleDatePickerInput{background-color:#fff;display:inline-block}.SingleDatePickerInput__withBorder{border:1px solid #dbdbdb;border-radius:2px}.SingleDatePickerInput__rtl{direction:rtl}.SingleDatePickerInput__disabled{background-color:#f2f2f2}.SingleDatePickerInput__block{display:block}.SingleDatePickerInput__showClearDate{padding-right:30px}.SingleDatePickerInput_clearDate{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;margin:0 10px 0 5px;overflow:visible;padding:10px;position:absolute;right:0;top:50%;transform:translateY(-50%)}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:#dbdbdb;border-radius:50%}.SingleDatePickerInput_clearDate__small{padding:6px}.SingleDatePickerInput_clearDate__hide{visibility:hidden}.SingleDatePickerInput_clearDate_svg{fill:#82888a;height:12px;vertical-align:middle;width:15px}.SingleDatePickerInput_clearDate_svg__small{height:9px}.SingleDatePickerInput_calendarIcon{background:0 0;border:0;color:inherit;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0 5px 0 10px;overflow:visible;padding:10px;vertical-align:middle}.SingleDatePickerInput_calendarIcon_svg{fill:#82888a;height:15px;vertical-align:middle;width:14px}.SingleDatePicker{display:inline-block;position:relative}.SingleDatePicker__block{display:block}.SingleDatePicker_picker{background-color:#fff;position:absolute;z-index:1}.SingleDatePicker_picker__rtl{direction:rtl}.SingleDatePicker_picker__directionLeft{left:0}.SingleDatePicker_picker__directionRight{right:0}.SingleDatePicker_picker__portal{background-color:rgba(0,0,0,.3);height:100%;left:0;position:fixed;top:0;width:100%}.SingleDatePicker_picker__fullScreenPortal{background-color:#fff}.SingleDatePicker_closeButton{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;overflow:visible;padding:15px;position:absolute;right:0;top:0;z-index:2}.SingleDatePicker_closeButton:focus,.SingleDatePicker_closeButton:hover{color:#b0b3b4;text-decoration:none}.SingleDatePicker_closeButton_svg{fill:#cacccd;height:15px;width:15px}.DayPickerKeyboardShortcuts_buttonReset{background:0 0;border:0;border-radius:0;color:inherit;cursor:pointer;font:inherit;font-size:14px;line-height:normal;overflow:visible;padding:0}.DayPickerKeyboardShortcuts_buttonReset:active{outline:0}.DayPickerKeyboardShortcuts_show{position:absolute;width:22px;z-index:2}.DayPickerKeyboardShortcuts_show__bottomRight{border-right:33px solid #00a699;border-top:26px solid transparent;bottom:0;right:0}.DayPickerKeyboardShortcuts_show__bottomRight:hover{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topRight{border-bottom:26px solid transparent;border-right:33px solid #00a699;right:0;top:0}.DayPickerKeyboardShortcuts_show__topRight:hover{border-right:33px solid #008489}.DayPickerKeyboardShortcuts_show__topLeft{border-bottom:26px solid transparent;border-left:33px solid #00a699;left:0;top:0}.DayPickerKeyboardShortcuts_show__topLeft:hover{border-left:33px solid #008489}.DayPickerKeyboardShortcuts_showSpan{color:#fff;position:absolute}.DayPickerKeyboardShortcuts_showSpan__bottomRight{bottom:0;right:-28px}.DayPickerKeyboardShortcuts_showSpan__topRight{right:-28px;top:1px}.DayPickerKeyboardShortcuts_showSpan__topLeft{left:-28px;top:1px}.DayPickerKeyboardShortcuts_panel{background:#fff;border:1px solid #dbdbdb;border-radius:2px;bottom:0;left:0;margin:33px;overflow:auto;padding:22px;position:absolute;right:0;top:0;z-index:2}.DayPickerKeyboardShortcuts_title{font-size:16px;font-weight:700;margin:0}.DayPickerKeyboardShortcuts_list{font-size:14px;list-style:none;padding:0}.DayPickerKeyboardShortcuts_close{position:absolute;right:22px;top:22px;z-index:2}.DayPickerKeyboardShortcuts_close:active{outline:0}.DayPickerKeyboardShortcuts_closeSvg{fill:#cacccd;height:15px;width:15px}.DayPickerKeyboardShortcuts_closeSvg:focus,.DayPickerKeyboardShortcuts_closeSvg:hover{fill:#82888a}.CalendarDay{box-sizing:border-box;cursor:pointer;font-size:14px;text-align:center}.CalendarDay:active{outline:0}.CalendarDay__defaultCursor{cursor:default}.CalendarDay__default{background:#fff;border:1px solid #e4e7e7;color:#484848}.CalendarDay__default:hover{background:#e4e7e7;border:1px double #e4e7e7;color:inherit}.CalendarDay__hovered_offset{background:#f4f5f5;border:1px double #e4e7e7;color:inherit}.CalendarDay__outside{background:#fff;border:0;color:#484848}.CalendarDay__outside:hover{border:0}.CalendarDay__blocked_minimum_nights{background:#fff;border:1px solid #eceeee;color:#cacccd}.CalendarDay__blocked_minimum_nights:active,.CalendarDay__blocked_minimum_nights:hover{background:#fff;color:#cacccd}.CalendarDay__highlighted_calendar{background:#ffe8bc;color:#484848}.CalendarDay__highlighted_calendar:active,.CalendarDay__highlighted_calendar:hover{background:#ffce71;color:#484848}.CalendarDay__selected_span{background:#66e2da;border:1px solid #33dacd;color:#fff}.CalendarDay__selected_span:active,.CalendarDay__selected_span:hover{background:#33dacd;border:1px solid #33dacd;color:#fff}.CalendarDay__last_in_range{border-right:#00a699}.CalendarDay__selected,.CalendarDay__selected:active,.CalendarDay__selected:hover{background:#00a699;border:1px solid #00a699;color:#fff}.CalendarDay__hovered_span,.CalendarDay__hovered_span:hover{background:#b2f1ec;border:1px solid #80e8e0;color:#007a87}.CalendarDay__hovered_span:active{background:#80e8e0;border:1px solid #80e8e0;color:#007a87}.CalendarDay__blocked_calendar,.CalendarDay__blocked_calendar:active,.CalendarDay__blocked_calendar:hover{background:#cacccd;border:1px solid #cacccd;color:#82888a}.CalendarDay__blocked_out_of_range,.CalendarDay__blocked_out_of_range:active,.CalendarDay__blocked_out_of_range:hover{background:#fff;border:1px solid #e4e7e7;color:#cacccd}.CalendarMonth{background:#fff;text-align:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top}.CalendarMonth_table{border-collapse:collapse;border-spacing:0}.CalendarMonth_verticalSpacing{border-collapse:separate}.CalendarMonth_caption{caption-side:top;color:#484848;font-size:18px;padding-bottom:37px;padding-top:22px;text-align:center}.CalendarMonth_caption__verticalScrollable{padding-bottom:7px;padding-top:12px}.CalendarMonthGrid{background:#fff;text-align:left;z-index:0}.CalendarMonthGrid__animating{z-index:1}.CalendarMonthGrid__horizontal{left:9px;position:absolute}.CalendarMonthGrid__vertical{margin:0 auto}.CalendarMonthGrid__vertical_scrollable{margin:0 auto;overflow-y:scroll}.CalendarMonthGrid_month__horizontal{display:inline-block;min-height:100%;vertical-align:top}.CalendarMonthGrid_month__hideForAnimation{opacity:0;pointer-events:none;position:absolute;z-index:-1}.CalendarMonthGrid_month__hidden{visibility:hidden}.DayPickerNavigation{position:relative;z-index:2}.DayPickerNavigation__horizontal{height:0}.DayPickerNavigation__verticalDefault{bottom:0;height:52px;left:0;position:absolute;width:100%}.DayPickerNavigation__verticalScrollableDefault{position:relative}.DayPickerNavigation_button{border:0;cursor:pointer;margin:0;padding:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}.DayPickerNavigation_button__default{background-color:#fff;border:1px solid #e4e7e7;color:#757575}.DayPickerNavigation_button__default:focus,.DayPickerNavigation_button__default:hover{border:1px solid #c4c4c4}.DayPickerNavigation_button__default:active{background:#f2f2f2}.DayPickerNavigation_button__horizontalDefault{border-radius:3px;line-height:.78;padding:6px 9px;position:absolute;top:18px}.DayPickerNavigation_leftButton__horizontalDefault{left:22px}.DayPickerNavigation_rightButton__horizontalDefault{right:22px}.DayPickerNavigation_button__verticalDefault{background:#fff;box-shadow:0 0 5px 2px rgba(0,0,0,.1);display:inline-block;height:100%;padding:5px;position:relative;width:50%}.DayPickerNavigation_nextButton__verticalDefault{border-left:0}.DayPickerNavigation_nextButton__verticalScrollableDefault{width:100%}.DayPickerNavigation_svg__horizontal{fill:#82888a;display:block;height:19px;width:19px}.DayPickerNavigation_svg__vertical{fill:#484848;display:block;height:42px;width:42px}.DayPicker{position:relative;text-align:left}.DayPicker,.DayPicker__horizontal{background:#fff}.DayPicker__verticalScrollable{height:100%}.DayPicker__hidden{visibility:hidden}.DayPicker__withBorder{border-radius:3px;box-shadow:0 2px 6px rgba(0,0,0,.05),0 0 0 1px rgba(0,0,0,.07)}.DayPicker_portal__horizontal{box-shadow:none;left:50%;position:absolute;top:50%}.DayPicker_portal__vertical{position:static}.DayPicker_focusRegion{outline:0}.DayPicker_calendarInfo__horizontal,.DayPicker_wrapper__horizontal{display:inline-block;vertical-align:top}.DayPicker_weekHeaders{position:relative}.DayPicker_weekHeaders__horizontal{margin-left:9px}.DayPicker_weekHeader{color:#757575;position:absolute;text-align:left;top:62px;z-index:2}.DayPicker_weekHeader__vertical{left:50%}.DayPicker_weekHeader__verticalScrollable{background:#fff;border-bottom:1px solid #dbdbdb;display:table-row;left:0;margin-left:0;text-align:center;top:0;width:100%}.DayPicker_weekHeader_ul{font-size:14px;list-style:none;margin:1px 0;padding-left:0;padding-right:0}.DayPicker_weekHeader_li{display:inline-block;text-align:center}.DayPicker_transitionContainer{border-radius:3px;overflow:hidden;position:relative}.DayPicker_transitionContainer__horizontal{transition:height .2s ease-in-out}.DayPicker_transitionContainer__vertical{width:100%}.DayPicker_transitionContainer__verticalScrollable{bottom:0;height:100%;left:0;overflow-y:scroll;padding-top:20px;position:absolute;right:0;top:0}.DateInput{background:#fff;display:inline-block;margin:0;padding:0;position:relative;vertical-align:middle;width:130px}.DateInput__small{width:97px}.DateInput__block{width:100%}.DateInput__disabled{background:#f2f2f2;color:#dbdbdb}.DateInput_input{background-color:#fff;border:0;border-bottom:2px solid transparent;border-radius:0;color:#484848;font-size:19px;font-weight:200;line-height:24px;padding:11px 11px 9px;width:100%}.DateInput_input__small{font-size:15px;letter-spacing:.2px;line-height:18px;padding:7px 7px 5px}.DateInput_input__regular{font-weight:auto}.DateInput_input__readOnly{-webkit-user-select:none;-ms-user-select:none;user-select:none}.DateInput_input__focused{background:#fff;border:0;border-bottom:2px solid #008489;outline:0}.DateInput_input__disabled{background:#f2f2f2;font-style:italic}.DateInput_screenReaderMessage{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.DateInput_fang{height:10px;left:22px;position:absolute;width:20px;z-index:2}.DateInput_fangShape{fill:#fff}.DateInput_fangStroke{stroke:#dbdbdb;fill:transparent}.DateRangePickerInput{background-color:#fff;display:inline-block}.DateRangePickerInput__disabled{background:#f2f2f2}.DateRangePickerInput__withBorder{border:1px solid #dbdbdb;border-radius:2px}.DateRangePickerInput__rtl{direction:rtl}.DateRangePickerInput__block{display:block}.DateRangePickerInput__showClearDates{padding-right:30px}.DateRangePickerInput_arrow{color:#484848;display:inline-block;vertical-align:middle}.DateRangePickerInput_arrow_svg{fill:#484848;height:24px;vertical-align:middle;width:24px}.DateRangePickerInput_clearDates{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;margin:0 10px 0 5px;overflow:visible;padding:10px;position:absolute;right:0;top:50%;transform:translateY(-50%)}.DateRangePickerInput_clearDates__small{padding:6px}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:#dbdbdb;border-radius:50%}.DateRangePickerInput_clearDates__hide{visibility:hidden}.DateRangePickerInput_clearDates_svg{fill:#82888a;height:12px;vertical-align:middle;width:15px}.DateRangePickerInput_clearDates_svg__small{height:9px}.DateRangePickerInput_calendarIcon{background:0 0;border:0;color:inherit;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0 5px 0 10px;overflow:visible;padding:10px;vertical-align:middle}.DateRangePickerInput_calendarIcon_svg{fill:#82888a;height:15px;vertical-align:middle;width:14px}.DateRangePicker{display:inline-block;position:relative}.DateRangePicker__block{display:block}.DateRangePicker_picker{background-color:#fff;position:absolute;z-index:1}.DateRangePicker_picker__rtl{direction:rtl}.DateRangePicker_picker__directionLeft{left:0}.DateRangePicker_picker__directionRight{right:0}.DateRangePicker_picker__portal{background-color:rgba(0,0,0,.3);height:100%;left:0;position:fixed;top:0;width:100%}.DateRangePicker_picker__fullScreenPortal{background-color:#fff}.DateRangePicker_closeButton{background:0 0;border:0;color:inherit;cursor:pointer;font:inherit;line-height:normal;overflow:visible;padding:15px;position:absolute;right:0;top:0;z-index:2}.DateRangePicker_closeButton:focus,.DateRangePicker_closeButton:hover{color:#b0b3b4;text-decoration:none}.DateRangePicker_closeButton_svg{fill:#cacccd;height:15px;width:15px}.components-datetime{padding:0}.components-datetime .components-datetime__calendar-help{padding:16px}.components-datetime .components-datetime__calendar-help h4{margin:0}.components-datetime .components-datetime__buttons{display:flex;justify-content:space-between}.components-datetime .components-datetime__date-help-toggle{display:block;margin-left:auto}.components-datetime fieldset{border:0;margin:0;padding:0}.components-datetime input,.components-datetime select{border:1px solid #757575;border-radius:2px;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear}@media (prefers-reduced-motion:reduce){.components-datetime input,.components-datetime select{transition-duration:0s}}.components-datetime .components-button,.components-datetime input[type=number],.components-datetime select{height:30px;margin-bottom:0;margin-top:0}.components-datetime__date{border-top:1px solid #ddd;min-height:236px}.components-datetime__date .DayPickerNavigation_leftButton__horizontalDefault{left:0}.components-datetime__date .CalendarMonth_caption{font-size:13px}.components-datetime__date .CalendarMonth_table{border-collapse:separate;border-spacing:2px}.components-datetime__date .CalendarDay{border:none;border-radius:50%;font-size:13px;text-align:center}.components-datetime__date .CalendarDay:focus{box-shadow:inset 0 0 0 1.5px #007cba,inset 0 0 0 2.5px #fff;box-shadow:inset 0 0 0 1.5px var(--wp-admin-theme-color),inset 0 0 0 2.5px #fff;outline:2px solid transparent}.components-datetime__date .CalendarDay__selected{background:#007cba;background:var(--wp-admin-theme-color);border:2px solid transparent}.components-datetime__date .CalendarDay__selected:hover{background:#005a87;background:var(--wp-admin-theme-color-darker-20)}.components-datetime__date .CalendarDay__selected:focus{box-shadow:inset 0 0 0 1px #fff}.components-datetime__date .DayPickerNavigation_button__horizontalDefault{padding:2px 8px;top:20px}.components-datetime__date .DayPickerNavigation_button__horizontalDefault:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-datetime__date .DayPicker_weekHeader{top:50px}.components-datetime__date .DayPicker_weekHeader .DayPicker_weekHeader_ul{margin:1px 0;padding-left:0;padding-right:0}.components-datetime__date.is-description-visible .DayPicker{visibility:hidden}.components-datetime__time{padding-bottom:16px}.components-datetime__time fieldset{margin-bottom:.5em;position:relative}.components-datetime__time fieldset+fieldset{margin-bottom:0}.components-datetime__time .components-datetime__time-field-am-pm fieldset{margin-top:0}.components-datetime__time .components-datetime__time-wrapper{display:flex}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-separator{display:inline-block;padding:0 3px 0 0}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field-time{direction:ltr}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select{margin-right:4px}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field select:focus{position:relative;z-index:1}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]{-moz-appearance:textfield;margin-right:4px;padding:2px;text-align:center}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]:focus{position:relative;z-index:1}.components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.components-datetime__time.is-12-hour .components-datetime__time-field-day input{border-radius:2px 0 0 2px!important;margin:-4px 0 0!important}.components-datetime__time.is-12-hour .components-datetime__time-field-year input{border-radius:0 2px 2px 0!important}.components-datetime__timezone{line-height:30px;margin-left:4px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.components-datetime__time-legend{font-weight:600;margin-top:.5em}.components-datetime__time-legend.invisible{left:-999em;position:absolute;top:-999em}.components-datetime__time-field-day-input,.components-datetime__time-field-hours-input,.components-datetime__time-field-minutes-input{width:35px}.components-datetime__time-field-year-input{width:55px}.components-datetime__time-field-month-select{max-width:145px}.components-popover .components-datetime__date{padding-left:4px}.block-editor-dimension-control .components-base-control__field{align-items:center;display:flex}.block-editor-dimension-control .components-base-control__label{align-items:center;display:flex;margin-bottom:0;margin-right:1em}.block-editor-dimension-control .components-base-control__label .dashicon{margin-right:.5em}.block-editor-dimension-control.is-manual .components-base-control__label{width:10em}.components-disabled{pointer-events:none;position:relative}.components-disabled:after{bottom:0;content:"";left:0;position:absolute;right:0;top:0}.components-disabled *{pointer-events:none}body.is-dragging-components-draggable{cursor:move;cursor:grabbing!important}.components-draggable__invisible-drag-image{height:50px;left:-1000px;position:fixed;width:50px}.components-draggable__clone{background:transparent;padding:0;pointer-events:none;position:fixed;z-index:1000000000}.components-drop-zone{border:2px solid #007cba;border:2px solid var(--wp-admin-theme-color);border-radius:2px;bottom:0;left:0;opacity:0;position:absolute;right:0;top:0;transition:opacity .3s,background-color .3s,visibility 0s .3s;visibility:hidden;z-index:40}@media (prefers-reduced-motion:reduce){.components-drop-zone{transition-duration:0s}}.components-drop-zone.is-active{opacity:1;transition:opacity .3s,background-color .3s;visibility:visible}@media (prefers-reduced-motion:reduce){.components-drop-zone.is-active{transition-duration:0s}}.components-drop-zone.is-dragging-over-element{background-color:#007cba;background-color:var(--wp-admin-theme-color)}.components-drop-zone__content{color:#fff;left:0;position:absolute;right:0;text-align:center;top:50%;transform:translateY(-50%);transition:transform .2s ease-in-out;width:100%;z-index:50}@media (prefers-reduced-motion:reduce){.components-drop-zone__content{transition-duration:0s}}.components-drop-zone.is-dragging-over-element .components-drop-zone__content{transform:translateY(-50%) scale(1.05)}.components-drop-zone__content-icon,.components-drop-zone__content-text{display:block}.components-drop-zone__content-icon{fill:currentColor;line-height:0;margin:0 auto}.components-drop-zone__content-text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}.components-drop-zone__provider{height:100%}.components-dropdown{display:inline-block}.components-dropdown__content .components-popover__content>div{padding:12px}.components-dropdown-menu__popover .components-popover__content{width:200px}.components-dropdown-menu__menu{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;width:100%}.components-dropdown-menu__menu .components-dropdown-menu__menu-item,.components-dropdown-menu__menu .components-menu-item{cursor:pointer;outline:none;padding:6px;width:100%}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator,.components-dropdown-menu__menu .components-menu-item.has-separator{margin-top:6px;overflow:visible;position:relative}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator:before,.components-dropdown-menu__menu .components-menu-item.has-separator:before{background-color:#ddd;box-sizing:content-box;content:"";display:block;height:1px;left:0;position:absolute;right:0;top:-3px}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.is-active svg,.components-dropdown-menu__menu .components-menu-item.is-active svg{background:#1e1e1e;border-radius:1px;box-shadow:0 0 0 1px #1e1e1e;color:#fff}.components-dropdown-menu__menu .components-dropdown-menu__menu-item>svg,.components-dropdown-menu__menu .components-menu-item>svg{border-radius:2px;height:24px;width:24px}.components-dropdown-menu__menu .components-menu-item__button,.components-dropdown-menu__menu .components-menu-item__button.components-button{height:auto;min-height:36px;padding-left:8px;padding-right:8px;text-align:left}.components-dropdown-menu__menu .components-menu-item__button .components-menu-item__info-wrapper,.components-dropdown-menu__menu .components-menu-item__button.components-button .components-menu-item__info-wrapper{max-width:calc(100% - 32px)}.components-dropdown-menu__menu .components-menu-group{margin:0 -12px;padding:12px}.components-dropdown-menu__menu .components-menu-group:first-child{margin-top:-12px}.components-dropdown-menu__menu .components-menu-group:last-child{margin-bottom:-12px}.components-dropdown-menu__menu .components-menu-group+.components-menu-group{border-top:1px solid #ccc;margin-top:0;padding:12px}.is-alternate .components-dropdown-menu__menu .components-menu-group+.components-menu-group{border-color:#1e1e1e}.components-font-size-picker__controls{align-items:center;display:flex;flex-wrap:wrap;margin-bottom:24px;max-width:248px}.components-font-size-picker__controls .components-font-size-picker__number{border:1px solid #757575;border-radius:2px;box-shadow:0 0 0 transparent;display:inline-block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;font-weight:500;height:30px;line-height:normal;margin:8px 8px 0 0;padding:6px 8px;transition:box-shadow .1s linear;width:54px}@media (prefers-reduced-motion:reduce){.components-font-size-picker__controls .components-font-size-picker__number{transition-duration:0s}}@media (min-width:600px){.components-font-size-picker__controls .components-font-size-picker__number{font-size:13px;line-height:normal}}.components-font-size-picker__controls .components-font-size-picker__number:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-font-size-picker__controls .components-font-size-picker__number::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-font-size-picker__controls .components-font-size-picker__number::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.components-font-size-picker__controls .components-font-size-picker__number:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .components-font-size-picker__controls .components-font-size-picker__number::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .components-font-size-picker__controls .components-font-size-picker__number::-moz-placeholder{color:hsla(0,0%,100%,.65);opacity:1}.is-dark-theme .components-font-size-picker__controls .components-font-size-picker__number:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.components-font-size-picker__controls .components-font-size-picker__number[value=""]+.components-button{cursor:default;opacity:.3;pointer-events:none}.components-font-size-picker__controls .components-font-size-picker__number-container{display:flex;flex-direction:column}.components-font-size-picker__controls .components-font-size-picker__select{margin-right:8px}.components-font-size-picker__controls .components-color-palette__clear{height:30px;margin-top:26px}.components-font-size-picker__custom-input .components-range-control__slider+.dashicon{height:30px;width:30px}.components-font-size-picker{border:0;margin:0;padding:0}.components-form-toggle{display:inline-block;position:relative}.components-form-toggle .components-form-toggle__track{background-color:#fff;border:1px solid #1e1e1e;border-radius:9px;box-sizing:border-box;content:"";display:inline-block;height:18px;transition:background .2s ease;vertical-align:top;width:36px}@media (prefers-reduced-motion:reduce){.components-form-toggle .components-form-toggle__track{transition-duration:0s}}.components-form-toggle .components-form-toggle__thumb{background-color:#1e1e1e;border:5px solid #1e1e1e;border-radius:50%;box-sizing:border-box;display:block;height:12px;left:3px;position:absolute;top:3px;transition:transform .1s ease;width:12px}@media (prefers-reduced-motion:reduce){.components-form-toggle .components-form-toggle__thumb{transition-duration:0s}}.components-form-toggle.is-checked .components-form-toggle__track{background-color:#007cba;background-color:var(--wp-admin-theme-color);border:9px solid transparent}.components-form-toggle .components-form-toggle__input:focus+.components-form-toggle__track{box-shadow:0 0 0 2px #fff,0 0 0 3.5px #007cba;box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:2px}.components-form-toggle.is-checked .components-form-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(18px)}.components-disabled .components-form-toggle{opacity:.3}.components-form-toggle input.components-form-toggle__input[type=checkbox]{border:none;height:100%;left:0;margin:0;opacity:0;padding:0;position:absolute;top:0;width:100%;z-index:1}.components-form-toggle input.components-form-toggle__input[type=checkbox]:checked{background:none}.components-form-toggle input.components-form-toggle__input[type=checkbox]:before{content:""}.components-form-token-field__input-container{align-items:flex-start;border:1px solid #757575;border-radius:2px;box-shadow:0 0 0 transparent;cursor:text;display:flex;flex-wrap:wrap;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin:0 0 8px;padding:4px;transition:box-shadow .1s linear;width:100%}@media (prefers-reduced-motion:reduce){.components-form-token-field__input-container{transition-duration:0s}}@media (min-width:600px){.components-form-token-field__input-container{font-size:13px;line-height:normal}}.components-form-token-field__input-container:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-form-token-field__input-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-form-token-field__input-container::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.components-form-token-field__input-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .components-form-token-field__input-container::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .components-form-token-field__input-container::-moz-placeholder{color:hsla(0,0%,100%,.65);opacity:1}.is-dark-theme .components-form-token-field__input-container:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.components-form-token-field__input-container.is-disabled{background:#ddd;border-color:#ddd}.components-form-token-field__input-container.is-active{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-form-token-field__input-container input[type=text].components-form-token-field__input{background:inherit;border:0;box-shadow:none;color:#1e1e1e;display:inline-block;margin-left:4px;max-width:100%;min-height:24px;padding:0;width:100%}.components-form-token-field.is-active .components-form-token-field__input-container input[type=text].components-form-token-field__input,.components-form-token-field__input-container input[type=text].components-form-token-field__input:focus{box-shadow:none;outline:none}.components-form-token-field__input-container .components-form-token-field__token+input[type=text].components-form-token-field__input{width:auto}.components-form-token-field__label{display:inline-block;margin-bottom:4px}.components-form-token-field__help{color:#757575;font-size:12px;font-style:normal}.components-form-token-field__token{color:#1e1e1e;display:flex;font-size:13px;margin:2px 4px 2px 0;max-width:100%}.components-form-token-field__token.is-success .components-form-token-field__remove-token,.components-form-token-field__token.is-success .components-form-token-field__token-text{background:#4ab866}.components-form-token-field__token.is-error .components-form-token-field__remove-token,.components-form-token-field__token.is-error .components-form-token-field__token-text{background:#cc1818}.components-form-token-field__token.is-validating .components-form-token-field__remove-token,.components-form-token-field__token.is-validating .components-form-token-field__token-text{color:#757575}.components-form-token-field__token.is-borderless{padding:0 16px 0 0;position:relative}.components-form-token-field__token.is-borderless .components-form-token-field__token-text{background:transparent;color:#007cba;color:var(--wp-admin-theme-color)}.components-form-token-field__token.is-borderless .components-form-token-field__remove-token{background:transparent;color:#757575;position:absolute;right:0;top:1px}.components-form-token-field__token.is-borderless.is-success .components-form-token-field__token-text{color:#4ab866}.components-form-token-field__token.is-borderless.is-error .components-form-token-field__token-text{border-radius:4px 0 0 4px;color:#cc1818;padding:0 4px 0 6px}.components-form-token-field__token.is-borderless.is-validating .components-form-token-field__token-text{color:#1e1e1e}.components-form-token-field__token.is-disabled .components-form-token-field__remove-token{cursor:default}.components-form-token-field__remove-token.components-button,.components-form-token-field__token-text{background:#ddd;display:inline-block;height:auto;line-height:24px;transition:all .2s cubic-bezier(.4,1,.4,1)}@media (prefers-reduced-motion:reduce){.components-form-token-field__remove-token.components-button,.components-form-token-field__token-text{animation-duration:1ms;transition-duration:0s}}.components-form-token-field__token-text{border-radius:12px 0 0 12px;overflow:hidden;padding:0 4px 0 8px;text-overflow:ellipsis;white-space:nowrap}.components-form-token-field__remove-token.components-button{border-radius:0 12px 12px 0;color:#757575;cursor:pointer;line-height:10px;overflow:initial;padding:0 2px}.components-form-token-field__remove-token.components-button:hover{color:#1e1e1e}.components-form-token-field__suggestions-list{border-top:1px solid #757575;flex:1 0 100%;list-style:none;margin:4px -4px -4px;max-height:9em;min-width:100%;overflow-y:auto;padding:0;transition:all .15s ease-in-out}@media (prefers-reduced-motion:reduce){.components-form-token-field__suggestions-list{transition-duration:0s}}.components-form-token-field__suggestion{color:#757575;cursor:pointer;display:block;font-size:13px;margin:0;padding:4px 8px}.components-form-token-field__suggestion.is-selected{background:#007cba;background:var(--wp-admin-theme-color);color:#fff}.components-form-token-field__suggestion-match{text-decoration:underline}@media (min-width:600px){.components-guide{width:600px}}.components-guide .components-modal__header{background:none;border-bottom:none;margin:0;padding:0;width:100%}.components-guide .components-modal__header .components-button{align-self:flex-start;margin:8px 8px 0 0;position:static}.components-guide .components-modal__header .components-button:hover svg{fill:#fff}.components-guide__container{display:flex;flex-direction:column;justify-content:space-between;margin-top:-60px;min-height:100%}.components-guide__page{display:flex;flex-direction:column;justify-content:center;position:relative}@media (min-width:600px){.components-guide__page{min-height:300px}}.components-guide__footer{align-content:center;display:flex;height:30px;justify-content:center;margin:0 0 24px;padding:0 32px;position:relative;width:100%}@media (max-width:600px){.components-guide__footer{bottom:0;position:absolute}}.components-guide__page-control{margin:8px 0;text-align:center}.components-guide__page-control li{display:inline-block}.components-guide__page-control .components-button{height:30px;min-width:20px}.components-guide .components-modal__content{padding:0}.components-modal__frame.components-guide{border:none;height:80vh;max-height:575px;min-width:312px}@media (max-width:600px){.components-modal__frame.components-guide{bottom:5%;left:16px;margin:0 auto;right:16px;top:5%}}.components-button.components-guide__back-button,.components-button.components-guide__finish-button,.components-button.components-guide__forward-button{height:30px;position:absolute}.components-button.components-guide__back-button,.components-button.components-guide__forward-button{font-size:13px;padding:4px 2px}.components-button.components-guide__back-button.has-text svg,.components-button.components-guide__forward-button.has-text svg{margin:0}.components-button.components-guide__back-button:hover,.components-button.components-guide__forward-button:hover{text-decoration:underline}.components-button.components-guide__back-button{left:32px}.components-button.components-guide__forward-button{color:#1386bf;font-weight:700;right:32px}.components-button.components-guide__finish-button{right:32px}.components-button.components-guide__inline-finish-button{display:none}.components-navigate-regions.is-focusing-regions [role=region]{position:relative}.components-navigate-regions.is-focusing-regions [role=region]:focus:after{bottom:0;box-shadow:inset 0 0 0 4px #007cba;box-shadow:inset 0 0 0 4px var(--wp-admin-theme-color);content:"";left:0;outline:4px solid transparent;pointer-events:none;position:absolute;right:0;top:0}@supports (outline-offset:1px){.components-navigate-regions.is-focusing-regions [role=region]:focus:after{content:none}.components-navigate-regions.is-focusing-regions [role=region]:focus{outline-color:#007cba;outline-color:var(--wp-admin-theme-color);outline-offset:-4px;outline-style:solid;outline-width:4px}}.components-menu-group+.components-menu-group{border-top:1px solid #1e1e1e;margin-top:8px;padding-top:8px}.components-menu-group__label{color:#757575;font-size:11px;font-weight:500;margin-bottom:12px;margin-top:4px;padding:0 8px;text-transform:uppercase}.components-menu-item__button,.components-menu-item__button.components-button{width:100%}.components-menu-item__button .components-menu-items__item-icon,.components-menu-item__button.components-button .components-menu-items__item-icon{display:inline-block;flex:0 0 auto;margin-left:auto;margin-right:-2px}.components-menu-item__button .components-menu-item__shortcut+.components-menu-items__item-icon,.components-menu-item__button.components-button .components-menu-item__shortcut+.components-menu-items__item-icon{margin-left:8px}.components-menu-item__button .block-editor-block-icon,.components-menu-item__button.components-button .block-editor-block-icon{margin-left:-2px;margin-right:8px}.components-menu-item__info-wrapper{display:flex;flex-direction:column}.components-menu-item__info{color:#757575;font-size:12px;margin-top:4px}.components-menu-item__shortcut{-ms-grid-row-align:center;align-self:center;color:currentColor;display:none;margin-left:auto;margin-right:0;padding-left:12px}@media (min-width:480px){.components-menu-item__shortcut{display:inline}}.components-menu-items-choice svg,.components-menu-items-choice.components-button svg{margin-right:12px}.components-menu-items-choice.components-button.has-icon,.components-menu-items-choice.has-icon{padding-left:12px}.components-modal__screen-overlay{animation:edit-post__fade-in-animation .2s ease-out 0s;animation-fill-mode:forwards;background-color:rgba(0,0,0,.7);bottom:0;left:0;position:fixed;right:0;top:0;z-index:100000}@media (prefers-reduced-motion:reduce){.components-modal__screen-overlay{animation-duration:1ms}}.components-modal__frame{background:#fff;border:1px solid #ddd;bottom:0;box-shadow:0 3px 30px rgba(0,0,0,.2);box-sizing:border-box;left:0;margin:0;overflow:auto;position:absolute;right:0;top:0}@media (min-width:600px){.components-modal__frame{animation:components-modal__appear-animation .1s ease-out;animation-fill-mode:forwards;bottom:auto;left:50%;max-height:calc(100% - 120px);max-width:calc(100% - 32px);min-width:360px;right:auto;top:50%;transform:translate(-50%,-50%)}}@media (min-width:600px) and (prefers-reduced-motion:reduce){.components-modal__frame{animation-duration:1ms}}@keyframes components-modal__appear-animation{0%{margin-top:32px}to{margin-top:0}}.components-modal__header{align-items:center;background:#fff;border-bottom:1px solid #ddd;box-sizing:border-box;display:flex;flex-direction:row;height:60px;justify-content:space-between;margin:0 -24px 24px;padding:0 24px;position:relative;position:sticky;top:0;z-index:10}@supports (-ms-ime-align:auto){.components-modal__header{position:fixed;width:100%}}.components-modal__header .components-modal__header-heading{font-size:1rem;font-weight:600}.components-modal__header h1{line-height:1;margin:0}.components-modal__header .components-button{left:8px;position:relative}.components-modal__header-heading-container{align-items:center;display:flex;flex-direction:row;flex-grow:1;justify-content:left}.components-modal__header-icon-container{display:inline-block}.components-modal__header-icon-container svg{max-height:36px;max-width:36px;padding:8px}.components-modal__content{box-sizing:border-box;height:100%;padding:0 24px 24px}@supports (-ms-ime-align:auto){.components-modal__content{padding-top:60px}}.components-notice{align-items:center;background-color:#fff;border-left:4px solid #007cba;border-left:4px solid var(--wp-admin-theme-color);display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;margin:5px 15px 2px;padding:8px 12px}.components-notice.is-dismissible{padding-right:36px;position:relative}.components-notice.is-success{background-color:#eff9f1;border-left-color:#4ab866}.components-notice.is-warning{background-color:#fef8ee;border-left-color:#f0b849}.components-notice.is-error{background-color:#f4a2a2;border-left-color:#cc1818}.components-notice__content{flex-grow:1;margin:4px 25px 4px 0}.components-notice__action.components-button,.components-notice__action.components-button.is-link{margin-left:12px}.components-notice__action.components-button.is-secondary{vertical-align:initial}.components-notice__dismiss{align-self:flex-start;color:#757575;flex-shrink:0}.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):focus,.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):active,.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{background-color:transparent;color:#1e1e1e}.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{box-shadow:none}.components-notice-list{box-sizing:border-box;max-width:100vw;z-index:29}.components-notice-list .components-notice__content{line-height:2;margin-bottom:12px;margin-top:12px}.components-notice-list .components-notice__action.components-button{display:block;margin-left:0;margin-top:8px}.components-panel{background:#fff;border:1px solid #e0e0e0}.components-panel>.components-panel__body:first-child,.components-panel>.components-panel__header:first-child{margin-top:-1px}.components-panel>.components-panel__body:last-child,.components-panel>.components-panel__header:last-child{border-bottom-width:0}.components-panel+.components-panel{margin-top:-1px}.components-panel__body{border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0}.components-panel__body h3{margin:0 0 .5em}.components-panel__body.is-opened{padding:16px}.components-panel__header{align-items:center;border-bottom:1px solid #ddd;border-top:1px solid #ddd;display:flex;height:48px;justify-content:space-between;padding:0 16px}.components-panel__header h2{color:inherit;font-size:inherit;margin:0}.components-panel__body+.components-panel__body,.components-panel__body+.components-panel__header,.components-panel__header+.components-panel__body,.components-panel__header+.components-panel__header{margin-top:-1px}.components-panel__body>.components-panel__body-title{display:block;font-size:inherit;margin-bottom:0;margin-top:0;padding:0;transition:background .1s ease-in-out}@media (prefers-reduced-motion:reduce){.components-panel__body>.components-panel__body-title{transition-duration:0s}}.components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 5px}.components-panel__body>.components-panel__body-title:hover{background:#f0f0f0;border:none}.components-panel__body-toggle.components-button{border:none;box-shadow:none;color:#1e1e1e;font-weight:500;height:auto;outline:none;padding:16px;position:relative;text-align:left;transition:background .1s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.components-panel__body-toggle.components-button{transition-duration:0s}}.components-panel__body-toggle.components-button:focus{border-radius:0;box-shadow:inset 0 0 0 1.5px #007cba;box-shadow:inset 0 0 0 1.5px var(--wp-admin-theme-color)}.components-panel__body-toggle.components-button .components-panel__arrow{fill:currentColor;color:#1e1e1e;position:absolute;right:16px;top:50%;transform:translateY(-50%);transition:color .1s ease-in-out}@media (prefers-reduced-motion:reduce){.components-panel__body-toggle.components-button .components-panel__arrow{transition-duration:0s}}body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right{-ms-filter:fliph;filter:FlipH;margin-top:-10px;transform:scaleX(-1)}.components-panel__icon{color:#757575;margin:-2px 0 -2px 6px}.components-panel__body-toggle-icon{margin-right:-5px}.components-panel__color-title{float:left;height:19px}.components-panel__row{align-items:center;display:flex;justify-content:space-between;margin-top:8px;min-height:36px}.components-panel__row select{min-width:0}.components-panel__row label{flex-shrink:0;margin-right:12px;max-width:75%}.components-panel__row:empty,.components-panel__row:first-of-type{margin-top:0}.components-panel .circle-picker{padding-bottom:20px}.components-placeholder.components-placeholder{-moz-font-smoothing:subpixel-antialiased;-webkit-font-smoothing:subpixel-antialiased;background-color:#fff;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;box-sizing:border-box;color:#1e1e1e;margin:0;min-height:200px;outline:1px solid transparent;padding:1em;position:relative;text-align:left;width:100%}@supports (position:sticky){.components-placeholder.components-placeholder{align-items:flex-start;display:flex;flex-direction:column;justify-content:center}}.components-placeholder.components-placeholder .components-base-control__label{font-size:13px}.components-placeholder__error,.components-placeholder__fieldset,.components-placeholder__instructions,.components-placeholder__label{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.components-placeholder__label{align-items:center;display:flex;font-weight:600;margin-bottom:16px}.components-placeholder__label .block-editor-block-icon,.components-placeholder__label .dashicon,.components-placeholder__label>svg{fill:currentColor;margin-right:1ch}.components-placeholder__fieldset,.components-placeholder__fieldset form{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.components-placeholder__fieldset form p,.components-placeholder__fieldset p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.components-placeholder__fieldset.is-column-layout,.components-placeholder__fieldset.is-column-layout form{flex-direction:column}.components-placeholder__input[type=url]{border:1px solid #757575;border-radius:2px;box-shadow:0 0 0 transparent;flex:1 1 auto;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin:0 8px 0 0;padding:6px 8px;transition:box-shadow .1s linear}@media (prefers-reduced-motion:reduce){.components-placeholder__input[type=url]{transition-duration:0s}}@media (min-width:600px){.components-placeholder__input[type=url]{font-size:13px;line-height:normal}}.components-placeholder__input[type=url]:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-placeholder__input[type=url]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-placeholder__input[type=url]::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.components-placeholder__input[type=url]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .components-placeholder__input[type=url]::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .components-placeholder__input[type=url]::-moz-placeholder{color:hsla(0,0%,100%,.65);opacity:1}.is-dark-theme .components-placeholder__input[type=url]:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.components-placeholder__instructions{margin-bottom:1em}.components-placeholder__error{margin-top:1em;width:100%}.components-placeholder__preview img{margin:3%;width:50%}.components-placeholder__fieldset .components-button{margin-bottom:12px;margin-right:12px}.components-placeholder__fieldset .components-button:last-child{margin-bottom:0;margin-right:0}.components-placeholder__fieldset .components-button:not(.is-link)~.components-button.is-link{margin-left:10px;margin-right:10px}.components-placeholder__fieldset .components-button:not(.is-link)~.components-button.is-link:last-child{margin-right:0}.components-placeholder.is-large .components-placeholder__label{font-size:18pt;font-weight:400}.components-placeholder.is-medium .components-placeholder__instructions,.components-placeholder.is-small .components-placeholder__instructions{display:none}.components-placeholder.is-medium .components-placeholder__fieldset,.components-placeholder.is-medium .components-placeholder__fieldset form,.components-placeholder.is-small .components-placeholder__fieldset,.components-placeholder.is-small .components-placeholder__fieldset form{flex-direction:column}.components-placeholder.is-medium .components-placeholder__fieldset .components-button,.components-placeholder.is-small .components-placeholder__fieldset .components-button{margin-right:auto}.components-placeholder.is-small .components-button{padding:0 8px 2px} 2 3 /*!rtl:begin:ignore*/.components-popover{left:0;opacity:0;position:fixed;top:0;z-index:1000000}.components-popover.is-expanded,.components-popover[data-x-axis][data-y-axis]{opacity:1}.components-popover.is-expanded{bottom:0;left:0;right:0;top:0;z-index:1000000!important}.components-popover:not(.is-without-arrow){margin-left:2px}.components-popover:not(.is-without-arrow):before{border:8px solid #ccc}.components-popover:not(.is-without-arrow).is-alternate:before{border-color:#1e1e1e}.components-popover:not(.is-without-arrow):after{border:8px solid #fff}.components-popover:not(.is-without-arrow):after,.components-popover:not(.is-without-arrow):before{content:"";height:0;line-height:0;position:absolute;width:0}.components-popover:not(.is-without-arrow)[data-y-axis=top]{margin-top:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=top]:before{bottom:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=top]:after{bottom:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=top]:after,.components-popover:not(.is-without-arrow)[data-y-axis=top]:before{border-bottom:none;border-left-color:transparent;border-right-color:transparent;border-top-style:solid;margin-left:-10px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]{margin-top:8px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{top:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after{top:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:after,.components-popover:not(.is-without-arrow)[data-y-axis=bottom]:before{border-bottom-style:solid;border-left-color:transparent;border-right-color:transparent;border-top:none;margin-left:-10px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]{margin-left:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:before{right:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:after{right:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:after,.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=left]:before{border-bottom-color:transparent;border-left-style:solid;border-right:none;border-top-color:transparent}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]{margin-left:8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:before{left:-8px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:after{left:-6px}.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:after,.components-popover:not(.is-without-arrow)[data-y-axis=middle][data-x-axis=right]:before{border-bottom-color:transparent;border-left:none;border-right-style:solid;border-top-color:transparent}.components-popover[data-y-axis=top]{bottom:100%}.components-popover[data-y-axis=bottom]{top:100%}.components-popover[data-y-axis=middle]{align-items:center;display:flex}.components-popover.is-from-top{margin-top:12px}.components-popover.is-from-bottom{margin-top:-12px}.components-popover.is-from-left:not(.is-from-top):not(.is-from-bottom){margin-left:12px}.components-popover.is-from-right:not(.is-from-top):not(.is-from-bottom){margin-right:12px}.components-popover__content{background:#fff;border:1px solid #ccc;border-radius:2px;box-shadow:0 2px 6px rgba(0,0,0,.05);height:100%}.is-alternate .components-popover__content{border:1px solid #1e1e1e;box-shadow:none}.components-popover .components-popover__content{height:auto;min-width:260px;overflow-y:auto;position:absolute}.components-popover.is-expanded .components-popover__content{border:none;border-top:1px solid #1e1e1e;height:calc(100% - 48px);min-width:auto;overflow-y:visible;position:static}.components-popover[data-y-axis=top] .components-popover__content{bottom:100%}.components-popover[data-x-axis=center] .components-popover__content{left:50%;transform:translateX(-50%)}.components-popover[data-x-axis=right] .components-popover__content{left:100%;position:absolute}.components-popover:not([data-y-axis=middle])[data-x-axis=right] .components-popover__content{margin-left:-25px}.components-popover[data-x-axis=left] .components-popover__content{position:absolute;right:100%}.components-popover:not([data-y-axis=middle])[data-x-axis=left] .components-popover__content{margin-right:-25px}.components-popover__header{align-items:center;background:#fff;display:flex;height:48px;justify-content:space-between;padding:0 8px 0 16px}.components-popover__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.components-popover__close.components-button{z-index:5} 4 5 /*!rtl:end:ignore*/.components-radio-control{display:flex;flex-direction:column}.components-radio-control .components-base-control__help{margin-top:0}.components-radio-control .components-base-control__field{margin-bottom:0}.components-radio-control__option:not(:last-child){margin-bottom:4px}.components-radio-control__input[type=radio]{border:1px solid #1e1e1e;border-radius:2px;border-radius:50%;box-shadow:0 0 0 transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin-right:6px;margin-top:0;padding:6px 8px;transition:box-shadow .1s linear;transition:none}@media (prefers-reduced-motion:reduce){.components-radio-control__input[type=radio]{transition-duration:0s}}@media (min-width:600px){.components-radio-control__input[type=radio]{font-size:13px;line-height:normal}}.components-radio-control__input[type=radio]:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.components-radio-control__input[type=radio]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-radio-control__input[type=radio]::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.components-radio-control__input[type=radio]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .components-radio-control__input[type=radio]::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .components-radio-control__input[type=radio]::-moz-placeholder{color:hsla(0,0%,100%,.65);opacity:1}.is-dark-theme .components-radio-control__input[type=radio]:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.components-radio-control__input[type=radio]:checked:before{background-color:#fff;border:3px solid #fff;height:7px;margin:8px 0 0 8px;width:7px}@media (min-width:782px){.components-radio-control__input[type=radio]:checked:before{height:6px;margin:4px 0 0 4px;width:6px}}.components-radio-control__input[type=radio]:focus{box-shadow:0 0 0 2px #fff,0 0 0 3.5px #007cba;box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-radio-control__input[type=radio]:checked{background:#007cba;background:var(--wp-admin-theme-color);border-color:#007cba;border-color:var(--wp-admin-theme-color)}.components-resizable-box__handle{display:none;height:23px;width:23px;z-index:2}.components-resizable-box__container.has-show-handle .components-resizable-box__handle{display:block}.components-resizable-box__handle:after{border:2px solid #fff;border-radius:50%;height:15px;right:calc(50% - 8px);top:calc(50% - 8px);width:15px}.components-resizable-box__handle:after,.components-resizable-box__side-handle:before{background:#007cba;background:var(--wp-admin-theme-color);content:"";cursor:inherit;display:block;position:absolute}.components-resizable-box__side-handle:before{border:2px solid #fff;height:7px;opacity:0;right:calc(50% - 4px);top:calc(50% - 4px);transition:transform .1s ease-in;width:7px}@media (prefers-reduced-motion:reduce){.components-resizable-box__side-handle:before{transition-duration:0s}}.is-dark-theme .components-resizable-box__handle:after,.is-dark-theme .components-resizable-box__side-handle:before{border-color:#ddd}.components-resizable-box__corner-handle,.components-resizable-box__side-handle{z-index:2}.components-resizable-box__side-handle.components-resizable-box__handle-bottom,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:before,.components-resizable-box__side-handle.components-resizable-box__handle-top,.components-resizable-box__side-handle.components-resizable-box__handle-top:before{border-left:0;border-right:0;left:0;width:100%}.components-resizable-box__side-handle.components-resizable-box__handle-left,.components-resizable-box__side-handle.components-resizable-box__handle-left:before,.components-resizable-box__side-handle.components-resizable-box__handle-right,.components-resizable-box__side-handle.components-resizable-box__handle-right:before{border-bottom:0;border-top:0;height:100%;top:0}.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation:components-resizable-box__top-bottom-animation .1s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation-duration:1ms}}.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before{animation:components-resizable-box__left-right-animation .1s ease-out 0s;animation-fill-mode:forwards}@media (prefers-reduced-motion:reduce){.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before{animation-duration:1ms}}@media not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none){.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation:none}}}@keyframes components-resizable-box__top-bottom-animation{0%{opacity:0;transform:scaleX(0)}to{opacity:1;transform:scaleX(1)}}@keyframes components-resizable-box__left-right-animation{0%{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}} 6 1 @charset "UTF-8";@media not (prefers-reduced-motion){.components-animate__appear{animation:components-animate__appear-animation .1s cubic-bezier(0,0,.2,1) 0s;animation-fill-mode:forwards}}.components-animate__appear.is-from-top,.components-animate__appear.is-from-top.is-from-left{transform-origin:top left}.components-animate__appear.is-from-top.is-from-right{transform-origin:top right}.components-animate__appear.is-from-bottom,.components-animate__appear.is-from-bottom.is-from-left{transform-origin:bottom left}.components-animate__appear.is-from-bottom.is-from-right{transform-origin:bottom right}@keyframes components-animate__appear-animation{0%{transform:translateY(-2em) scaleY(0) scaleX(0)}to{transform:translateY(0) scaleY(1) scaleX(1)}}@media not (prefers-reduced-motion){.components-animate__slide-in{animation:components-animate__slide-in-animation .1s cubic-bezier(0,0,.2,1);animation-fill-mode:forwards}.components-animate__slide-in.is-from-left{transform:translateX(100%)}.components-animate__slide-in.is-from-right{transform:translateX(-100%)}}@keyframes components-animate__slide-in-animation{to{transform:translateX(0)}}@media not (prefers-reduced-motion){.components-animate__loading{animation:components-animate__loading 1.6s ease-in-out infinite}}@keyframes components-animate__loading{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.components-autocomplete__popover .components-popover__content{min-width:200px;padding:8px}.components-autocomplete__result.components-button{display:flex;height:auto;min-height:36px;text-align:left;width:100%}.components-autocomplete__result.components-button:focus:not(:disabled){box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.components-badge{box-sizing:border-box}.components-badge *,.components-badge :after,.components-badge :before{box-sizing:inherit}.components-badge{background-color:color-mix(in srgb,#fff 90%,var(--base-color));border-radius:2px;color:color-mix(in srgb,#000 50%,var(--base-color));display:inline-block;line-height:0;max-width:100%;min-height:24px;padding:2px 8px}.components-badge:where(.is-default){background-color:#f0f0f0;color:#2f2f2f}.components-badge.has-icon{padding-inline-start:4px}.components-badge.is-info{--base-color:#3858e9}.components-badge.is-warning{--base-color:#f0b849}.components-badge.is-error{--base-color:#cc1818}.components-badge.is-success{--base-color:#4ab866}.components-badge__flex-wrapper{align-items:center;display:inline-flex;font-size:12px;font-weight:400;gap:2px;line-height:20px;max-width:100%}.components-badge__icon{flex-shrink:0}.components-badge__content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.components-button-group{display:inline-block}.components-button-group .components-button{border-radius:0;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;display:inline-flex}.components-button-group .components-button+.components-button{margin-left:-1px}.components-button-group .components-button:first-child{border-radius:2px 0 0 2px}.components-button-group .components-button:last-child{border-radius:0 2px 2px 0}.components-button-group .components-button.is-primary,.components-button-group .components-button:focus{position:relative;z-index:1}.components-button-group .components-button.is-primary{box-shadow:inset 0 0 0 1px #1e1e1e}.components-button{-webkit-appearance:none;background:none;border:0;cursor:pointer;display:inline-flex;font-family:inherit;font-size:13px;font-weight:499;margin:0;text-decoration:none}@media not (prefers-reduced-motion){.components-button{transition:box-shadow .1s linear}}.components-button{align-items:center;border-radius:2px;box-sizing:border-box;color:var(--wp-components-color-foreground,#1e1e1e);height:36px;padding:6px 12px}.components-button.is-next-40px-default-size{height:40px}.components-button:hover:not(:disabled,[aria-disabled=true]),.components-button[aria-expanded=true]{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-button:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:3px solid transparent}.components-button.is-primary{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:var(--wp-components-color-accent-inverted,#fff);outline:1px solid transparent;text-decoration:none;text-shadow:none;white-space:nowrap}.components-button.is-primary:hover:not(:disabled){background:var(--wp-components-color-accent-darker-10,var(--wp-admin-theme-color-darker-10,#2145e6));color:var(--wp-components-color-accent-inverted,#fff)}.components-button.is-primary:active:not(:disabled){background:var(--wp-components-color-accent-darker-20,var(--wp-admin-theme-color-darker-20,#183ad6));border-color:var(--wp-components-color-accent-darker-20,var(--wp-admin-theme-color-darker-20,#183ad6));color:var(--wp-components-color-accent-inverted,#fff)}.components-button.is-primary:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--wp-components-color-background,#fff),0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-button.is-primary:disabled,.components-button.is-primary:disabled:active:enabled,.components-button.is-primary[aria-disabled=true],.components-button.is-primary[aria-disabled=true]:active:enabled,.components-button.is-primary[aria-disabled=true]:enabled{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:hsla(0,0%,100%,.4);outline:none}.components-button.is-primary:disabled:active:enabled:focus:enabled,.components-button.is-primary:disabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:active:enabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:enabled:focus:enabled,.components-button.is-primary[aria-disabled=true]:focus:enabled{box-shadow:inset 0 0 0 1px var(--wp-components-color-background,#fff),0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-button.is-primary.is-busy,.components-button.is-primary.is-busy:disabled,.components-button.is-primary.is-busy[aria-disabled=true]{background-image:linear-gradient(-45deg,var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)) 33%,var(--wp-components-color-accent-darker-20,var(--wp-admin-theme-color-darker-20,#183ad6)) 33%,var(--wp-components-color-accent-darker-20,var(--wp-admin-theme-color-darker-20,#183ad6)) 70%,var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)) 70%);background-size:100px 100%;border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:var(--wp-components-color-accent-inverted,#fff)}.components-button.is-secondary,.components-button.is-tertiary{outline:1px solid transparent}.components-button.is-secondary:active:not(:disabled),.components-button.is-tertiary:active:not(:disabled){box-shadow:none}.components-button.is-secondary:disabled,.components-button.is-secondary[aria-disabled=true],.components-button.is-secondary[aria-disabled=true]:hover,.components-button.is-tertiary:disabled,.components-button.is-tertiary[aria-disabled=true],.components-button.is-tertiary[aria-disabled=true]:hover{background:transparent;color:#949494;transform:none}.components-button.is-secondary{background:transparent;box-shadow:inset 0 0 0 1px var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)),0 0 0 currentColor;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:1px solid transparent;white-space:nowrap}.components-button.is-secondary:hover:not(:disabled,[aria-disabled=true],.is-pressed){background:color-mix(in srgb,var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)) 4%,transparent);box-shadow:inset 0 0 0 1px var(--wp-components-color-accent-darker-20,var(--wp-admin-theme-color-darker-20,#183ad6));color:var(--wp-components-color-accent-darker-20,var(--wp-admin-theme-color-darker-20,#183ad6))}.components-button.is-secondary:disabled:not(:focus),.components-button.is-secondary[aria-disabled=true]:hover:not(:focus),.components-button.is-secondary[aria-disabled=true]:not(:focus){box-shadow:inset 0 0 0 1px #ddd}.components-button.is-secondary:focus:not(:disabled){box-shadow:0 0 0 currentColor inset,0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-button.is-tertiary{background:transparent;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));white-space:nowrap}.components-button.is-tertiary:hover:not(:disabled,[aria-disabled=true],.is-pressed){background:color-mix(in srgb,var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)) 4%,transparent);color:var(--wp-components-color-accent-darker-20,var(--wp-admin-theme-color-darker-20,#183ad6))}.components-button.is-tertiary:active:not(:disabled,[aria-disabled=true]){background:color-mix(in srgb,var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)) 8%,transparent)}p+.components-button.is-tertiary{margin-left:-6px}.components-button.is-tertiary:disabled:not(:focus),.components-button.is-tertiary[aria-disabled=true]:hover:not(:focus),.components-button.is-tertiary[aria-disabled=true]:not(:focus){box-shadow:none;outline:none}.components-button.is-destructive{--wp-components-color-accent:#cc1818;--wp-components-color-accent-darker-10:#9e1313;--wp-components-color-accent-darker-20:#710d0d}.components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link){color:#cc1818}.components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):hover:not(:disabled,[aria-disabled=true]){color:#710d0d}.components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #cc1818}.components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):active:not(:disabled,[aria-disabled=true]){background:#ccc}.components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):disabled,.components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link)[aria-disabled=true]{color:#949494}.components-button.is-destructive.is-secondary:hover:not(:disabled,[aria-disabled=true]),.components-button.is-destructive.is-tertiary:hover:not(:disabled,[aria-disabled=true]){background:rgba(204,24,24,.04)}.components-button.is-destructive.is-secondary:active:not(:disabled,[aria-disabled=true]),.components-button.is-destructive.is-tertiary:active:not(:disabled,[aria-disabled=true]){background:rgba(204,24,24,.08)}.components-button.is-link{background:none;border:0;border-radius:0;box-shadow:none;color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));font-weight:400;margin:0;outline:none;padding:0;text-align:left;text-decoration:underline}@media not (prefers-reduced-motion){.components-button.is-link{transition-duration:.05s;transition-property:border,background,color;transition-timing-function:ease-in-out}}.components-button.is-link{height:auto}.components-button.is-link:focus{border-radius:2px}.components-button.is-link:disabled,.components-button.is-link[aria-disabled=true]{color:#949494}.components-button:not(:disabled,[aria-disabled=true]):active{color:var(--wp-components-color-foreground,#1e1e1e)}.components-button:disabled,.components-button[aria-disabled=true]{color:#949494;cursor:default}@media not (prefers-reduced-motion){.components-button.is-busy,.components-button.is-secondary.is-busy,.components-button.is-secondary.is-busy:disabled,.components-button.is-secondary.is-busy[aria-disabled=true]{animation:components-button__busy-animation 2.5s linear infinite}}.components-button.is-busy,.components-button.is-secondary.is-busy,.components-button.is-secondary.is-busy:disabled,.components-button.is-secondary.is-busy[aria-disabled=true]{background-image:linear-gradient(-45deg,#fafafa 33%,#e0e0e0 0,#e0e0e0 70%,#fafafa 0);background-size:100px 100%}.components-button.is-compact{height:32px}.components-button.is-compact.has-icon:not(.has-text){min-width:32px;padding:0}.components-button.is-small{font-size:11px;height:24px;line-height:22px;padding:0 8px}.components-button.is-small.has-icon:not(.has-text){min-width:24px;padding:0}.components-button.has-icon{justify-content:center;min-width:36px;padding:6px}.components-button.has-icon.is-next-40px-default-size{min-width:40px}.components-button.has-icon .dashicon{align-items:center;box-sizing:content-box;display:inline-flex;justify-content:center;padding:2px}.components-button.has-icon.has-text{gap:4px;justify-content:start;padding-left:8px;padding-right:12px}.components-button.has-icon.has-text.has-icon-right{padding-left:12px;padding-right:8px}.components-button.is-pressed,.components-button.is-pressed:hover{color:var(--wp-components-color-foreground-inverted,#fff)}.components-button.is-pressed:hover:not(:disabled,[aria-disabled=true]),.components-button.is-pressed:not(:disabled,[aria-disabled=true]){background:var(--wp-components-color-foreground,#1e1e1e)}.components-button.is-pressed:disabled,.components-button.is-pressed[aria-disabled=true]{color:#949494}.components-button.is-pressed:disabled:not(.is-primary):not(.is-secondary):not(.is-tertiary),.components-button.is-pressed[aria-disabled=true]:not(.is-primary):not(.is-secondary):not(.is-tertiary){background:#949494;color:var(--wp-components-color-foreground-inverted,#fff)}.components-button.is-pressed:focus:not(:disabled){box-shadow:inset 0 0 0 1px var(--wp-components-color-background,#fff),0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent}.components-button svg{fill:currentColor;flex-shrink:0;outline:none}@media (forced-colors:active){.components-button svg{fill:CanvasText}}.components-button .components-visually-hidden{height:auto}@keyframes components-button__busy-animation{0%{background-position:200px 0}}.components-calendar{background-color:var(--wp-components-color-background,#fff);color:var(--wp-components-color-foreground,#1e1e1e);display:inline-block;font-size:13px;font-weight:400;position:relative;z-index:0}.components-calendar,.components-calendar *,.components-calendar :after,.components-calendar :before{box-sizing:border-box}.components-calendar__day{padding:0;position:relative}.components-calendar__day:has(.components-calendar__day-button:disabled){color:var(--wp-components-color-gray-600,#949494)}.components-calendar__day:has(.components-calendar__day-button:focus-visible),.components-calendar__day:has(.components-calendar__day-button:hover:not(:disabled)){color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-calendar__day-button{align-items:center;background:none;border:none;border-radius:2px;color:inherit;cursor:pointer;display:flex;font:inherit;font-variant-numeric:tabular-nums;height:32px;justify-content:center;margin:0;padding:0;position:relative;width:32px}.components-calendar__day-button:before{border:none;border-radius:2px;content:"";inset:0;position:absolute;z-index:-1}.components-calendar__day-button:after{content:"";inset:0;pointer-events:none;position:absolute;z-index:1}.components-calendar__day-button:disabled{cursor:revert}@media (forced-colors:active){.components-calendar__day-button:disabled{text-decoration:line-through}}.components-calendar__day-button:focus-visible{outline:var(--wp-admin-border-width-focus) solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-offset:1px}.components-calendar__caption-label{align-items:center;border:0;display:inline-flex;position:relative;text-transform:capitalize;white-space:nowrap;z-index:1}.components-calendar__button-next,.components-calendar__button-previous{align-items:center;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:none;border:none;border-radius:2px;color:inherit;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin:0;padding:0;position:relative;width:32px}.components-calendar__button-next:disabled,.components-calendar__button-next[aria-disabled=true],.components-calendar__button-previous:disabled,.components-calendar__button-previous[aria-disabled=true]{color:var(--wp-components-color-gray-600,#949494);cursor:revert}.components-calendar__button-next:focus-visible,.components-calendar__button-previous:focus-visible{outline:var(--wp-admin-border-width-focus) solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-calendar__chevron{display:inline-block;fill:currentColor;height:16px;width:16px}.components-calendar[dir=rtl] .components-calendar__nav .components-calendar__chevron{transform:rotate(180deg);transform-origin:50%}.components-calendar__month-caption{align-content:center;display:flex;height:32px;justify-content:center;margin-bottom:12px}.components-calendar__months{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;max-width:fit-content;position:relative}.components-calendar__month-grid{border-collapse:separate;border-spacing:0 4px}.components-calendar__nav{align-items:center;display:flex;height:32px;inset-block-start:0;inset-inline-end:0;inset-inline-start:0;justify-content:space-between;position:absolute}.components-calendar__weekday{color:var(--wp-components-color-gray-700,#757575);height:32px;padding:0;text-align:center;text-transform:uppercase;width:32px}.components-calendar__day--today:after{border:2px solid;border-radius:50%;content:"";height:0;inset-block-start:2px;inset-inline-end:2px;position:absolute;width:0;z-index:1}.components-calendar__day--selected:not(.components-calendar__range-middle):has(.components-calendar__day-button,.components-calendar__day-button:hover:not(:disabled)){color:var(--wp-components-color-foreground-inverted,#fff)}.components-calendar__day--selected:not(.components-calendar__range-middle) .components-calendar__day-button:before{background-color:var(--wp-components-color-foreground,#1e1e1e);border:1px solid transparent}.components-calendar__day--selected:not(.components-calendar__range-middle) .components-calendar__day-button:disabled:before{background-color:var(--wp-components-color-gray-600,#949494)}.components-calendar__day--selected:not(.components-calendar__range-middle) .components-calendar__day-button:hover:not(:disabled):before{background-color:var(--wp-components-color-gray-800,#2f2f2f)}.components-calendar__day--hidden{visibility:hidden}.components-calendar__range-start:not(.components-calendar__range-end) .components-calendar__day-button,.components-calendar__range-start:not(.components-calendar__range-end) .components-calendar__day-button:before{border-end-end-radius:0;border-start-end-radius:0}.components-calendar__range-middle .components-calendar__day-button:before{background-color:color-mix(in srgb,var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)) 4%,transparent);border-color:transparent;border-radius:0;border-style:solid;border-width:1px 0}.components-calendar__range-end:not(.components-calendar__range-start) .components-calendar__day-button,.components-calendar__range-end:not(.components-calendar__range-start) .components-calendar__day-button:before{border-end-start-radius:0;border-start-start-radius:0}.components-calendar__day--preview svg{color:color-mix(in srgb,var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)) 16%,transparent);inset:0;pointer-events:none;position:absolute}@media (forced-colors:active){.components-calendar__day--preview svg{color:inherit}}.components-calendar[dir=rtl] .components-calendar__day--preview svg{transform:scaleX(-1)}.components-calendar__day--preview.components-calendar__range-middle .components-calendar__day-button:before{border:none}@keyframes slide-in-left{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-right{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-out-left{0%{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes slide-out-right{0%{transform:translateX(0)}to{transform:translateX(100%)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}.components-calendar__caption-after-enter,.components-calendar__caption-after-exit,.components-calendar__caption-before-enter,.components-calendar__caption-before-exit,.components-calendar__weeks-after-enter,.components-calendar__weeks-after-exit,.components-calendar__weeks-before-enter,.components-calendar__weeks-before-exit{animation-duration:0s;animation-fill-mode:forwards;animation-timing-function:cubic-bezier(.4,0,.2,1)}@media not (prefers-reduced-motion){.components-calendar__caption-after-enter,.components-calendar__caption-after-exit,.components-calendar__caption-before-enter,.components-calendar__caption-before-exit,.components-calendar__weeks-after-enter,.components-calendar__weeks-after-exit,.components-calendar__weeks-before-enter,.components-calendar__weeks-before-exit{animation-duration:.3s}}.components-calendar[dir=rtl] .components-calendar__weeks-after-enter,.components-calendar__weeks-before-enter{animation-name:slide-in-left}.components-calendar[dir=rtl] .components-calendar__weeks-after-exit,.components-calendar__weeks-before-exit{animation-name:slide-out-left}.components-calendar[dir=rtl] .components-calendar__weeks-before-enter,.components-calendar__weeks-after-enter{animation-name:slide-in-right}.components-calendar[dir=rtl] .components-calendar__weeks-before-exit,.components-calendar__weeks-after-exit{animation-name:slide-out-right}.components-calendar__caption-after-enter{animation-name:fade-in}.components-calendar__caption-after-exit{animation-name:fade-out}.components-calendar__caption-before-enter{animation-name:fade-in}.components-calendar__caption-before-exit{animation-name:fade-out}.components-checkbox-control{--checkbox-input-size:24px}@media (min-width:600px){.components-checkbox-control{--checkbox-input-size:16px}}.components-checkbox-control{--checkbox-input-margin:8px}.components-checkbox-control__label{cursor:pointer;line-height:var(--checkbox-input-size)}.components-checkbox-control__input[type=checkbox]{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;margin-right:12px;padding:6px 8px;transition:none}@media not (prefers-reduced-motion){.components-checkbox-control__input[type=checkbox]{transition:box-shadow .1s linear}}@media (min-width:600px){.components-checkbox-control__input[type=checkbox]{font-size:13px;line-height:normal}}.components-checkbox-control__input[type=checkbox]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]::-moz-placeholder{color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-checkbox-control__input[type=checkbox]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox]:checked{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox]:checked::-ms-check{opacity:0}.components-checkbox-control__input[type=checkbox]:checked:before,.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{color:#fff;margin:-3px -5px}@media (min-width:782px){.components-checkbox-control__input[type=checkbox]:checked:before,.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{margin:-4px 0 0 -5px}}.components-checkbox-control__input[type=checkbox][aria-checked=mixed]{background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color)}.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{content:"\f460";display:inline-block;float:left;font:normal 30px/1 dashicons;vertical-align:middle;width:16px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (min-width:782px){.components-checkbox-control__input[type=checkbox][aria-checked=mixed]:before{float:none;font-size:21px}}.components-checkbox-control__input[type=checkbox]:disabled,.components-checkbox-control__input[type=checkbox][aria-disabled=true]{background:#f0f0f0;border-color:#ddd;cursor:default;opacity:1}.components-checkbox-control__input[type=checkbox]{appearance:none;background:#fff;clear:none;color:#1e1e1e;cursor:pointer;display:inline-block;height:var(--checkbox-input-size);line-height:0;margin:0 4px 0 0;outline:0;padding:0!important;text-align:center;vertical-align:top;width:var(--checkbox-input-size)}@media not (prefers-reduced-motion){.components-checkbox-control__input[type=checkbox]{transition:border-color .1s ease-in-out}}.components-checkbox-control__input[type=checkbox]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff,0 0 0 calc(var(--wp-admin-border-width-focus)*2) var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:2px}.components-checkbox-control__input[type=checkbox]:checked,.components-checkbox-control__input[type=checkbox]:indeterminate{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-checkbox-control__input[type=checkbox]:checked::-ms-check,.components-checkbox-control__input[type=checkbox]:indeterminate::-ms-check{opacity:0}.components-checkbox-control__input[type=checkbox]:checked:before{content:none}.components-checkbox-control__input-container{aspect-ratio:1;display:inline-block;flex-shrink:0;line-height:1;margin-right:var(--checkbox-input-margin);position:relative;vertical-align:middle;width:var(--checkbox-input-size)}svg.components-checkbox-control__checked,svg.components-checkbox-control__indeterminate{--checkmark-size:var(--checkbox-input-size);cursor:pointer;fill:#fff;height:var(--checkmark-size);left:50%;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);-webkit-user-select:none;user-select:none;width:var(--checkmark-size)}@media (min-width:600px){svg.components-checkbox-control__checked,svg.components-checkbox-control__indeterminate{--checkmark-size:calc(var(--checkbox-input-size) + 4px)}}.components-checkbox-control__help{display:inline-block;margin-inline-start:calc(var(--checkbox-input-size) + var(--checkbox-input-margin))}.components-circular-option-picker{display:inline-block;min-width:188px;width:100%}.components-circular-option-picker .components-circular-option-picker__custom-clear-wrapper{display:flex;justify-content:flex-end;margin-top:12px}.components-circular-option-picker .components-circular-option-picker__swatches{display:flex;flex-wrap:wrap;gap:12px;position:relative;z-index:1}.components-circular-option-picker>:not(.components-circular-option-picker__swatches){position:relative;z-index:0}.components-circular-option-picker__option-wrapper{display:inline-block;height:28px;transform:scale(1);vertical-align:top;width:28px}@media not (prefers-reduced-motion){.components-circular-option-picker__option-wrapper{transition:transform .1s ease;will-change:transform}}.components-circular-option-picker__option-wrapper:hover{transform:scale(1.2)}.components-circular-option-picker__option-wrapper>div{height:100%;width:100%}.components-circular-option-picker__option-wrapper:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='none'%3E%3Cpath fill='%23555d65' d='M6 8V6H4v2zm2 0V6h2v2zm2 8H8v-2h2zm2 0v-2h2v2zm0 2v-2h-2v2H8v2h2v-2zm2 0v2h-2v-2zm2 0h-2v-2h2z'/%3E%3Cpath fill='%23555d65' fill-rule='evenodd' d='M18 18h2v-2h-2v-2h2v-2h-2v-2h2V8h-2v2h-2V8h-2v2h2v2h-2v2h2v2h2zm-2-4v-2h2v2z' clip-rule='evenodd'/%3E%3Cpath fill='%23555d65' d='M18 18v2h-2v-2z'/%3E%3Cpath fill='%23555d65' fill-rule='evenodd' d='M8 10V8H6v2H4v2h2v2H4v2h2v2H4v2h2v2H4v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2V4h-2v2h-2V4h-2v2h-2V4h-2v2h2v2h-2v2zm0 2v-2H6v2zm2 0v-2h2v2zm0 2v-2H8v2H6v2h2v2H6v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h-2v2h-2V6h-2v2h-2v2h2v2h-2v2z' clip-rule='evenodd'/%3E%3Cpath fill='%23555d65' fill-rule='evenodd' d='M4 0H2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v2H0v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2h-2V0h-2v2H8V0H6v2H4zm0 4V2H2v2zm2 0V2h2v2zm0 2V4H4v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2H2v2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h2v2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2h-2V2h-2v2H8v2z' clip-rule='evenodd'/%3E%3C/svg%3E");border-radius:50%;bottom:1px;content:"";left:1px;position:absolute;right:1px;top:1px;z-index:-1}.components-circular-option-picker__option{aspect-ratio:1;background:transparent;border:none;border-radius:50%;box-shadow:inset 0 0 0 14px;display:inline-block;height:100%!important;vertical-align:top}@media not (prefers-reduced-motion){.components-circular-option-picker__option{transition:box-shadow .1s ease}}.components-circular-option-picker__option{cursor:pointer}.components-circular-option-picker__option:hover{box-shadow:inset 0 0 0 14px!important}.components-circular-option-picker__option[aria-pressed=true],.components-circular-option-picker__option[aria-selected=true]{box-shadow:inset 0 0 0 4px;overflow:visible;position:relative;z-index:1}.components-circular-option-picker__option[aria-pressed=true]+svg,.components-circular-option-picker__option[aria-selected=true]+svg{border-radius:50%;left:2px;pointer-events:none;position:absolute;top:2px;z-index:2}.components-circular-option-picker__option:after{border:1px solid transparent;border-radius:50%;bottom:-1px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);box-sizing:inherit;content:"";left:-1px;position:absolute;right:-1px;top:-1px}.components-circular-option-picker__option:focus:after{border:2px solid #757575;border-radius:50%;box-shadow:inset 0 0 0 2px #fff;content:"";height:calc(100% + 4px);left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:calc(100% + 4px)}.components-circular-option-picker__option.components-button:focus{background-color:transparent;box-shadow:inset 0 0 0 14px;outline:none}.components-circular-option-picker__button-action .components-circular-option-picker__option{background:#fff;color:#fff}.components-circular-option-picker__dropdown-link-action{margin-right:16px}.components-circular-option-picker__dropdown-link-action .components-button{line-height:22px}.components-palette-edit__popover-gradient-picker{padding:8px;width:260px}.components-dropdown-menu__menu .components-palette-edit__menu-button{width:100%}.component-color-indicator{background:#fff linear-gradient(-45deg,transparent 48%,#ddd 0,#ddd 52%,transparent 0);border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);display:inline-block;height:20px;padding:0;width:20px}.components-combobox-control{width:100%}input.components-combobox-control__input[type=text]{background:var(--wp-components-color-background,#fff);border:none;box-shadow:none;color:var(--wp-components-color-foreground,#1e1e1e);font-family:inherit;font-size:16px;line-height:inherit;margin:0;min-height:auto;padding:2px;width:100%}@media (min-width:600px){input.components-combobox-control__input[type=text]{font-size:13px}}input.components-combobox-control__input[type=text]:focus{box-shadow:none;outline:none}.components-combobox-control__suggestions-container{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.components-combobox-control__suggestions-container{transition:box-shadow .1s linear}}@media (min-width:600px){.components-combobox-control__suggestions-container{font-size:13px;line-height:normal}}.components-combobox-control__suggestions-container:focus{border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));box-shadow:0 0 0 .5px var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent}.components-combobox-control__suggestions-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container::-moz-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container{align-items:flex-start;display:flex;flex-wrap:wrap;padding:0;width:100%}.components-combobox-control__suggestions-container:focus-within{border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));box-shadow:0 0 0 .5px var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent}.components-combobox-control__suggestions-container .components-spinner{margin:0}.components-color-palette__custom-color-wrapper{position:relative;z-index:0}.components-color-palette__custom-color-button{background:none;border:none;border-radius:4px 4px 0 0;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);box-sizing:border-box;cursor:pointer;height:64px;outline:1px solid transparent;position:relative;width:100%}.components-color-palette__custom-color-button:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline-width:2px}.components-color-palette__custom-color-button:after{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,24px 24px;background-size:48px 48px;border-radius:3px 3px 0 0;content:"";inset:1px;position:absolute;z-index:-1}.components-color-palette__custom-color-text-wrapper{border-radius:0 0 4px 4px;box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.2),inset 1px 0 0 0 rgba(0,0,0,.2),inset -1px 0 0 0 rgba(0,0,0,.2);font-size:13px;padding:12px 16px;position:relative}.components-color-palette__custom-color-name{color:var(--wp-components-color-foreground,#1e1e1e);margin:0 1px}.components-color-palette__custom-color-value{color:#757575}.components-color-palette__custom-color-value--is-hex{text-transform:uppercase}.components-color-palette__custom-color-value:empty:after{content:"";visibility:hidden}.components-custom-gradient-picker__gradient-bar{border-radius:2px;height:48px;position:relative;width:100%;z-index:1}.components-custom-gradient-picker__gradient-bar.has-gradient{background-image:repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0);background-position:0 0,12px 12px;background-size:24px 24px}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__gradient-bar-background{inset:0;position:absolute}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__markers-container{margin-left:auto;margin-right:auto;position:relative;width:calc(100% - 48px)}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-dropdown{display:flex;height:16px;position:absolute;top:16px;width:16px}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point-dropdown{background:#fff;border-radius:50%;color:#1e1e1e;height:inherit;min-width:16px!important;padding:2px;position:relative;width:inherit}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__insert-point-dropdown svg{height:100%;width:100%}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button{border-radius:50%;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) #fff,0 0 2px 0 rgba(0,0,0,.25);height:inherit;outline:2px solid transparent;padding:0;width:inherit}.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button.is-active,.components-custom-gradient-picker__gradient-bar .components-custom-gradient-picker__control-point-button:focus{box-shadow:inset 0 0 0 calc(var(--wp-admin-border-width-focus)*2) #fff,0 0 2px 0 rgba(0,0,0,.25);outline:1.5px solid transparent}.components-custom-gradient-picker__remove-control-point-wrapper{padding-bottom:8px}.components-custom-gradient-picker__inserter{direction:ltr}.components-custom-gradient-picker__liner-gradient-indicator{display:inline-block;flex:0 auto;height:20px;width:20px}.components-custom-gradient-picker__ui-line{position:relative;z-index:0}body.is-dragging-components-draggable{cursor:move;cursor:grabbing!important}.components-draggable__invisible-drag-image{height:50px;left:-1000px;position:fixed;width:50px}.components-draggable__clone{background:transparent;padding:0;pointer-events:none;position:fixed;z-index:1000000000}.components-drop-zone{border-radius:2px;bottom:0;left:0;opacity:0;position:absolute;right:0;top:0;visibility:hidden;z-index:40}.components-drop-zone.is-active{opacity:1;visibility:visible}.components-drop-zone .components-drop-zone__content{align-items:center;background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));bottom:0;color:#fff;display:flex;height:100%;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;right:0;text-align:center;top:0;width:100%;z-index:50}.components-drop-zone .components-drop-zone__content-inner{opacity:0;transform:scale(.9)}.components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content{opacity:1}@media not (prefers-reduced-motion){.components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content{transition:opacity .2s ease-in-out}}.components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content-inner{opacity:1;transform:scale(1)}@media not (prefers-reduced-motion){.components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content-inner{transition:opacity .1s ease-in-out .1s,transform .1s ease-in-out .1s}}.components-drop-zone__content-icon,.components-drop-zone__content-text{display:block}.components-drop-zone__content-icon{fill:currentColor;line-height:0;margin:0 auto 8px;pointer-events:none}.components-drop-zone__content-text{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.components-dropdown{display:inline-block}.components-dropdown__content .components-popover__content{padding:8px}.components-dropdown__content .components-popover__content:has(.components-menu-group){padding:0}.components-dropdown__content .components-popover__content:has(.components-menu-group) .components-dropdown-menu__menu>.components-menu-item__button,.components-dropdown__content .components-popover__content:has(.components-menu-group)>.components-menu-item__button{margin:8px;width:auto}.components-dropdown__content [role=menuitem]{white-space:nowrap}.components-dropdown__content .components-menu-group{padding:8px}.components-dropdown__content .components-menu-group+.components-menu-group{border-top:1px solid #ccc;padding:8px}.components-dropdown__content.is-alternate .components-menu-group+.components-menu-group{border-color:#1e1e1e}.components-dropdown-menu__toggle{vertical-align:top}.components-dropdown-menu__menu{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4;width:100%}.components-dropdown-menu__menu .components-dropdown-menu__menu-item,.components-dropdown-menu__menu .components-menu-item{cursor:pointer;font-weight:400;outline:none;padding:6px;white-space:nowrap;width:100%}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator,.components-dropdown-menu__menu .components-menu-item.has-separator{margin-top:6px;overflow:visible;position:relative}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.has-separator:before,.components-dropdown-menu__menu .components-menu-item.has-separator:before{background-color:#ddd;box-sizing:content-box;content:"";display:block;height:1px;left:0;position:absolute;right:0;top:-3px}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.is-active .dashicon,.components-dropdown-menu__menu .components-dropdown-menu__menu-item.is-active svg,.components-dropdown-menu__menu .components-menu-item.is-active .dashicon,.components-dropdown-menu__menu .components-menu-item.is-active svg{background:#1e1e1e;border-radius:1px;box-shadow:0 0 0 1px #1e1e1e;color:#fff}.components-dropdown-menu__menu .components-dropdown-menu__menu-item.is-icon-only,.components-dropdown-menu__menu .components-menu-item.is-icon-only{width:auto}.components-dropdown-menu__menu .components-menu-item__button,.components-dropdown-menu__menu .components-menu-item__button.components-button{height:auto;min-height:40px;padding-left:8px;padding-right:8px;text-align:left}.components-duotone-picker__color-indicator:before{background:transparent}.components-duotone-picker__color-indicator>.components-button,.components-duotone-picker__color-indicator>.components-button.is-pressed:hover:not(:disabled){background:linear-gradient(-45deg,transparent 48%,#ddd 0,#ddd 52%,transparent 0);color:transparent}.components-duotone-picker__color-indicator>.components-button:hover:not(:disabled):not([aria-disabled=true]),.components-duotone-picker__color-indicator>.components-button:not([aria-disabled=true]):active{color:transparent}.components-color-list-picker,.components-color-list-picker__swatch-button{width:100%}.components-color-list-picker__color-picker{margin:8px 0}.components-color-list-picker__swatch-color{margin:2px}.components-external-link{text-decoration:none}.components-external-link__contents{text-decoration:underline}.components-external-link__icon{font-weight:400;margin-left:.5ch}.components-form-toggle{display:inline-block;height:16px;position:relative}.components-form-toggle .components-form-toggle__track{background-color:#fff;border:1px solid #949494;border-radius:8px;box-sizing:border-box;content:"";display:inline-block;height:16px;position:relative;vertical-align:top;width:32px}@media not (prefers-reduced-motion){.components-form-toggle .components-form-toggle__track{transition:background-color .2s ease,border-color .2s ease}}.components-form-toggle .components-form-toggle__track{overflow:hidden}.components-form-toggle .components-form-toggle__track:after{border-top:16px solid transparent;box-sizing:border-box;content:"";inset:0;position:absolute}@media not (prefers-reduced-motion){.components-form-toggle .components-form-toggle__track:after{transition:opacity .2s ease}}.components-form-toggle .components-form-toggle__track:after{opacity:0}.components-form-toggle .components-form-toggle__thumb{border-radius:50%;box-sizing:border-box;display:block;height:12px;left:2px;position:absolute;top:2px;width:12px}@media not (prefers-reduced-motion){.components-form-toggle .components-form-toggle__thumb{transition:transform .2s ease,background-color .2s ease-out}}.components-form-toggle .components-form-toggle__thumb{background-color:#1e1e1e;border:6px solid transparent;box-shadow:0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01)}.components-form-toggle.is-checked .components-form-toggle__track{background-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-form-toggle.is-checked .components-form-toggle__track:after{opacity:1}.components-form-toggle .components-form-toggle__input:focus+.components-form-toggle__track{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff,0 0 0 calc(var(--wp-admin-border-width-focus)*2) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent;outline-offset:2px}.components-form-toggle.is-checked .components-form-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(16px)}.components-disabled .components-form-toggle,.components-form-toggle.is-disabled{opacity:.3}.components-form-toggle input.components-form-toggle__input[type=checkbox]{border:none;height:100%;left:0;margin:0;opacity:0;padding:0;position:absolute;top:0;width:100%;z-index:1}.components-form-toggle input.components-form-toggle__input[type=checkbox]:checked{background:none}.components-form-toggle input.components-form-toggle__input[type=checkbox]:before{content:""}.components-form-toggle input.components-form-toggle__input[type=checkbox]:not(:disabled,[aria-disabled=true]){cursor:pointer}.components-form-token-field__input-container{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.components-form-token-field__input-container{transition:box-shadow .1s linear}}@media (min-width:600px){.components-form-token-field__input-container{font-size:13px;line-height:normal}}.components-form-token-field__input-container:focus{border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));box-shadow:0 0 0 .5px var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent}.components-form-token-field__input-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-form-token-field__input-container::-moz-placeholder{color:rgba(30,30,30,.62)}.components-form-token-field__input-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-form-token-field__input-container{cursor:text;padding:0;width:100%}.components-form-token-field__input-container.is-disabled{background:#ddd;border-color:#ddd}.components-form-token-field__input-container.is-active{border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));box-shadow:0 0 0 .5px var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent}.components-form-token-field__input-container input[type=text].components-form-token-field__input{background:inherit;border:0;box-shadow:none;color:var(--wp-components-color-foreground,#1e1e1e);display:inline-block;flex:1;font-family:inherit;font-size:16px;margin-left:4px;max-width:100%;min-height:24px;min-width:50px;padding:0;width:100%}@media (min-width:600px){.components-form-token-field__input-container input[type=text].components-form-token-field__input{font-size:13px}}.components-form-token-field.is-active .components-form-token-field__input-container input[type=text].components-form-token-field__input,.components-form-token-field__input-container input[type=text].components-form-token-field__input:focus{box-shadow:none;outline:none}.components-form-token-field__input-container .components-form-token-field__token+input[type=text].components-form-token-field__input{width:auto}.components-form-token-field__token{color:#1e1e1e;display:flex;font-size:13px;max-width:100%}.components-form-token-field__token.is-success .components-form-token-field__remove-token,.components-form-token-field__token.is-success .components-form-token-field__token-text{background:#4ab866}.components-form-token-field__token.is-error .components-form-token-field__remove-token,.components-form-token-field__token.is-error .components-form-token-field__token-text{background:#cc1818}.components-form-token-field__token.is-validating .components-form-token-field__remove-token,.components-form-token-field__token.is-validating .components-form-token-field__token-text{color:#757575}.components-form-token-field__token.is-borderless{padding:0 24px 0 0;position:relative}.components-form-token-field__token.is-borderless .components-form-token-field__token-text{background:transparent}.components-form-token-field__token.is-borderless:not(.is-disabled) .components-form-token-field__token-text{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-form-token-field__token.is-borderless .components-form-token-field__remove-token{background:transparent;color:#757575;position:absolute;right:0;top:1px}.components-form-token-field__token.is-borderless.is-success .components-form-token-field__token-text{color:#4ab866}.components-form-token-field__token.is-borderless.is-error .components-form-token-field__token-text{color:#cc1818;padding:0 4px 0 6px}.components-form-token-field__token.is-borderless.is-validating .components-form-token-field__token-text{color:#1e1e1e}.components-form-token-field__remove-token.components-button,.components-form-token-field__token-text{background:#ddd;display:inline-block;height:auto;min-width:unset}@media not (prefers-reduced-motion){.components-form-token-field__remove-token.components-button,.components-form-token-field__token-text{transition:all .2s cubic-bezier(.4,1,.4,1)}}.components-form-token-field__token-text{border-radius:1px 0 0 1px;line-height:24px;overflow:hidden;padding:0 0 0 8px;text-overflow:ellipsis;white-space:nowrap}.components-form-token-field__remove-token.components-button{border-radius:0 1px 1px 0;color:#1e1e1e;line-height:10px;overflow:initial}.components-form-token-field__remove-token.components-button:hover:not(:disabled){color:#1e1e1e}.components-form-token-field__suggestions-list{flex:1 0 100%;max-height:128px;min-width:100%;overflow-y:auto}@media not (prefers-reduced-motion){.components-form-token-field__suggestions-list{transition:all .15s ease-in-out}}.components-form-token-field__suggestions-list{box-shadow:inset 0 1px 0 0 #949494;list-style:none;margin:0;padding:0}.components-form-token-field__suggestion{box-sizing:border-box;color:var(--wp-components-color-foreground,#1e1e1e);display:block;font-size:13px;margin:0;min-height:32px;padding:8px 12px}.components-form-token-field__suggestion.is-selected{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:var(--wp-components-color-foreground-inverted,#fff)}.components-form-token-field__suggestion[aria-disabled=true]{color:#949494;pointer-events:none}.components-form-token-field__suggestion[aria-disabled=true].is-selected{background:color-mix(in srgb,var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)) 4%,transparent)}.components-form-token-field__suggestion:not(.is-empty){cursor:pointer}@media (min-width:600px){.components-guide{width:600px}}.components-guide .components-modal__content{margin-top:0;padding:0}.components-guide .components-modal__content:before{content:none}.components-guide .components-modal__header{border-bottom:none;height:64px;padding:0;position:sticky}.components-guide .components-modal__header .components-button{align-self:flex-start;margin:8px 8px 0 0;position:static}.components-guide .components-guide__container{display:flex;flex-direction:column;justify-content:space-between;margin-top:-64px;min-height:100%}.components-guide .components-guide__page{display:flex;flex-direction:column;justify-content:center;position:relative}@media (min-width:600px){.components-guide .components-guide__page{min-height:300px}}.components-guide .components-guide__footer{align-content:center;display:flex;height:36px;justify-content:center;margin:0 0 24px;padding:0 32px;position:relative;width:100%}.components-guide .components-guide__page-control{margin:0;text-align:center}.components-guide .components-guide__page-control li{display:inline-block;margin:0}.components-guide .components-guide__page-control .components-button{color:#e0e0e0;margin:-6px 0}.components-guide .components-guide__page-control li[aria-current=step] .components-button{color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-modal__frame.components-guide{border:none;max-height:575px;min-width:312px}@media (max-width:600px){.components-modal__frame.components-guide{margin:auto;max-width:calc(100vw - 32px)}}.components-button.components-guide__back-button,.components-button.components-guide__finish-button,.components-button.components-guide__forward-button{position:absolute}.components-button.components-guide__back-button{left:32px}.components-button.components-guide__finish-button,.components-button.components-guide__forward-button{right:32px}[role=region]{position:relative}[role=region].interface-interface-skeleton__content:focus-visible:after{bottom:0;content:"";left:0;outline-color:var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-2/var(--wp-block-editor-iframe-zoom-out-scale, 1));outline-style:solid;outline-width:calc(var(--wp-admin-border-width-focus)*2/var(--wp-block-editor-iframe-zoom-out-scale, 1));pointer-events:none;position:absolute;right:0;top:0;z-index:1000000}.is-focusing-regions [role=region]:focus:after{bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;z-index:1000000}.is-focusing-regions .editor-post-publish-panel,.is-focusing-regions .interface-interface-skeleton__actions .editor-layout__toggle-entities-saved-states-panel,.is-focusing-regions .interface-interface-skeleton__actions .editor-layout__toggle-publish-panel,.is-focusing-regions .interface-interface-skeleton__sidebar .editor-layout__toggle-sidebar-panel,.is-focusing-regions [role=region]:focus:after,.is-focusing-regions.is-distraction-free .interface-interface-skeleton__header .edit-post-header{outline-color:var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-2/var(--wp-block-editor-iframe-zoom-out-scale, 1));outline-style:solid;outline-width:calc(var(--wp-admin-border-width-focus)*2/var(--wp-block-editor-iframe-zoom-out-scale, 1))}.components-menu-group+.components-menu-group{border-top:1px solid #1e1e1e;padding-top:8px}.components-menu-group+.components-menu-group.has-hidden-separator{border-top:none;margin-top:0;padding-top:0}.components-menu-group:has(>div:empty){display:none}.components-menu-group__label{color:#757575;font-size:11px;font-weight:499;margin-bottom:12px;margin-top:4px;padding:0 8px;text-transform:uppercase;white-space:nowrap}.components-menu-item__button,.components-menu-item__button.components-button{font-weight:400;width:100%}.components-menu-item__button.components-button[role=menuitemcheckbox] .components-menu-item__item:only-child,.components-menu-item__button.components-button[role=menuitemradio] .components-menu-item__item:only-child,.components-menu-item__button[role=menuitemcheckbox] .components-menu-item__item:only-child,.components-menu-item__button[role=menuitemradio] .components-menu-item__item:only-child{box-sizing:initial;padding-right:48px}.components-menu-item__button .components-menu-items__item-icon,.components-menu-item__button.components-button .components-menu-items__item-icon{display:inline-block;flex:0 0 auto}.components-menu-item__button .components-menu-items__item-icon.has-icon-right,.components-menu-item__button.components-button .components-menu-items__item-icon.has-icon-right{margin-left:24px;margin-right:-2px}.components-menu-item__button .components-menu-item__shortcut+.components-menu-items__item-icon.has-icon-right,.components-menu-item__button.components-button .components-menu-item__shortcut+.components-menu-items__item-icon.has-icon-right{margin-left:8px}.components-menu-item__button .block-editor-block-icon,.components-menu-item__button.components-button .block-editor-block-icon{margin-left:-2px;margin-right:8px}.components-menu-item__button.components-button.is-primary,.components-menu-item__button.is-primary{justify-content:center}.components-menu-item__button.components-button.is-primary .components-menu-item__item,.components-menu-item__button.is-primary .components-menu-item__item{margin-right:0}.components-menu-item__button.components-button:disabled.is-tertiary,.components-menu-item__button.components-button[aria-disabled=true].is-tertiary,.components-menu-item__button:disabled.is-tertiary,.components-menu-item__button[aria-disabled=true].is-tertiary{background:none;color:var(--wp-components-color-accent-darker-10,var(--wp-admin-theme-color-darker-10,#2145e6));opacity:.3}.components-menu-item__info-wrapper{display:flex;flex-direction:column;margin-right:auto}.components-menu-item__info{color:#757575;font-size:12px;margin-top:4px;white-space:normal}.components-menu-item__item{align-items:center;display:inline-flex;margin-right:auto;min-width:160px;white-space:nowrap}.components-menu-item__shortcut{align-self:center;color:currentColor;display:none;margin-left:auto;margin-right:0;padding-left:24px}@media (min-width:480px){.components-menu-item__shortcut{display:inline}}.components-menu-items-choice,.components-menu-items-choice.components-button{height:auto;min-height:40px}.components-menu-items-choice svg,.components-menu-items-choice.components-button svg{margin-right:12px}.components-menu-items-choice.components-button.has-icon,.components-menu-items-choice.has-icon{padding-left:12px}.components-modal__screen-overlay{background-color:rgba(0,0,0,.35);bottom:0;display:flex;left:0;position:fixed;right:0;top:0;z-index:100000}@keyframes __wp-base-styles-fade-in{0%{opacity:0}to{opacity:1}}@media not (prefers-reduced-motion){.components-modal__screen-overlay{animation:__wp-base-styles-fade-in .08s linear 0s;animation-fill-mode:forwards}}@keyframes __wp-base-styles-fade-out{0%{opacity:1}to{opacity:0}}@media not (prefers-reduced-motion){.components-modal__screen-overlay.is-animating-out{animation:__wp-base-styles-fade-out .08s linear 80ms;animation-fill-mode:forwards}}.components-modal__frame{box-sizing:border-box}.components-modal__frame *,.components-modal__frame :after,.components-modal__frame :before{box-sizing:inherit}.components-modal__frame{animation-fill-mode:forwards;animation-name:components-modal__appear-animation;animation-timing-function:cubic-bezier(.29,0,0,1);background:#fff;border-radius:8px 8px 0 0;box-shadow:0 5px 15px rgba(0,0,0,.08),0 15px 27px rgba(0,0,0,.07),0 30px 36px rgba(0,0,0,.04),0 50px 43px rgba(0,0,0,.02);color:#1e1e1e;display:flex;margin:40px 0 0;overflow:hidden;width:100%}.components-modal__frame h1,.components-modal__frame h2,.components-modal__frame h3{color:#1e1e1e}@media not (prefers-reduced-motion){.components-modal__frame{animation-duration:var(--modal-frame-animation-duration)}}.components-modal__screen-overlay.is-animating-out .components-modal__frame{animation-name:components-modal__disappear-animation;animation-timing-function:cubic-bezier(1,0,.2,1)}@media (min-width:600px){.components-modal__frame{border-radius:8px;margin:auto;max-height:calc(100% - 128px);max-width:calc(100% - 32px);min-width:350px;width:auto}}@media (min-width:600px) and (min-width:600px){.components-modal__frame.is-full-screen{height:calc(100% - 32px);max-height:none;width:calc(100% - 32px)}}@media (min-width:600px) and (min-width:782px){.components-modal__frame.is-full-screen{height:calc(100% - 80px);max-width:none;width:calc(100% - 80px)}}@media (min-width:600px){.components-modal__frame.has-size-large,.components-modal__frame.has-size-medium,.components-modal__frame.has-size-small{width:100%}.components-modal__frame.has-size-small{max-width:384px}.components-modal__frame.has-size-medium{max-width:512px}.components-modal__frame.has-size-large{max-width:840px}}@media (min-width:960px){.components-modal__frame{max-height:70%}}.components-modal__frame.is-full-screen .components-modal__content{display:flex;margin-bottom:32px;padding-bottom:0}.components-modal__frame.is-full-screen .components-modal__content>:last-child{flex:1}@keyframes components-modal__appear-animation{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}@keyframes components-modal__disappear-animation{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.9)}}.components-modal__header{align-items:center;border-bottom:1px solid transparent;box-sizing:border-box;display:flex;flex-direction:row;height:72px;justify-content:space-between;left:0;padding:24px 32px 8px;position:absolute;top:0;width:100%;z-index:10}.components-modal__header .components-modal__header-heading{font-size:20px;font-weight:600}.components-modal__header h1{line-height:1;margin:0}.components-modal__content.has-scrolled-content:not(.hide-header) .components-modal__header{border-bottom-color:#ddd}.components-modal__header+p{margin-top:0}.components-modal__header-heading-container{align-items:center;display:flex;flex-direction:row;flex-grow:1;justify-content:flex-start}.components-modal__header-icon-container{display:inline-block}.components-modal__header-icon-container svg{max-height:36px;max-width:36px;padding:8px}.components-modal__content{flex:1;margin-top:72px;overflow:auto;padding:4px 32px 32px}.components-modal__content.hide-header{margin-top:0;padding-top:32px}.components-modal__content.is-scrollable:focus-visible{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent;outline-offset:-2px}.components-notice{align-items:center;background-color:#fff;border-left:4px solid var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));color:#1e1e1e;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:8px 12px}.components-notice.is-dismissible{position:relative}.components-notice.is-success{background-color:#eff9f1;border-left-color:#4ab866}.components-notice.is-warning{background-color:#fef8ee;border-left-color:#f0b849}.components-notice.is-error{background-color:#f4a2a2;border-left-color:#cc1818}.components-notice__content{flex-grow:1;margin:4px 25px 4px 0}.components-notice__actions{display:flex;flex-wrap:wrap}.components-notice__action.components-button,.components-notice__action.components-button.is-link{margin-left:12px}.components-notice__action.components-button.is-secondary{vertical-align:initial}.components-notice__action.components-button{margin-right:8px}.components-notice__dismiss{align-self:flex-start;color:#757575;flex-shrink:0}.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):focus,.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):active,.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{background-color:transparent;color:#1e1e1e}.components-notice__dismiss:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{box-shadow:none}.components-notice-list{box-sizing:border-box;max-width:100vw}.components-notice-list .components-notice__content{line-height:2;margin-bottom:12px;margin-top:12px}.components-notice-list .components-notice__action.components-button{display:block;margin-left:0;margin-top:8px}.components-panel{background:#fff;border:1px solid #e0e0e0}.components-panel>.components-panel__body:first-child,.components-panel>.components-panel__header:first-child{margin-top:-1px}.components-panel>.components-panel__body:last-child,.components-panel>.components-panel__header:last-child{border-bottom-width:0}.components-panel+.components-panel{margin-top:-1px}.components-panel__body{border-bottom:1px solid #e0e0e0;border-top:1px solid #e0e0e0}.components-panel__body h3{margin:0 0 .5em}.components-panel__body.is-opened{padding:16px}.components-panel__header{align-items:center;border-bottom:1px solid #ddd;box-sizing:content-box;display:flex;flex-shrink:0;height:47px;justify-content:space-between;padding:0 16px}.components-panel__header h2{color:inherit;font-size:inherit;margin:0}.components-panel__body+.components-panel__body,.components-panel__body+.components-panel__header,.components-panel__header+.components-panel__body,.components-panel__header+.components-panel__header{margin-top:-1px}.components-panel__body>.components-panel__body-title{display:block;font-size:inherit;margin-bottom:0;margin-top:0;padding:0}@media not (prefers-reduced-motion){.components-panel__body>.components-panel__body-title{transition:background .1s ease-in-out}}.components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 5px}.components-panel__body>.components-panel__body-title:hover{background:#f0f0f0;border:none}.components-panel__body-toggle.components-button{border:none;box-shadow:none;color:#1e1e1e;font-weight:499;outline:none;padding:16px 48px 16px 16px;position:relative;text-align:left;width:100%}@media not (prefers-reduced-motion){.components-panel__body-toggle.components-button{transition:background .1s ease-in-out}}.components-panel__body-toggle.components-button{height:auto}.components-panel__body-toggle.components-button:focus{border-radius:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-panel__body-toggle.components-button .components-panel__arrow{color:#1e1e1e;fill:currentColor;position:absolute;right:16px;top:50%;transform:translateY(-50%)}@media not (prefers-reduced-motion){.components-panel__body-toggle.components-button .components-panel__arrow{transition:color .1s ease-in-out}}body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right{-ms-filter:fliph;filter:FlipH;margin-top:-10px;transform:scaleX(-1)}.components-panel__icon{color:#757575;margin:-2px 0 -2px 6px}.components-panel__body-toggle-icon{margin-right:-5px}.components-panel__color-title{float:left;height:19px}.components-panel__row{align-items:center;display:flex;justify-content:space-between;margin-top:8px;min-height:36px}.components-panel__row select{min-width:0}.components-panel__row label{flex-shrink:0;margin-right:12px;max-width:75%}.components-panel__row:empty,.components-panel__row:first-of-type{margin-top:0}.components-panel .circle-picker{padding-bottom:20px}.components-placeholder.components-placeholder{align-items:flex-start;box-sizing:border-box;color:#1e1e1e;display:flex;flex-direction:column;font-size:13px;gap:16px;margin:0;padding:24px;position:relative;text-align:left;width:100%;-moz-font-smoothing:subpixel-antialiased;-webkit-font-smoothing:subpixel-antialiased;background-color:#fff;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;outline:1px solid transparent}.components-placeholder__error,.components-placeholder__fieldset,.components-placeholder__instructions,.components-placeholder__label{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;letter-spacing:normal;line-height:normal;text-transform:none}.components-placeholder__label{align-items:center;display:flex;font-weight:600}.components-placeholder__label .block-editor-block-icon,.components-placeholder__label .dashicon,.components-placeholder__label>svg{fill:currentColor;margin-right:4px}@media (forced-colors:active){.components-placeholder__label .block-editor-block-icon,.components-placeholder__label .dashicon,.components-placeholder__label>svg{fill:CanvasText}}.components-placeholder__label:empty{display:none}.components-placeholder__fieldset,.components-placeholder__fieldset form{display:flex;flex-direction:row;flex-wrap:wrap;gap:16px;justify-content:flex-start;width:100%}.components-placeholder__fieldset form p,.components-placeholder__fieldset p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.components-placeholder__fieldset.is-column-layout,.components-placeholder__fieldset.is-column-layout form{flex-direction:column}.components-placeholder__input[type=url]{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.components-placeholder__input[type=url]{transition:box-shadow .1s linear}}@media (min-width:600px){.components-placeholder__input[type=url]{font-size:13px;line-height:normal}}.components-placeholder__input[type=url]:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-placeholder__input[type=url]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-placeholder__input[type=url]::-moz-placeholder{color:rgba(30,30,30,.62)}.components-placeholder__input[type=url]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-placeholder__input[type=url]{flex:1 1 auto}.components-placeholder__error{gap:8px;width:100%}.components-placeholder__fieldset .components-button:not(.is-link)~.components-button.is-link{margin-left:10px;margin-right:10px}.components-placeholder__fieldset .components-button:not(.is-link)~.components-button.is-link:last-child{margin-right:0}.components-placeholder.is-medium .components-placeholder__instructions,.components-placeholder.is-small .components-placeholder__instructions{display:none}.components-placeholder.is-medium .components-placeholder__fieldset,.components-placeholder.is-medium .components-placeholder__fieldset form,.components-placeholder.is-small .components-placeholder__fieldset,.components-placeholder.is-small .components-placeholder__fieldset form{flex-direction:column}.components-placeholder.is-medium .components-button,.components-placeholder.is-medium .components-placeholder__fieldset>*,.components-placeholder.is-small .components-button,.components-placeholder.is-small .components-placeholder__fieldset>*{justify-content:center;width:100%}.components-placeholder.is-small{padding:16px}.components-placeholder.has-illustration{backdrop-filter:blur(100px);backface-visibility:hidden;background-color:transparent;border-radius:0;box-shadow:none;color:inherit;display:flex}.is-dark-theme .components-placeholder.has-illustration{background-color:rgba(0,0,0,.1)}.components-placeholder.has-illustration .components-placeholder__fieldset{margin-left:0;margin-right:0}.components-placeholder.has-illustration .components-button,.components-placeholder.has-illustration .components-placeholder__instructions,.components-placeholder.has-illustration .components-placeholder__label{opacity:0;pointer-events:none}@media not (prefers-reduced-motion){.components-placeholder.has-illustration .components-button,.components-placeholder.has-illustration .components-placeholder__instructions,.components-placeholder.has-illustration .components-placeholder__label{transition:opacity .1s linear}}.is-selected>.components-placeholder.has-illustration .components-button,.is-selected>.components-placeholder.has-illustration .components-placeholder__instructions,.is-selected>.components-placeholder.has-illustration .components-placeholder__label{opacity:1;pointer-events:auto}.components-placeholder.has-illustration:before{background:currentColor;bottom:0;content:"";left:0;opacity:.1;pointer-events:none;position:absolute;right:0;top:0}.components-placeholder.has-illustration{overflow:hidden}.is-selected .components-placeholder.has-illustration{overflow:auto}.components-placeholder__preview{display:flex;justify-content:center}.components-placeholder__illustration{box-sizing:content-box;height:100%;left:50%;opacity:.25;position:absolute;stroke:currentColor;top:50%;transform:translate(-50%,-50%);width:100%}.components-popover{box-sizing:border-box}.components-popover *,.components-popover :after,.components-popover :before{box-sizing:inherit}.components-popover{will-change:transform;z-index:1000000}.components-popover.is-expanded{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1000000!important}.components-popover__content{background:#fff;border-radius:4px;box-shadow:0 0 0 1px #ccc,0 2px 3px rgba(0,0,0,.05),0 4px 5px rgba(0,0,0,.04),0 12px 12px rgba(0,0,0,.03),0 16px 16px rgba(0,0,0,.02);box-sizing:border-box;width:min-content}.is-alternate .components-popover__content{border-radius:2px;box-shadow:0 0 0 1px #1e1e1e}.is-unstyled .components-popover__content{background:none;border-radius:0;box-shadow:none}.components-popover.is-expanded .components-popover__content{box-shadow:0 -1px 0 0 #ccc;height:calc(100% - 48px);overflow-y:visible;position:static;width:auto}.components-popover.is-expanded.is-alternate .components-popover__content{box-shadow:0 -1px 0 #1e1e1e}.components-popover__header{align-items:center;background:#fff;display:flex;height:48px;justify-content:space-between;padding:0 8px 0 16px}.components-popover__header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.components-popover__close.components-button{z-index:5}.components-popover__arrow{display:flex;height:14px;pointer-events:none;position:absolute;width:14px}.components-popover__arrow:before{background-color:#fff;content:"";height:2px;left:1px;position:absolute;right:1px;top:-1px}.components-popover__arrow.is-top{bottom:-14px!important;transform:rotate(0)}.components-popover__arrow.is-right{left:-14px!important;transform:rotate(90deg)}.components-popover__arrow.is-bottom{top:-14px!important;transform:rotate(180deg)}.components-popover__arrow.is-left{right:-14px!important;transform:rotate(-90deg)}.components-popover__triangle{display:block;flex:1}.components-popover__triangle-bg{fill:#fff}.components-popover__triangle-border{fill:transparent;stroke:#ccc;stroke-width:1px}.is-alternate .components-popover__triangle-border{stroke:#1e1e1e}.components-radio-control{border:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;margin:0;padding:0}.components-radio-control__group-wrapper.has-help{margin-block-end:12px}.components-radio-control__option{align-items:center;column-gap:8px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto minmax(0,max-content)}.components-radio-control__input[type=radio]{border:1px solid #1e1e1e;border-radius:50%;grid-column:1;grid-row:1;height:24px;margin-right:12px;max-width:24px;min-width:24px;position:relative;transition:none;width:24px}@media not (prefers-reduced-motion){.components-radio-control__input[type=radio]{transition:box-shadow .1s linear}}@media (min-width:600px){.components-radio-control__input[type=radio]{height:16px;max-width:16px;min-width:16px;width:16px}}.components-radio-control__input[type=radio]:checked:before{background-color:#fff;border:4px solid #fff;box-sizing:inherit;height:12px;left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:12px}@media (min-width:600px){.components-radio-control__input[type=radio]:checked:before{height:8px;width:8px}}.components-radio-control__input[type=radio]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--wp-admin-theme-color)}.components-radio-control__input[type=radio]:checked{background:var(--wp-admin-theme-color);border:none}.components-radio-control__input[type=radio]{appearance:none;cursor:pointer;display:inline-flex;margin:0;padding:0}.components-radio-control__input[type=radio]:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff,0 0 0 calc(var(--wp-admin-border-width-focus)*2) var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:2px}.components-radio-control__input[type=radio]:checked{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-radio-control__input[type=radio]:checked:before{border-radius:50%;content:""}.components-radio-control__label{cursor:pointer;grid-column:2;grid-row:1;line-height:24px}@media (min-width:600px){.components-radio-control__label{line-height:16px}}.components-radio-control__option-description{grid-column:2;grid-row:2;padding-block-start:4px}.components-radio-control__option-description.components-radio-control__option-description{margin-top:0}.components-resizable-box__handle{display:none;height:23px;width:23px;z-index:2}.components-resizable-box__container.has-show-handle .components-resizable-box__handle{display:block}.components-resizable-box__handle>div{height:100%;outline:none;position:relative;width:100%;z-index:2}.components-resizable-box__container>img{width:inherit}.components-resizable-box__handle:after{background:#fff;border-radius:50%;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9)),0 1px 1px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.02),0 3px 3px rgba(0,0,0,.02),0 4px 4px rgba(0,0,0,.01);content:"";cursor:inherit;display:block;height:15px;outline:2px solid transparent;position:absolute;right:calc(50% - 8px);top:calc(50% - 8px);width:15px}.components-resizable-box__side-handle:before{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-radius:9999px;content:"";cursor:inherit;display:block;height:3px;position:absolute;right:calc(50% - 1px);top:calc(50% - 1px);width:3px}@media not (prefers-reduced-motion){.components-resizable-box__side-handle:before{transition:transform .1s ease-in;will-change:transform}}.components-resizable-box__side-handle:before{opacity:0}.components-resizable-box__corner-handle,.components-resizable-box__side-handle{z-index:2}.components-resizable-box__side-handle.components-resizable-box__handle-bottom,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:before,.components-resizable-box__side-handle.components-resizable-box__handle-top,.components-resizable-box__side-handle.components-resizable-box__handle-top:before{border-left:0;border-right:0;left:0;width:100%}.components-resizable-box__side-handle.components-resizable-box__handle-left,.components-resizable-box__side-handle.components-resizable-box__handle-left:before,.components-resizable-box__side-handle.components-resizable-box__handle-right,.components-resizable-box__side-handle.components-resizable-box__handle-right:before{border-bottom:0;border-top:0;height:100%;top:0}@media not (prefers-reduced-motion){.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation:components-resizable-box__top-bottom-animation .1s ease-out 0s;animation-fill-mode:forwards}.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before{animation:components-resizable-box__left-right-animation .1s ease-out 0s;animation-fill-mode:forwards}}@media not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none){.components-resizable-box__side-handle.components-resizable-box__handle-bottom:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-left:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-right:hover:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:active:before,.components-resizable-box__side-handle.components-resizable-box__handle-top:hover:before{animation:none}}}@keyframes components-resizable-box__top-bottom-animation{0%{opacity:0;transform:scaleX(0)}to{opacity:1;transform:scaleX(1)}}@keyframes components-resizable-box__left-right-animation{0%{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}} 7 2 /*!rtl:begin:ignore*/.components-resizable-box__handle-right{right:-11.5px}.components-resizable-box__handle-left{left:-11.5px}.components-resizable-box__handle-top{top:-11.5px}.components-resizable-box__handle-bottom{bottom:-11.5px} 8 3 9 /*!rtl:end:ignore*/.components-responsive-wrapper{max-width:100%;position:relative}.components-responsive-wrapper,.components-responsive-wrapper>span{display:block}.components-responsive-wrapper__content{bottom:0;height:100%;left:0;margin:auto;position:absolute;right:0;top:0;width:100%}.components-sandbox{overflow:hidden}iframe.components-sandbox{width:100%}body.lockscroll,html.lockscroll{overflow:hidden}.components-select-control__input{-webkit-tap-highlight-color:rgba(0,0,0,0)!important;background:#fff;height:36px;line-height:36px;margin:1px;outline:0;width:100%}@media (min-width:782px){.components-select-control__input{height:28px;line-height:28px}}@media (max-width:782px){.components-base-control .components-base-control__field .components-select-control__input{font-size:16px}}.components-snackbar{background-color:#1e1e1e;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.3);box-sizing:border-box;color:#fff;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;max-width:600px;padding:16px 24px;width:100%}@media (min-width:600px){.components-snackbar{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}}.components-snackbar:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px #007cba;box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-snackbar__action.components-button{color:#fff;flex-shrink:0;height:auto;line-height:1.4;margin-left:32px;padding:0}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary){background-color:transparent;text-decoration:underline}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):focus{box-shadow:none;color:#fff;outline:1px dotted #fff}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{color:#007cba;color:var(--wp-admin-theme-color)}.components-snackbar__content{align-items:baseline;display:flex;justify-content:space-between;line-height:1.4}.components-snackbar-list{box-sizing:border-box;position:absolute;width:100%;z-index:100000}.components-snackbar-list__notice-container{padding-top:8px;position:relative}.components-spinner{background-color:#949494;border-radius:100%;display:inline-block;height:18px;margin:5px 11px 0;opacity:.7;position:relative;width:18px}.components-spinner:before{animation:components-spinner__animation 1s linear infinite;background-color:#fff;border-radius:100%;content:"";height:4px;left:3px;position:absolute;top:3px;transform-origin:6px 6px;width:4px}@keyframes components-spinner__animation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.components-tab-panel__tabs{align-items:stretch;display:flex}.components-tab-panel__tabs-item{background:transparent;border:none;border-radius:0;box-shadow:none;box-sizing:border-box;cursor:pointer;font-weight:500;height:48px;margin-left:0;padding:3px 16px;transition:box-shadow .1s linear}.components-tab-panel__tabs-item:after{speak:none;content:attr(data-label);display:block;height:0;overflow:hidden;visibility:hidden}.components-tab-panel__tabs-item:focus:not(:disabled){box-shadow:inset 0 1.5px #007cba;box-shadow:inset 0 1.5px var(--wp-admin-theme-color)}.components-tab-panel__tabs-item.is-active{box-shadow:inset 0 0 0 1.5px transparent,inset 0 -4px 0 0 #007cba;box-shadow:inset 0 0 0 1.5px transparent,inset 0 -4px 0 0 var(--wp-admin-theme-color);position:relative}.components-tab-panel__tabs-item.is-active:before{border-bottom:4px solid transparent;bottom:1px;content:"";left:0;position:absolute;right:0;top:0}.components-tab-panel__tabs-item:focus{box-shadow:inset 0 0 0 1.5px #007cba;box-shadow:inset 0 0 0 1.5px var(--wp-admin-theme-color)}.components-tab-panel__tabs-item.is-active:focus{box-shadow:inset 0 0 0 1.5px #007cba,inset 0 -4px 0 0 #007cba;box-shadow:inset 0 0 0 1.5px var(--wp-admin-theme-color),inset 0 -4px 0 0 var(--wp-admin-theme-color)}.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{border:1px solid #757575;border-radius:2px;box-shadow:0 0 0 transparent;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px;transition:box-shadow .1s linear;width:100%}@media (prefers-reduced-motion:reduce){.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{transition-duration:0s}}@media (min-width:600px){.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{font-size:13px;line-height:normal}}.components-text-control__input:focus,.components-text-control__input[type=color]:focus,.components-text-control__input[type=date]:focus,.components-text-control__input[type=datetime-local]:focus,.components-text-control__input[type=datetime]:focus,.components-text-control__input[type=email]:focus,.components-text-control__input[type=month]:focus,.components-text-control__input[type=number]:focus,.components-text-control__input[type=password]:focus,.components-text-control__input[type=tel]:focus,.components-text-control__input[type=text]:focus,.components-text-control__input[type=time]:focus,.components-text-control__input[type=url]:focus,.components-text-control__input[type=week]:focus{border-color:#007cba;border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px #007cba;box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid transparent}.components-text-control__input::-webkit-input-placeholder,.components-text-control__input[type=color]::-webkit-input-placeholder,.components-text-control__input[type=date]::-webkit-input-placeholder,.components-text-control__input[type=datetime-local]::-webkit-input-placeholder,.components-text-control__input[type=datetime]::-webkit-input-placeholder,.components-text-control__input[type=email]::-webkit-input-placeholder,.components-text-control__input[type=month]::-webkit-input-placeholder,.components-text-control__input[type=number]::-webkit-input-placeholder,.components-text-control__input[type=password]::-webkit-input-placeholder,.components-text-control__input[type=tel]::-webkit-input-placeholder,.components-text-control__input[type=text]::-webkit-input-placeholder,.components-text-control__input[type=time]::-webkit-input-placeholder,.components-text-control__input[type=url]::-webkit-input-placeholder,.components-text-control__input[type=week]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-text-control__input::-moz-placeholder,.components-text-control__input[type=color]::-moz-placeholder,.components-text-control__input[type=date]::-moz-placeholder,.components-text-control__input[type=datetime-local]::-moz-placeholder,.components-text-control__input[type=datetime]::-moz-placeholder,.components-text-control__input[type=email]::-moz-placeholder,.components-text-control__input[type=month]::-moz-placeholder,.components-text-control__input[type=number]::-moz-placeholder,.components-text-control__input[type=password]::-moz-placeholder,.components-text-control__input[type=tel]::-moz-placeholder,.components-text-control__input[type=text]::-moz-placeholder,.components-text-control__input[type=time]::-moz-placeholder,.components-text-control__input[type=url]::-moz-placeholder,.components-text-control__input[type=week]::-moz-placeholder{color:rgba(30,30,30,.62);opacity:1}.components-text-control__input:-ms-input-placeholder,.components-text-control__input[type=color]:-ms-input-placeholder,.components-text-control__input[type=date]:-ms-input-placeholder,.components-text-control__input[type=datetime-local]:-ms-input-placeholder,.components-text-control__input[type=datetime]:-ms-input-placeholder,.components-text-control__input[type=email]:-ms-input-placeholder,.components-text-control__input[type=month]:-ms-input-placeholder,.components-text-control__input[type=number]:-ms-input-placeholder,.components-text-control__input[type=password]:-ms-input-placeholder,.components-text-control__input[type=tel]:-ms-input-placeholder,.components-text-control__input[type=text]:-ms-input-placeholder,.components-text-control__input[type=time]:-ms-input-placeholder,.components-text-control__input[type=url]:-ms-input-placeholder,.components-text-control__input[type=week]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.is-dark-theme .components-text-control__input::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=color]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=date]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=datetime-local]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=datetime]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=email]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=month]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=number]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=password]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=tel]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=text]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=time]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=url]::-webkit-input-placeholder,.is-dark-theme .components-text-control__input[type=week]::-webkit-input-placeholder{color:hsla(0,0%,100%,.65)}.is-dark-theme .components-text-control__input::-moz-placeholder,.is-dark-theme .components-text-control__input[type=color]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=date]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=datetime-local]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=datetime]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=email]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=month]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=number]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=password]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=tel]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=text]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=time]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=url]::-moz-placeholder,.is-dark-theme .components-text-control__input[type=week]::-moz-placeholder{color:hsla(0,0%,100%,.65);opacity:1}.is-dark-theme .components-text-control__input:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=color]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=date]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=datetime-local]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=datetime]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=email]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=month]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=number]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=password]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=tel]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=text]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=time]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=url]:-ms-input-placeholder,.is-dark-theme .components-text-control__input[type=week]:-ms-input-placeholder{color:hsla(0,0%,100%,.65)}.components-tip{color:#757575;display:flex}.components-tip svg{-ms-grid-row-align:center;fill:#f0b849;align-self:center;flex-shrink:0;margin-right:16px}.components-tip p{margin:0}.components-toggle-control .components-base-control__field{align-items:center;display:flex;line-height:normal;margin-bottom:12px}.components-toggle-control .components-base-control__field .components-form-toggle{margin-right:12px}.components-toggle-control .components-base-control__field .components-toggle-control__label{display:block}.components-accessible-toolbar{border:1px solid #1e1e1e;border-radius:2px;display:inline-flex;flex-shrink:0}.components-accessible-toolbar>.components-toolbar-group:last-child{border-right:none}.components-accessible-toolbar .components-button,.components-toolbar .components-button{height:48px;padding-left:16px;padding-right:16px;position:relative;z-index:1}.components-accessible-toolbar .components-button:focus:enabled,.components-toolbar .components-button:focus:enabled{box-shadow:none;outline:none}.components-accessible-toolbar .components-button:before,.components-toolbar .components-button:before{animation:components-button__appear-animation .1s ease;animation-fill-mode:forwards;border-radius:2px;content:"";display:block;height:32px;left:8px;position:absolute;right:8px;z-index:-1}@media (prefers-reduced-motion:reduce){.components-accessible-toolbar .components-button:before,.components-toolbar .components-button:before{animation-duration:1ms}}.components-accessible-toolbar .components-button svg,.components-toolbar .components-button svg{margin-left:auto;margin-right:auto;position:relative}.components-accessible-toolbar .components-button.is-pressed,.components-accessible-toolbar .components-button.is-pressed:hover,.components-toolbar .components-button.is-pressed,.components-toolbar .components-button.is-pressed:hover{background:transparent}.components-accessible-toolbar .components-button.is-pressed:before,.components-toolbar .components-button.is-pressed:before{background:#1e1e1e}.components-accessible-toolbar .components-button:focus:before,.components-toolbar .components-button:focus:before{box-shadow:inset 0 0 0 1.5px #007cba,inset 0 0 0 4px #fff;box-shadow:inset 0 0 0 1.5px var(--wp-admin-theme-color),inset 0 0 0 4px #fff;outline:2px solid transparent}.components-accessible-toolbar .components-button.has-icon,.components-toolbar .components-button.has-icon{justify-content:center;min-width:48px;padding-left:8px;padding-right:8px}.components-accessible-toolbar .components-button.components-tab-button,.components-toolbar .components-button.components-tab-button{font-weight:500}.components-accessible-toolbar .components-button.components-tab-button span,.components-toolbar .components-button.components-tab-button span{display:inline-block;padding-left:0;padding-right:0;position:relative}@keyframes components-button__appear-animation{0%{transform:scaleY(0)}to{transform:scaleY(1)}}.components-toolbar__control.components-button{position:relative}.components-toolbar__control.components-button[data-subscript] svg{padding:5px 10px 5px 0}.components-toolbar__control.components-button[data-subscript]:after{bottom:10px;content:attr(data-subscript);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:12px;position:absolute;right:8px}.components-toolbar__control.components-button:active:before{display:none}.components-toolbar__control.components-button:not(:disabled).is-pressed[data-subscript]:after{color:#fff}.components-toolbar-group{background-color:#fff;border-right:1px solid #1e1e1e;display:inline-flex;flex-shrink:0;flex-wrap:wrap;line-height:0;min-height:48px}.components-toolbar-group .components-toolbar-group.components-toolbar-group{border-width:0;margin:0}.components-toolbar{background-color:#fff;border:1px solid #1e1e1e;display:inline-flex;flex-shrink:0;flex-wrap:wrap;margin:0;min-height:48px}.components-toolbar .components-toolbar.components-toolbar{border-width:0;margin:0}div.components-toolbar>div{display:block;margin:0}@supports (position:sticky){div.components-toolbar>div{display:flex}}div.components-toolbar>div+div.has-left-divider{margin-left:6px;overflow:visible;position:relative}div.components-toolbar>div+div.has-left-divider:before{background-color:#ddd;box-sizing:content-box;content:"";display:inline-block;height:20px;left:-3px;position:absolute;top:8px;width:1px}.components-accessible-toolbar .components-toolbar-group>.components-button.components-button.has-icon,.components-toolbar div>.components-button.components-button.has-icon{min-width:36px;padding-left:6px;padding-right:6px}.components-accessible-toolbar .components-toolbar-group>.components-button.components-button.has-icon svg,.components-toolbar div>.components-button.components-button.has-icon svg{min-width:24px}.components-accessible-toolbar .components-toolbar-group>.components-button.components-button.has-icon:before,.components-toolbar div>.components-button.components-button.has-icon:before{left:2px;right:2px}.components-accessible-toolbar .components-toolbar-group>.components-button:first-child.has-icon,.components-accessible-toolbar .components-toolbar-group>div:first-child>.components-button.has-icon,.components-toolbar div:first-child .components-button.has-icon{min-width:42px;padding-left:11px;padding-right:6px}.components-accessible-toolbar .components-toolbar-group>.components-button:first-child.has-icon:before,.components-accessible-toolbar .components-toolbar-group>div:first-child>.components-button.has-icon:before,.components-toolbar div:first-child .components-button.has-icon:before{left:8px;right:2px}.components-accessible-toolbar .components-toolbar-group>.components-button:last-of-type.has-icon,.components-accessible-toolbar .components-toolbar-group>div:last-child>.components-button.has-icon,.components-toolbar div:last-child .components-button.has-icon{min-width:42px;padding-left:6px;padding-right:11px}.components-accessible-toolbar .components-toolbar-group>.components-button:last-of-type.has-icon:before,.components-accessible-toolbar .components-toolbar-group>div:last-child>.components-button.has-icon:before,.components-toolbar div:last-child .components-button.has-icon:before{left:2px;right:8px}.components-accessible-toolbar .components-toolbar-group>.components-button:first-of-type:last-of-type.has-icon,.components-accessible-toolbar .components-toolbar-group>div:first-child:last-child>.components-button.has-icon,.components-toolbar div:first-child:last-child>.components-button.has-icon{min-width:48px;padding-left:12px;padding-right:12px}.components-accessible-toolbar .components-toolbar-group>.components-button:first-of-type:last-of-type.has-icon:before,.components-accessible-toolbar .components-toolbar-group>div:first-child:last-child>.components-button.has-icon:before,.components-toolbar div:first-child:last-child>.components-button.has-icon:before{left:8px;right:8px}.components-tooltip.components-popover{z-index:1000002}.components-tooltip.components-popover .components-popover__content{min-width:0}.components-tooltip .components-popover__content{background:#1e1e1e;border-radius:2px;border-width:0;box-shadow:none;color:#fff;font-size:12px;line-height:1.4;text-align:center;white-space:nowrap}.components-tooltip .components-popover__content>div{padding:4px 8px}.components-tooltip__shortcut{display:inline-block;margin-left:8px}.components-visually-hidden{clip:rect(1px,1px,1px,1px);word-wrap:normal!important;border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.components-visually-hidden:focus{clip:auto!important;background-color:#ddd;-webkit-clip-path:none;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000} 4 /*!rtl:end:ignore*/.components-responsive-wrapper{align-items:center;display:flex;justify-content:center;max-width:100%;position:relative}.components-responsive-wrapper__content{display:block;max-width:100%;width:100%}.components-sandbox{overflow:hidden}iframe.components-sandbox{width:100%}body.lockscroll,html.lockscroll{overflow:hidden}.components-select-control__input{outline:0;-webkit-tap-highlight-color:rgba(0,0,0,0)!important}.components-snackbar{backdrop-filter:blur(16px) saturate(180%);background:rgba(0,0,0,.85);border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);box-sizing:border-box;color:#fff;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;max-width:600px;padding:12px 20px;pointer-events:auto;width:100%}@media (min-width:600px){.components-snackbar{width:fit-content}}.components-snackbar:focus{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9))}.components-snackbar.components-snackbar-explicit-dismiss{cursor:default}.components-snackbar .components-snackbar__content-with-icon{padding-left:24px;position:relative}.components-snackbar .components-snackbar__icon{left:-8px;position:absolute;top:-2.9px}.components-snackbar .components-snackbar__dismiss-button{cursor:pointer;margin-left:24px}.components-snackbar__action.components-button,.components-snackbar__action.components-external-link{color:#fff;flex-shrink:0;margin-left:32px}.components-snackbar__action.components-button:focus,.components-snackbar__action.components-external-link:focus{box-shadow:none;outline:1px dotted #fff}.components-snackbar__action.components-button:hover,.components-snackbar__action.components-external-link:hover{color:currentColor;text-decoration:none}.components-snackbar__content{align-items:baseline;display:flex;justify-content:space-between;line-height:1.4}.components-snackbar-list{box-sizing:border-box;pointer-events:none;position:absolute;width:100%;z-index:100000}.components-snackbar-list__notice-container{padding-top:8px;position:relative}.components-tab-panel__tabs{align-items:stretch;display:flex;flex-direction:row}.components-tab-panel__tabs[aria-orientation=vertical]{flex-direction:column}.components-tab-panel__tabs-item{background:transparent;border:none;border-radius:0;box-shadow:none;cursor:pointer;font-weight:400;height:48px!important;margin-left:0;padding:3px 16px;position:relative}.components-tab-panel__tabs-item:focus:not(:disabled){box-shadow:none;outline:none;position:relative}.components-tab-panel__tabs-item:after{background:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));border-radius:0;bottom:0;content:"";height:calc(var(--wp-admin-border-width-focus)*0);left:0;pointer-events:none;position:absolute;right:0}@media not (prefers-reduced-motion){.components-tab-panel__tabs-item:after{transition:all .1s linear}}.components-tab-panel__tabs-item.is-active:after{height:calc(var(--wp-admin-border-width-focus)*1);outline:2px solid transparent;outline-offset:-1px}.components-tab-panel__tabs-item:before{border-radius:2px;bottom:12px;box-shadow:0 0 0 0 transparent;content:"";left:12px;pointer-events:none;position:absolute;right:12px;top:12px}@media not (prefers-reduced-motion){.components-tab-panel__tabs-item:before{transition:all .1s linear}}.components-tab-panel__tabs-item:focus-visible:before{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent}.components-tab-panel__tab-content:focus{box-shadow:none;outline:none}.components-tab-panel__tab-content:focus-visible{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent;outline-offset:0}.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{background:var(--wp-components-color-background,#fff);border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 transparent;color:var(--wp-components-color-foreground,#1e1e1e);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;height:32px;line-height:normal;margin:0;padding:6px 8px;width:100%}@media not (prefers-reduced-motion){.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{transition:box-shadow .1s linear}}@media (min-width:600px){.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{font-size:13px;line-height:normal}}.components-text-control__input:focus,.components-text-control__input[type=color]:focus,.components-text-control__input[type=date]:focus,.components-text-control__input[type=datetime-local]:focus,.components-text-control__input[type=datetime]:focus,.components-text-control__input[type=email]:focus,.components-text-control__input[type=month]:focus,.components-text-control__input[type=number]:focus,.components-text-control__input[type=password]:focus,.components-text-control__input[type=tel]:focus,.components-text-control__input[type=text]:focus,.components-text-control__input[type=time]:focus,.components-text-control__input[type=url]:focus,.components-text-control__input[type=week]:focus{border-color:var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));box-shadow:0 0 0 .5px var(--wp-components-color-accent,var(--wp-admin-theme-color,#3858e9));outline:2px solid transparent}.components-text-control__input::-webkit-input-placeholder,.components-text-control__input[type=color]::-webkit-input-placeholder,.components-text-control__input[type=date]::-webkit-input-placeholder,.components-text-control__input[type=datetime-local]::-webkit-input-placeholder,.components-text-control__input[type=datetime]::-webkit-input-placeholder,.components-text-control__input[type=email]::-webkit-input-placeholder,.components-text-control__input[type=month]::-webkit-input-placeholder,.components-text-control__input[type=number]::-webkit-input-placeholder,.components-text-control__input[type=password]::-webkit-input-placeholder,.components-text-control__input[type=tel]::-webkit-input-placeholder,.components-text-control__input[type=text]::-webkit-input-placeholder,.components-text-control__input[type=time]::-webkit-input-placeholder,.components-text-control__input[type=url]::-webkit-input-placeholder,.components-text-control__input[type=week]::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-text-control__input::-moz-placeholder,.components-text-control__input[type=color]::-moz-placeholder,.components-text-control__input[type=date]::-moz-placeholder,.components-text-control__input[type=datetime-local]::-moz-placeholder,.components-text-control__input[type=datetime]::-moz-placeholder,.components-text-control__input[type=email]::-moz-placeholder,.components-text-control__input[type=month]::-moz-placeholder,.components-text-control__input[type=number]::-moz-placeholder,.components-text-control__input[type=password]::-moz-placeholder,.components-text-control__input[type=tel]::-moz-placeholder,.components-text-control__input[type=text]::-moz-placeholder,.components-text-control__input[type=time]::-moz-placeholder,.components-text-control__input[type=url]::-moz-placeholder,.components-text-control__input[type=week]::-moz-placeholder{color:rgba(30,30,30,.62)}.components-text-control__input:-ms-input-placeholder,.components-text-control__input[type=color]:-ms-input-placeholder,.components-text-control__input[type=date]:-ms-input-placeholder,.components-text-control__input[type=datetime-local]:-ms-input-placeholder,.components-text-control__input[type=datetime]:-ms-input-placeholder,.components-text-control__input[type=email]:-ms-input-placeholder,.components-text-control__input[type=month]:-ms-input-placeholder,.components-text-control__input[type=number]:-ms-input-placeholder,.components-text-control__input[type=password]:-ms-input-placeholder,.components-text-control__input[type=tel]:-ms-input-placeholder,.components-text-control__input[type=text]:-ms-input-placeholder,.components-text-control__input[type=time]:-ms-input-placeholder,.components-text-control__input[type=url]:-ms-input-placeholder,.components-text-control__input[type=week]:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-text-control__input,.components-text-control__input[type=color],.components-text-control__input[type=date],.components-text-control__input[type=datetime-local],.components-text-control__input[type=datetime],.components-text-control__input[type=email],.components-text-control__input[type=month],.components-text-control__input[type=number],.components-text-control__input[type=password],.components-text-control__input[type=tel],.components-text-control__input[type=text],.components-text-control__input[type=time],.components-text-control__input[type=url],.components-text-control__input[type=week]{border-color:var(--wp-components-color-gray-600,#949494)}.components-text-control__input::placeholder,.components-text-control__input[type=color]::placeholder,.components-text-control__input[type=date]::placeholder,.components-text-control__input[type=datetime-local]::placeholder,.components-text-control__input[type=datetime]::placeholder,.components-text-control__input[type=email]::placeholder,.components-text-control__input[type=month]::placeholder,.components-text-control__input[type=number]::placeholder,.components-text-control__input[type=password]::placeholder,.components-text-control__input[type=tel]::placeholder,.components-text-control__input[type=text]::placeholder,.components-text-control__input[type=time]::placeholder,.components-text-control__input[type=url]::placeholder,.components-text-control__input[type=week]::placeholder{color:color-mix(in srgb,var(--wp-components-color-foreground,#1e1e1e),transparent 38%)}.components-text-control__input.is-next-40px-default-size,.components-text-control__input[type=color].is-next-40px-default-size,.components-text-control__input[type=date].is-next-40px-default-size,.components-text-control__input[type=datetime-local].is-next-40px-default-size,.components-text-control__input[type=datetime].is-next-40px-default-size,.components-text-control__input[type=email].is-next-40px-default-size,.components-text-control__input[type=month].is-next-40px-default-size,.components-text-control__input[type=number].is-next-40px-default-size,.components-text-control__input[type=password].is-next-40px-default-size,.components-text-control__input[type=tel].is-next-40px-default-size,.components-text-control__input[type=text].is-next-40px-default-size,.components-text-control__input[type=time].is-next-40px-default-size,.components-text-control__input[type=url].is-next-40px-default-size,.components-text-control__input[type=week].is-next-40px-default-size{height:40px;padding-left:12px;padding-right:12px}.components-text-control__input[type=email],.components-text-control__input[type=url]{direction:ltr}.components-tip{color:#757575;display:flex}.components-tip svg{align-self:center;fill:#f0b849;flex-shrink:0;margin-right:16px}.components-tip p{margin:0}.components-toggle-control__label{line-height:16px}.components-toggle-control__label:not(.is-disabled){cursor:pointer}.components-toggle-control__help{display:inline-block;margin-inline-start:40px}.components-accessible-toolbar{border:1px solid var(--wp-components-color-foreground,#1e1e1e);border-radius:2px;display:inline-flex;flex-shrink:0}.components-accessible-toolbar>.components-toolbar-group:last-child{border-right:none}.components-accessible-toolbar.is-unstyled{border:none}.components-accessible-toolbar.is-unstyled>.components-toolbar-group{border-right:none}.components-accessible-toolbar[aria-orientation=vertical],.components-toolbar[aria-orientation=vertical]{align-items:center;display:flex;flex-direction:column}.components-accessible-toolbar .components-button,.components-toolbar .components-button{height:48px;padding-left:16px;padding-right:16px;position:relative;z-index:1}.components-accessible-toolbar .components-button:focus:not(:disabled),.components-toolbar .components-button:focus:not(:disabled){box-shadow:none;outline:none}.components-accessible-toolbar .components-button:before,.components-toolbar .components-button:before{border-radius:2px;content:"";display:block;height:32px;left:8px;position:absolute;right:8px;z-index:-1}@media not (prefers-reduced-motion){.components-accessible-toolbar .components-button:before,.components-toolbar .components-button:before{animation:components-button__appear-animation .1s ease;animation-fill-mode:forwards}}.components-accessible-toolbar .components-button svg,.components-toolbar .components-button svg{margin-left:auto;margin-right:auto;position:relative}.components-accessible-toolbar .components-button.is-pressed,.components-accessible-toolbar .components-button.is-pressed:hover,.components-toolbar .components-button.is-pressed,.components-toolbar .components-button.is-pressed:hover{background:transparent}.components-accessible-toolbar .components-button.is-pressed:before,.components-toolbar .components-button.is-pressed:before{background:var(--wp-components-color-foreground,#1e1e1e)}.components-accessible-toolbar .components-button:focus:before,.components-toolbar .components-button:focus:before{box-shadow:inset 0 0 0 1px #fff,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid transparent}.components-accessible-toolbar .components-button.has-icon.has-icon,.components-toolbar .components-button.has-icon.has-icon{min-width:48px;padding-left:8px;padding-right:8px}@keyframes components-button__appear-animation{0%{transform:scaleY(0)}to{transform:scaleY(1)}}.components-toolbar__control.components-button{position:relative}.components-toolbar__control.components-button[data-subscript] svg{padding:5px 10px 5px 0}.components-toolbar__control.components-button[data-subscript]:after{bottom:10px;content:attr(data-subscript);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:12px;position:absolute;right:8px}.components-toolbar__control.components-button:not(:disabled).is-pressed[data-subscript]:after{color:#fff}.components-toolbar-group{background-color:var(--wp-components-color-background,#fff);border-right:1px solid var(--wp-components-color-foreground,#1e1e1e);display:inline-flex;flex-shrink:0;flex-wrap:wrap;min-height:48px;padding-left:6px;padding-right:6px}.components-toolbar-group .components-toolbar-group.components-toolbar-group{border-width:0;margin:0}.components-toolbar-group{line-height:0}.components-toolbar-group .components-button.components-button,.components-toolbar-group .components-button.has-icon.has-icon{justify-content:center;min-width:36px;padding-left:6px;padding-right:6px}.components-toolbar-group .components-button.components-button svg,.components-toolbar-group .components-button.has-icon.has-icon svg{min-width:24px}.components-toolbar-group .components-button.components-button:before,.components-toolbar-group .components-button.has-icon.has-icon:before{left:2px;right:2px}.components-toolbar{background-color:var(--wp-components-color-background,#fff);border:1px solid var(--wp-components-color-foreground,#1e1e1e);display:inline-flex;flex-shrink:0;flex-wrap:wrap;margin:0;min-height:48px}.components-toolbar .components-toolbar.components-toolbar{border-width:0;margin:0}div.components-toolbar>div{display:flex;margin:0}div.components-toolbar>div+div.has-left-divider{margin-left:6px;overflow:visible;position:relative}div.components-toolbar>div+div.has-left-divider:before{background-color:#ddd;box-sizing:content-box;content:"";display:inline-block;height:20px;left:-3px;position:absolute;top:8px;width:1px}.components-tooltip{background:#000;border-radius:2px;box-shadow:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);color:#f0f0f0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:12px;line-height:1.4;padding:4px 8px;text-align:center;z-index:1000002}.components-tooltip__shortcut{margin-left:8px}.components-validated-control:has(:is(input,select):user-invalid) .components-input-control__backdrop{--wp-components-color-accent:#cc1818;border-color:#cc1818}.components-validated-control :is(textarea,input[type=text]):user-invalid{--wp-admin-theme-color:#cc1818;--wp-components-color-accent:#cc1818;border-color:#cc1818}.components-validated-control .components-combobox-control__suggestions-container:has(input:user-invalid):not(:has([aria-expanded=true])){border-color:#cc1818}.components-validated-control__wrapper-with-error-delegate{position:relative}.components-validated-control__wrapper-with-error-delegate:has(select:user-invalid) .components-input-control__backdrop{--wp-components-color-accent:#cc1818;border-color:#cc1818}.components-validated-control__wrapper-with-error-delegate:has(input[type=radio]:invalid){--wp-components-color-accent:#cc1818}.components-validated-control__wrapper-with-error-delegate:has(input:user-invalid) .components-form-token-field__input-container:not(:has([aria-expanded=true])){--wp-components-color-accent:#cc1818;border-color:#cc1818}.components-validated-control__error-delegate{height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}.components-validated-control__indicator{align-items:flex-start;animation:components-validated-control__indicator-jump .2s cubic-bezier(.68,-.55,.27,1.55);color:var(--wp-components-color-gray-700,#757575);display:flex;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:12px;gap:4px;line-height:16px;margin:8px 0 0}.components-validated-control__indicator.is-invalid{color:#cc1818}.components-validated-control__indicator.is-valid{color:color-mix(in srgb,#000 30%,#4ab866)}.components-validated-control__indicator-icon{flex-shrink:0}.components-validated-control__indicator-spinner{height:12px;margin:2px;width:12px}@keyframes components-validated-control__indicator-jump{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}:root{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color--rgb:56,88,233;--wp-admin-theme-color-darker-10:#2145e6;--wp-admin-theme-color-darker-10--rgb:33.0384615385,68.7307692308,230.4615384615;--wp-admin-theme-color-darker-20:#183ad6;--wp-admin-theme-color-darker-20--rgb:23.6923076923,58.1538461538,214.3076923077;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}} 5 /*# sourceMappingURL=gallery-ui.css.map*/ -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/css/video.css
r2316357 r3518458 1 1 .cld-video-player{max-width:100%} 2 /*# sourceMappingURL=video.css.map*/ -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/asset-edit.js
r3439415 r3518458 1 !function(){var e={604:function(e,t,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(e){return function(e,t){var r,n,o,s,l,u,c,p,h,f=1,d=e.length,v="";for(n=0;n<d;n++)if("string"==typeof e[n])v+=e[n];else if("object"==typeof e[n]){if((s=e[n]).keys)for(r=t[f],o=0;o<s.keys.length;o++){if(null==r)throw new Error(a('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[o],s.keys[o-1]));r=r[s.keys[o]]}else r=s.param_no?t[s.param_no]:t[f++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),i.numeric_arg.test(s.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(a("[sprintf] expecting number but found %T",r));switch(i.number.test(s.type)&&(p=r>=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=r:(!i.number.test(s.type)||p&&!s.sign?h="":(h=p?"+":"-",r=r.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",c=s.width-(h+r).length,l=s.width&&c>0?u.repeat(c):"",v+=s.align?h+r+l:"0"===u?h+l+r:l+h+r)}return v}(function(e){if(s[e])return s[e];var t,r=e,n=[],a=0;for(;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){a|=1;var o=[],l=t[2],u=[];if(null===(u=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(l=l.substring(u[0].length));)if(null!==(u=i.key_access.exec(l)))o.push(u[1]);else{if(null===(u=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}t[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[e]=n}(e),arguments)}function o(e,t){return a.apply(null,[e].concat(t||[]))}var s=Object.create(null);"undefined"!=typeof window&&(window.sprintf=a,window.vsprintf=o,void 0===(n=function(){return{sprintf:a,vsprintf:o}}.call(t,r,t,e))||(e.exports=n))}()},616:function(e){e.exports=function(e,t){var r,n,i=0;function a(){var a,o,s=r,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(o=0;o<l;o++)if(s.args[o]!==arguments[o]){s=s.next;continue e}return s!==r&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=r,s.prev=null,r.prev=s,r=s),s.val}s=s.next}for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];return s={args:a,val:e.apply(null,a)},r?(r.prev=s,s.next=r):n=s,i===t.maxSize?(n=n.prev).next=null:i++,r=s,s.val}return t=t||{},a.clear=function(){r=null,n=null,i=0},a}},633:function(e,t,r){var n=r(738).default;function i(){"use strict";e.exports=i=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},a=Object.prototype,o=a.hasOwnProperty,s=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",p=l.toStringTag||"@@toStringTag";function h(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(t){h=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof O?t:O,a=Object.create(i.prototype),o=new D(n||[]);return s(a,"_invoke",{value:k(e,r,o)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=f;var v="suspendedStart",y="suspendedYield",m="executing",g="completed",b={};function O(){}function w(){}function x(){}var _={};h(_,u,(function(){return this}));var I=Object.getPrototypeOf,j=I&&I(I(F([])));j&&j!==a&&o.call(j,u)&&(_=j);var P=x.prototype=O.prototype=Object.create(_);function S(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,a,s,l){var u=d(e[i],e,a);if("throw"!==u.type){var c=u.arg,p=c.value;return p&&"object"==n(p)&&o.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):t.resolve(p).then((function(e){c.value=e,s(c)}),(function(e){return r("throw",e,s,l)}))}l(u.arg)}var i;s(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(a,a):a()}})}function k(e,r,n){var i=v;return function(a,o){if(i===m)throw Error("Generator is already running");if(i===g){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var l=L(s,n);if(l){if(l===b)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var u=d(e,r,n);if("normal"===u.type){if(i=n.done?g:y,u.arg===b)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=g,n.method="throw",n.arg=u.arg)}}}function L(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var a=d(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,b;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(o.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return w.prototype=x,s(P,"constructor",{value:x,configurable:!0}),s(x,"constructor",{value:w,configurable:!0}),w.displayName=h(x,p,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,h(e,p,"GeneratorFunction")),e.prototype=Object.create(P),e},r.awrap=function(e){return{__await:e}},S(E.prototype),h(E.prototype,c,(function(){return this})),r.AsyncIterator=E,r.async=function(e,t,n,i,a){void 0===a&&(a=Promise);var o=new E(f(e,t,n,i),a);return r.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(P),h(P,p,"Generator"),h(P,u,(function(){return this})),h(P,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=F,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},738:function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:function(e,t,r){var n=r(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e,t,n,i,a=r(616),o=r.n(a);r(604),o()(console.error);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}function u(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}e={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},t=["(","?"],n={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var c={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};function p(r){var a=function(r){for(var a,o,s,l,u=[],c=[];a=r.match(i);){for(o=a[0],(s=r.substr(0,a.index).trim())&&u.push(s);l=c.pop();){if(n[o]){if(n[o][0]===l){o=n[o][1]||o;break}}else if(t.indexOf(l)>=0||e[l]<e[o]){c.push(l);break}u.push(l)}n[o]||c.push(o),r=r.substr(a.index+o.length)}return(r=r.trim())&&u.push(r),u.concat(c.reverse())}(r);return function(e){return function(e,t){var r,n,i,a,o,s,l=[];for(r=0;r<e.length;r++){if(o=e[r],a=c[o]){for(n=a.length,i=Array(n);n--;)i[n]=l.pop();try{s=a.apply(null,i)}catch(e){return e}}else s=t.hasOwnProperty(o)?t[o]:+o;l.push(s)}return l[0]}(a,e)}}var h={contextDelimiter:"",onMissingKey:null};function f(e,t){var r;for(r in this.data=e,this.pluralForms={},this.options={},h)this.options[r]=void 0!==t&&r in t?t[r]:h[r]}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}f.prototype.getPluralForm=function(e,t){var r,n,i,a=this.pluralForms[e];return a||("function"!=typeof(i=(r=this.data[e][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(e){var t,r,n;for(t=e.split(";"),r=0;r<t.length;r++)if(0===(n=t[r].trim()).indexOf("plural="))return n.substr(7)}(r["Plural-Forms"]||r["plural-forms"]||r.plural_forms),i=function(e){var t=p(e);return function(e){return+t({n:e})}}(n)),a=this.pluralForms[e]=i),a(t)},f.prototype.dcnpgettext=function(e,t,r,n,i){var a,o,s;return a=void 0===i?0:this.getPluralForm(e,i),o=r,t&&(o=t+this.options.contextDelimiter+r),(s=this.data[e][o])&&s[a]?s[a]:(this.options.onMissingKey&&this.options.onMissingKey(r,e),0===a?r:n)};var y={"":{plural_forms:function(e){return 1===e?0:1}}},m=/^i18n\.(n?gettext|has_translation)(_|$)/;var g=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var b=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var O=function(e,t){return function(r,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,o=e[t];if(b(r)&&g(n))if("function"==typeof i)if("number"==typeof a){var s={callback:i,priority:a,namespace:n};if(o[r]){var l,u=o[r].handlers;for(l=u.length;l>0&&!(a>=u[l-1].priority);l--);l===u.length?u[l]=s:u.splice(l,0,s),o.__current.forEach((function(e){e.name===r&&e.currentIndex>=l&&e.currentIndex++}))}else o[r]={handlers:[s],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,n,i,a)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var w=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,i){var a=e[t];if(b(n)&&(r||g(i))){if(!a[n])return 0;var o=0;if(r)o=a[n].handlers.length,a[n]={runs:a[n].runs,handlers:[]};else for(var s=a[n].handlers,l=function(e){s[e].namespace===i&&(s.splice(e,1),o++,a.__current.forEach((function(t){t.name===n&&t.currentIndex>=e&&t.currentIndex--})))},u=s.length-1;u>=0;u--)l(u);return"hookRemoved"!==n&&e.doAction("hookRemoved",n,i),o}}};var x=function(e,t){return function(r,n){var i=e[t];return void 0!==n?r in i&&i[r].handlers.some((function(e){return e.namespace===n})):r in i}};var _=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n){var i=e[t];i[n]||(i[n]={handlers:[],runs:0}),i[n].runs++;var a=i[n].handlers;for(var o=arguments.length,s=new Array(o>1?o-1:0),l=1;l<o;l++)s[l-1]=arguments[l];if(!a||!a.length)return r?s[0]:void 0;var u={name:n,currentIndex:0};for(i.__current.push(u);u.currentIndex<a.length;){var c=a[u.currentIndex].callback.apply(null,s);r&&(s[0]=c),u.currentIndex++}return i.__current.pop(),r?s[0]:void 0}};var I=function(e,t){return function(){var r,n,i=e[t];return null!==(r=null===(n=i.__current[i.__current.length-1])||void 0===n?void 0:n.name)&&void 0!==r?r:null}};var j=function(e,t){return function(r){var n=e[t];return void 0===r?void 0!==n.__current[0]:!!n.__current[0]&&r===n.__current[0].name}};var P=function(e,t){return function(r){var n=e[t];if(b(r))return n[r]&&n[r].runs?n[r].runs:0}},S=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=O(this,"actions"),this.addFilter=O(this,"filters"),this.removeAction=w(this,"actions"),this.removeFilter=w(this,"filters"),this.hasAction=x(this,"actions"),this.hasFilter=x(this,"filters"),this.removeAllActions=w(this,"actions",!0),this.removeAllFilters=w(this,"filters",!0),this.doAction=_(this,"actions"),this.applyFilters=_(this,"filters",!0),this.currentAction=I(this,"actions"),this.currentFilter=I(this,"filters"),this.doingAction=j(this,"actions"),this.doingFilter=j(this,"filters"),this.didAction=P(this,"actions"),this.didFilter=P(this,"filters")};var E=function(){return new S}(),k=(E.addAction,E.addFilter,E.removeAction,E.removeFilter,E.hasAction,E.hasFilter,E.removeAllActions,E.removeAllFilters,E.doAction,E.applyFilters,E.currentAction,E.currentFilter,E.doingAction,E.doingFilter,E.didAction,E.didFilter,E.actions,E.filters,function(e,t,r){var n=new f({}),i=new Set,a=function(){i.forEach((function(e){return e()}))},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[t]=v(v(v({},y),n.data[t]),e),n.data[t][""]=v(v({},y[""]),n.data[t][""])},s=function(e,t){o(e,t),a()},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;return n.data[e]||o(void 0,e),n.dcnpgettext(e,t,r,i,a)},u=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},c=function(e,t,n){var i=l(n,t,e);return r?(i=r.applyFilters("i18n.gettext_with_context",i,e,t,n),r.applyFilters("i18n.gettext_with_context_"+u(n),i,e,t,n)):i};if(e&&s(e,t),r){var p=function(e){m.test(e)&&a()};r.addAction("hookAdded","core/i18n",p),r.addAction("hookRemoved","core/i18n",p)}return{getLocaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[e]},setLocaleData:s,resetLocaleData:function(e,t){n.data={},n.pluralForms={},s(e,t)},subscribe:function(e){return i.add(e),function(){return i.delete(e)}},__:function(e,t){var n=l(t,void 0,e);return r?(n=r.applyFilters("i18n.gettext",n,e,t),r.applyFilters("i18n.gettext_"+u(t),n,e,t)):n},_x:c,_n:function(e,t,n,i){var a=l(i,void 0,e,t,n);return r?(a=r.applyFilters("i18n.ngettext",a,e,t,n,i),r.applyFilters("i18n.ngettext_"+u(i),a,e,t,n,i)):a},_nx:function(e,t,n,i,a){var o=l(a,i,e,t,n);return r?(o=r.applyFilters("i18n.ngettext_with_context",o,e,t,n,i,a),r.applyFilters("i18n.ngettext_with_context_"+u(a),o,e,t,n,i,a)):o},isRTL:function(){return"rtl"===c("ltr","text direction")},hasTranslation:function(e,t,i){var a,o,s=t?t+""+e:e,l=!(null===(a=n.data)||void 0===a||null===(o=a[null!=i?i:"default"])||void 0===o||!o[s]);return r&&(l=r.applyFilters("i18n.has_translation",l,e,t,i),l=r.applyFilters("i18n.has_translation_"+u(i),l,e,t,i)),l}}}(void 0,void 0,E)),L=(k.getLocaleData.bind(k),k.setLocaleData.bind(k),k.resetLocaleData.bind(k),k.subscribe.bind(k),k.__.bind(k));k._x.bind(k),k._n.bind(k),k._nx.bind(k),k.isRTL.bind(k),k.hasTranslation.bind(k);var T={preview:null,wrap:null,apply:null,url:null,defaultWidth:null,defaultHeight:null,maxSize:null,init(){return this},createPreview(e=400,t=300){return this.maxSize=e>t?e:t,this.defaultWidth=e,this.defaultHeight=t,this.wrap=document.createElement("div"),this.apply=document.createElement("button"),this.preview=document.createElement("img"),this.apply.type="button",this.apply.classList.add("button-primary"),this.apply.innerText=L("Preview","cloudinary"),this.preview.style.transition="opacity 1s",this.preview.style.opacity=1,this.preview.style.maxWidth="100%",this.preview.style.maxHeight="100%",this.reset(),this.wrap.style.minHeight="200px",this.wrap.style.width=this.maxSize+"px",this.wrap.style.position="relative",this.wrap.style.display="flex",this.wrap.style.alignItems="center",this.wrap.style.justifyContent="center",this.apply.style.position="absolute",this.apply.style.display="none",this.wrap.appendChild(this.preview),this.wrap.appendChild(this.apply),this.preview.addEventListener("load",(e=>{this.preview.style.opacity=1,this.wrap.style.width="",this.wrap.style.height="",this.defaultHeight=this.preview.height,this.defaultWidth=this.preview.width,this.defaultHeight>this.defaultWidth?this.wrap.style.height=this.maxSize+"px":this.wrap.style.width=this.maxSize+"px"})),this.preview.addEventListener("error",(e=>{this.preview.src=this.getNoURL("⚠")})),this.apply.addEventListener("click",(()=>{this.apply.style.display="none",this.reset(),this.preview.style.opacity=.6,this.preview.src=this.url})),this.wrap},reset(){this.preview.src=this.getNoURL()},setSrc(e,t=!1){this.preview.style.opacity=.6,t?(this.apply.style.display="none",this.preview.src=e):(this.apply.style.display="block",this.url=e)},getNoURL(e="︎"){const t=this.defaultWidth/2-23,r=this.defaultHeight/2+25;return`data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="${this.defaultWidth}" height="${this.defaultHeight}"><style>.error { font: normal 50px sans-serif; fill:rgb(255,0,0); }</style><rect width="100%" height="100%" style="fill:rgba(0,0,0,0.2);"></rect><text x="${t}" y="${r}" class="error">${e}</text></svg>`}};var A={preview:null,wrap:null,apply:null,url:null,publicId:null,player:null,defaultWidth:null,defaultHeight:null,maxSize:null,init(){return this},createPreview(e=427,t=240){return this.maxSize=e>t?e:t,this.defaultWidth=e,this.defaultHeight=t,this.wrap=document.createElement("div"),this.apply=document.createElement("button"),this.preview=document.createElement("video"),this.apply.type="button",this.apply.classList.add("button-primary"),this.apply.innerText=L("Preview","cloudinary"),this.preview.id="cld-asset-video-preview",this.preview.style.transition="opacity 1s",this.preview.style.opacity=1,this.preview.style.maxWidth="100%",this.preview.style.maxHeight="100%",this.preview.controls=!0,this.preview.setAttribute("width",e),this.preview.setAttribute("height",t),this.wrap.style.minHeight="200px",this.wrap.style.width=this.maxSize+"px",this.wrap.style.position="relative",this.wrap.style.display="flex",this.wrap.style.alignItems="center",this.wrap.style.justifyContent="center",this.apply.style.position="absolute",this.apply.style.display="none",this.wrap.appendChild(this.preview),this.wrap.appendChild(this.apply),this.apply.addEventListener("click",(()=>{this.apply.style.display="none",this.preview.style.opacity=.6,this.updatePlayer(this.url)})),this.wrap},setPublicId(e){this.publicId=e,this.initPlayer()},initPlayer(){void 0!==window.cloudinary&&void 0!==window.cld?this.player||(this.player=window.cld.videoPlayer(this.preview.id,{fluid:!0,controls:!0})):console.error("Cloudinary video player not loaded")},setSrc(e,t=!1){this.preview.style.opacity=.6,t?(this.apply.style.display="none",this.player||this.initPlayer(),this.updatePlayer(e)):(this.apply.style.display="block",this.url=e)},updatePlayer(e){if(!this.player)return;const t={publicId:this.publicId};e&&""!==e.trim()&&(t.transformation={raw_transformation:e}),this.player.source(t),this.preview.style.opacity=1},reset(e){this.setSrc(e,!1)}};function D(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var B=function(e){var t=function e(t,r){var n=t.headers,i=void 0===n?{}:n;for(var a in i)if("x-wp-nonce"===a.toLowerCase()&&i[a]===e.nonce)return r(t);return r(C(C({},t),{},{headers:C(C({},i),{},{"X-WP-Nonce":e.nonce})}))};return t.nonce=e,t};function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var z=function(e,t){var r,n,i=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(r=e.namespace.replace(/^\/|\/$/g,""),i=(n=e.endpoint.replace(/^\//,""))?r+"/"+n:r),delete e.namespace,delete e.endpoint,t($($({},e),{},{path:i}))};function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=function(e){return function(t,r){return z(t,(function(t){var n,i=t.url,a=t.path;return"string"==typeof a&&(n=e,-1!==e.indexOf("?")&&(a=a.replace("?","&")),a=a.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(a=a.replace("?","&")),i=n+a),r(G(G({},t),{},{url:i}))}))}};function W(e){var t=e.split("?"),r=t[1],n=t[0];return r?n+"?"+r.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):n}var V=function(e){var t=Object.keys(e).reduce((function(t,r){return t[W(r)]=e[r],t}),{});return function(e,r){var n=e.parse,i=void 0===n||n;if("string"==typeof e.path){var a=e.method||"GET",o=W(e.path);if("GET"===a&&t[o]){var s=t[o];return delete t[o],Promise.resolve(i?s.body:new window.Response(JSON.stringify(s.body),{status:200,statusText:"OK",headers:s.headers}))}if("OPTIONS"===a&&t[a]&&t[a][o])return Promise.resolve(t[a][o])}return r(e)}};function H(e,t,r,n,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,i)}var U=r(756),J=r.n(U);function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return X(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function K(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?q(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Q(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var r=Y(t.split("=").filter(Boolean).map(decodeURIComponent),2),n=r[0],i=r[1],a=void 0===i?"":i;n&&function(e,t,r){for(var n=t.length,i=n-1,a=0;a<n;a++){var o=t[a];!o&&Array.isArray(e)&&(o=e.length.toString());var s=!isNaN(Number(t[a+1]));e[o]=a===i?r:e[o]||(s?[]:{}),Array.isArray(e[o])&&!s&&(e[o]=K({},e[o])),e=e[o]}}(e,n.replace(/\]/g,"").split("["),a);return e}),{})}function Z(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ee(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var r=e,n=e.indexOf("?");return-1!==n&&(t=Object.assign(Q(e),t),r=r.substr(0,n)),r+"?"+function(e){for(var t,r="",n=Object.entries(e);t=n.shift();){var i=Y(t,2),a=i[0],o=i[1];if(Array.isArray(o)||o&&o.constructor===Object){var s,l=Z(Object.entries(o).reverse());try{for(l.s();!(s=l.n()).done;){var u=Y(s.value,2),c=u[0],p=u[1];n.unshift(["".concat(a,"[").concat(c,"]"),p])}}catch(e){l.e(e)}finally{l.f()}}else void 0!==o&&(null===o&&(o=""),r+="&"+[a,o].map(encodeURIComponent).join("="))}return r.substr(1)}(t)}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ie=function(e){return e.json?e.json():Promise.reject(e)},ae=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},oe=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),r=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||r},se=function(){var e,t=(e=J().mark((function e(t,r){var n,i,a,o,s,l;return J().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",r(t));case 2:if(oe(t)){e.next=4;break}return e.abrupt("return",r(t));case 4:return e.next=6,Pe(ne(ne({},(c={per_page:100},p=void 0,h=void 0,p=(u=t).path,h=u.url,ne(ne({},D(u,["path","url"])),{},{url:h&&te(h,c),path:p&&te(p,c)}))),{},{parse:!1}));case 6:return n=e.sent,e.next=9,ie(n);case 9:if(i=e.sent,Array.isArray(i)){e.next=12;break}return e.abrupt("return",i);case 12:if(a=ae(n)){e.next=15;break}return e.abrupt("return",i);case 15:o=[].concat(i);case 16:if(!a){e.next=27;break}return e.next=19,Pe(ne(ne({},t),{},{path:void 0,url:a,parse:!1}));case 19:return s=e.sent,e.next=22,ie(s);case 22:l=e.sent,o=o.concat(l),a=ae(s),e.next=16;break;case 27:return e.abrupt("return",o);case 28:case"end":return e.stop()}var u,c,p,h}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){H(a,n,i,o,s,"next",e)}function s(e){H(a,n,i,o,s,"throw",e)}o(void 0)}))});return function(e,r){return t.apply(this,arguments)}}(),le=se;function ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pe=new Set(["PATCH","PUT","DELETE"]);function he(e,t){return void 0!==function(e,t){return Q(e)[t]}(e,t)}var fe=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:204===e.status?null:e.json?e.json():Promise.reject(e)}(e,t)).catch((function(e){return de(e,t)}))};function de(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))throw e;return function(e){var t={code:"invalid_json",message:L("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))}(e).then((function(e){var t={code:"unknown_error",message:L("An unknown error occurred.")};throw e||t}))}function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var me=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e);var r=0,n=function e(n){return r++,t({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return r<5?e(n):(t({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))};return t(ye(ye({},e),{},{parse:!1})).catch((function(t){var r=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&r?n(r).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:L("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):de(t,e.parse)})).then((function(t){return fe(t,e.parse)}))};function ge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Oe={Accept:"application/json, */*;q=0.1"},we={credentials:"include"},xe=[function(e,t){return"string"!=typeof e.url||he(e.url,"_locale")||(e.url=te(e.url,{_locale:"user"})),"string"!=typeof e.path||he(e.path,"_locale")||(e.path=te(e.path,{_locale:"user"})),t(e)},z,function(e,t){var r=e.method,n=void 0===r?"GET":r;return pe.has(n.toUpperCase())&&(e=ce(ce({},e),{},{headers:ce(ce({},e.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),t(e)},le];var _e=function(e){if(e.status>=200&&e.status<300)return e;throw e},Ie=function(e){var t=e.url,r=e.path,n=e.data,i=e.parse,a=void 0===i||i,o=D(e,["url","path","data","parse"]),s=e.body,l=e.headers;return l=be(be({},Oe),l),n&&(s=JSON.stringify(n),l["Content-Type"]="application/json"),window.fetch(t||r||window.location.href,be(be(be({},we),o),{},{body:s,headers:l})).then((function(e){return Promise.resolve(e).then(_e).catch((function(e){return de(e,a)})).then((function(e){return fe(e,a)}))}),(function(){throw{code:"fetch_error",message:L("You are probably offline.")}}))};function je(e){return xe.reduceRight((function(e,t){return function(r){return t(r,e)}}),Ie)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(je.nonceEndpoint).then(_e).then((function(e){return e.text()})).then((function(t){return je.nonceMiddleware.nonce=t,je(e)}))}))}je.use=function(e){xe.unshift(e)},je.setFetchHandler=function(e){Ie=e},je.createNonceMiddleware=B,je.createPreloadingMiddleware=V,je.createRootURLMiddleware=R,je.fetchAllMiddleware=le,je.mediaUploadMiddleware=me;var Pe=je;var Se={id:null,post_id:null,transformations:null,beforeCallbacks:[],completeCallbacks:[],init(e){if(void 0!==cldData.editor)return Pe.use(Pe.createNonceMiddleware(cldData.editor.nonce)),this.callback=e,this},save(e){this.doBefore(e),Pe({path:cldData.editor.save_url,data:e,method:"POST"}).then((e=>{this.doComplete(e,this)}))},doBefore(e){this.beforeCallbacks.forEach((t=>t(e,this)))},doComplete(e){this.completeCallbacks.forEach((t=>t(e,this)))},onBefore(e){this.beforeCallbacks.push(e)},onComplete(e){this.completeCallbacks.push(e)}};const Ee=L("Select Image","cloudinary"),ke=L("Replace Image","cloudinary"),Le={wrap:document.getElementById("cld-asset-edit"),isVideo:!1,preview:null,id:null,editor:null,base:null,publicId:null,size:null,currentURL:null,transformationsInput:document.getElementById("edit_asset.edit_affects.transformations"),textOverlayColorInput:document.getElementById("edit_asset.edit_affects.text_overlay_color"),textOverlayFontFaceInput:document.getElementById("edit_asset.edit_affects.text_overlay_font_face"),textOverlayFontSizeInput:document.getElementById("edit_asset.edit_affects.text_overlay_font_size"),textOverlayTextInput:document.getElementById("edit_asset.edit_affects.text_overlay_text"),textOverlayPositionInput:document.getElementById("edit_asset.edit_affects.text_overlay_position"),textOverlayXOffsetInput:document.getElementById("edit_asset.edit_affects.text_overlay_x_offset"),textOverlayYOffsetInput:document.getElementById("edit_asset.edit_affects.text_overlay_y_offset"),imageOverlayImageIdInput:document.getElementById("edit_asset.edit_affects.image_overlay_image_id"),imageOverlayPublicIdInput:document.getElementById("edit_asset.edit_affects.image_overlay_public_id"),imageOverlaySizeInput:document.getElementById("edit_asset.edit_affects.image_overlay_size"),imageOverlayOpacityInput:document.getElementById("edit_asset.edit_affects.image_overlay_opacity"),imageOverlayPositionInput:document.getElementById("edit_asset.edit_affects.image_overlay_position"),imageOverlayXOffsetInput:document.getElementById("edit_asset.edit_affects.image_overlay_x_offset"),imageOverlayYOffsetInput:document.getElementById("edit_asset.edit_affects.image_overlay_y_offset"),saveButton:document.getElementById("cld-asset-edit-save"),saveTextOverlayButton:document.getElementById("cld-asset-save-text-overlay"),saveImageOverlayButton:document.getElementById("cld-asset-save-image-overlay"),removeTextOverlayButton:document.getElementById("cld-asset-remove-text-overlay"),removeImageOverlayButton:document.getElementById("cld-asset-remove-image-overlay"),textGrid:document.getElementById("edit-overlay-grid-text"),imageGrid:document.getElementById("edit-overlay-grid-image"),imagePreviewWrapper:document.getElementById("edit-overlay-select-image-preview"),assetPreviewTransformationString:document.getElementById("asset-preview-transformation-string"),assetPreviewSuccessMessage:document.getElementById("asset-preview-success-message"),imageSelect:document.getElementById("edit-overlay-select-image"),textOverlayMap:null,imageOverlayMap:null,init(){const e=JSON.parse(this.wrap.dataset.item);if(this.id=e.ID,this.base=e.base+e.size+"/",this.transformationsInput.value=e.transformations?e.transformations:"",!e?.file)return;this.isVideo="video"===e?.type,this.publicId=e.file,this.textOverlayMap=[{key:"text",input:this.textOverlayTextInput,defaultValue:"",event:"input"},{key:"color",input:this.textOverlayColorInput,defaultValue:"",event:"input"},{key:"fontFace",input:this.textOverlayFontFaceInput,defaultValue:"Arial",event:"input"},{key:"fontSize",input:this.textOverlayFontSizeInput,defaultValue:20,event:"input"},{key:"position",input:this.textOverlayPositionInput,defaultValue:"",event:"change"},{key:"xOffset",input:this.textOverlayXOffsetInput,defaultValue:0,event:"input"},{key:"yOffset",input:this.textOverlayYOffsetInput,defaultValue:0,event:"input"}],this.imageOverlayMap=[{key:"imageId",input:this.imageOverlayImageIdInput,defaultValue:"",event:"input"},{key:"publicId",input:this.imageOverlayPublicIdInput,defaultValue:"",event:"input"},{key:"size",input:this.imageOverlaySizeInput,defaultValue:100,event:"input"},{key:"opacity",input:this.imageOverlayOpacityInput,defaultValue:20,event:"input"},{key:"position",input:this.imageOverlayPositionInput,defaultValue:"",event:"change"},{key:"xOffset",input:this.imageOverlayXOffsetInput,defaultValue:0,event:"input"},{key:"yOffset",input:this.imageOverlayYOffsetInput,defaultValue:0,event:"input"}];const t=this.parseJsonOverlay(e.text_overlay),r=this.parseJsonOverlay(e.image_overlay);this.setOverlayInputs(this.textOverlayMap,t),this.setOverlayInputs(this.imageOverlayMap,r),this.initPreview(e),this.initEditor(),this.initGravityGrid("edit-overlay-grid-text",t),this.initGravityGrid("edit-overlay-grid-image",r),this.initImageSelect(),this.initRemoveOverlayButtons()},initPreview(e){this.isVideo?(this.preview=A.init(),this.wrap.appendChild(this.preview.createPreview(480,360)),this.preview.setPublicId(e?.data?.public_id),this.preview.setSrc(this.buildSrc(),!0)):(this.preview=T.init(),this.wrap.appendChild(this.preview.createPreview("100%","auto")),this.preview.setSrc(this.buildSrc(),!0)),this.transformationsInput.addEventListener("input",(e=>{this.preview.setSrc(this.buildSrc())})),this.addOverlayEventListeners()},addOverlayEventListeners(){const e=()=>{const e=this.textOverlayTextInput?.value?.trim();e&&this.preview.setSrc(this.buildSrc())},t=()=>{const e=this.imageOverlayPublicIdInput?.value?.trim();e&&this.preview.setSrc(this.buildSrc())};this.textOverlayTextInput&&this.textOverlayTextInput.addEventListener("input",(()=>{this.preview.setSrc(this.buildSrc())})),this.imageOverlayPublicIdInput&&this.imageOverlayPublicIdInput.addEventListener("input",(()=>{this.preview.setSrc(this.buildSrc())}));const r=this.textOverlayMap.filter((({key:e})=>"text"!==e)),n=this.imageOverlayMap.filter((({key:e})=>"imageId"!==e));r.forEach((({input:t,event:r})=>{t&&(t===this.textOverlayColorInput?t.addEventListener(r,(()=>{setTimeout(e,0)})):t.addEventListener(r,e))})),n.forEach((({input:e,event:r})=>{e&&e.addEventListener(r,t)}))},initEditor(){this.editor=Se.init(),this.editor.onBefore((()=>this.preview.reset())),this.editor.onComplete((e=>{this.preview.setSrc(this.buildSrc(),!0),e.note?alert(e.note):(this.assetPreviewSuccessMessage.style.display="block",setTimeout((()=>{this.assetPreviewSuccessMessage.style.display="none"}),2e3))})),this.saveButton.addEventListener("click",(e=>{e.preventDefault(),this.editor.save({ID:this.id,transformations:this.transformationsInput.value})})),this.saveTextOverlayButton.addEventListener("click",(e=>{e.preventDefault();const t=this.getOverlayData(this.textOverlayMap);t.transformation=this.buildTextOverlay(),this.editor.save({ID:this.id,textOverlay:t})})),this.saveImageOverlayButton.addEventListener("click",(e=>{e.preventDefault();const t=this.getOverlayData(this.imageOverlayMap);t.transformation=this.buildImageOverlay(),this.editor.save({ID:this.id,imageOverlay:t})}))},initGravityGrid(e,t){const r=document.getElementById(e);let n=[];if(!r||!r.dataset?.gridOptions)return;try{if(n=JSON.parse(r.dataset.gridOptions),n.length<1)return}catch(e){return}const i={"edit-overlay-grid-text":{positionInput:this.textOverlayPositionInput,contentInput:this.textOverlayTextInput},"edit-overlay-grid-image":{positionInput:this.imageOverlayPositionInput,contentInput:this.imageOverlayPublicIdInput}}[e];n.forEach((e=>{const n=document.createElement("div");n.className="edit-overlay-grid__cell",n.dataset.gravity=e,t&&t.position&&t.position===e&&n.classList.add("edit-overlay-grid__cell--selected"),n.addEventListener("click",(()=>{if(r.querySelectorAll(".edit-overlay-grid__cell--selected").forEach((e=>e.classList.remove("edit-overlay-grid__cell--selected"))),n.classList.add("edit-overlay-grid__cell--selected"),i){i.positionInput.value=e;const t=i.contentInput?.value?.trim();t&&this.preview.setSrc(this.buildSrc())}})),r.appendChild(n)}))},updateImageSelectLabel(e){this.imageSelect&&(this.imageSelect.textContent=e)},initImageSelect(){this.imageSelect&&(this.imageSelect.addEventListener("click",(e=>{e.preventDefault();const t=wp.media({title:Ee,button:{text:Ee},library:{type:"image"},multiple:!1});t.on("select",(()=>{const e=t.state().get("selection").first().toJSON();e?.public_id?(this.imageOverlayImageIdInput.value=e.id,this.imageOverlayPublicIdInput.value=e.public_id,this.updateImageSelectLabel(ke),this.renderImageOverlay(e)):(this.imageOverlayImageIdInput.value="",this.imageOverlayPublicIdInput.value="",this.updateImageSelectLabel(Ee),this.renderImageOverlay({}),alert(L("Please select an image that is synced to Cloudinary.","cloudinary"))),this.preview.setSrc(this.buildSrc())})),t.open()})),this.imageOverlayPublicIdInput?.value?this.updateImageSelectLabel(ke):this.updateImageSelectLabel(Ee))},renderImageOverlay(e){if(this.imagePreviewWrapper&&this.imagePreviewWrapper.firstChild&&this.imagePreviewWrapper.removeChild(this.imagePreviewWrapper.firstChild),this.imagePreviewWrapper&&(e?.url||e?.source_url)){const t=document.createElement("img");t.src=e.url||e.source_url,t.alt=e.alt||"",this.imagePreviewWrapper.appendChild(t)}},initRemoveOverlayButtons(){this.removeTextOverlayButton&&this.removeTextOverlayButton.addEventListener("click",(e=>{e.preventDefault(),this.clearTextOverlay()})),this.removeImageOverlayButton&&this.removeImageOverlayButton.addEventListener("click",(e=>{e.preventDefault(),this.clearImageOverlay()}))},clearTextOverlay(){this.textOverlayMap.forEach((({input:e,defaultValue:t})=>{e&&(e.value=t,e.dispatchEvent(new Event("change")))})),this.textGrid&&this.textGrid.querySelectorAll(".edit-overlay-grid__cell--selected").forEach((e=>e.classList.remove("edit-overlay-grid__cell--selected"))),this.preview.setSrc(this.buildSrc())},clearImageOverlay(){this.imageOverlayMap.forEach((({input:e,defaultValue:t})=>{e&&(e.value=t,e.dispatchEvent(new Event("change")))})),this.imagePreviewWrapper&&this.imagePreviewWrapper.firstChild&&(this.imagePreviewWrapper.removeChild(this.imagePreviewWrapper.firstChild),this.updateImageSelectLabel(Ee)),this.imageGrid&&this.imageGrid.querySelectorAll(".edit-overlay-grid__cell--selected").forEach((e=>e.classList.remove("edit-overlay-grid__cell--selected"))),this.preview.setSrc(this.buildSrc())},getFormattedPercentageValue(e){const t=e/100;return t%1==0?t.toFixed(1):t},buildPlacementQualifiers(e,t,r){let n=[];return e?.value&&n.push(`g_${e.value}`),t?.value&&n.push(`x_${t.value}`),r?.value&&n.push(`y_${r.value}`),n.length>0?","+n.join(","):""},buildImageOverlay(){const e=this.imageOverlayPublicIdInput.value.trim().replace(/\//g,":");if(!e)return"";let t=`l_${e}`,r=[];this.imageOverlaySizeInput?.value&&r.push(`c_scale,w_${this.imageOverlaySizeInput.value}`),this.imageOverlayOpacityInput?.value&&r.push(`o_${this.imageOverlayOpacityInput.value}`),r.length>0&&(t+="/"+r.join("/"));return`${t}/c_limit,w_1.0,fl_relative/fl_layer_apply${this.buildPlacementQualifiers(this.imageOverlayPositionInput,this.imageOverlayXOffsetInput,this.imageOverlayYOffsetInput)}`},buildTextOverlay(){if(!this.textOverlayTextInput||!this.textOverlayTextInput.value.trim())return"";const e=this.textOverlayTextInput.value.trim();let t=`l_text:${this.textOverlayFontFaceInput?.value||"Arial"}_${this.textOverlayFontSizeInput?.value||"20"}:${encodeURIComponent(e)}`;if(this.textOverlayColorInput?.value){let e=this.textOverlayColorInput.value;if(e.startsWith("rgb")){const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9]*\.?[0-9]+))?\)/);if(t){const r=parseInt(t[1]).toString(16).padStart(2,"0"),n=parseInt(t[2]).toString(16).padStart(2,"0"),i=parseInt(t[3]).toString(16).padStart(2,"0");if(void 0!==t[4]){const a=parseFloat(t[4]);e=r+n+i+Math.round(255*a).toString(16).padStart(2,"0")}else e=r+n+i}}else e=e.replace("#","");t=`co_rgb:${e},${t}`}return`${t}/c_limit,w_0.9,fl_relative/fl_layer_apply${this.buildPlacementQualifiers(this.textOverlayPositionInput,this.textOverlayXOffsetInput,this.textOverlayYOffsetInput)}`},buildSrc(){const e=this.transformationsInput.value,t=this.buildTextOverlay(),r=this.buildImageOverlay(),n=[this.base],i=[],a=(e,t,r=e,a=!0)=>{if(e){const o=e.replace(/\/$/,"");n.push(o);const s=a?"/":"";i.push(`<span class="${t} string-preview-base">${s}${r}</span>`)}};e?a(e,"string-preview-transformations",`.../${e}`,!1):i.push('<span class="string-preview-transformations string-preview-base">...</span>'),a(t,"string-preview-text-overlay"),a(r,"string-preview-image-overlay"),a(this.publicId,"string-preview-public-id",this.publicId,!1);const o=n.join("/").replace(/([^:]\/)\/+/g,"$1");return this.assetPreviewTransformationString.innerHTML=i.join(""),this.assetPreviewTransformationString.href=o,this.isVideo?this.videoTransformations(e,r,t):o},videoTransformations(e,t,r){const n=[];return e&&n.push(e),r&&n.push(r),t&&n.push(t),n.join("/")},getOverlayData(e){const t={};return e.forEach((({key:e,input:r})=>{t[e]=r?.value||""})),t},parseJsonOverlay(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e={}}return e},setOverlayInputs(e,t){e.forEach((({key:e,input:r,defaultValue:n})=>{r&&(r.value=t&&void 0!==t[e]?t[e]:n,r.dispatchEvent(new Event("change")),"color"===e&&r.value&&jQuery(this.textOverlayColorInput).iris({color:r.value}),"imageId"===e&&r.value&&this.fetchImageById(r.value).then((e=>{Le.renderImageOverlay(e)})))}))},fetchImageById:e=>fetch(`/wp-json/wp/v2/media/${e}`).then((e=>{if(!e.ok)throw new Error(L("Image not found","cloudinary"));return e.json()}))};window.addEventListener("load",(()=>Le.init()))}()}(); 1 (()=>{"use strict";var e,t,i,r;e={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},t=["(","?"],i={")":["("],":":["?","?:"]},r=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var n={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,i){if(e)throw t;return i}};function a(a){var s=function(n){for(var a,s,l,o,u=[],c=[];a=n.match(r);){for(s=a[0],(l=n.substr(0,a.index).trim())&&u.push(l);o=c.pop();){if(i[s]){if(i[s][0]===o){s=i[s][1]||s;break}}else if(t.indexOf(o)>=0||e[o]<e[s]){c.push(o);break}u.push(o)}i[s]||c.push(s),n=n.substr(a.index+s.length)}return(n=n.trim())&&u.push(n),u.concat(c.reverse())}(a);return function(e){return function(e,t){var i,r,a,s,l,o,u=[];for(i=0;i<e.length;i++){if(l=e[i],s=n[l]){for(r=s.length,a=Array(r);r--;)a[r]=u.pop();try{o=s.apply(null,a)}catch(e){return e}}else o=t.hasOwnProperty(l)?t[l]:+l;u.push(o)}return u[0]}(s,e)}}var s={contextDelimiter:"",onMissingKey:null};function l(e,t){var i;for(i in this.data=e,this.pluralForms={},this.options={},s)this.options[i]=void 0!==t&&i in t?t[i]:s[i]}l.prototype.getPluralForm=function(e,t){var i,r,n,s=this.pluralForms[e];return s||("function"!=typeof(n=(i=this.data[e][""])["Plural-Forms"]||i["plural-forms"]||i.plural_forms)&&(r=function(e){var t,i,r;for(t=e.split(";"),i=0;i<t.length;i++)if(0===(r=t[i].trim()).indexOf("plural="))return r.substr(7)}(i["Plural-Forms"]||i["plural-forms"]||i.plural_forms),n=function(e){var t=a(e);return function(e){return+t({n:e})}}(r)),s=this.pluralForms[e]=n),s(t)},l.prototype.dcnpgettext=function(e,t,i,r,n){var a,s,l;return a=void 0===n?0:this.getPluralForm(e,n),s=i,t&&(s=t+this.options.contextDelimiter+i),(l=this.data[e][s])&&l[a]?l[a]:(this.options.onMissingKey&&this.options.onMissingKey(i,e),0===a?i:r)};var o={plural_forms:e=>1===e?0:1},u=/^i18n\.(n?gettext|has_translation)(_|$)/;var c=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var d=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var p=function(e,t){return function(i,r,n,a=10){const s=e[t];if(!d(i))return;if(!c(r))return;if("function"!=typeof n)return void console.error("The hook callback must be a function.");if("number"!=typeof a)return void console.error("If specified, the hook priority must be a number.");const l={callback:n,priority:a,namespace:r};if(s[i]){const e=s[i].handlers;let t;for(t=e.length;t>0&&!(a>=e[t-1].priority);t--);t===e.length?e[t]=l:e.splice(t,0,l),s.__current.forEach(e=>{e.name===i&&e.currentIndex>=t&&e.currentIndex++})}else s[i]={handlers:[l],runs:0};"hookAdded"!==i&&e.doAction("hookAdded",i,r,n,a)}};var h=function(e,t,i=!1){return function(r,n){const a=e[t];if(!d(r))return;if(!i&&!c(n))return;if(!a[r])return 0;let s=0;if(i)s=a[r].handlers.length,a[r]={runs:a[r].runs,handlers:[]};else{const e=a[r].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===n&&(e.splice(t,1),s++,a.__current.forEach(e=>{e.name===r&&e.currentIndex>=t&&e.currentIndex--}))}return"hookRemoved"!==r&&e.doAction("hookRemoved",r,n),s}};var v=function(e,t){return function(i,r){const n=e[t];return void 0!==r?i in n&&n[i].handlers.some(e=>e.namespace===r):i in n}};var y=function(e,t,i,r){return function(n,...a){const s=e[t];s[n]||(s[n]={handlers:[],runs:0}),s[n].runs++;const l=s[n].handlers;if(!l||!l.length)return i?a[0]:void 0;const o={name:n,currentIndex:0};return(r?async function(){try{s.__current.add(o);let e=i?a[0]:void 0;for(;o.currentIndex<l.length;){const t=l[o.currentIndex];e=await t.callback.apply(null,a),i&&(a[0]=e),o.currentIndex++}return i?e:void 0}finally{s.__current.delete(o)}}:function(){try{s.__current.add(o);let e=i?a[0]:void 0;for(;o.currentIndex<l.length;){e=l[o.currentIndex].callback.apply(null,a),i&&(a[0]=e),o.currentIndex++}return i?e:void 0}finally{s.__current.delete(o)}})()}};var f=function(e,t){return function(){const i=e[t],r=Array.from(i.__current);return r.at(-1)?.name??null}};var m=function(e,t){return function(i){const r=e[t];return void 0===i?r.__current.size>0:Array.from(r.__current).some(e=>e.name===i)}};var g=function(e,t){return function(i){const r=e[t];if(d(i))return r[i]&&r[i].runs?r[i].runs:0}},w=class{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=p(this,"actions"),this.addFilter=p(this,"filters"),this.removeAction=h(this,"actions"),this.removeFilter=h(this,"filters"),this.hasAction=v(this,"actions"),this.hasFilter=v(this,"filters"),this.removeAllActions=h(this,"actions",!0),this.removeAllFilters=h(this,"filters",!0),this.doAction=y(this,"actions",!1,!1),this.doActionAsync=y(this,"actions",!1,!0),this.applyFilters=y(this,"filters",!0,!1),this.applyFiltersAsync=y(this,"filters",!0,!0),this.currentAction=f(this,"actions"),this.currentFilter=f(this,"filters"),this.doingAction=m(this,"actions"),this.doingFilter=m(this,"filters"),this.didAction=g(this,"actions"),this.didFilter=g(this,"filters")}};var _=function(){return new w}(),{addAction:I,addFilter:O,removeAction:x,removeFilter:b,hasAction:S,hasFilter:E,removeAllActions:P,removeAllFilters:A,doAction:T,doActionAsync:k,applyFilters:F,applyFiltersAsync:L,currentAction:B,currentFilter:C,doingAction:j,doingFilter:$,didAction:M,didFilter:z,actions:D,filters:R}=_,W=((e,t,i)=>{const r=new l({}),n=new Set,a=()=>{n.forEach(e=>e())},s=(e,t="default")=>{r.data[t]={...r.data[t],...e},r.data[t][""]={...o,...r.data[t]?.[""]},delete r.pluralForms[t]},c=(e,t)=>{s(e,t),a()},d=(e="default",t,i,n,a)=>(r.data[e]||s(void 0,e),r.dcnpgettext(e,t,i,n,a)),p=e=>e||"default",h=(e,t,r)=>{let n=d(r,t,e);return i?(n=i.applyFilters("i18n.gettext_with_context",n,e,t,r),i.applyFilters("i18n.gettext_with_context_"+p(r),n,e,t,r)):n};if(e&&c(e,t),i){const e=e=>{u.test(e)&&a()};i.addAction("hookAdded","core/i18n",e),i.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>r.data[e],setLocaleData:c,addLocaleData:(e,t="default")=>{r.data[t]={...r.data[t],...e,"":{...o,...r.data[t]?.[""],...e?.[""]}},delete r.pluralForms[t],a()},resetLocaleData:(e,t)=>{r.data={},r.pluralForms={},c(e,t)},subscribe:e=>(n.add(e),()=>n.delete(e)),__:(e,t)=>{let r=d(t,void 0,e);return i?(r=i.applyFilters("i18n.gettext",r,e,t),i.applyFilters("i18n.gettext_"+p(t),r,e,t)):r},_x:h,_n:(e,t,r,n)=>{let a=d(n,void 0,e,t,r);return i?(a=i.applyFilters("i18n.ngettext",a,e,t,r,n),i.applyFilters("i18n.ngettext_"+p(n),a,e,t,r,n)):a},_nx:(e,t,r,n,a)=>{let s=d(a,n,e,t,r);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,e,t,r,n,a),i.applyFilters("i18n.ngettext_with_context_"+p(a),s,e,t,r,n,a)):s},isRTL:()=>"rtl"===h("ltr","text direction"),hasTranslation:(e,t,n)=>{const a=t?t+""+e:e;let s=!!r.data?.[n??"default"]?.[a];return i&&(s=i.applyFilters("i18n.has_translation",s,e,t,n),s=i.applyFilters("i18n.has_translation_"+p(n),s,e,t,n)),s}}})(void 0,void 0,_),V=(W.getLocaleData.bind(W),W.setLocaleData.bind(W),W.resetLocaleData.bind(W),W.subscribe.bind(W),W.__.bind(W));W._x.bind(W),W._n.bind(W),W._nx.bind(W),W.isRTL.bind(W),W.hasTranslation.bind(W);const N={preview:null,wrap:null,apply:null,url:null,defaultWidth:null,defaultHeight:null,maxSize:null,init(){return this},createPreview(e=400,t=300){return this.maxSize=e>t?e:t,this.defaultWidth=e,this.defaultHeight=t,this.wrap=document.createElement("div"),this.apply=document.createElement("button"),this.preview=document.createElement("img"),this.apply.type="button",this.apply.classList.add("button-primary"),this.apply.innerText=V("Preview","cloudinary"),this.preview.style.transition="opacity 1s",this.preview.style.opacity=1,this.preview.style.maxWidth="100%",this.preview.style.maxHeight="100%",this.reset(),this.wrap.style.minHeight="200px",this.wrap.style.width=this.maxSize+"px",this.wrap.style.position="relative",this.wrap.style.display="flex",this.wrap.style.alignItems="center",this.wrap.style.justifyContent="center",this.apply.style.position="absolute",this.apply.style.display="none",this.wrap.appendChild(this.preview),this.wrap.appendChild(this.apply),this.preview.addEventListener("load",e=>{this.preview.style.opacity=1,this.wrap.style.width="",this.wrap.style.height="",this.defaultHeight=this.preview.height,this.defaultWidth=this.preview.width,this.defaultHeight>this.defaultWidth?this.wrap.style.height=this.maxSize+"px":this.wrap.style.width=this.maxSize+"px"}),this.preview.addEventListener("error",e=>{this.preview.src=this.getNoURL("⚠")}),this.apply.addEventListener("click",()=>{this.apply.style.display="none",this.reset(),this.preview.style.opacity=.6,this.preview.src=this.url}),this.wrap},reset(){this.preview.src=this.getNoURL()},setSrc(e,t=!1){this.preview.style.opacity=.6,t?(this.apply.style.display="none",this.preview.src=e):(this.apply.style.display="block",this.url=e)},getNoURL(e="︎"){const t=this.defaultWidth/2-23,i=this.defaultHeight/2+25;return`data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="${this.defaultWidth}" height="${this.defaultHeight}"><style>.error { font: normal 50px sans-serif; fill:rgb(255,0,0); }</style><rect width="100%" height="100%" style="fill:rgba(0,0,0,0.2);"></rect><text x="${t}" y="${i}" class="error">${e}</text></svg>`}},U={preview:null,wrap:null,apply:null,url:null,publicId:null,player:null,defaultWidth:null,defaultHeight:null,maxSize:null,init(){return this},createPreview(e=427,t=240){return this.maxSize=e>t?e:t,this.defaultWidth=e,this.defaultHeight=t,this.wrap=document.createElement("div"),this.apply=document.createElement("button"),this.preview=document.createElement("video"),this.apply.type="button",this.apply.classList.add("button-primary"),this.apply.innerText=V("Preview","cloudinary"),this.preview.id="cld-asset-video-preview",this.preview.style.transition="opacity 1s",this.preview.style.opacity=1,this.preview.style.maxWidth="100%",this.preview.style.maxHeight="100%",this.preview.controls=!0,this.preview.setAttribute("width",e),this.preview.setAttribute("height",t),this.wrap.style.minHeight="200px",this.wrap.style.width=this.maxSize+"px",this.wrap.style.position="relative",this.wrap.style.display="flex",this.wrap.style.alignItems="center",this.wrap.style.justifyContent="center",this.apply.style.position="absolute",this.apply.style.display="none",this.wrap.appendChild(this.preview),this.wrap.appendChild(this.apply),this.apply.addEventListener("click",()=>{this.apply.style.display="none",this.preview.style.opacity=.6,this.updatePlayer(this.url)}),this.wrap},setPublicId(e){this.publicId=e,this.initPlayer()},initPlayer(){void 0!==window.cloudinary&&void 0!==window.cld?this.player||(this.player=window.cld.videoPlayer(this.preview.id,{fluid:!0,controls:!0})):console.error("Cloudinary video player not loaded")},setSrc(e,t=!1){this.preview.style.opacity=.6,t?(this.apply.style.display="none",this.player||this.initPlayer(),this.updatePlayer(e)):(this.apply.style.display="block",this.url=e)},updatePlayer(e){if(!this.player)return;const t={publicId:this.publicId};e&&""!==e.trim()&&(t.transformation={raw_transformation:e}),this.player.source(t),this.preview.style.opacity=1},reset(e){this.setSrc(e,!1)}};var H=function(e){const t=(e,i)=>{const{headers:r={}}=e;for(const n in r)if("x-wp-nonce"===n.toLowerCase()&&r[n]===t.nonce)return i(e);return i({...e,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t},G=(e,t)=>{let i,r,n=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(i=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),n=r?i+"/"+r:i),delete e.namespace,delete e.endpoint,t({...e,path:n})},J=e=>(t,i)=>G(t,t=>{let r,n=t.url,a=t.path;return"string"==typeof a&&(r=e,-1!==e.indexOf("?")&&(a=a.replace("?","&")),a=a.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(a=a.replace("?","&")),n=r+a),i({...t,url:n})});function X(e){const t=e.split("?"),i=t[1],r=t[0];return i?r+"?"+i.split("&").map(e=>e.split("=")).map(e=>e.map(decodeURIComponent)).sort((e,t)=>e[0].localeCompare(t[0])).map(e=>e.map(encodeURIComponent)).map(e=>e.join("=")).join("&"):r}function Y(e){try{return decodeURIComponent(e)}catch{return e}}function K(e){return(function(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((e,t)=>{const[i,r=""]=t.split("=").filter(Boolean).map(Y);if(i){!function(e,t,i){const r=t.length,n=r-1;for(let a=0;a<r;a++){let r=t[a];!r&&Array.isArray(e)&&(r=e.length.toString()),r=["__proto__","constructor","prototype"].includes(r)?r.toUpperCase():r;const s=!isNaN(Number(t[a+1]));e[r]=a===n?i:e[r]||(s?[]:{}),Array.isArray(e[r])&&!s&&(e[r]={...e[r]}),e=e[r]}}(e,i.replace(/\]/g,"").split("["),r)}return e},Object.create(null))}function q(e){let t="";const i=Object.entries(e);let r;for(;r=i.shift();){let[e,n]=r;if(Array.isArray(n)||n&&n.constructor===Object){const t=Object.entries(n).reverse();for(const[r,n]of t)i.unshift([`${e}[${r}]`,n])}else void 0!==n&&(null===n&&(n=""),t+="&"+[e,String(n)].map(encodeURIComponent).join("="))}return t.substr(1)}function Q(e="",t){if(!t||!Object.keys(t).length)return e;const i=function(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}(e)||"";let r=e.replace(i,"");const n=e.indexOf("?");return-1!==n&&(t=Object.assign(K(e),t),r=r.substr(0,n)),r+"?"+q(t)+i}function Z(e,t){if(t)return Promise.resolve(e.body);try{return Promise.resolve(new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}catch{return Object.entries(e.headers).forEach(([t,i])=>{"link"===t.toLowerCase()&&(e.headers[t]=i.replace(/<([^>]+)>/,(e,t)=>`<${encodeURI(t)}>`))}),Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}}var ee=function(e){const t=Object.fromEntries(Object.entries(e).map(([e,t])=>[X(e),t]));return(e,i)=>{const{parse:r=!0}=e;let n=e.path;if(!n&&e.url){const{rest_route:t,...i}=K(e.url);"string"==typeof t&&(n=Q(t,i))}if("string"!=typeof n)return i(e);const a=e.method||"GET",s=X(n);if("GET"===a&&t[s]){const e=t[s];return delete t[s],Z(e,!!r)}if("OPTIONS"===a&&t[a]&&t[a][s]){const e=t[a][s];return delete t[a][s],Z(e,!!r)}return i(e)}},te=({path:e,url:t,...i},r)=>({...i,url:t&&Q(t,r),path:e&&Q(e,r)}),ie=e=>e.json?e.json():Promise.reject(e),re=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t},ne=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),i=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||i})(e))return t(e);const i=await _e({...te(e,{per_page:100}),parse:!1}),r=await ie(i);if(!Array.isArray(r))return r;let n=re(i);if(!n)return r;let a=[].concat(r);for(;n;){const t=await _e({...e,path:void 0,url:n,parse:!1}),i=await ie(t);a=a.concat(i),n=re(t)}return a},ae=new Set(["PATCH","PUT","DELETE"]),se="GET";function le(e,t){return K(e)[t]}function oe(e,t){return void 0!==le(e,t)}async function ue(e){try{return await e.json()}catch{throw{code:"invalid_json",message:V("The response is not a valid JSON response.")}}}async function ce(e,t=!0){return t?204===e.status?null:await ue(e):e}async function de(e,t=!0){if(!t)throw e;throw await ue(e)}var pe=(e,t)=>{if(!function(e){const t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);let i=0;const r=e=>(i++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>i<5?r(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject())));return t({...e,parse:!1}).catch(t=>{if(!(t instanceof globalThis.Response))return Promise.reject(t);const i=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&i?r(i).catch(()=>!1!==e.parse?Promise.reject({code:"post_process",message:V("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)):de(t,e.parse)}).then(t=>ce(t,e.parse))};function he(e,...t){const i=e.replace(/^[^#]*/,""),r=(e=e.replace(/#.*/,"")).indexOf("?");if(-1===r)return e+i;const n=K(e),a=e.substr(0,r);t.forEach(e=>delete n[e]);const s=q(n);return(s?a+"?"+s:a)+i}var ve=e=>(t,i)=>{if("string"==typeof t.url){const i=le(t.url,"wp_theme_preview");void 0===i?t.url=Q(t.url,{wp_theme_preview:e}):""===i&&(t.url=he(t.url,"wp_theme_preview"))}if("string"==typeof t.path){const i=le(t.path,"wp_theme_preview");void 0===i?t.path=Q(t.path,{wp_theme_preview:e}):""===i&&(t.path=he(t.path,"wp_theme_preview"))}return i(t)},ye={Accept:"application/json, */*;q=0.1"},fe={credentials:"include"},me=[(e,t)=>("string"!=typeof e.url||oe(e.url,"_locale")||(e.url=Q(e.url,{_locale:"user"})),"string"!=typeof e.path||oe(e.path,"_locale")||(e.path=Q(e.path,{_locale:"user"})),t(e)),G,(e,t)=>{const{method:i=se}=e;return ae.has(i.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":i,"Content-Type":"application/json"},method:"POST"}),t(e)},ne];var ge=e=>{const{url:t,path:i,data:r,parse:n=!0,...a}=e;let{body:s,headers:l}=e;l={...ye,...l},r&&(s=JSON.stringify(r),l["Content-Type"]="application/json");return globalThis.fetch(t||i||window.location.href,{...fe,...a,body:s,headers:l}).then(e=>e.ok?ce(e,n):de(e,n),e=>{if(e&&"AbortError"===e.name)throw e;if(!globalThis.navigator.onLine)throw{code:"offline_error",message:V("Unable to connect. Please check your Internet connection.")};throw{code:"fetch_error",message:V("Could not get a valid response from the server.")}})};var we=e=>me.reduceRight((e,t)=>i=>t(i,e),ge)(e).catch(t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):globalThis.fetch(we.nonceEndpoint).then(e=>e.ok?e.text():Promise.reject(t)).then(t=>(we.nonceMiddleware.nonce=t,we(e))));we.use=function(e){me.unshift(e)},we.setFetchHandler=function(e){ge=e},we.createNonceMiddleware=H,we.createPreloadingMiddleware=ee,we.createRootURLMiddleware=J,we.fetchAllMiddleware=ne,we.mediaUploadMiddleware=pe,we.createThemePreviewMiddleware=ve;var _e=we;const Ie={id:null,post_id:null,transformations:null,beforeCallbacks:[],completeCallbacks:[],init(e){if(void 0!==cldData.editor)return _e.use(_e.createNonceMiddleware(cldData.editor.nonce)),this.callback=e,this},save(e){this.doBefore(e),_e({path:cldData.editor.save_url,data:e,method:"POST"}).then(e=>{this.doComplete(e,this)})},doBefore(e){this.beforeCallbacks.forEach(t=>t(e,this))},doComplete(e){this.completeCallbacks.forEach(t=>t(e,this))},onBefore(e){this.beforeCallbacks.push(e)},onComplete(e){this.completeCallbacks.push(e)}},Oe=V("Select Image","cloudinary"),xe=V("Replace Image","cloudinary"),be={wrap:document.getElementById("cld-asset-edit"),isVideo:!1,preview:null,id:null,editor:null,base:null,publicId:null,size:null,currentURL:null,transformationsInput:document.getElementById("edit_asset.edit_affects.transformations"),textOverlayColorInput:document.getElementById("edit_asset.edit_affects.text_overlay_color"),textOverlayFontFaceInput:document.getElementById("edit_asset.edit_affects.text_overlay_font_face"),textOverlayFontSizeInput:document.getElementById("edit_asset.edit_affects.text_overlay_font_size"),textOverlayTextInput:document.getElementById("edit_asset.edit_affects.text_overlay_text"),textOverlayPositionInput:document.getElementById("edit_asset.edit_affects.text_overlay_position"),textOverlayXOffsetInput:document.getElementById("edit_asset.edit_affects.text_overlay_x_offset"),textOverlayYOffsetInput:document.getElementById("edit_asset.edit_affects.text_overlay_y_offset"),imageOverlayImageIdInput:document.getElementById("edit_asset.edit_affects.image_overlay_image_id"),imageOverlayPublicIdInput:document.getElementById("edit_asset.edit_affects.image_overlay_public_id"),imageOverlaySizeInput:document.getElementById("edit_asset.edit_affects.image_overlay_size"),imageOverlayOpacityInput:document.getElementById("edit_asset.edit_affects.image_overlay_opacity"),imageOverlayPositionInput:document.getElementById("edit_asset.edit_affects.image_overlay_position"),imageOverlayXOffsetInput:document.getElementById("edit_asset.edit_affects.image_overlay_x_offset"),imageOverlayYOffsetInput:document.getElementById("edit_asset.edit_affects.image_overlay_y_offset"),saveButton:document.getElementById("cld-asset-edit-save"),saveTextOverlayButton:document.getElementById("cld-asset-save-text-overlay"),saveImageOverlayButton:document.getElementById("cld-asset-save-image-overlay"),removeTextOverlayButton:document.getElementById("cld-asset-remove-text-overlay"),removeImageOverlayButton:document.getElementById("cld-asset-remove-image-overlay"),textGrid:document.getElementById("edit-overlay-grid-text"),imageGrid:document.getElementById("edit-overlay-grid-image"),imagePreviewWrapper:document.getElementById("edit-overlay-select-image-preview"),assetPreviewTransformationString:document.getElementById("asset-preview-transformation-string"),assetPreviewSuccessMessage:document.getElementById("asset-preview-success-message"),imageSelect:document.getElementById("edit-overlay-select-image"),textOverlayMap:null,imageOverlayMap:null,init(){const e=JSON.parse(this.wrap.dataset.item);if(this.id=e.ID,this.base=e.base+e.size+"/",this.transformationsInput.value=e.transformations?e.transformations:"",!e?.file)return;this.isVideo="video"===e?.type,this.publicId=e.file,this.textOverlayMap=[{key:"text",input:this.textOverlayTextInput,defaultValue:"",event:"input"},{key:"color",input:this.textOverlayColorInput,defaultValue:"",event:"input"},{key:"fontFace",input:this.textOverlayFontFaceInput,defaultValue:"Arial",event:"input"},{key:"fontSize",input:this.textOverlayFontSizeInput,defaultValue:20,event:"input"},{key:"position",input:this.textOverlayPositionInput,defaultValue:"",event:"change"},{key:"xOffset",input:this.textOverlayXOffsetInput,defaultValue:0,event:"input"},{key:"yOffset",input:this.textOverlayYOffsetInput,defaultValue:0,event:"input"}],this.imageOverlayMap=[{key:"imageId",input:this.imageOverlayImageIdInput,defaultValue:"",event:"input"},{key:"publicId",input:this.imageOverlayPublicIdInput,defaultValue:"",event:"input"},{key:"size",input:this.imageOverlaySizeInput,defaultValue:100,event:"input"},{key:"opacity",input:this.imageOverlayOpacityInput,defaultValue:20,event:"input"},{key:"position",input:this.imageOverlayPositionInput,defaultValue:"",event:"change"},{key:"xOffset",input:this.imageOverlayXOffsetInput,defaultValue:0,event:"input"},{key:"yOffset",input:this.imageOverlayYOffsetInput,defaultValue:0,event:"input"}];const t=this.parseJsonOverlay(e.text_overlay),i=this.parseJsonOverlay(e.image_overlay);this.setOverlayInputs(this.textOverlayMap,t),this.setOverlayInputs(this.imageOverlayMap,i),this.initPreview(e),this.initEditor(),this.initGravityGrid("edit-overlay-grid-text",t),this.initGravityGrid("edit-overlay-grid-image",i),this.initImageSelect(),this.initRemoveOverlayButtons()},initPreview(e){this.isVideo?(this.preview=U.init(),this.wrap.appendChild(this.preview.createPreview(480,360)),this.preview.setPublicId(e?.data?.public_id),this.preview.setSrc(this.buildSrc(),!0)):(this.preview=N.init(),this.wrap.appendChild(this.preview.createPreview("100%","auto")),this.preview.setSrc(this.buildSrc(),!0)),this.transformationsInput.addEventListener("input",e=>{this.preview.setSrc(this.buildSrc())}),this.addOverlayEventListeners()},addOverlayEventListeners(){const e=()=>{const e=this.textOverlayTextInput?.value?.trim();e&&this.preview.setSrc(this.buildSrc())},t=()=>{const e=this.imageOverlayPublicIdInput?.value?.trim();e&&this.preview.setSrc(this.buildSrc())};this.textOverlayTextInput&&this.textOverlayTextInput.addEventListener("input",()=>{this.preview.setSrc(this.buildSrc())}),this.imageOverlayPublicIdInput&&this.imageOverlayPublicIdInput.addEventListener("input",()=>{this.preview.setSrc(this.buildSrc())});const i=this.textOverlayMap.filter(({key:e})=>"text"!==e),r=this.imageOverlayMap.filter(({key:e})=>"imageId"!==e);i.forEach(({input:t,event:i})=>{t&&(t===this.textOverlayColorInput?t.addEventListener(i,()=>{setTimeout(e,0)}):t.addEventListener(i,e))}),r.forEach(({input:e,event:i})=>{e&&e.addEventListener(i,t)})},initEditor(){this.editor=Ie.init(),this.editor.onBefore(()=>this.preview.reset()),this.editor.onComplete(e=>{this.preview.setSrc(this.buildSrc(),!0),e.note?alert(e.note):(this.assetPreviewSuccessMessage.style.display="block",setTimeout(()=>{this.assetPreviewSuccessMessage.style.display="none"},2e3))}),this.saveButton.addEventListener("click",e=>{e.preventDefault(),this.editor.save({ID:this.id,transformations:this.transformationsInput.value})}),this.saveTextOverlayButton.addEventListener("click",e=>{e.preventDefault();const t=this.getOverlayData(this.textOverlayMap);t.transformation=this.buildTextOverlay(),this.editor.save({ID:this.id,textOverlay:t})}),this.saveImageOverlayButton.addEventListener("click",e=>{e.preventDefault();const t=this.getOverlayData(this.imageOverlayMap);t.transformation=this.buildImageOverlay(),this.editor.save({ID:this.id,imageOverlay:t})})},initGravityGrid(e,t){const i=document.getElementById(e);let r=[];if(!i||!i.dataset?.gridOptions)return;try{if(r=JSON.parse(i.dataset.gridOptions),r.length<1)return}catch(e){return}const n={"edit-overlay-grid-text":{positionInput:this.textOverlayPositionInput,contentInput:this.textOverlayTextInput},"edit-overlay-grid-image":{positionInput:this.imageOverlayPositionInput,contentInput:this.imageOverlayPublicIdInput}}[e];r.forEach(e=>{const r=document.createElement("div");r.className="edit-overlay-grid__cell",r.dataset.gravity=e,t&&t.position&&t.position===e&&r.classList.add("edit-overlay-grid__cell--selected"),r.addEventListener("click",()=>{if(i.querySelectorAll(".edit-overlay-grid__cell--selected").forEach(e=>e.classList.remove("edit-overlay-grid__cell--selected")),r.classList.add("edit-overlay-grid__cell--selected"),n){n.positionInput.value=e;const t=n.contentInput?.value?.trim();t&&this.preview.setSrc(this.buildSrc())}}),i.appendChild(r)})},updateImageSelectLabel(e){this.imageSelect&&(this.imageSelect.textContent=e)},initImageSelect(){this.imageSelect&&(this.imageSelect.addEventListener("click",e=>{e.preventDefault();const t=wp.media({title:Oe,button:{text:Oe},library:{type:"image"},multiple:!1});t.on("select",()=>{const e=t.state().get("selection").first().toJSON();e?.public_id?(this.imageOverlayImageIdInput.value=e.id,this.imageOverlayPublicIdInput.value=e.public_id,this.updateImageSelectLabel(xe),this.renderImageOverlay(e)):(this.imageOverlayImageIdInput.value="",this.imageOverlayPublicIdInput.value="",this.updateImageSelectLabel(Oe),this.renderImageOverlay({}),alert(V("Please select an image that is synced to Cloudinary.","cloudinary"))),this.preview.setSrc(this.buildSrc())}),t.open()}),this.imageOverlayPublicIdInput?.value?this.updateImageSelectLabel(xe):this.updateImageSelectLabel(Oe))},renderImageOverlay(e){if(this.imagePreviewWrapper&&this.imagePreviewWrapper.firstChild&&this.imagePreviewWrapper.removeChild(this.imagePreviewWrapper.firstChild),this.imagePreviewWrapper&&(e?.url||e?.source_url)){const t=document.createElement("img");t.src=e.url||e.source_url,t.alt=e.alt||"",this.imagePreviewWrapper.appendChild(t)}},initRemoveOverlayButtons(){this.removeTextOverlayButton&&this.removeTextOverlayButton.addEventListener("click",e=>{e.preventDefault(),this.clearTextOverlay()}),this.removeImageOverlayButton&&this.removeImageOverlayButton.addEventListener("click",e=>{e.preventDefault(),this.clearImageOverlay()})},clearTextOverlay(){this.textOverlayMap.forEach(({input:e,defaultValue:t})=>{e&&(e.value=t,e.dispatchEvent(new Event("change")))}),this.textGrid&&this.textGrid.querySelectorAll(".edit-overlay-grid__cell--selected").forEach(e=>e.classList.remove("edit-overlay-grid__cell--selected")),this.preview.setSrc(this.buildSrc())},clearImageOverlay(){this.imageOverlayMap.forEach(({input:e,defaultValue:t})=>{e&&(e.value=t,e.dispatchEvent(new Event("change")))}),this.imagePreviewWrapper&&this.imagePreviewWrapper.firstChild&&(this.imagePreviewWrapper.removeChild(this.imagePreviewWrapper.firstChild),this.updateImageSelectLabel(Oe)),this.imageGrid&&this.imageGrid.querySelectorAll(".edit-overlay-grid__cell--selected").forEach(e=>e.classList.remove("edit-overlay-grid__cell--selected")),this.preview.setSrc(this.buildSrc())},getFormattedPercentageValue(e){const t=e/100;return t%1==0?t.toFixed(1):t},buildPlacementQualifiers(e,t,i){let r=[];return e?.value&&r.push(`g_${e.value}`),t?.value&&r.push(`x_${t.value}`),i?.value&&r.push(`y_${i.value}`),r.length>0?","+r.join(","):""},buildImageOverlay(){const e=this.imageOverlayPublicIdInput.value.trim().replace(/\//g,":");if(!e)return"";let t=`l_${e}`,i=[];this.imageOverlaySizeInput?.value&&i.push(`c_scale,w_${this.imageOverlaySizeInput.value}`),this.imageOverlayOpacityInput?.value&&i.push(`o_${this.imageOverlayOpacityInput.value}`),i.length>0&&(t+="/"+i.join("/"));return`${t}/c_limit,w_1.0,fl_relative/fl_layer_apply${this.buildPlacementQualifiers(this.imageOverlayPositionInput,this.imageOverlayXOffsetInput,this.imageOverlayYOffsetInput)}`},buildTextOverlay(){if(!this.textOverlayTextInput||!this.textOverlayTextInput.value.trim())return"";const e=this.textOverlayTextInput.value.trim();let t=`l_text:${this.textOverlayFontFaceInput?.value||"Arial"}_${this.textOverlayFontSizeInput?.value||"20"}:${encodeURIComponent(e)}`;if(this.textOverlayColorInput?.value){let e=this.textOverlayColorInput.value;if(e.startsWith("rgb")){const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9]*\.?[0-9]+))?\)/);if(t){const i=parseInt(t[1]).toString(16).padStart(2,"0"),r=parseInt(t[2]).toString(16).padStart(2,"0"),n=parseInt(t[3]).toString(16).padStart(2,"0");if(void 0!==t[4]){const a=parseFloat(t[4]);e=i+r+n+Math.round(255*a).toString(16).padStart(2,"0")}else e=i+r+n}}else e=e.replace("#","");t=`co_rgb:${e},${t}`}return`${t}/c_limit,w_0.9,fl_relative/fl_layer_apply${this.buildPlacementQualifiers(this.textOverlayPositionInput,this.textOverlayXOffsetInput,this.textOverlayYOffsetInput)}`},buildSrc(){const e=this.transformationsInput.value,t=this.buildTextOverlay(),i=this.buildImageOverlay(),r=[this.base],n=[],a=(e,t,i=e,a=!0)=>{if(e){const s=e.replace(/\/$/,"");r.push(s);const l=a?"/":"";n.push(`<span class="${t} string-preview-base">${l}${i}</span>`)}};e?a(e,"string-preview-transformations",`.../${e}`,!1):n.push('<span class="string-preview-transformations string-preview-base">...</span>'),a(t,"string-preview-text-overlay"),a(i,"string-preview-image-overlay"),a(this.publicId,"string-preview-public-id",this.publicId,!1);const s=r.join("/").replace(/([^:]\/)\/+/g,"$1");return this.assetPreviewTransformationString.innerHTML=n.join(""),this.assetPreviewTransformationString.href=s,this.isVideo?this.videoTransformations(e,i,t):s},videoTransformations(e,t,i){const r=[];return e&&r.push(e),i&&r.push(i),t&&r.push(t),r.join("/")},getOverlayData(e){const t={};return e.forEach(({key:e,input:i})=>{t[e]=i?.value||""}),t},parseJsonOverlay(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e={}}return e},setOverlayInputs(e,t){e.forEach(({key:e,input:i,defaultValue:r})=>{i&&(i.value=t&&void 0!==t[e]?t[e]:r,i.dispatchEvent(new Event("change")),"color"===e&&i.value&&jQuery(this.textOverlayColorInput).iris({color:i.value}),"imageId"===e&&i.value&&this.fetchImageById(i.value).then(e=>{be.renderImageOverlay(e)}))})},fetchImageById:e=>fetch(`/wp-json/wp/v2/media/${e}`).then(e=>{if(!e.ok)throw new Error(V("Image not found","cloudinary"));return e.json()})};window.addEventListener("load",()=>be.init())})(); 2 //# sourceMappingURL=asset-edit.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/asset-manager.js
r3343538 r3518458 1 !function(){var e={604:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return function(e,t){var n,r,a,c,s,l,u,p,d,h=1,f=e.length,g="";for(r=0;r<f;r++)if("string"==typeof e[r])g+=e[r];else if("object"==typeof e[r]){if((c=e[r]).keys)for(n=t[h],a=0;a<c.keys.length;a++){if(null==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',c.keys[a],c.keys[a-1]));n=n[c.keys[a]]}else n=c.param_no?t[c.param_no]:t[h++];if(i.not_type.test(c.type)&&i.not_primitive.test(c.type)&&n instanceof Function&&(n=n()),i.numeric_arg.test(c.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(i.number.test(c.type)&&(p=n>=0),c.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,c.width?parseInt(c.width):0);break;case"e":n=c.precision?parseFloat(n).toExponential(c.precision):parseFloat(n).toExponential();break;case"f":n=c.precision?parseFloat(n).toFixed(c.precision):parseFloat(n);break;case"g":n=c.precision?String(Number(n.toPrecision(c.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=c.precision?n.substring(0,c.precision):n;break;case"t":n=String(!!n),n=c.precision?n.substring(0,c.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=c.precision?n.substring(0,c.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=c.precision?n.substring(0,c.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(c.type)?g+=n:(!i.number.test(c.type)||p&&!c.sign?d="":(d=p?"+":"-",n=n.toString().replace(i.sign,"")),l=c.pad_char?"0"===c.pad_char?"0":c.pad_char.charAt(1):" ",u=c.width-(d+n).length,s=c.width&&u>0?l.repeat(u):"",g+=c.align?d+n+s:"0"===l?d+s+n:s+d+n)}return g}(function(e){if(c[e])return c[e];var t,n=e,r=[],o=0;for(;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],s=t[2],l=[];if(null===(l=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(l[1]);""!==(s=s.substring(l[0].length));)if(null!==(l=i.key_access.exec(s)))a.push(l[1]);else{if(null===(l=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(l[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return c[e]=r}(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}var c=Object.create(null);"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},616:function(e){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,c=n,s=arguments.length;e:for(;c;){if(c.args.length===arguments.length){for(a=0;a<s;a++)if(c.args[a]!==arguments[a]){c=c.next;continue e}return c!==n&&(c===r&&(r=c.prev),c.prev.next=c.next,c.next&&(c.next.prev=c.prev),c.next=n,c.prev=null,n.prev=c,n=c),c.val}c=c.next}for(o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];return c={args:o,val:e.apply(null,o)},n?(n.prev=c,c.next=n):r=c,i===t.maxSize?(r=r.prev).next=null:i++,n=c,c.val}return t=t||{},o.clear=function(){n=null,r=null,i=0},o}},633:function(e,t,n){var r=n(738).default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},o=Object.prototype,a=o.hasOwnProperty,c=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",p=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),a=new D(r||[]);return c(o,"_invoke",{value:L(e,n,a)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=h;var g="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function _(){}function w(){}function O(){}var x={};d(x,l,(function(){return this}));var j=Object.getPrototypeOf,P=j&&j(j(I([])));P&&P!==o&&a.call(P,l)&&(x=P);var E=O.prototype=_.prototype=Object.create(x);function S(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,c,s){var l=f(e[i],e,o);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==r(p)&&a.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,c,s)}),(function(e){n("throw",e,c,s)})):t.resolve(p).then((function(e){u.value=e,c(u)}),(function(e){return n("throw",e,c,s)}))}s(l.arg)}var i;c(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function L(e,n,r){var i=g;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var c=r.delegate;if(c){var s=C(c,r);if(s){if(s===b)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===g)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var l=f(e,n,r);if("normal"===l.type){if(i=r.done?m:y,l.arg===b)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function C(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var o=f(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,b;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,b):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,b)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function I(e){if(e||""===e){var n=e[l];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(a.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(r(e)+" is not iterable")}return w.prototype=O,c(E,"constructor",{value:O,configurable:!0}),c(O,"constructor",{value:w,configurable:!0}),w.displayName=d(O,p,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,d(e,p,"GeneratorFunction")),e.prototype=Object.create(E),e},n.awrap=function(e){return{__await:e}},S(k.prototype),d(k.prototype,u,(function(){return this})),n.AsyncIterator=k,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new k(h(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(E),d(E,p,"Generator"),d(E,l,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=I,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&a.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return c.type="throw",c.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),b}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},738:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:function(e,t,n){var r=n(633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},951:function(e,t){var n,r,i,o;o=function(){var e="BKMGTPEZY".split("");function t(e,t){return e&&e.toLowerCase()===t.toLowerCase()}return function(n,r){return n="number"==typeof n?n:0,(r=r||{}).fixed="number"==typeof r.fixed?r.fixed:2,r.spacer="string"==typeof r.spacer?r.spacer:" ",r.calculate=function(e){var i=t(e,"si")?["k","B"]:["K","iB"],o=t(e,"si")?1e3:1024,a=Math.log(n)/Math.log(o)|0,c=n/Math.pow(o,a),s=c.toFixed(r.fixed);return a-1<3&&!t(e,"si")&&t(e,"jedec")&&(i[1]="B"),{suffix:a?(i[0]+"MGTPEZY")[a-1]+i[1]:1==(0|s)?"Byte":"Bytes",magnitude:a,result:c,fixed:s,bits:{result:c/8,fixed:(c/8).toFixed(r.fixed)}}},r.to=function(r,i){var o=t(i,"si")?1e3:1024,a=e.indexOf("string"==typeof r?r[0].toUpperCase():"B"),c=n;if(-1===a||0===a)return c.toFixed(2);for(;a>0;a--)c/=o;return c.toFixed(2)},r.human=function(e){var t=r.calculate(e);return t.fixed+r.spacer+t.suffix},r}},e.exports?e.exports=o():(r=[],void 0===(i="function"==typeof(n=o)?n.apply(t,r):n)||(e.exports=i))}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function r(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function i(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var o,a,c,s,l=n(616),u=n.n(l);n(604),u()(console.error);o={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},a=["(","?"],c={")":["("],":":["?","?:"]},s=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var p={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function d(e){var t=function(e){for(var t,n,r,i,l=[],u=[];t=e.match(s);){for(n=t[0],(r=e.substr(0,t.index).trim())&&l.push(r);i=u.pop();){if(c[n]){if(c[n][0]===i){n=c[n][1]||n;break}}else if(a.indexOf(i)>=0||o[i]<o[n]){u.push(i);break}l.push(i)}c[n]||u.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&l.push(e),l.concat(u.reverse())}(e);return function(e){return function(e,t){var n,r,i,o,a,c,s=[];for(n=0;n<e.length;n++){if(a=e[n],o=p[a]){for(r=o.length,i=Array(r);r--;)i[r]=s.pop();try{c=o.apply(null,i)}catch(e){return e}}else c=t.hasOwnProperty(a)?t[a]:+a;s.push(c)}return s[0]}(t,e)}}var h={contextDelimiter:"",onMissingKey:null};function f(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},h)this.options[n]=void 0!==t&&n in t?t[n]:h[n]}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}f.prototype.getPluralForm=function(e,t){var n,r,i,o=this.pluralForms[e];return o||("function"!=typeof(i=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=function(e){var t=d(e);return function(e){return+t({n:e})}}(r)),o=this.pluralForms[e]=i),o(t)},f.prototype.dcnpgettext=function(e,t,n,r,i){var o,a,c;return o=void 0===i?0:this.getPluralForm(e,i),a=n,t&&(a=t+this.options.contextDelimiter+n),(c=this.data[e][a])&&c[o]?c[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)};var v={"":{plural_forms:function(e){return 1===e?0:1}}},m=/^i18n\.(n?gettext|has_translation)(_|$)/;var b=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var _=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var w=function(e,t){return function(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,a=e[t];if(_(n)&&b(r))if("function"==typeof i)if("number"==typeof o){var c={callback:i,priority:o,namespace:r};if(a[n]){var s,l=a[n].handlers;for(s=l.length;s>0&&!(o>=l[s-1].priority);s--);s===l.length?l[s]=c:l.splice(s,0,c),a.__current.forEach((function(e){e.name===n&&e.currentIndex>=s&&e.currentIndex++}))}else a[n]={handlers:[c],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,r,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var O=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r,i){var o=e[t];if(_(r)&&(n||b(i))){if(!o[r])return 0;var a=0;if(n)a=o[r].handlers.length,o[r]={runs:o[r].runs,handlers:[]};else for(var c=o[r].handlers,s=function(e){c[e].namespace===i&&(c.splice(e,1),a++,o.__current.forEach((function(t){t.name===r&&t.currentIndex>=e&&t.currentIndex--})))},l=c.length-1;l>=0;l--)s(l);return"hookRemoved"!==r&&e.doAction("hookRemoved",r,i),a}}};var x=function(e,t){return function(n,r){var i=e[t];return void 0!==r?n in i&&i[n].handlers.some((function(e){return e.namespace===r})):n in i}};var j=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r){var i=e[t];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;var o=i[r].handlers;for(var a=arguments.length,c=new Array(a>1?a-1:0),s=1;s<a;s++)c[s-1]=arguments[s];if(!o||!o.length)return n?c[0]:void 0;var l={name:r,currentIndex:0};for(i.__current.push(l);l.currentIndex<o.length;){var u=o[l.currentIndex].callback.apply(null,c);n&&(c[0]=u),l.currentIndex++}return i.__current.pop(),n?c[0]:void 0}};var P=function(e,t){return function(){var n,r,i=e[t];return null!==(n=null===(r=i.__current[i.__current.length-1])||void 0===r?void 0:r.name)&&void 0!==n?n:null}};var E=function(e,t){return function(n){var r=e[t];return void 0===n?void 0!==r.__current[0]:!!r.__current[0]&&n===r.__current[0].name}};var S=function(e,t){return function(n){var r=e[t];if(_(n))return r[n]&&r[n].runs?r[n].runs:0}},k=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=w(this,"actions"),this.addFilter=w(this,"filters"),this.removeAction=O(this,"actions"),this.removeFilter=O(this,"filters"),this.hasAction=x(this,"actions"),this.hasFilter=x(this,"filters"),this.removeAllActions=O(this,"actions",!0),this.removeAllFilters=O(this,"filters",!0),this.doAction=j(this,"actions"),this.applyFilters=j(this,"filters",!0),this.currentAction=P(this,"actions"),this.currentFilter=P(this,"filters"),this.doingAction=E(this,"actions"),this.doingFilter=E(this,"filters"),this.didAction=S(this,"actions"),this.didFilter=S(this,"filters")};var L=function(){return new k}(),C=(L.addAction,L.addFilter,L.removeAction,L.removeFilter,L.hasAction,L.hasFilter,L.removeAllActions,L.removeAllFilters,L.doAction,L.applyFilters,L.currentAction,L.currentFilter,L.doingAction,L.doingFilter,L.didAction,L.didFilter,L.actions,L.filters,function(e,t,n){var r=new f({}),i=new Set,o=function(){i.forEach((function(e){return e()}))},a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";r.data[t]=y(y(y({},v),r.data[t]),e),r.data[t][""]=y(y({},v[""]),r.data[t][""])},c=function(e,t){a(e,t),o()},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return r.data[e]||a(void 0,e),r.dcnpgettext(e,t,n,i,o)},l=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},u=function(e,t,r){var i=s(r,t,e);return n?(i=n.applyFilters("i18n.gettext_with_context",i,e,t,r),n.applyFilters("i18n.gettext_with_context_"+l(r),i,e,t,r)):i};if(e&&c(e,t),n){var p=function(e){m.test(e)&&o()};n.addAction("hookAdded","core/i18n",p),n.addAction("hookRemoved","core/i18n",p)}return{getLocaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[e]},setLocaleData:c,resetLocaleData:function(e,t){r.data={},r.pluralForms={},c(e,t)},subscribe:function(e){return i.add(e),function(){return i.delete(e)}},__:function(e,t){var r=s(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+l(t),r,e,t)):r},_x:u,_n:function(e,t,r,i){var o=s(i,void 0,e,t,r);return n?(o=n.applyFilters("i18n.ngettext",o,e,t,r,i),n.applyFilters("i18n.ngettext_"+l(i),o,e,t,r,i)):o},_nx:function(e,t,r,i,o){var a=s(o,i,e,t,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,r,i,o),n.applyFilters("i18n.ngettext_with_context_"+l(o),a,e,t,r,i,o)):a},isRTL:function(){return"rtl"===u("ltr","text direction")},hasTranslation:function(e,t,i){var o,a,c=t?t+""+e:e,s=!(null===(o=r.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[c]);return n&&(s=n.applyFilters("i18n.has_translation",s,e,t,i),s=n.applyFilters("i18n.has_translation_"+l(i),s,e,t,i)),s}}}(void 0,void 0,L)),A=(C.getLocaleData.bind(C),C.setLocaleData.bind(C),C.resetLocaleData.bind(C),C.subscribe.bind(C),C.__.bind(C));C._x.bind(C),C._n.bind(C),C._nx.bind(C),C.isRTL.bind(C),C.hasTranslation.bind(C);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I=function(e){var t=function e(t,n){var r=t.headers,i=void 0===r?{}:r;for(var o in i)if("x-wp-nonce"===o.toLowerCase()&&i[o]===e.nonce)return n(t);return n(D(D({},t),{},{headers:D(D({},i),{},{"X-WP-Nonce":e.nonce})}))};return t.nonce=e,t};function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(e,t){var n,r,i=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),i=(r=e.endpoint.replace(/^\//,""))?n+"/"+r:n),delete e.namespace,delete e.endpoint,t(N(N({},e),{},{path:i}))};function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B=function(e){return function(t,n){return M(t,(function(t){var r,i=t.url,o=t.path;return"string"==typeof o&&(r=e,-1!==e.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(o=o.replace("?","&")),i=r+o),n(R(R({},t),{},{url:i}))}))}};function U(e){var t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((function(e){return e.split("=")})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.join("=")})).join("&"):r}var G=function(e){var t=Object.keys(e).reduce((function(t,n){return t[U(n)]=e[n],t}),{});return function(e,n){var r=e.parse,i=void 0===r||r;if("string"==typeof e.path){var o=e.method||"GET",a=U(e.path);if("GET"===o&&t[a]){var c=t[a];return delete t[a],Promise.resolve(i?c.body:new window.Response(JSON.stringify(c.body),{status:200,statusText:"OK",headers:c.headers}))}if("OPTIONS"===o&&t[o]&&t[o][a])return Promise.resolve(t[o][a])}return n(e)}};function J(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}var H=n(756),$=n.n(H);function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function X(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,c=[],s=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){l=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return K(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var n=X(t.split("=").filter(Boolean).map(decodeURIComponent),2),r=n[0],i=n[1],o=void 0===i?"":i;r&&function(e,t,n){for(var r=t.length,i=r-1,o=0;o<r;o++){var a=t[o];!a&&Array.isArray(e)&&(a=e.length.toString());var c=!isNaN(Number(t[o+1]));e[a]=o===i?n:e[a]||(c?[]:{}),Array.isArray(e[a])&&!c&&(e[a]=q({},e[a])),e=e[a]}}(e,r.replace(/\]/g,"").split("["),o);return e}),{})}function W(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(Y(e),t),n=n.substr(0,r)),n+"?"+function(e){for(var t,n="",r=Object.entries(e);t=r.shift();){var i=X(t,2),o=i[0],a=i[1];if(Array.isArray(a)||a&&a.constructor===Object){var c,s=W(Object.entries(a).reverse());try{for(s.s();!(c=s.n()).done;){var l=X(c.value,2),u=l[0],p=l[1];r.unshift(["".concat(o,"[").concat(u,"]"),p])}}catch(e){s.e(e)}finally{s.f()}}else void 0!==a&&(null===a&&(a=""),n+="&"+[o,a].map(encodeURIComponent).join("="))}return n.substr(1)}(t)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ne=function(e){return e.json?e.json():Promise.reject(e)},re=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},ie=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},oe=function(){var e,t=(e=$().mark((function e(t,n){var r,o,a,c,s,l;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(ie(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,je(te(te({},(p={per_page:100},d=void 0,h=void 0,d=(u=t).path,h=u.url,te(te({},i(u,["path","url"])),{},{url:h&&V(h,p),path:d&&V(d,p)}))),{},{parse:!1}));case 6:return r=e.sent,e.next=9,ne(r);case 9:if(o=e.sent,Array.isArray(o)){e.next=12;break}return e.abrupt("return",o);case 12:if(a=re(r)){e.next=15;break}return e.abrupt("return",o);case 15:c=[].concat(o);case 16:if(!a){e.next=27;break}return e.next=19,je(te(te({},t),{},{path:void 0,url:a,parse:!1}));case 19:return s=e.sent,e.next=22,ne(s);case 22:l=e.sent,c=c.concat(l),a=re(s),e.next=16;break;case 27:return e.abrupt("return",c);case 28:case"end":return e.stop()}var u,p,d,h}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){J(o,r,i,a,c,"next",e)}function c(e){J(o,r,i,a,c,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}(),ae=oe;function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var le=new Set(["PATCH","PUT","DELETE"]);function ue(e,t){return void 0!==function(e,t){return Y(e)[t]}(e,t)}var pe=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:204===e.status?null:e.json?e.json():Promise.reject(e)}(e,t)).catch((function(e){return de(e,t)}))};function de(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))throw e;return function(e){var t={code:"invalid_json",message:A("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))}(e).then((function(e){var t={code:"unknown_error",message:A("An unknown error occurred.")};throw e||t}))}function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ge=function(e,t){if(!(e.path&&-1!==e.path.indexOf("/wp/v2/media")||e.url&&-1!==e.url.indexOf("/wp/v2/media")))return t(e);var n=0,r=function e(r){return n++,t({path:"/wp/v2/media/".concat(r,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return n<5?e(r):(t({path:"/wp/v2/media/".concat(r,"?force=true"),method:"DELETE"}),Promise.reject())}))};return t(fe(fe({},e),{},{parse:!1})).catch((function(t){var n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?r(n).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:A("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):de(t,e.parse)})).then((function(t){return pe(t,e.parse)}))};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var me={Accept:"application/json, */*;q=0.1"},be={credentials:"include"},_e=[function(e,t){return"string"!=typeof e.url||ue(e.url,"_locale")||(e.url=V(e.url,{_locale:"user"})),"string"!=typeof e.path||ue(e.path,"_locale")||(e.path=V(e.path,{_locale:"user"})),t(e)},M,function(e,t){var n=e.method,r=void 0===n?"GET":n;return le.has(r.toUpperCase())&&(e=se(se({},e),{},{headers:se(se({},e.headers),{},{"X-HTTP-Method-Override":r,"Content-Type":"application/json"}),method:"POST"})),t(e)},ae];var we=function(e){if(e.status>=200&&e.status<300)return e;throw e},Oe=function(e){var t=e.url,n=e.path,r=e.data,o=e.parse,a=void 0===o||o,c=i(e,["url","path","data","parse"]),s=e.body,l=e.headers;return l=ve(ve({},me),l),r&&(s=JSON.stringify(r),l["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,ve(ve(ve({},be),c),{},{body:s,headers:l})).then((function(e){return Promise.resolve(e).then(we).catch((function(e){return de(e,a)})).then((function(e){return pe(e,a)}))}),(function(){throw{code:"fetch_error",message:A("You are probably offline.")}}))};function xe(e){return _e.reduceRight((function(e,t){return function(n){return t(n,e)}}),Oe)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(xe.nonceEndpoint).then(we).then((function(e){return e.text()})).then((function(t){return xe.nonceMiddleware.nonce=t,xe(e)}))}))}xe.use=function(e){_e.unshift(e)},xe.setFetchHandler=function(e){Oe=e},xe.createNonceMiddleware=I,xe.createPreloadingMiddleware=G,xe.createRootURLMiddleware=B,xe.fetchAllMiddleware=ae,xe.mediaUploadMiddleware=ge;var je=xe,Pe=n(951),Ee=n.n(Pe);var Se={controlled:null,bind(e){this.controlled=e,this.controlled.forEach((e=>{this._main(e)})),this._init()},_init(){this.controlled.forEach((e=>{this._checkUp(e)}))},_main(e){const t=JSON.parse(e.dataset.main);e.dataset.size&&(e.filesize=parseInt(e.dataset.size,10)),e.mains=t.map((t=>{const n=document.getElementById(t),r=document.getElementById(t+"_size_wrapper");return r&&(n.filesize=0,n.sizespan=r),this._addChild(n,e),n})),this._bindEvents(e),e.mains.forEach((e=>{this._bindEvents(e)}))},_bindEvents(e){e.eventBound||(e.addEventListener("click",(t=>{const n=t.target;n.elements&&(this._checkDown(n),this._evaluateSize(n)),n.mains&&this._checkUp(e)})),e.eventBound=!0)},_addChild(e,t){const n=e.elements?e.elements:[];-1===n.indexOf(t)&&(n.push(t),e.elements=n)},_removeChild(e,t){const n=e.elements.indexOf(t);-1<n&&e.elements.splice(n,1)},_checkDown(e){e.elements&&(e.classList.remove("partial"),e.elements.forEach((t=>{t.checked!==e.checked&&(t.checked=e.checked,t.disabled&&(t.checked=!1),t.dispatchEvent(new Event("change")))})),e.elements.forEach((t=>{this._checkDown(t),t.elements||this._checkUp(t,e)})))},_checkUp(e,t){e.mains&&[...e.mains].forEach((e=>{e!==t&&this._evaluateCheckStatus(e),this._checkUp(e),this._evaluateSize(e)}))},_evaluateCheckStatus(e){let t=0,n=e.classList.contains("partial");n&&(e.classList.remove("partial"),n=!1),e.elements.forEach((r=>{null!==r.parentNode?(t+=r.checked,r.classList.contains("partial")&&(n=!0)):this._removeChild(e,r)}));let r="some";t===e.elements.length?r="on":0===t?r="off":n=!0,n&&e.classList.add("partial");const i="off"!==r;e.checked===i&&e.value===r||(e.value=r,e.checked=i,e.dispatchEvent(new Event("change")))},_evaluateSize(e){if(e.sizespan&&e.elements){e.filesize=0,e.elements.forEach((t=>{t.checked&&(e.filesize+=t.filesize)}));let t=null;0<e.filesize&&(t=Ee()(e.filesize,{spacer:" "}).human("jedec")),e.sizespan.innerText=t}}};var ke={key:"_cld_pending_state",data:null,pending:null,changed:!1,previous:{},init(){this.data=cldData.stateData?cldData.stateData:{};let e=localStorage.getItem(this.key);e&&(e=JSON.parse(e),this.data={...this.data,...e},this.sendStates()),this.previous=JSON.stringify(this.data)},_update(){this.pending&&(clearTimeout(this.pending),localStorage.removeItem(this.key)),this.previous!==JSON.stringify(this.data)&&(this.pending=setTimeout((()=>this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(e,t){this.data[e]&&this.data[e]===t||(this.data[e]=t,this._update())},get(e){let t=null;return this.data[e]&&(t=this.data[e]),t},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((e=>e.json())).then((e=>{e.success&&(this.previous=JSON.stringify(e.state),localStorage.removeItem(this.key))}))}};const Le={cachePoints:{},spinners:{},states:null,init(e,t){if(this.states=t,"undefined"!=typeof CLDASSETS){je.use(je.createNonceMiddleware(CLDASSETS.nonce));e.querySelectorAll("[data-cache-point]").forEach((e=>this._bind(e)));const t=document.getElementById("connect.cache.cld_purge_all");t&&(t.disabled="disabled",t.style.width="100px",t.style.transition="width 0.5s",t.addEventListener("click",(()=>{t.dataset.purging||confirm(wp.i18n.__("Purge entire cache?","cloudinary"))&&this._purgeAll(t,!1)})),this._watchPurge(t),setInterval((()=>{this._watchPurge(t)}),5e3))}},getCachePoint(e){return this.cachePoints["_"+e]?this.cachePoints["_"+e]:null},setCachePoint(e,t){const n=document.getElementById(t.dataset.slug),r=document.createElement("div"),i=this._getRow(),o=document.createElement("td");o.colSpan=2,o.className="cld-loading",i.appendChild(o);const a=document.getElementById(t.dataset.slug+"_search"),c=document.getElementById(t.dataset.slug+"_reload"),s=document.getElementById(t.dataset.browser),l=document.getElementById(t.dataset.apply);l.style.float="right",l.style.marginLeft="6px",s.addEventListener("change",(t=>{this._handleManager(e)})),n.addEventListener("change",(t=>{this._handleManager(e)})),window.addEventListener("CacheToggle",(e=>{e.detail.cachePoint===t&&this._cacheChange(t,e.detail)})),l.addEventListener("click",(e=>{this._applyChanges(t)})),c.addEventListener("click",(t=>{this._load(e)})),a.addEventListener("keydown",(t=>{13===t.which&&(t.preventDefault(),t.stopPropagation(),this._load(e))})),r.className="cld-pagenav",l.cacheChanges={disable:[],enable:[],delete:[]},t.main=n,t.search=a,t.controller=s,t.viewer=t.parentNode.parentNode,t.loader=i,t.table=t.parentNode,t.apply=l,t.paginate=r,t.currentPage=1,t.viewer.appendChild(r),this.cachePoints["_"+e]=t},close(e){e.classList.add("closed")},open(e){e.classList.remove("closed")},isOpen(e){const t=this.getCachePoint(e);let n=!1;return t&&(n=t.controller.checked&&t.main.checked),n},_bind(e){const t=e.dataset.cachePoint;this.setCachePoint(t,e),this._handleManager(t)},_handleManager(e){const t=this.getCachePoint(e);t&&(this.isOpen(e)?(this.open(t.viewer),this.states.set(t.viewer.id,"open"),t.loaded||this._load(e)):(this.close(t.viewer),t.controller.checked=!1,this.states.set(t.viewer.id,"close")))},_load(e){const t=this.getCachePoint(e);let n="100px";t.clientHeight&&(n=t.clientHeight-16+"px"),this._clearChildren(t),t.appendChild(t.loader),this.open(t.loader),t.loader.firstChild.style.height=n,je({path:CLDASSETS.fetch_url,data:{ID:e,page:t.currentPage,search:t.search.value},method:"POST"}).then((e=>{t.removeChild(t.loader),this._buildList(t,e.items),this._buildNav(t,e);const n=t.querySelectorAll("[data-main]");Se.bind(n),t.loaded=!0}))},_cacheChange(e,t){const n=t.checked?t.states.on:t.states.off,r=t.checked?t.states.off:t.states.on;this._removeFromList(e,t.item.ID,r)||this._addToList(e,t.item.ID,n),this._evaluateApply(e)},_evaluateApply(e){e.apply.disabled="disabled";const t=e.apply.cacheChanges;let n=!1;for(const e in t)t[e].length&&(n=!0);n&&(e.apply.disabled="")},_applyChanges(e){const t=e.apply.cacheChanges;e.apply.disabled="disabled";for(const n in t)t[n].length&&this._set_state(e,n,t[n])},_watchPurge(e){e.dataset.purging||e.dataset.updating||(e.dataset.updating=!0,je({path:CLDASSETS.purge_all,data:{count:!0},method:"POST"}).then((t=>{e.dataset.updating="",0<t.percent&&100>t.percent?(e.disabled="",this._purgeAll(e,!0)):0<t.pending?e.disabled="":e.disabled="disabled"})))},_purgeAll(e,t,n){e.blur();e.dataset.purging=!0,e.style.width="200px",e.style.border="0",e.dataset.title=e.innerText,e.innerText=A("Purging cache 0%","cloudinary"),e.style.backgroundImage="linear-gradient(90deg, #2a0 0%, #787878 0%)",this._purgeAction(e,t,n)},_purgeAction(e,t,n){const r=e.dataset.parent;je({path:CLDASSETS.purge_all,data:{count:t,parent:r},method:"POST"}).then((t=>{e.innerText=A("Purging cache","cloudinary")+" "+Math.round(t.percent,2)+"%",e.style.backgroundImage="linear-gradient(90deg, #2a0 "+t.percent+"%, #787878 "+t.percent+"%)",100>t.percent?this._purgeAction(e,!0,n):n?n():(e.innerText=wp.i18n.__("Purge complete.","cloudinary"),setTimeout((()=>{e.dataset.purging="",e.style.backgroundImage="",e.style.minHeight="",e.style.border="",e.style.width="100px",e.disabled="disabled",e.innerText=e.dataset.title}),2e3))}))},_set_state(e,t,n){this._showSpinners(n),je({path:CLDASSETS.update_url,data:{state:t,ids:n},method:"POST"}).then((n=>{this._hideSpinners(n),n.forEach((n=>{this._removeFromList(e,n,t),this._evaluateApply(e),e.apply.disabled="disabled"})),"delete"===t&&this._load(e.dataset.cachePoint)}))},_showSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="visible"}))},_hideSpinners(e){e.forEach((e=>{this.spinners["spinner_"+e].style.visibility="hidden"}))},_removeFromList(e,t,n){const r=this._getListIndex(e,t,n);let i=!1;return-1<r&&(e.apply.cacheChanges[n].splice(r,1),i=!0),i},_addToList(e,t,n){-1===this._getListIndex(e,t,n)&&e.apply.cacheChanges[n].push(t)},_getListIndex:(e,t,n)=>e.apply.cacheChanges[n].indexOf(t),_noCache(e){const t=this._getNote(wp.i18n.__("No files cached.","cloudinary"));e.viewer.appendChild(t),this.close(e.table)},_clearChildren(e){for(;e.children.length;){const t=e.lastChild;t.children.length&&this._clearChildren(t),e.removeChild(t)}},_buildList(e,t){t.forEach((t=>{if(t.note)return void e.appendChild(this._getNote(t.note));const n=this._getRow(t.ID),r=this._getStateSwitch(e,t,{on:"enable",off:"disable"}),i=this._getFile(e,t,n),o=this._getEdit(t,e);n.appendChild(i),n.appendChild(o),n.appendChild(r),e.appendChild(n)}))},_buildNav(e,t){e.paginate.innerHTML="";const n=document.createElement("button"),r=document.createElement("button");n.type="button",n.innerHTML="‹",n.className="button cld-pagenav-prev",1===t.current_page?n.disabled=!0:n.addEventListener("click",(n=>{e.currentPage=t.current_page-1,this._load(e.dataset.cachePoint)})),r.type="button",r.innerHTML="›",r.className="button cld-pagenav-next",t.current_page===t.total_pages||0===t.total_pages?r.disabled=!0:r.addEventListener("click",(n=>{e.currentPage=t.current_page+1,this._load(e.dataset.cachePoint)}));const i=document.createElement("span");if(i.innerText=t.nav_text,i.className="cld-pagenav-text",e.paginate.appendChild(n),e.paginate.appendChild(i),e.paginate.appendChild(r),e.paginate.appendChild(e.apply),e.apply.classList.remove("closed"),e.apply.disabled="disabled",t.items.length){const t=document.createElement("button");t.type="button",t.className="button",t.innerText=wp.i18n.__("Purge cache point","cloudinary"),t.style.float="right",e.paginate.appendChild(t),t.addEventListener("click",(n=>{if(confirm(wp.i18n.__("Purge entire cache point?","cloudinary"))){t.dataset.parent=e.dataset.cachePoint;const n=this;t.classList.add("button-primary"),this._purgeAll(t,!1,(function(){n._load(e.dataset.cachePoint)}))}}))}},_getNote(e){const t=this._getRow(),n=document.createElement("td");return n.colSpan=2,n.innerText=e,t.appendChild(n),t},_getRow(e){const t=document.createElement("tr");return e&&(t.id="row_"+e),t},_getEdit(e){const t=document.createElement("td"),n=document.createElement("a");return n.href=e.edit_url,e.data.transformations?n.innerText=e.data.transformations:n.innerText=A("Add transformations","cloudinary"),t.appendChild(n),t},_getFile(e,t){const n=document.createElement("td"),r=document.createElement("label"),i=this._getDeleter(e,n,t);r.innerText=t.short_url,r.htmlFor=t.key,n.appendChild(i),n.appendChild(r);const o=document.createElement("span"),a="spinner_"+t.ID;return o.className="spinner",o.id=a,n.appendChild(o),this.spinners[a]=o,n},_getDeleter(e,t,n){const r=document.createElement("input"),i=[e.dataset.slug+"_deleter"],o=this._getListIndex(e,n.ID,"delete");return r.type="checkbox",r.value=n.ID,r.id=n.key,r.dataset.main=JSON.stringify(i),-1<o&&(r.checked=!0,t.style.textDecoration="line-through"),r.addEventListener("change",(i=>{t.style.opacity=1,t.style.textDecoration="",r.checked&&(t.style.opacity=.8,t.style.textDecoration="line-through");const o=new CustomEvent("CacheToggle",{detail:{checked:r.checked,states:{on:"delete",off:n.active?"enable":"disable"},item:n,cachePoint:e}});window.dispatchEvent(o)})),r},_getStateSwitch(e,t,n){const r=document.createElement("td"),i=document.createElement("label"),o=document.createElement("input"),a=document.createElement("span"),c=(e.dataset.slug,this._getListIndex(e,t.ID,"disable"));return r.style.textAlign="right",i.className="cld-input-on-off-control mini",o.type="checkbox",o.value=t.ID,o.checked=!(-1<c)&&t.active,a.className="cld-input-on-off-control-slider",i.appendChild(o),i.appendChild(a),o.addEventListener("change",(r=>{const i=new CustomEvent("CacheToggle",{detail:{checked:o.checked,states:n,item:t,cachePoint:e}});window.dispatchEvent(i)})),r.appendChild(i),r}},Ce=document.getElementById("cloudinary-settings-page");Ce&&(ke.init(),window.addEventListener("load",(()=>Le.init(Ce,ke))))}()}(); 1 (()=>{var e={951(e,t){var n,r,i,a;a=function(){var e="BKMGTPEZY".split("");function t(e,t){return e&&e.toLowerCase()===t.toLowerCase()}return function(n,r){return n="number"==typeof n?n:0,(r=r||{}).fixed="number"==typeof r.fixed?r.fixed:2,r.spacer="string"==typeof r.spacer?r.spacer:" ",r.calculate=function(e){var i=t(e,"si")?["k","B"]:["K","iB"],a=t(e,"si")?1e3:1024,s=Math.log(n)/Math.log(a)|0,o=n/Math.pow(a,s),c=o.toFixed(r.fixed);return s-1<3&&!t(e,"si")&&t(e,"jedec")&&(i[1]="B"),{suffix:s?(i[0]+"MGTPEZY")[s-1]+i[1]:1==(0|c)?"Byte":"Bytes",magnitude:s,result:o,fixed:c,bits:{result:o/8,fixed:(o/8).toFixed(r.fixed)}}},r.to=function(r,i){var a=t(i,"si")?1e3:1024,s=e.indexOf("string"==typeof r?r[0].toUpperCase():"B"),o=n;if(-1===s||0===s)return o.toFixed(2);for(;s>0;s--)o/=a;return o.toFixed(2)},r.human=function(e){var t=r.calculate(e);return t.fixed+r.spacer+t.suffix},r}},e.exports?e.exports=a():(r=[],void 0===(i="function"==typeof(n=a)?n.apply(t,r):n)||(e.exports=i))}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t,r,i;e={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},t=["(","?"],r={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var a={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function s(n){var s=function(n){for(var a,s,o,c,l=[],d=[];a=n.match(i);){for(s=a[0],(o=n.substr(0,a.index).trim())&&l.push(o);c=d.pop();){if(r[s]){if(r[s][0]===c){s=r[s][1]||s;break}}else if(t.indexOf(c)>=0||e[c]<e[s]){d.push(c);break}l.push(c)}r[s]||d.push(s),n=n.substr(a.index+s.length)}return(n=n.trim())&&l.push(n),l.concat(d.reverse())}(n);return function(e){return function(e,t){var n,r,i,s,o,c,l=[];for(n=0;n<e.length;n++){if(o=e[n],s=a[o]){for(r=s.length,i=Array(r);r--;)i[r]=l.pop();try{c=s.apply(null,i)}catch(e){return e}}else c=t.hasOwnProperty(o)?t[o]:+o;l.push(c)}return l[0]}(s,e)}}var o={contextDelimiter:"",onMissingKey:null};function c(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},o)this.options[n]=void 0!==t&&n in t?t[n]:o[n]}c.prototype.getPluralForm=function(e,t){var n,r,i,a=this.pluralForms[e];return a||("function"!=typeof(i=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=function(e){var t=s(e);return function(e){return+t({n:e})}}(r)),a=this.pluralForms[e]=i),a(t)},c.prototype.dcnpgettext=function(e,t,n,r,i){var a,s,o;return a=void 0===i?0:this.getPluralForm(e,i),s=n,t&&(s=t+this.options.contextDelimiter+n),(o=this.data[e][s])&&o[a]?o[a]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===a?n:r)};var l={plural_forms:e=>1===e?0:1},d=/^i18n\.(n?gettext|has_translation)(_|$)/;var h=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var u=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var p=function(e,t){return function(n,r,i,a=10){const s=e[t];if(!u(n))return;if(!h(r))return;if("function"!=typeof i)return void console.error("The hook callback must be a function.");if("number"!=typeof a)return void console.error("If specified, the hook priority must be a number.");const o={callback:i,priority:a,namespace:r};if(s[n]){const e=s[n].handlers;let t;for(t=e.length;t>0&&!(a>=e[t-1].priority);t--);t===e.length?e[t]=o:e.splice(t,0,o),s.__current.forEach(e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex++})}else s[n]={handlers:[o],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,r,i,a)}};var f=function(e,t,n=!1){return function(r,i){const a=e[t];if(!u(r))return;if(!n&&!h(i))return;if(!a[r])return 0;let s=0;if(n)s=a[r].handlers.length,a[r]={runs:a[r].runs,handlers:[]};else{const e=a[r].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===i&&(e.splice(t,1),s++,a.__current.forEach(e=>{e.name===r&&e.currentIndex>=t&&e.currentIndex--}))}return"hookRemoved"!==r&&e.doAction("hookRemoved",r,i),s}};var m=function(e,t){return function(n,r){const i=e[t];return void 0!==r?n in i&&i[n].handlers.some(e=>e.namespace===r):n in i}};var g=function(e,t,n,r){return function(i,...a){const s=e[t];s[i]||(s[i]={handlers:[],runs:0}),s[i].runs++;const o=s[i].handlers;if(!o||!o.length)return n?a[0]:void 0;const c={name:i,currentIndex:0};return(r?async function(){try{s.__current.add(c);let e=n?a[0]:void 0;for(;c.currentIndex<o.length;){const t=o[c.currentIndex];e=await t.callback.apply(null,a),n&&(a[0]=e),c.currentIndex++}return n?e:void 0}finally{s.__current.delete(c)}}:function(){try{s.__current.add(c);let e=n?a[0]:void 0;for(;c.currentIndex<o.length;){e=o[c.currentIndex].callback.apply(null,a),n&&(a[0]=e),c.currentIndex++}return n?e:void 0}finally{s.__current.delete(c)}})()}};var _=function(e,t){return function(){const n=e[t],r=Array.from(n.__current);return r.at(-1)?.name??null}};var y=function(e,t){return function(n){const r=e[t];return void 0===n?r.__current.size>0:Array.from(r.__current).some(e=>e.name===n)}};var v=function(e,t){return function(n){const r=e[t];if(u(n))return r[n]&&r[n].runs?r[n].runs:0}},b=class{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=p(this,"actions"),this.addFilter=p(this,"filters"),this.removeAction=f(this,"actions"),this.removeFilter=f(this,"filters"),this.hasAction=m(this,"actions"),this.hasFilter=m(this,"filters"),this.removeAllActions=f(this,"actions",!0),this.removeAllFilters=f(this,"filters",!0),this.doAction=g(this,"actions",!1,!1),this.doActionAsync=g(this,"actions",!1,!0),this.applyFilters=g(this,"filters",!0,!1),this.applyFiltersAsync=g(this,"filters",!0,!0),this.currentAction=_(this,"actions"),this.currentFilter=_(this,"filters"),this.doingAction=y(this,"actions"),this.doingFilter=y(this,"filters"),this.didAction=v(this,"actions"),this.didFilter=v(this,"filters")}};var w=function(){return new b}(),{addAction:x,addFilter:E,removeAction:A,removeFilter:C,hasAction:k,hasFilter:S,removeAllActions:T,removeAllFilters:P,doAction:L,doActionAsync:F,applyFilters:O,applyFiltersAsync:I,currentAction:D,currentFilter:N,doingAction:j,doingFilter:M,didAction:z,didFilter:R,actions:B,filters:U}=w,J=((e,t,n)=>{const r=new c({}),i=new Set,a=()=>{i.forEach(e=>e())},s=(e,t="default")=>{r.data[t]={...r.data[t],...e},r.data[t][""]={...l,...r.data[t]?.[""]},delete r.pluralForms[t]},o=(e,t)=>{s(e,t),a()},h=(e="default",t,n,i,a)=>(r.data[e]||s(void 0,e),r.dcnpgettext(e,t,n,i,a)),u=e=>e||"default",p=(e,t,r)=>{let i=h(r,t,e);return n?(i=n.applyFilters("i18n.gettext_with_context",i,e,t,r),n.applyFilters("i18n.gettext_with_context_"+u(r),i,e,t,r)):i};if(e&&o(e,t),n){const e=e=>{d.test(e)&&a()};n.addAction("hookAdded","core/i18n",e),n.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>r.data[e],setLocaleData:o,addLocaleData:(e,t="default")=>{r.data[t]={...r.data[t],...e,"":{...l,...r.data[t]?.[""],...e?.[""]}},delete r.pluralForms[t],a()},resetLocaleData:(e,t)=>{r.data={},r.pluralForms={},o(e,t)},subscribe:e=>(i.add(e),()=>i.delete(e)),__:(e,t)=>{let r=h(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+u(t),r,e,t)):r},_x:p,_n:(e,t,r,i)=>{let a=h(i,void 0,e,t,r);return n?(a=n.applyFilters("i18n.ngettext",a,e,t,r,i),n.applyFilters("i18n.ngettext_"+u(i),a,e,t,r,i)):a},_nx:(e,t,r,i,a)=>{let s=h(a,i,e,t,r);return n?(s=n.applyFilters("i18n.ngettext_with_context",s,e,t,r,i,a),n.applyFilters("i18n.ngettext_with_context_"+u(a),s,e,t,r,i,a)):s},isRTL:()=>"rtl"===p("ltr","text direction"),hasTranslation:(e,t,i)=>{const a=t?t+""+e:e;let s=!!r.data?.[i??"default"]?.[a];return n&&(s=n.applyFilters("i18n.has_translation",s,e,t,i),s=n.applyFilters("i18n.has_translation_"+u(i),s,e,t,i)),s}}})(void 0,void 0,w),H=(J.getLocaleData.bind(J),J.setLocaleData.bind(J),J.resetLocaleData.bind(J),J.subscribe.bind(J),J.__.bind(J));J._x.bind(J),J._n.bind(J),J._nx.bind(J),J.isRTL.bind(J),J.hasTranslation.bind(J);var $=function(e){const t=(e,n)=>{const{headers:r={}}=e;for(const i in r)if("x-wp-nonce"===i.toLowerCase()&&r[i]===t.nonce)return n(e);return n({...e,headers:{...r,"X-WP-Nonce":t.nonce}})};return t.nonce=e,t},K=(e,t)=>{let n,r,i=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),r=e.endpoint.replace(/^\//,""),i=r?n+"/"+r:n),delete e.namespace,delete e.endpoint,t({...e,path:i})},Z=e=>(t,n)=>K(t,t=>{let r,i=t.url,a=t.path;return"string"==typeof a&&(r=e,-1!==e.indexOf("?")&&(a=a.replace("?","&")),a=a.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(a=a.replace("?","&")),i=r+a),n({...t,url:i})});function q(e){const t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map(e=>e.split("=")).map(e=>e.map(decodeURIComponent)).sort((e,t)=>e[0].localeCompare(t[0])).map(e=>e.map(encodeURIComponent)).map(e=>e.join("=")).join("&"):r}function G(e){try{return decodeURIComponent(e)}catch{return e}}function X(e){return(function(e){let t;try{t=new URL(e,"http://example.com").search.substring(1)}catch{}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((e,t)=>{const[n,r=""]=t.split("=").filter(Boolean).map(G);if(n){!function(e,t,n){const r=t.length,i=r-1;for(let a=0;a<r;a++){let r=t[a];!r&&Array.isArray(e)&&(r=e.length.toString()),r=["__proto__","constructor","prototype"].includes(r)?r.toUpperCase():r;const s=!isNaN(Number(t[a+1]));e[r]=a===i?n:e[r]||(s?[]:{}),Array.isArray(e[r])&&!s&&(e[r]={...e[r]}),e=e[r]}}(e,n.replace(/\]/g,"").split("["),r)}return e},Object.create(null))}function W(e){let t="";const n=Object.entries(e);let r;for(;r=n.shift();){let[e,i]=r;if(Array.isArray(i)||i&&i.constructor===Object){const t=Object.entries(i).reverse();for(const[r,i]of t)n.unshift([`${e}[${r}]`,i])}else void 0!==i&&(null===i&&(i=""),t+="&"+[e,String(i)].map(encodeURIComponent).join("="))}return t.substr(1)}function Y(e="",t){if(!t||!Object.keys(t).length)return e;const n=function(e){const t=/^\S+?(#[^\s\?]*)/.exec(e);if(t)return t[1]}(e)||"";let r=e.replace(n,"");const i=e.indexOf("?");return-1!==i&&(t=Object.assign(X(e),t),r=r.substr(0,i)),r+"?"+W(t)+n}function Q(e,t){if(t)return Promise.resolve(e.body);try{return Promise.resolve(new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}catch{return Object.entries(e.headers).forEach(([t,n])=>{"link"===t.toLowerCase()&&(e.headers[t]=n.replace(/<([^>]+)>/,(e,t)=>`<${encodeURI(t)}>`))}),Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}}var V=function(e){const t=Object.fromEntries(Object.entries(e).map(([e,t])=>[q(e),t]));return(e,n)=>{const{parse:r=!0}=e;let i=e.path;if(!i&&e.url){const{rest_route:t,...n}=X(e.url);"string"==typeof t&&(i=Y(t,n))}if("string"!=typeof i)return n(e);const a=e.method||"GET",s=q(i);if("GET"===a&&t[s]){const e=t[s];return delete t[s],Q(e,!!r)}if("OPTIONS"===a&&t[a]&&t[a][s]){const e=t[a][s];return delete t[a][s],Q(e,!!r)}return n(e)}},ee=({path:e,url:t,...n},r)=>({...n,url:t&&Y(t,r),path:e&&Y(e,r)}),te=e=>e.json?e.json():Promise.reject(e),ne=e=>{const{next:t}=(e=>{if(!e)return{};const t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}})(e.headers.get("link"));return t},re=async(e,t)=>{if(!1===e.parse)return t(e);if(!(e=>{const t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n})(e))return t(e);const n=await ve({...ee(e,{per_page:100}),parse:!1}),r=await te(n);if(!Array.isArray(r))return r;let i=ne(n);if(!i)return r;let a=[].concat(r);for(;i;){const t=await ve({...e,path:void 0,url:i,parse:!1}),n=await te(t);a=a.concat(n),i=ne(t)}return a},ie=new Set(["PATCH","PUT","DELETE"]),ae="GET";function se(e,t){return X(e)[t]}function oe(e,t){return void 0!==se(e,t)}async function ce(e){try{return await e.json()}catch{throw{code:"invalid_json",message:H("The response is not a valid JSON response.")}}}async function le(e,t=!0){return t?204===e.status?null:await ce(e):e}async function de(e,t=!0){if(!t)throw e;throw await ce(e)}var he=(e,t)=>{if(!function(e){const t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);let n=0;const r=e=>(n++,t({path:`/wp/v2/media/${e}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>n<5?r(e):(t({path:`/wp/v2/media/${e}?force=true`,method:"DELETE"}),Promise.reject())));return t({...e,parse:!1}).catch(t=>{if(!(t instanceof globalThis.Response))return Promise.reject(t);const n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?r(n).catch(()=>!1!==e.parse?Promise.reject({code:"post_process",message:H("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)):de(t,e.parse)}).then(t=>le(t,e.parse))};function ue(e,...t){const n=e.replace(/^[^#]*/,""),r=(e=e.replace(/#.*/,"")).indexOf("?");if(-1===r)return e+n;const i=X(e),a=e.substr(0,r);t.forEach(e=>delete i[e]);const s=W(i);return(s?a+"?"+s:a)+n}var pe=e=>(t,n)=>{if("string"==typeof t.url){const n=se(t.url,"wp_theme_preview");void 0===n?t.url=Y(t.url,{wp_theme_preview:e}):""===n&&(t.url=ue(t.url,"wp_theme_preview"))}if("string"==typeof t.path){const n=se(t.path,"wp_theme_preview");void 0===n?t.path=Y(t.path,{wp_theme_preview:e}):""===n&&(t.path=ue(t.path,"wp_theme_preview"))}return n(t)},fe={Accept:"application/json, */*;q=0.1"},me={credentials:"include"},ge=[(e,t)=>("string"!=typeof e.url||oe(e.url,"_locale")||(e.url=Y(e.url,{_locale:"user"})),"string"!=typeof e.path||oe(e.path,"_locale")||(e.path=Y(e.path,{_locale:"user"})),t(e)),K,(e,t)=>{const{method:n=ae}=e;return ie.has(n.toUpperCase())&&(e={...e,headers:{...e.headers,"X-HTTP-Method-Override":n,"Content-Type":"application/json"},method:"POST"}),t(e)},re];var _e=e=>{const{url:t,path:n,data:r,parse:i=!0,...a}=e;let{body:s,headers:o}=e;o={...fe,...o},r&&(s=JSON.stringify(r),o["Content-Type"]="application/json");return globalThis.fetch(t||n||window.location.href,{...me,...a,body:s,headers:o}).then(e=>e.ok?le(e,i):de(e,i),e=>{if(e&&"AbortError"===e.name)throw e;if(!globalThis.navigator.onLine)throw{code:"offline_error",message:H("Unable to connect. Please check your Internet connection.")};throw{code:"fetch_error",message:H("Could not get a valid response from the server.")}})};var ye=e=>ge.reduceRight((e,t)=>n=>t(n,e),_e)(e).catch(t=>"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):globalThis.fetch(ye.nonceEndpoint).then(e=>e.ok?e.text():Promise.reject(t)).then(t=>(ye.nonceMiddleware.nonce=t,ye(e))));ye.use=function(e){ge.unshift(e)},ye.setFetchHandler=function(e){_e=e},ye.createNonceMiddleware=$,ye.createPreloadingMiddleware=V,ye.createRootURLMiddleware=Z,ye.fetchAllMiddleware=re,ye.mediaUploadMiddleware=he,ye.createThemePreviewMiddleware=pe;var ve=ye,be=n(951),we=n.n(be);const xe={controlled:null,bind(e){this.controlled=e,this.controlled.forEach(e=>{this._main(e)}),this._init()},_init(){this.controlled.forEach(e=>{this._checkUp(e)})},_main(e){const t=JSON.parse(e.dataset.main);e.dataset.size&&(e.filesize=parseInt(e.dataset.size,10)),e.mains=t.map(t=>{const n=document.getElementById(t),r=document.getElementById(t+"_size_wrapper");return r&&(n.filesize=0,n.sizespan=r),this._addChild(n,e),n}),this._bindEvents(e),e.mains.forEach(e=>{this._bindEvents(e)})},_bindEvents(e){e.eventBound||(e.addEventListener("click",t=>{const n=t.target;n.elements&&(this._checkDown(n),this._evaluateSize(n)),n.mains&&this._checkUp(e)}),e.eventBound=!0)},_addChild(e,t){const n=e.elements?e.elements:[];-1===n.indexOf(t)&&(n.push(t),e.elements=n)},_removeChild(e,t){const n=e.elements.indexOf(t);-1<n&&e.elements.splice(n,1)},_checkDown(e){e.elements&&(e.classList.remove("partial"),e.elements.forEach(t=>{t.checked!==e.checked&&(t.checked=e.checked,t.disabled&&(t.checked=!1),t.dispatchEvent(new Event("change")))}),e.elements.forEach(t=>{this._checkDown(t),t.elements||this._checkUp(t,e)}))},_checkUp(e,t){e.mains&&[...e.mains].forEach(e=>{e!==t&&this._evaluateCheckStatus(e),this._checkUp(e),this._evaluateSize(e)})},_evaluateCheckStatus(e){let t=0,n=e.classList.contains("partial");n&&(e.classList.remove("partial"),n=!1),e.elements.forEach(r=>{null!==r.parentNode?(t+=r.checked,r.classList.contains("partial")&&(n=!0)):this._removeChild(e,r)});let r="some";t===e.elements.length?r="on":0===t?r="off":n=!0,n&&e.classList.add("partial");const i="off"!==r;e.checked===i&&e.value===r||(e.value=r,e.checked=i,e.dispatchEvent(new Event("change")))},_evaluateSize(e){if(e.sizespan&&e.elements){e.filesize=0,e.elements.forEach(t=>{t.checked&&(e.filesize+=t.filesize)});let t=null;0<e.filesize&&(t=we()(e.filesize,{spacer:" "}).human("jedec")),e.sizespan.innerText=t}}},Ee={key:"_cld_pending_state",data:null,pending:null,changed:!1,previous:{},init(){this.data=cldData.stateData?cldData.stateData:{};let e=localStorage.getItem(this.key);e&&(e=JSON.parse(e),this.data={...this.data,...e},this.sendStates()),this.previous=JSON.stringify(this.data)},_update(){this.pending&&(clearTimeout(this.pending),localStorage.removeItem(this.key)),this.previous!==JSON.stringify(this.data)&&(this.pending=setTimeout(()=>this.sendStates(),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(e,t){this.data[e]&&this.data[e]===t||(this.data[e]=t,this._update())},get(e){let t=null;return this.data[e]&&(t=this.data[e]),t},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then(e=>e.json()).then(e=>{e.success&&(this.previous=JSON.stringify(e.state),localStorage.removeItem(this.key))})}},Ae={cachePoints:{},spinners:{},states:null,init(e,t){if(this.states=t,"undefined"!=typeof CLDASSETS){ve.use(ve.createNonceMiddleware(CLDASSETS.nonce));e.querySelectorAll("[data-cache-point]").forEach(e=>this._bind(e));const t=document.getElementById("connect.cache.cld_purge_all");t&&(t.disabled="disabled",t.style.width="100px",t.style.transition="width 0.5s",t.addEventListener("click",()=>{t.dataset.purging||confirm(wp.i18n.__("Purge entire cache?","cloudinary"))&&this._purgeAll(t,!1)}),this._watchPurge(t),setInterval(()=>{this._watchPurge(t)},5e3))}},getCachePoint(e){return this.cachePoints["_"+e]?this.cachePoints["_"+e]:null},setCachePoint(e,t){const n=document.getElementById(t.dataset.slug),r=document.createElement("div"),i=this._getRow(),a=document.createElement("td");a.colSpan=2,a.className="cld-loading",i.appendChild(a);const s=document.getElementById(t.dataset.slug+"_search"),o=document.getElementById(t.dataset.slug+"_reload"),c=document.getElementById(t.dataset.browser),l=document.getElementById(t.dataset.apply);l.style.float="right",l.style.marginLeft="6px",c.addEventListener("change",t=>{this._handleManager(e)}),n.addEventListener("change",t=>{this._handleManager(e)}),window.addEventListener("CacheToggle",e=>{e.detail.cachePoint===t&&this._cacheChange(t,e.detail)}),l.addEventListener("click",e=>{this._applyChanges(t)}),o.addEventListener("click",t=>{this._load(e)}),s.addEventListener("keydown",t=>{13===t.which&&(t.preventDefault(),t.stopPropagation(),this._load(e))}),r.className="cld-pagenav",l.cacheChanges={disable:[],enable:[],delete:[]},t.main=n,t.search=s,t.controller=c,t.viewer=t.parentNode.parentNode,t.loader=i,t.table=t.parentNode,t.apply=l,t.paginate=r,t.currentPage=1,t.viewer.appendChild(r),this.cachePoints["_"+e]=t},close(e){e.classList.add("closed")},open(e){e.classList.remove("closed")},isOpen(e){const t=this.getCachePoint(e);let n=!1;return t&&(n=t.controller.checked&&t.main.checked),n},_bind(e){const t=e.dataset.cachePoint;this.setCachePoint(t,e),this._handleManager(t)},_handleManager(e){const t=this.getCachePoint(e);t&&(this.isOpen(e)?(this.open(t.viewer),this.states.set(t.viewer.id,"open"),t.loaded||this._load(e)):(this.close(t.viewer),t.controller.checked=!1,this.states.set(t.viewer.id,"close")))},_load(e){const t=this.getCachePoint(e);let n="100px";t.clientHeight&&(n=t.clientHeight-16+"px"),this._clearChildren(t),t.appendChild(t.loader),this.open(t.loader),t.loader.firstChild.style.height=n,ve({path:CLDASSETS.fetch_url,data:{ID:e,page:t.currentPage,search:t.search.value},method:"POST"}).then(e=>{t.removeChild(t.loader),this._buildList(t,e.items),this._buildNav(t,e);const n=t.querySelectorAll("[data-main]");xe.bind(n),t.loaded=!0})},_cacheChange(e,t){const n=t.checked?t.states.on:t.states.off,r=t.checked?t.states.off:t.states.on;this._removeFromList(e,t.item.ID,r)||this._addToList(e,t.item.ID,n),this._evaluateApply(e)},_evaluateApply(e){e.apply.disabled="disabled";const t=e.apply.cacheChanges;let n=!1;for(const e in t)t[e].length&&(n=!0);n&&(e.apply.disabled="")},_applyChanges(e){const t=e.apply.cacheChanges;e.apply.disabled="disabled";for(const n in t)t[n].length&&this._set_state(e,n,t[n])},_watchPurge(e){e.dataset.purging||e.dataset.updating||(e.dataset.updating=!0,ve({path:CLDASSETS.purge_all,data:{count:!0},method:"POST"}).then(t=>{e.dataset.updating="",0<t.percent&&100>t.percent?(e.disabled="",this._purgeAll(e,!0)):0<t.pending?e.disabled="":e.disabled="disabled"}))},_purgeAll(e,t,n){e.blur();e.dataset.purging=!0,e.style.width="200px",e.style.border="0",e.dataset.title=e.innerText,e.innerText=H("Purging cache 0%","cloudinary"),e.style.backgroundImage="linear-gradient(90deg, #2a0 0%, #787878 0%)",this._purgeAction(e,t,n)},_purgeAction(e,t,n){const r=e.dataset.parent;ve({path:CLDASSETS.purge_all,data:{count:t,parent:r},method:"POST"}).then(t=>{e.innerText=H("Purging cache","cloudinary")+" "+Math.round(t.percent,2)+"%",e.style.backgroundImage="linear-gradient(90deg, #2a0 "+t.percent+"%, #787878 "+t.percent+"%)",100>t.percent?this._purgeAction(e,!0,n):n?n():(e.innerText=wp.i18n.__("Purge complete.","cloudinary"),setTimeout(()=>{e.dataset.purging="",e.style.backgroundImage="",e.style.minHeight="",e.style.border="",e.style.width="100px",e.disabled="disabled",e.innerText=e.dataset.title},2e3))})},_set_state(e,t,n){this._showSpinners(n),ve({path:CLDASSETS.update_url,data:{state:t,ids:n},method:"POST"}).then(n=>{this._hideSpinners(n),n.forEach(n=>{this._removeFromList(e,n,t),this._evaluateApply(e),e.apply.disabled="disabled"}),"delete"===t&&this._load(e.dataset.cachePoint)})},_showSpinners(e){e.forEach(e=>{this.spinners["spinner_"+e].style.visibility="visible"})},_hideSpinners(e){e.forEach(e=>{this.spinners["spinner_"+e].style.visibility="hidden"})},_removeFromList(e,t,n){const r=this._getListIndex(e,t,n);let i=!1;return-1<r&&(e.apply.cacheChanges[n].splice(r,1),i=!0),i},_addToList(e,t,n){-1===this._getListIndex(e,t,n)&&e.apply.cacheChanges[n].push(t)},_getListIndex:(e,t,n)=>e.apply.cacheChanges[n].indexOf(t),_noCache(e){const t=this._getNote(wp.i18n.__("No files cached.","cloudinary"));e.viewer.appendChild(t),this.close(e.table)},_clearChildren(e){for(;e.children.length;){const t=e.lastChild;t.children.length&&this._clearChildren(t),e.removeChild(t)}},_buildList(e,t){t.forEach(t=>{if(t.note)return void e.appendChild(this._getNote(t.note));const n=this._getRow(t.ID),r=this._getStateSwitch(e,t,{on:"enable",off:"disable"}),i=this._getFile(e,t,n),a=this._getEdit(t,e);n.appendChild(i),n.appendChild(a),n.appendChild(r),e.appendChild(n)})},_buildNav(e,t){e.paginate.innerHTML="";const n=document.createElement("button"),r=document.createElement("button");n.type="button",n.innerHTML="‹",n.className="button cld-pagenav-prev",1===t.current_page?n.disabled=!0:n.addEventListener("click",n=>{e.currentPage=t.current_page-1,this._load(e.dataset.cachePoint)}),r.type="button",r.innerHTML="›",r.className="button cld-pagenav-next",t.current_page===t.total_pages||0===t.total_pages?r.disabled=!0:r.addEventListener("click",n=>{e.currentPage=t.current_page+1,this._load(e.dataset.cachePoint)});const i=document.createElement("span");if(i.innerText=t.nav_text,i.className="cld-pagenav-text",e.paginate.appendChild(n),e.paginate.appendChild(i),e.paginate.appendChild(r),e.paginate.appendChild(e.apply),e.apply.classList.remove("closed"),e.apply.disabled="disabled",t.items.length){const t=document.createElement("button");t.type="button",t.className="button",t.innerText=wp.i18n.__("Purge cache point","cloudinary"),t.style.float="right",e.paginate.appendChild(t),t.addEventListener("click",n=>{if(confirm(wp.i18n.__("Purge entire cache point?","cloudinary"))){t.dataset.parent=e.dataset.cachePoint;const n=this;t.classList.add("button-primary"),this._purgeAll(t,!1,function(){n._load(e.dataset.cachePoint)})}})}},_getNote(e){const t=this._getRow(),n=document.createElement("td");return n.colSpan=2,n.innerText=e,t.appendChild(n),t},_getRow(e){const t=document.createElement("tr");return e&&(t.id="row_"+e),t},_getEdit(e){const t=document.createElement("td"),n=document.createElement("a");return n.href=e.edit_url,e.data.transformations?n.innerText=e.data.transformations:n.innerText=H("Add transformations","cloudinary"),t.appendChild(n),t},_getFile(e,t){const n=document.createElement("td"),r=document.createElement("label"),i=this._getDeleter(e,n,t);r.innerText=t.short_url,r.htmlFor=t.key,n.appendChild(i),n.appendChild(r);const a=document.createElement("span"),s="spinner_"+t.ID;return a.className="spinner",a.id=s,n.appendChild(a),this.spinners[s]=a,n},_getDeleter(e,t,n){const r=document.createElement("input"),i=[e.dataset.slug+"_deleter"],a=this._getListIndex(e,n.ID,"delete");return r.type="checkbox",r.value=n.ID,r.id=n.key,r.dataset.main=JSON.stringify(i),-1<a&&(r.checked=!0,t.style.textDecoration="line-through"),r.addEventListener("change",i=>{t.style.opacity=1,t.style.textDecoration="",r.checked&&(t.style.opacity=.8,t.style.textDecoration="line-through");const a=new CustomEvent("CacheToggle",{detail:{checked:r.checked,states:{on:"delete",off:n.active?"enable":"disable"},item:n,cachePoint:e}});window.dispatchEvent(a)}),r},_getStateSwitch(e,t,n){const r=document.createElement("td"),i=document.createElement("label"),a=document.createElement("input"),s=document.createElement("span"),o=(e.dataset.slug,this._getListIndex(e,t.ID,"disable"));return r.style.textAlign="right",i.className="cld-input-on-off-control mini",a.type="checkbox",a.value=t.ID,a.checked=!(-1<o)&&t.active,s.className="cld-input-on-off-control-slider",i.appendChild(a),i.appendChild(s),a.addEventListener("change",r=>{const i=new CustomEvent("CacheToggle",{detail:{checked:a.checked,states:n,item:t,cachePoint:e}});window.dispatchEvent(i)}),r.appendChild(i),r}},Ce=document.getElementById("cloudinary-settings-page");Ce&&(Ee.init(),window.addEventListener("load",()=>Ae.init(Ce,Ee)))})()})(); 2 //# sourceMappingURL=asset-manager.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/block-editor.asset.php
r3343538 r3518458 1 <?php return array('dependencies' => array(' react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => 'acdb83aa5cf9c0e8d936');1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'aab7b2e0606348e43cc2'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/block-editor.js
r3343538 r3518458 1 !function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.apiFetch,r=e.n(t),o=window.wp.i18n,i=window.wp.data,a=window.wp.components,n=window.ReactJSXRuntime;const s={_init(){"undefined"!=typeof CLD_VIDEO_PLAYER&&wp.hooks.addFilter("blocks.registerBlockType","Cloudinary/Media/Video",(function(e,t){return"core/video"===t&&("off"!==CLD_VIDEO_PLAYER.video_autoplay_mode&&(e.attributes.autoplay.default=!0),"on"===CLD_VIDEO_PLAYER.video_loop&&(e.attributes.loop.default=!0),"off"===CLD_VIDEO_PLAYER.video_controls&&(e.attributes.controls.default=!1)),e}))}};s._init();wp.hooks.addFilter("blocks.registerBlockType","cloudinary/addAttributes",(function(e,t){return"core/image"!==t&&"core/video"!==t||(e.attributes||(e.attributes={}),e.attributes.overwrite_transformations={type:"boolean"},e.attributes.transformations={type:"boolean"}),e}));const l=e=>{const{attributes:{overwrite_transformations:t},setAttributes:r}=e;return(0,n.jsx)(a.PanelBody,{title:(0,o.__)("Transformations","cloudinary"),children:(0,n.jsx)(a.ToggleControl,{label:(0,o.__)("Overwrite Global Transformations","cloudinary"),checked:t,onChange:e=>{r({overwrite_transformations:e})}})})};let d=e=>{const{setAttributes:t,media:r}=e,{InspectorControls:o}=wp.editor;return r&&r.transformations&&t({transformations:!0}),(0,n.jsx)(o,{children:(0,n.jsx)(l,{...e})})};d=(0,i.withSelect)(((e,t)=>({...t,media:t.attributes.id?e("core").getMedia(t.attributes.id):null})))(d);wp.hooks.addFilter("editor.BlockEdit","cloudinary/filterEdit",(e=>t=>{const{name:r}=t,o="core/image"===r||"core/video"===r;return(0,n.jsxs)(n.Fragment,{children:[o?(0,n.jsx)(d,{...t}):null,(0,n.jsx)(e,{...t})]})}),20);let c=e=>(0,n.jsx)(n.Fragment,{children:e.modalClass&&(0,n.jsx)(a.ToggleControl,{label:(0,o.__)("Overwrite Cloudinary Global Transformations","cloudinary"),checked:e.overwrite_featured_transformations,onChange:t=>e.setOverwrite(t),className:"cloudinary-overwrite-transformations"})});c=(0,i.withSelect)((e=>{var t;return{overwrite_featured_transformations:null!==(t=e("core/editor")?.getEditedPostAttribute("meta")._cloudinary_featured_overwrite)&&void 0!==t&&t}}))(c),c=(0,i.withDispatch)((e=>({setOverwrite:t=>{e("core/editor").editPost({meta:{_cloudinary_featured_overwrite:t}})}})))(c);const u=e=>class extends e{render(){return(0,n.jsxs)(n.Fragment,{children:[super.render(),!!this.props.value&&(0,n.jsx)(c,{...this.props})]})}},m={_init(){wp.hooks.addFilter("editor.MediaUpload","cloudinary/filter-featured-image",u)}};m._init();const h={wrapper:null,query:{per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},available:{},taxonomies:null,fetchWait:null,_init(){if(this.wrapper=document.getElementById("cld-tax-items"),!this.wrapper)return;const{getTaxonomies:e}=(0,i.select)("core");this.fetchWait=setInterval((()=>{this.taxonomies=e(),this.taxonomies&&(clearInterval(this.fetchWait),this._init_listeners())}),1e3)},_init_listeners(){this.taxonomies.forEach((e=>{e.rest_base&&e.visibility.public&&(0,i.subscribe)((()=>{const t=e.slug,r=e.hierarchical,{isResolving:o}=(0,i.select)("core/data"),a=["taxonomy",t,this.query];this.available[t]=null,r&&(this.available[t]=(0,i.select)("core").getEntityRecords("taxonomy",t,this.query)),o("core","getEntityRecords",a)||this.event(e)}))}))},event(e){const t=(0,i.select)("core/editor").getEditedPostAttribute(e.rest_base);if(!t)return;const r=[...t],o=Array.from(this.wrapper.querySelectorAll(`[data-item*="${e.slug}"]`));[...r].forEach((t=>{const r=this.wrapper.querySelector(`[data-item="${e.slug}:${t}"]`);o.splice(o.indexOf(r),1),null===r&&this.createItem(this.getItem(e,t))})),o.forEach((e=>{e.parentNode.removeChild(e)}))},createItem(e){if(!e||!e.id)return;const t=document.createElement("li"),r=document.createElement("span"),o=document.createElement("input"),i=document.createTextNode(e.name);t.classList.add("cld-tax-order-list-item"),t.dataset.item=`${e.taxonomy}:${e.id}`,o.classList.add("cld-tax-order-list-item-input"),o.type="hidden",o.name="cld_tax_order[]",o.value=`${e.taxonomy}:${e.id}`,r.className="dashicons dashicons-menu cld-tax-order-list-item-handle",t.appendChild(r),t.appendChild(o),t.appendChild(i),this.wrapper.appendChild(t)},getItem(e,t){let r={};if(null===this.available[e.slug])r=(0,i.select)("core").getEntityRecord("taxonomy",e.slug,t);else for(const o of this.available[e.slug])if(o.id===t){r=o,r.taxonomy=e.slug;break}return r}};window.addEventListener("load",(()=>h._init()));window.$=window.jQuery,r().use(((e,t)=>{if("cors"===e.mode)return t(e);if(e.url)try{const r=new URL(e.url,location.href);if(r.protocol!==location.protocol||r.hostname!==location.hostname||r.port!==location.port)return t(e)}catch{return t(e)}return e.headers||(e.headers={}),e.headers["x-cld-fetch-from-editor"]="true",t(e)}))}(); 1 (()=>{"use strict";var e={6087(e){e.exports=window.wp.element}},t={};function r(o){var a=t[o];if(void 0!==a)return a.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const o=window.wp.apiFetch;var a=r.n(o);const i=window.wp.i18n,n=window.wp.data,s=window.wp.components;var l=r(6087);const d={_init(){"undefined"!=typeof CLD_VIDEO_PLAYER&&wp.hooks.addFilter("blocks.registerBlockType","Cloudinary/Media/Video",function(e,t){return"core/video"===t&&("off"!==CLD_VIDEO_PLAYER.video_autoplay_mode&&(e.attributes.autoplay.default=!0),"on"===CLD_VIDEO_PLAYER.video_loop&&(e.attributes.loop.default=!0),"off"===CLD_VIDEO_PLAYER.video_controls&&(e.attributes.controls.default=!1)),e})}};d._init();wp.hooks.addFilter("blocks.registerBlockType","cloudinary/addAttributes",function(e,t){return"core/image"!==t&&"core/video"!==t||(e.attributes||(e.attributes={}),e.attributes.overwrite_transformations={type:"boolean"},e.attributes.transformations={type:"boolean"}),e});const c=e=>{const{attributes:{overwrite_transformations:t},setAttributes:r}=e;return l.createElement(s.PanelBody,{title:(0,i.__)("Transformations","cloudinary")},l.createElement(s.ToggleControl,{label:(0,i.__)("Overwrite Global Transformations","cloudinary"),checked:t,onChange:e=>{r({overwrite_transformations:e})},__nextHasNoMarginBottom:!0}))};let u=e=>{const{setAttributes:t,media:r}=e,{InspectorControls:o}=wp.editor;return r&&r.transformations&&t({transformations:!0}),l.createElement(o,null,l.createElement(c,e))};u=(0,n.withSelect)((e,t)=>({...t,media:t.attributes.id?e("core").getMedia(t.attributes.id):null}))(u);wp.hooks.addFilter("editor.BlockEdit","cloudinary/filterEdit",e=>t=>{const{name:r}=t,o="core/image"===r||"core/video"===r;return l.createElement(l.Fragment,null,o?l.createElement(u,t):null,l.createElement(e,t))},20);var m=r(6087);let p=e=>m.createElement(m.Fragment,null,e.modalClass&&m.createElement(s.ToggleControl,{label:(0,i.__)("Overwrite Cloudinary Global Transformations","cloudinary"),checked:e.overwrite_featured_transformations,onChange:t=>e.setOverwrite(t),className:"cloudinary-overwrite-transformations",__nextHasNoMarginBottom:!0}));p=(0,n.withSelect)(e=>({overwrite_featured_transformations:e("core/editor")?.getEditedPostAttribute("meta")._cloudinary_featured_overwrite??!1}))(p),p=(0,n.withDispatch)(e=>({setOverwrite:t=>{e("core/editor").editPost({meta:{_cloudinary_featured_overwrite:t}})}}))(p);const h=e=>class extends e{render(){return m.createElement(m.Fragment,null,super.render(),!!this.props.value&&m.createElement(p,this.props))}},f={_init(){wp.hooks.addFilter("editor.MediaUpload","cloudinary/filter-featured-image",h)}};f._init();const _={wrapper:null,query:{per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view"},available:{},taxonomies:null,fetchWait:null,_init(){if(this.wrapper=document.getElementById("cld-tax-items"),!this.wrapper)return;const{getTaxonomies:e}=(0,n.select)("core");this.fetchWait=setInterval(()=>{this.taxonomies=e(),this.taxonomies&&(clearInterval(this.fetchWait),this._init_listeners())},1e3)},_init_listeners(){this.taxonomies.forEach(e=>{e.rest_base&&e.visibility.public&&(0,n.subscribe)(()=>{const t=e.slug,r=e.hierarchical,{isResolving:o}=(0,n.select)("core/data"),a=["taxonomy",t,this.query];this.available[t]=null,r&&(this.available[t]=(0,n.select)("core").getEntityRecords("taxonomy",t,this.query)),o("core","getEntityRecords",a)||this.event(e)})})},event(e){const t=(0,n.select)("core/editor").getEditedPostAttribute(e.rest_base);if(!t)return;const r=[...t],o=Array.from(this.wrapper.querySelectorAll(`[data-item*="${e.slug}"]`));[...r].forEach(t=>{const r=this.wrapper.querySelector(`[data-item="${e.slug}:${t}"]`);o.splice(o.indexOf(r),1),null===r&&this.createItem(this.getItem(e,t))}),o.forEach(e=>{e.parentNode.removeChild(e)})},createItem(e){if(!e||!e.id)return;const t=document.createElement("li"),r=document.createElement("span"),o=document.createElement("input"),a=document.createTextNode(e.name);t.classList.add("cld-tax-order-list-item"),t.dataset.item=`${e.taxonomy}:${e.id}`,o.classList.add("cld-tax-order-list-item-input"),o.type="hidden",o.name="cld_tax_order[]",o.value=`${e.taxonomy}:${e.id}`,r.className="dashicons dashicons-menu cld-tax-order-list-item-handle",t.appendChild(r),t.appendChild(o),t.appendChild(a),this.wrapper.appendChild(t)},getItem(e,t){let r={};if(null===this.available[e.slug])r=(0,n.select)("core").getEntityRecord("taxonomy",e.slug,t);else for(const o of this.available[e.slug])if(o.id===t){r=o,r.taxonomy=e.slug;break}return r}};window.addEventListener("load",()=>_._init());window.$=window.jQuery,a().use((e,t)=>{if("cors"===e.mode)return t(e);if(e.url)try{const r=new URL(e.url,location.href);if(r.protocol!==location.protocol||r.hostname!==location.hostname||r.port!==location.port)return t(e)}catch{return t(e)}return e.headers||(e.headers={}),e.headers["x-cld-fetch-from-editor"]="true",t(e)})})(); 2 //# sourceMappingURL=block-editor.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/breakpoints-preview.js
r3343538 r3518458 1 !function(){var t={604:function(t,e,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return function(t,e){var n,r,a,s,u,c,l,p,f,d=1,h=t.length,v="";for(r=0;r<h;r++)if("string"==typeof t[r])v+=t[r];else if("object"==typeof t[r]){if((s=t[r]).keys)for(n=e[d],a=0;a<s.keys.length;a++){if(null==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));n=n[s.keys[a]]}else n=s.param_no?e[s.param_no]:e[d++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&n instanceof Function&&(n=n()),i.numeric_arg.test(s.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(i.number.test(s.type)&&(p=n>=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=n:(!i.number.test(s.type)||p&&!s.sign?f="":(f=p?"+":"-",n=n.toString().replace(i.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(f+n).length,u=s.width&&l>0?c.repeat(l):"",v+=s.align?f+n+u:"0"===c?f+u+n:u+f+n)}return v}(function(t){if(s[t])return s[t];var e,n=t,r=[],o=0;for(;n;){if(null!==(e=i.text.exec(n)))r.push(e[0]);else if(null!==(e=i.modulo.exec(n)))r.push("%");else{if(null===(e=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var a=[],u=e[2],c=[];if(null===(c=i.key.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(c[1]);""!==(u=u.substring(c[0].length));)if(null!==(c=i.key_access.exec(u)))a.push(c[1]);else{if(null===(c=i.index_access.exec(u)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(c[1])}e[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}n=n.substring(e[0].length)}return s[t]=r}(t),arguments)}function a(t,e){return o.apply(null,[t].concat(e||[]))}var s=Object.create(null);"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(e,n,e,t))||(t.exports=r))}()},616:function(t){t.exports=function(t,e){var n,r,i=0;function o(){var o,a,s=n,u=arguments.length;t:for(;s;){if(s.args.length===arguments.length){for(a=0;a<u;a++)if(s.args[a]!==arguments[a]){s=s.next;continue t}return s!==n&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=n,s.prev=null,n.prev=s,n=s),s.val}s=s.next}for(o=new Array(u),a=0;a<u;a++)o[a]=arguments[a];return s={args:o,val:t.apply(null,o)},n?(n.prev=s,s.next=n):r=s,i===e.maxSize?(r=r.prev).next=null:i++,n=s,s.val}return e=e||{},o.clear=function(){n=null,r=null,i=0},o}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t,e,r,i,o=n(616),a=n.n(o);n(604),a()(console.error);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}t={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},e=["(","?"],r={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var c={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,n){if(t)throw e;return n}};function l(n){var o=function(n){for(var o,a,s,u,c=[],l=[];o=n.match(i);){for(a=o[0],(s=n.substr(0,o.index).trim())&&c.push(s);u=l.pop();){if(r[a]){if(r[a][0]===u){a=r[a][1]||a;break}}else if(e.indexOf(u)>=0||t[u]<t[a]){l.push(u);break}c.push(u)}r[a]||l.push(a),n=n.substr(o.index+a.length)}return(n=n.trim())&&c.push(n),c.concat(l.reverse())}(n);return function(t){return function(t,e){var n,r,i,o,a,s,u=[];for(n=0;n<t.length;n++){if(a=t[n],o=c[a]){for(r=o.length,i=Array(r);r--;)i[r]=u.pop();try{s=o.apply(null,i)}catch(t){return t}}else s=e.hasOwnProperty(a)?e[a]:+a;u.push(s)}return u[0]}(o,t)}}var p={contextDelimiter:"",onMissingKey:null};function f(t,e){var n;for(n in this.data=t,this.pluralForms={},this.options={},p)this.options[n]=void 0!==e&&n in e?e[n]:p[n]}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){var r,i,o;r=t,i=e,o=n[e],(i=u(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}f.prototype.getPluralForm=function(t,e){var n,r,i,o=this.pluralForms[t];return o||("function"!=typeof(i=(n=this.data[t][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(t){var e,n,r;for(e=t.split(";"),n=0;n<e.length;n++)if(0===(r=e[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=function(t){var e=l(t);return function(t){return+e({n:t})}}(r)),o=this.pluralForms[t]=i),o(e)},f.prototype.dcnpgettext=function(t,e,n,r,i){var o,a,s;return o=void 0===i?0:this.getPluralForm(t,i),a=n,e&&(a=e+this.options.contextDelimiter+n),(s=this.data[t][a])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,t),0===o?n:r)};var v={"":{plural_forms:function(t){return 1===t?0:1}}},m=/^i18n\.(n?gettext|has_translation)(_|$)/;var g=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var y=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var b=function(t,e){return function(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,a=t[e];if(y(n)&&g(r))if("function"==typeof i)if("number"==typeof o){var s={callback:i,priority:o,namespace:r};if(a[n]){var u,c=a[n].handlers;for(u=c.length;u>0&&!(o>=c[u-1].priority);u--);u===c.length?c[u]=s:c.splice(u,0,s),a.__current.forEach((function(t){t.name===n&&t.currentIndex>=u&&t.currentIndex++}))}else a[n]={handlers:[s],runs:0};"hookAdded"!==n&&t.doAction("hookAdded",n,r,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var x=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r,i){var o=t[e];if(y(r)&&(n||g(i))){if(!o[r])return 0;var a=0;if(n)a=o[r].handlers.length,o[r]={runs:o[r].runs,handlers:[]};else for(var s=o[r].handlers,u=function(t){s[t].namespace===i&&(s.splice(t,1),a++,o.__current.forEach((function(e){e.name===r&&e.currentIndex>=t&&e.currentIndex--})))},c=s.length-1;c>=0;c--)u(c);return"hookRemoved"!==r&&t.doAction("hookRemoved",r,i),a}}};var _=function(t,e){return function(n,r){var i=t[e];return void 0!==r?n in i&&i[n].handlers.some((function(t){return t.namespace===r})):n in i}};var w=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r){var i=t[e];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;var o=i[r].handlers;for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];if(!o||!o.length)return n?s[0]:void 0;var c={name:r,currentIndex:0};for(i.__current.push(c);c.currentIndex<o.length;){var l=o[c.currentIndex].callback.apply(null,s);n&&(s[0]=l),c.currentIndex++}return i.__current.pop(),n?s[0]:void 0}};var k=function(t,e){return function(){var n,r,i=t[e];return null!==(n=null===(r=i.__current[i.__current.length-1])||void 0===r?void 0:r.name)&&void 0!==n?n:null}};var F=function(t,e){return function(n){var r=t[e];return void 0===n?void 0!==r.__current[0]:!!r.__current[0]&&n===r.__current[0].name}};var A=function(t,e){return function(n){var r=t[e];if(y(n))return r[n]&&r[n].runs?r[n].runs:0}},S=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=b(this,"actions"),this.addFilter=b(this,"filters"),this.removeAction=x(this,"actions"),this.removeFilter=x(this,"filters"),this.hasAction=_(this,"actions"),this.hasFilter=_(this,"filters"),this.removeAllActions=x(this,"actions",!0),this.removeAllFilters=x(this,"filters",!0),this.doAction=w(this,"actions"),this.applyFilters=w(this,"filters",!0),this.currentAction=k(this,"actions"),this.currentFilter=k(this,"filters"),this.doingAction=F(this,"actions"),this.doingFilter=F(this,"filters"),this.didAction=A(this,"actions"),this.didFilter=A(this,"filters")};var E=function(){return new S}(),O=(E.addAction,E.addFilter,E.removeAction,E.removeFilter,E.hasAction,E.hasFilter,E.removeAllActions,E.removeAllFilters,E.doAction,E.applyFilters,E.currentAction,E.currentFilter,E.doingAction,E.doingFilter,E.didAction,E.didFilter,E.actions,E.filters,function(t,e,n){var r=new f({}),i=new Set,o=function(){i.forEach((function(t){return t()}))},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";r.data[e]=h(h(h({},v),r.data[e]),t),r.data[e][""]=h(h({},v[""]),r.data[e][""])},s=function(t,e){a(t,e),o()},u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return r.data[t]||a(void 0,t),r.dcnpgettext(t,e,n,i,o)},c=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},l=function(t,e,r){var i=u(r,e,t);return n?(i=n.applyFilters("i18n.gettext_with_context",i,t,e,r),n.applyFilters("i18n.gettext_with_context_"+c(r),i,t,e,r)):i};if(t&&s(t,e),n){var p=function(t){m.test(t)&&o()};n.addAction("hookAdded","core/i18n",p),n.addAction("hookRemoved","core/i18n",p)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[t]},setLocaleData:s,resetLocaleData:function(t,e){r.data={},r.pluralForms={},s(t,e)},subscribe:function(t){return i.add(t),function(){return i.delete(t)}},__:function(t,e){var r=u(e,void 0,t);return n?(r=n.applyFilters("i18n.gettext",r,t,e),n.applyFilters("i18n.gettext_"+c(e),r,t,e)):r},_x:l,_n:function(t,e,r,i){var o=u(i,void 0,t,e,r);return n?(o=n.applyFilters("i18n.ngettext",o,t,e,r,i),n.applyFilters("i18n.ngettext_"+c(i),o,t,e,r,i)):o},_nx:function(t,e,r,i,o){var a=u(o,i,t,e,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,t,e,r,i,o),n.applyFilters("i18n.ngettext_with_context_"+c(o),a,t,e,r,i,o)):a},isRTL:function(){return"rtl"===l("ltr","text direction")},hasTranslation:function(t,e,i){var o,a,s=e?e+""+t:t,u=!(null===(o=r.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[s]);return n&&(u=n.applyFilters("i18n.has_translation",u,t,e,i),u=n.applyFilters("i18n.has_translation_"+c(i),u,t,e,i)),u}}}(void 0,void 0,E)),j=(O.getLocaleData.bind(O),O.setLocaleData.bind(O),O.resetLocaleData.bind(O),O.subscribe.bind(O),O.__.bind(O));O._x.bind(O),O._n.bind(O),O._nx.bind(O),O.isRTL.bind(O),O.hasTranslation.bind(O);const I={template:document.getElementById("main-image"),stepper:document.getElementById("responsive.pixel_step"),counter:document.getElementById("responsive.breakpoints"),max:document.getElementById("responsive.max_width"),min:document.getElementById("responsive.min_width"),details:document.getElementById("preview-details"),preview:null,init(){this.preview=this.template.parentNode,this.stepper.addEventListener("change",(()=>{this.counter.value=this.rebuildPreview()})),this.counter.addEventListener("change",(()=>{this.calculateShift()})),this.max.addEventListener("change",(()=>{this.calculateShift()})),this.min.addEventListener("change",(()=>{this.calculateShift()})),this.stepper.dispatchEvent(new Event("change"))},calculateShift(){const t=this.counter.value,e=(this.max.value-this.min.value)/(t-1);this.stepper.value=Math.floor(e),this.stepper.dispatchEvent(new Event("change"))},rebuildPreview(){let t=parseInt(this.max.value),e=parseInt(this.min.value),n=parseInt(this.stepper.value);1>n&&(this.stepper.value=n=50),t||(t=parseInt(this.max.dataset.default),this.max.value=t),e||(e=100,this.min.value=e);let r=t,i=r/t*100;const o=this.makeSize(r,i);o.classList.add("main-image"),this.preview.innerHTML="",this.preview.appendChild(o);let a=1;for(;r>e&&(r-=n,!(r<e));)i=r/t*100,this.preview.appendChild(this.makeSize(r,i)),a++;return this.details.innerText=j(`With a max width of ${t}px and a minimum of ${e}px, you get a potential of ${a} images.`,"cloudinary"),a},makeSize(t,e){const n=this.template.cloneNode(!0);return n.lastChild.innerText=t+"px",n.style.width=e+"%",n.style.height=e+"%",n.id="",n.classList.remove("main-image"),n}};window.addEventListener("load",(()=>I.init()))}()}(); 1 (()=>{"use strict";var t,e,n,r;t={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},e=["(","?"],n={")":["("],":":["?","?:"]},r=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var i={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,n){if(t)throw e;return n}};function s(s){var o=function(i){for(var s,o,a,l,c=[],u=[];s=i.match(r);){for(o=s[0],(a=i.substr(0,s.index).trim())&&c.push(a);l=u.pop();){if(n[o]){if(n[o][0]===l){o=n[o][1]||o;break}}else if(e.indexOf(l)>=0||t[l]<t[o]){u.push(l);break}c.push(l)}n[o]||u.push(o),i=i.substr(s.index+o.length)}return(i=i.trim())&&c.push(i),c.concat(u.reverse())}(s);return function(t){return function(t,e){var n,r,s,o,a,l,c=[];for(n=0;n<t.length;n++){if(a=t[n],o=i[a]){for(r=o.length,s=Array(r);r--;)s[r]=c.pop();try{l=o.apply(null,s)}catch(t){return t}}else l=e.hasOwnProperty(a)?e[a]:+a;c.push(l)}return c[0]}(o,t)}}var o={contextDelimiter:"",onMissingKey:null};function a(t,e){var n;for(n in this.data=t,this.pluralForms={},this.options={},o)this.options[n]=void 0!==e&&n in e?e[n]:o[n]}a.prototype.getPluralForm=function(t,e){var n,r,i,o=this.pluralForms[t];return o||("function"!=typeof(i=(n=this.data[t][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(t){var e,n,r;for(e=t.split(";"),n=0;n<e.length;n++)if(0===(r=e[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=function(t){var e=s(t);return function(t){return+e({n:t})}}(r)),o=this.pluralForms[t]=i),o(e)},a.prototype.dcnpgettext=function(t,e,n,r,i){var s,o,a;return s=void 0===i?0:this.getPluralForm(t,i),o=n,e&&(o=e+this.options.contextDelimiter+n),(a=this.data[t][o])&&a[s]?a[s]:(this.options.onMissingKey&&this.options.onMissingKey(n,t),0===s?n:r)};var l={plural_forms:t=>1===t?0:1},c=/^i18n\.(n?gettext|has_translation)(_|$)/;var u=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var d=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var h=function(t,e){return function(n,r,i,s=10){const o=t[e];if(!d(n))return;if(!u(r))return;if("function"!=typeof i)return void console.error("The hook callback must be a function.");if("number"!=typeof s)return void console.error("If specified, the hook priority must be a number.");const a={callback:i,priority:s,namespace:r};if(o[n]){const t=o[n].handlers;let e;for(e=t.length;e>0&&!(s>=t[e-1].priority);e--);e===t.length?t[e]=a:t.splice(e,0,a),o.__current.forEach(t=>{t.name===n&&t.currentIndex>=e&&t.currentIndex++})}else o[n]={handlers:[a],runs:0};"hookAdded"!==n&&t.doAction("hookAdded",n,r,i,s)}};var p=function(t,e,n=!1){return function(r,i){const s=t[e];if(!d(r))return;if(!n&&!u(i))return;if(!s[r])return 0;let o=0;if(n)o=s[r].handlers.length,s[r]={runs:s[r].runs,handlers:[]};else{const t=s[r].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===i&&(t.splice(e,1),o++,s.__current.forEach(t=>{t.name===r&&t.currentIndex>=e&&t.currentIndex--}))}return"hookRemoved"!==r&&t.doAction("hookRemoved",r,i),o}};var f=function(t,e){return function(n,r){const i=t[e];return void 0!==r?n in i&&i[n].handlers.some(t=>t.namespace===r):n in i}};var m=function(t,e,n,r){return function(i,...s){const o=t[e];o[i]||(o[i]={handlers:[],runs:0}),o[i].runs++;const a=o[i].handlers;if(!a||!a.length)return n?s[0]:void 0;const l={name:i,currentIndex:0};return(r?async function(){try{o.__current.add(l);let t=n?s[0]:void 0;for(;l.currentIndex<a.length;){const e=a[l.currentIndex];t=await e.callback.apply(null,s),n&&(s[0]=t),l.currentIndex++}return n?t:void 0}finally{o.__current.delete(l)}}:function(){try{o.__current.add(l);let t=n?s[0]:void 0;for(;l.currentIndex<a.length;){t=a[l.currentIndex].callback.apply(null,s),n&&(s[0]=t),l.currentIndex++}return n?t:void 0}finally{o.__current.delete(l)}})()}};var v=function(t,e){return function(){const n=t[e],r=Array.from(n.__current);return r.at(-1)?.name??null}};var y=function(t,e){return function(n){const r=t[e];return void 0===n?r.__current.size>0:Array.from(r.__current).some(t=>t.name===n)}};var _=function(t,e){return function(n){const r=t[e];if(d(n))return r[n]&&r[n].runs?r[n].runs:0}},g=class{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=h(this,"actions"),this.addFilter=h(this,"filters"),this.removeAction=p(this,"actions"),this.removeFilter=p(this,"filters"),this.hasAction=f(this,"actions"),this.hasFilter=f(this,"filters"),this.removeAllActions=p(this,"actions",!0),this.removeAllFilters=p(this,"filters",!0),this.doAction=m(this,"actions",!1,!1),this.doActionAsync=m(this,"actions",!1,!0),this.applyFilters=m(this,"filters",!0,!1),this.applyFiltersAsync=m(this,"filters",!0,!0),this.currentAction=v(this,"actions"),this.currentFilter=v(this,"filters"),this.doingAction=y(this,"actions"),this.doingFilter=y(this,"filters"),this.didAction=_(this,"actions"),this.didFilter=_(this,"filters")}};var A=function(){return new g}(),{addAction:x,addFilter:F,removeAction:b,removeFilter:w,hasAction:I,hasFilter:k,removeAllActions:E,removeAllFilters:L,doAction:T,doActionAsync:S,applyFilters:D,applyFiltersAsync:z,currentAction:P,currentFilter:B,doingAction:$,doingFilter:M,didAction:O,didFilter:R,actions:Z,filters:C}=A,K=((t,e,n)=>{const r=new a({}),i=new Set,s=()=>{i.forEach(t=>t())},o=(t,e="default")=>{r.data[e]={...r.data[e],...t},r.data[e][""]={...l,...r.data[e]?.[""]},delete r.pluralForms[e]},u=(t,e)=>{o(t,e),s()},d=(t="default",e,n,i,s)=>(r.data[t]||o(void 0,t),r.dcnpgettext(t,e,n,i,s)),h=t=>t||"default",p=(t,e,r)=>{let i=d(r,e,t);return n?(i=n.applyFilters("i18n.gettext_with_context",i,t,e,r),n.applyFilters("i18n.gettext_with_context_"+h(r),i,t,e,r)):i};if(t&&u(t,e),n){const t=t=>{c.test(t)&&s()};n.addAction("hookAdded","core/i18n",t),n.addAction("hookRemoved","core/i18n",t)}return{getLocaleData:(t="default")=>r.data[t],setLocaleData:u,addLocaleData:(t,e="default")=>{r.data[e]={...r.data[e],...t,"":{...l,...r.data[e]?.[""],...t?.[""]}},delete r.pluralForms[e],s()},resetLocaleData:(t,e)=>{r.data={},r.pluralForms={},u(t,e)},subscribe:t=>(i.add(t),()=>i.delete(t)),__:(t,e)=>{let r=d(e,void 0,t);return n?(r=n.applyFilters("i18n.gettext",r,t,e),n.applyFilters("i18n.gettext_"+h(e),r,t,e)):r},_x:p,_n:(t,e,r,i)=>{let s=d(i,void 0,t,e,r);return n?(s=n.applyFilters("i18n.ngettext",s,t,e,r,i),n.applyFilters("i18n.ngettext_"+h(i),s,t,e,r,i)):s},_nx:(t,e,r,i,s)=>{let o=d(s,i,t,e,r);return n?(o=n.applyFilters("i18n.ngettext_with_context",o,t,e,r,i,s),n.applyFilters("i18n.ngettext_with_context_"+h(s),o,t,e,r,i,s)):o},isRTL:()=>"rtl"===p("ltr","text direction"),hasTranslation:(t,e,i)=>{const s=e?e+""+t:t;let o=!!r.data?.[i??"default"]?.[s];return n&&(o=n.applyFilters("i18n.has_translation",o,t,e,i),o=n.applyFilters("i18n.has_translation_"+h(i),o,t,e,i)),o}}})(void 0,void 0,A),j=(K.getLocaleData.bind(K),K.setLocaleData.bind(K),K.resetLocaleData.bind(K),K.subscribe.bind(K),K.__.bind(K));K._x.bind(K),K._n.bind(K),K._nx.bind(K),K.isRTL.bind(K),K.hasTranslation.bind(K);const N={template:document.getElementById("main-image"),stepper:document.getElementById("responsive.pixel_step"),counter:document.getElementById("responsive.breakpoints"),max:document.getElementById("responsive.max_width"),min:document.getElementById("responsive.min_width"),details:document.getElementById("preview-details"),preview:null,init(){this.preview=this.template.parentNode,this.stepper.addEventListener("change",()=>{this.counter.value=this.rebuildPreview()}),this.counter.addEventListener("change",()=>{this.calculateShift()}),this.max.addEventListener("change",()=>{this.calculateShift()}),this.min.addEventListener("change",()=>{this.calculateShift()}),this.stepper.dispatchEvent(new Event("change"))},calculateShift(){const t=this.counter.value,e=(this.max.value-this.min.value)/(t-1);this.stepper.value=Math.floor(e),this.stepper.dispatchEvent(new Event("change"))},rebuildPreview(){let t=parseInt(this.max.value),e=parseInt(this.min.value),n=parseInt(this.stepper.value);1>n&&(this.stepper.value=n=50),t||(t=parseInt(this.max.dataset.default),this.max.value=t),e||(e=100,this.min.value=e);let r=t,i=r/t*100;const s=this.makeSize(r,i);s.classList.add("main-image"),this.preview.innerHTML="",this.preview.appendChild(s);let o=1;for(;r>e&&(r-=n,!(r<e));)i=r/t*100,this.preview.appendChild(this.makeSize(r,i)),o++;return this.details.innerText=j(`With a max width of ${t}px and a minimum of ${e}px, you get a potential of ${o} images.`,"cloudinary"),o},makeSize(t,e){const n=this.template.cloneNode(!0);return n.lastChild.innerText=t+"px",n.style.width=e+"%",n.style.height=e+"%",n.id="",n.classList.remove("main-image"),n}};window.addEventListener("load",()=>N.init())})(); 2 //# sourceMappingURL=breakpoints-preview.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/cloudinary.js
r3454408 r3518458 1 !function(){var t={544:function(){!function(){const t=function(){const t=jQuery("#field-video_player").val(),e=jQuery("#field-video_controls").prop("checked"),i=jQuery('#field-video_autoplay_mode option[value="off"]');"cld"!==t||e?i.prop("disabled",!1):(i.prop("disabled",!0),i.prop("selected")&&i.next().prop("selected",!0))};t(),jQuery(document).on("change","#field-video_player",t),jQuery(document).on("change","#field-video_controls",t),jQuery(document).ready((function(t){t.isFunction(t.fn.wpColorPicker)&&t(".regular-color").wpColorPicker(),t(document).on("tabs.init",(function(){const e=t(".settings-tab-trigger"),i=t(".settings-tab-section");t(this).on("click",".settings-tab-trigger",(function(n){const r=t(this),o=t(r.attr("href"));n.preventDefault(),e.removeClass("active"),i.removeClass("active"),r.addClass("active"),o.addClass("active"),t(document).trigger("settings.tabbed",r)})),t(".cld-field").not('[data-condition="false"]').each((function(){const e=t(this),i=e.data("condition");for(const n in i){let r=t("#field-"+n);const o=i[n],s=e.closest("tr");r.length||(r=t(`[id^=field-${n}-]`));let a=!1;r.on("change init",(function(t,e=!1){if(a&&e)return;let i=this.value===o||this.checked;if(Array.isArray(o)&&2===o.length)switch(o[1]){case"neq":i=this.value!==o[0];break;case"gt":i=this.value>o[0];break;case"lt":i=this.value<o[0]}i?s.show():s.hide(),a=!0})),r.trigger("init",!0)}})),t("#field-cloudinary_url").on("input change",(function(){const e=t(this),i=e.val();new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d)*[:]{1}[^:@]*[@]{1}[^@]*$/g).test(i)?(e.addClass("settings-valid-field"),e.removeClass("settings-invalid-field")):(e.removeClass("settings-valid-field"),e.addClass("settings-invalid-field"))})).trigger("change"),t('[name="cloudinary_sync_media[auto_sync]"]').change((function(){"on"===t(this).val()&&t("#auto-sync-alert-btn").click()}))})),t(".render-trigger[data-event]").each((function(){const e=t(this),i=e.data("event");e.trigger(i,this)}))}))}(window,jQuery)},604:function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return function(t,e){var i,n,s,a,c,l,h,u,d,f=1,p=t.length,g="";for(n=0;n<p;n++)if("string"==typeof t[n])g+=t[n];else if("object"==typeof t[n]){if((a=t[n]).keys)for(i=e[f],s=0;s<a.keys.length;s++){if(null==i)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[s],a.keys[s-1]));i=i[a.keys[s]]}else i=a.param_no?e[a.param_no]:e[f++];if(r.not_type.test(a.type)&&r.not_primitive.test(a.type)&&i instanceof Function&&(i=i()),r.numeric_arg.test(a.type)&&"number"!=typeof i&&isNaN(i))throw new TypeError(o("[sprintf] expecting number but found %T",i));switch(r.number.test(a.type)&&(u=i>=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),l=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,c=a.width&&h>0?l.repeat(h):"",g+=a.align?d+i+c:"0"===l?d+c+i:c+d+i)}return g}(function(t){if(a[t])return a[t];var e,i=t,n=[],o=0;for(;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],c=e[2],l=[];if(null===(l=r.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(l[1]);""!==(c=c.substring(l[0].length));)if(null!==(l=r.key_access.exec(c)))s.push(l[1]);else{if(null===(l=r.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(l[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return a[t]=n}(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}var a=Object.create(null);"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},616:function(t){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,c=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s<c;s++)if(a.args[s]!==arguments[s]){a=a.next;continue t}return a!==i&&(a===n&&(n=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=i,a.prev=null,i.prev=a,i=a),a.val}a=a.next}for(o=new Array(c),s=0;s<c;s++)o[s]=arguments[s];return a={args:o,val:t.apply(null,o)},i?(i.prev=a,a.next=i):n=a,r===e.maxSize?(n=n.prev).next=null:r++,i=a,a.val}return e=e||{},o.clear=function(){i=null,n=null,r=0},o}},617:function(){!function(){"use strict";var t,e,i={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},n="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,r="onscroll"in window;function o(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach((function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))})),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function s(e){var i=document.createElement("div");for(i.innerHTML=function(e){var i=e.textContent||e.innerHTML,o="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((i.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((i.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!n&&r&&(void 0===t?i=i.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===e.parentNode.tagName.toLowerCase()&&(i='<source srcset="'+o+'" data-lazy-remove="true"></source>'+i),i=i.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+o+'" data-lazy-src='))),i}(e);i.firstChild;)n||!r||void 0===t||!i.firstChild.tagName||"img"!==i.firstChild.tagName.toLowerCase()&&"iframe"!==i.firstChild.tagName.toLowerCase()||t.observe(i.firstChild),e.parentNode.insertBefore(i.firstChild,e);e.parentNode.removeChild(e)}function a(){document.querySelectorAll("noscript.loading-lazy").forEach(s),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(t){t.matches&&document.querySelectorAll(i.lazyImage+"[data-lazy-src],"+i.lazyIframe+"[data-lazy-src]").forEach((function(t){o(t)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(t=new IntersectionObserver((function(t,e){t.forEach((function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),o(i)}}))}),i)),e="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?e(a):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){e(a)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&a()}))}()},633:function(t,e,i){var n=i(738).default;function r(){"use strict";t.exports=r=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var e,i={},o=Object.prototype,s=o.hasOwnProperty,a=Object.defineProperty||function(t,e,i){t[e]=i.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",h=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function d(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(e){d=function(t,e,i){return t[e]=i}}function f(t,e,i,n){var r=e&&e.prototype instanceof x?e:x,o=Object.create(r.prototype),s=new D(n||[]);return a(o,"_invoke",{value:T(t,i,s)}),o}function p(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}i.wrap=f;var g="suspendedStart",m="suspendedYield",b="executing",v="completed",y={};function x(){}function _(){}function w(){}var k={};d(k,l,(function(){return this}));var O=Object.getPrototypeOf,S=O&&O(O(j([])));S&&S!==o&&s.call(S,l)&&(k=S);var M=w.prototype=x.prototype=Object.create(k);function E(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function i(r,o,a,c){var l=p(t[r],t,o);if("throw"!==l.type){var h=l.arg,u=h.value;return u&&"object"==n(u)&&s.call(u,"__await")?e.resolve(u.__await).then((function(t){i("next",t,a,c)}),(function(t){i("throw",t,a,c)})):e.resolve(u).then((function(t){h.value=t,a(h)}),(function(t){return i("throw",t,a,c)}))}c(l.arg)}var r;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,r){i(t,n,e,r)}))}return r=r?r.then(o,o):o()}})}function T(t,i,n){var r=g;return function(o,s){if(r===b)throw Error("Generator is already running");if(r===v){if("throw"===o)throw s;return{value:e,done:!0}}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var c=L(a,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===g)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=b;var l=p(t,i,n);if("normal"===l.type){if(r=n.done?v:m,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=v,n.method="throw",n.arg=l.arg)}}}function L(t,i){var n=i.method,r=t.iterator[n];if(r===e)return i.delegate=null,"throw"===n&&t.iterator.return&&(i.method="return",i.arg=e,L(t,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=p(r,t.iterator,i.arg);if("throw"===o.type)return i.method="throw",i.arg=o.arg,i.delegate=null,y;var s=o.arg;return s?s.done?(i[t.resultName]=s.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,y):s:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,y)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function j(t){if(t||""===t){var i=t[l];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function i(){for(;++r<t.length;)if(s.call(t,r))return i.value=t[r],i.done=!1,i;return i.value=e,i.done=!0,i};return o.next=o}}throw new TypeError(n(t)+" is not iterable")}return _.prototype=w,a(M,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=d(w,u,"GeneratorFunction"),i.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,d(t,u,"GeneratorFunction")),t.prototype=Object.create(M),t},i.awrap=function(t){return{__await:t}},E(P.prototype),d(P.prototype,h,(function(){return this})),i.AsyncIterator=P,i.async=function(t,e,n,r,o){void 0===o&&(o=Promise);var s=new P(f(t,e,n,r),o);return i.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},E(M),d(M,u,"Generator"),d(M,l,(function(){return this})),d(M,"toString",(function(){return"[object Generator]"})),i.keys=function(t){var e=Object(t),i=[];for(var n in e)i.push(n);return i.reverse(),function t(){for(;i.length;){var n=i.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},i.values=j,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var i in this)"t"===i.charAt(0)&&s.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function n(n,r){return a.type="throw",a.arg=t,i.next=n,r&&(i.method="next",i.arg=e),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=s.call(o,"catchLoc"),l=s.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=t,o.arg=e,r?(this.method="next",this.next=r.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),C(i),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;C(i)}return r}}throw Error("illegal catch attempt")},delegateYield:function(t,i,n){return this.delegate={iterator:j(t),resultName:i,nextLoc:n},"next"===this.method&&(this.arg=e),y}},i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},712:function(){const t=document.querySelector(".cloudinary-collapsible__toggle");t&&t.addEventListener("click",(function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))}))},738:function(t){function e(i){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},756:function(t,e,i){var n=i(633)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},941:function(t,e,i){var n;t.exports=function(){function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=i[s]={exports:{}};e[s][0].call(l.exports,(function(t){return r(e[s][1][t]||t)}),l,l.exports,t,e,i,n)}return i[s].exports}for(var o=void 0,s=0;s<n.length;s++)r(n[s]);return r}return t}()({1:[function(t,e,n){(function(t){(function(){var i=200,r="__lodash_hash_undefined__",o=800,s=16,a=9007199254740991,c="[object Arguments]",l="[object Array]",h="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",m="[object Map]",b="[object Number]",v="[object Null]",y="[object Object]",x="[object Proxy]",_="[object RegExp]",w="[object Set]",k="[object String]",O="[object Undefined]",S="[object WeakMap]",M="[object ArrayBuffer]",E="[object DataView]",P="[object Float64Array]",T="[object Int8Array]",L="[object Int16Array]",A="[object Int32Array]",C="[object Uint8Array]",D="[object Uint8ClampedArray]",j="[object Uint16Array]",I="[object Uint32Array]",R=/[\\^$.*+?()[\]{}|]/g,F=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,N={};N["[object Float32Array]"]=N[P]=N[T]=N[L]=N[A]=N[C]=N[D]=N[j]=N[I]=!0,N[c]=N[l]=N[M]=N[u]=N[E]=N[d]=N[f]=N[p]=N[m]=N[b]=N[y]=N[_]=N[w]=N[k]=N[S]=!1;var B="object"==typeof t&&t&&t.Object===Object&&t,W="object"==typeof self&&self&&self.Object===Object&&self,V=B||W||Function("return this")(),H="object"==typeof n&&n&&!n.nodeType&&n,$=H&&"object"==typeof e&&e&&!e.nodeType&&e,U=$&&$.exports===H,q=U&&B.process,Y=function(){try{var t=$&&$.require&&$.require("util").types;return t||q&&q.binding&&q.binding("util")}catch(t){}}(),X=Y&&Y.isTypedArray;function G(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}function K(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n}function J(t){return function(e){return t(e)}}function Q(t,e){return null==t?void 0:t[e]}function Z(t,e){return function(i){return t(e(i))}}var tt,et=Array.prototype,it=Function.prototype,nt=Object.prototype,rt=V["__core-js_shared__"],ot=it.toString,st=nt.hasOwnProperty,at=(tt=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||""))?"Symbol(src)_1."+tt:"",ct=nt.toString,lt=ot.call(Object),ht=RegExp("^"+ot.call(st).replace(R,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ut=U?V.Buffer:void 0,dt=V.Symbol,ft=V.Uint8Array,pt=ut?ut.allocUnsafe:void 0,gt=Z(Object.getPrototypeOf,Object),mt=Object.create,bt=nt.propertyIsEnumerable,vt=et.splice,yt=dt?dt.toStringTag:void 0,xt=function(){try{var t=ye(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),_t=ut?ut.isBuffer:void 0,wt=Math.max,kt=Date.now,Ot=ye(V,"Map"),St=ye(Object,"create"),Mt=function(){function t(){}return function(e){if(!Ve(e))return{};if(mt)return mt(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();function Et(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function Pt(){this.__data__=St?St(null):{},this.size=0}function Tt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Lt(t){var e=this.__data__;if(St){var i=e[t];return i===r?void 0:i}return st.call(e,t)?e[t]:void 0}function At(t){var e=this.__data__;return St?void 0!==e[t]:st.call(e,t)}function Ct(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=St&&void 0===e?r:e,this}function Dt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function jt(){this.__data__=[],this.size=0}function It(t){var e=this.__data__,i=te(e,t);return!(i<0||(i==e.length-1?e.pop():vt.call(e,i,1),--this.size,0))}function Rt(t){var e=this.__data__,i=te(e,t);return i<0?void 0:e[i][1]}function Ft(t){return te(this.__data__,t)>-1}function zt(t,e){var i=this.__data__,n=te(i,t);return n<0?(++this.size,i.push([t,e])):i[n][1]=e,this}function Nt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function Bt(){this.size=0,this.__data__={hash:new Et,map:new(Ot||Dt),string:new Et}}function Wt(t){var e=ve(this,t).delete(t);return this.size-=e?1:0,e}function Vt(t){return ve(this,t).get(t)}function Ht(t){return ve(this,t).has(t)}function $t(t,e){var i=ve(this,t),n=i.size;return i.set(t,e),this.size+=i.size==n?0:1,this}function Ut(t){var e=this.__data__=new Dt(t);this.size=e.size}function qt(){this.__data__=new Dt,this.size=0}function Yt(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function Xt(t){return this.__data__.get(t)}function Gt(t){return this.__data__.has(t)}function Kt(t,e){var n=this.__data__;if(n instanceof Dt){var r=n.__data__;if(!Ot||r.length<i-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Nt(r)}return n.set(t,e),this.size=n.size,this}function Jt(t,e){var i=Re(t),n=!i&&Ie(t),r=!i&&!n&&Ne(t),o=!i&&!n&&!r&&Ue(t),s=i||n||r||o,a=s?K(t.length,String):[],c=a.length;for(var l in t)!e&&!st.call(t,l)||s&&("length"==l||r&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||we(l,c))||a.push(l);return a}function Qt(t,e,i){(void 0!==i&&!je(t[e],i)||void 0===i&&!(e in t))&&ee(t,e,i)}function Zt(t,e,i){var n=t[e];st.call(t,e)&&je(n,i)&&(void 0!==i||e in t)||ee(t,e,i)}function te(t,e){for(var i=t.length;i--;)if(je(t[i][0],e))return i;return-1}function ee(t,e,i){"__proto__"==e&&xt?xt(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}Et.prototype.clear=Pt,Et.prototype.delete=Tt,Et.prototype.get=Lt,Et.prototype.has=At,Et.prototype.set=Ct,Dt.prototype.clear=jt,Dt.prototype.delete=It,Dt.prototype.get=Rt,Dt.prototype.has=Ft,Dt.prototype.set=zt,Nt.prototype.clear=Bt,Nt.prototype.delete=Wt,Nt.prototype.get=Vt,Nt.prototype.has=Ht,Nt.prototype.set=$t,Ut.prototype.clear=qt,Ut.prototype.delete=Yt,Ut.prototype.get=Xt,Ut.prototype.has=Gt,Ut.prototype.set=Kt;var ie=be();function ne(t){return null==t?void 0===t?O:v:yt&&yt in Object(t)?xe(t):Pe(t)}function re(t){return He(t)&&ne(t)==c}function oe(t){return!(!Ve(t)||Se(t))&&(Be(t)?ht:F).test(De(t))}function se(t){return He(t)&&We(t.length)&&!!N[ne(t)]}function ae(t){if(!Ve(t))return Ee(t);var e=Me(t),i=[];for(var n in t)("constructor"!=n||!e&&st.call(t,n))&&i.push(n);return i}function ce(t,e,i,n,r){t!==e&&ie(e,(function(o,s){if(r||(r=new Ut),Ve(o))le(t,e,s,i,ce,n,r);else{var a=n?n(Le(t,s),o,s+"",t,e,r):void 0;void 0===a&&(a=o),Qt(t,s,a)}}),Ye)}function le(t,e,i,n,r,o,s){var a=Le(t,i),c=Le(e,i),l=s.get(c);if(l)Qt(t,i,l);else{var h=o?o(a,c,i+"",t,e,s):void 0,u=void 0===h;if(u){var d=Re(c),f=!d&&Ne(c),p=!d&&!f&&Ue(c);h=c,d||f||p?Re(a)?h=a:ze(a)?h=pe(a):f?(u=!1,h=ue(c,!0)):p?(u=!1,h=fe(c,!0)):h=[]:$e(c)||Ie(c)?(h=a,Ie(a)?h=qe(a):Ve(a)&&!Be(a)||(h=_e(c))):u=!1}u&&(s.set(c,h),r(h,c,n,o,s),s.delete(c)),Qt(t,i,h)}}function he(t,e){return Ae(Te(t,e,Ke),t+"")}function ue(t,e){if(e)return t.slice();var i=t.length,n=pt?pt(i):new t.constructor(i);return t.copy(n),n}function de(t){var e=new t.constructor(t.byteLength);return new ft(e).set(new ft(t)),e}function fe(t,e){var i=e?de(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function pe(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i<n;)e[i]=t[i];return e}function ge(t,e,i,n){var r=!i;i||(i={});for(var o=-1,s=e.length;++o<s;){var a=e[o],c=n?n(i[a],t[a],a,i,t):void 0;void 0===c&&(c=t[a]),r?ee(i,a,c):Zt(i,a,c)}return i}function me(t){return he((function(e,i){var n=-1,r=i.length,o=r>1?i[r-1]:void 0,s=r>2?i[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&ke(i[0],i[1],s)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=i[n];a&&t(e,a,n,o)}return e}))}function be(t){return function(e,i,n){for(var r=-1,o=Object(e),s=n(e),a=s.length;a--;){var c=s[t?a:++r];if(!1===i(o[c],c,o))break}return e}}function ve(t,e){var i=t.__data__;return Oe(e)?i["string"==typeof e?"string":"hash"]:i.map}function ye(t,e){var i=Q(t,e);return oe(i)?i:void 0}function xe(t){var e=st.call(t,yt),i=t[yt];try{t[yt]=void 0;var n=!0}catch(t){}var r=ct.call(t);return n&&(e?t[yt]=i:delete t[yt]),r}function _e(t){return"function"!=typeof t.constructor||Me(t)?{}:Mt(gt(t))}function we(t,e){var i=typeof t;return!!(e=null==e?a:e)&&("number"==i||"symbol"!=i&&z.test(t))&&t>-1&&t%1==0&&t<e}function ke(t,e,i){if(!Ve(i))return!1;var n=typeof e;return!!("number"==n?Fe(i)&&we(e,i.length):"string"==n&&e in i)&&je(i[e],t)}function Oe(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Se(t){return!!at&&at in t}function Me(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||nt)}function Ee(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}function Pe(t){return ct.call(t)}function Te(t,e,i){return e=wt(void 0===e?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=wt(n.length-e,0),s=Array(o);++r<o;)s[r]=n[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=n[r];return a[e]=i(s),G(t,this,a)}}function Le(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ae=Ce(xt?function(t,e){return xt(t,"toString",{configurable:!0,enumerable:!1,value:Ge(e),writable:!0})}:Ke);function Ce(t){var e=0,i=0;return function(){var n=kt(),r=s-(n-i);if(i=n,r>0){if(++e>=o)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function De(t){if(null!=t){try{return ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function je(t,e){return t===e||t!=t&&e!=e}var Ie=re(function(){return arguments}())?re:function(t){return He(t)&&st.call(t,"callee")&&!bt.call(t,"callee")},Re=Array.isArray;function Fe(t){return null!=t&&We(t.length)&&!Be(t)}function ze(t){return He(t)&&Fe(t)}var Ne=_t||Je;function Be(t){if(!Ve(t))return!1;var e=ne(t);return e==p||e==g||e==h||e==x}function We(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}function Ve(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function He(t){return null!=t&&"object"==typeof t}function $e(t){if(!He(t)||ne(t)!=y)return!1;var e=gt(t);if(null===e)return!0;var i=st.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&ot.call(i)==lt}var Ue=X?J(X):se;function qe(t){return ge(t,Ye(t))}function Ye(t){return Fe(t)?Jt(t,!0):ae(t)}var Xe=me((function(t,e,i){ce(t,e,i)}));function Ge(t){return function(){return t}}function Ke(t){return t}function Je(){return!1}e.exports=Xe}).call(this)}).call(this,void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,i){var r,o;r=self,o=function(){return function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return ae},Tweenable:function(){return St},interpolate:function(){return ee},processTweens:function(){return bt},setBezierFunction:function(){return H},shouldScheduleUpdate:function(){return xt},tween:function(){return Mt},unsetBezierFunction:function(){return $}});var n={};i.r(n),i.d(n,{bounce:function(){return I},bouncePast:function(){return R},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return P},easeInCirc:function(){return O},easeInCubic:function(){return l},easeInExpo:function(){return _},easeInOutBack:function(){return L},easeInOutCirc:function(){return M},easeInOutCubic:function(){return u},easeInOutExpo:function(){return k},easeInOutQuad:function(){return c},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return T},easeOutBounce:function(){return E},easeOutCirc:function(){return S},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return N},elastic:function(){return A},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return C},swingTo:function(){return j}});var r={};i.r(r),i.d(r,{afterTween:function(){return Gt},beforeTween:function(){return Xt},doesApply:function(){return qt},tweenCreated:function(){return Yt}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},c=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},l=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},O=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},T=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},L=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},A=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},C=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},j=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function B(t,e,i,n,r,o){var s,a,c,l,h,u=0,d=0,f=0,p=function(t){return((u*t+d)*t+f)*t},g=function(t){return(3*u*t+2*d)*t+f},m=function(t){return t>=0?t:0-t};return u=1-(f=3*e)-(d=3*(n-e)-f),c=1-(h=3*i)-(l=3*(r-i)-h),s=t,a=function(t){return 1/(200*t)}(o),function(t){return((c*t+l)*t+h)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=p(r)-t,m(o)<e)return r;if(s=g(r),m(s)<1e-6)break;r-=o/s}if((r=t)<(i=0))return i;if(r>(n=1))return n;for(;i<n;){if(o=p(r),m(o-t)<e)return r;t>o?i=r:n=r,r=.5*(n-i)+i}return r}(s,a))}var W,V=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.25,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.25,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.75,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.75;return function(r){return B(r,t,e,i,n,1)}},H=function(t,e,i,n,r){var o=V(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,St.formulas[t]=o},$=function(t){return delete St.formulas[t]};function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function q(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}function X(t){return function(t){if(Array.isArray(t))return G(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?G(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function K(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function J(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?K(Object(i),!0).forEach((function(e){Q(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):K(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Q(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Z,tt,et,it="linear",nt="undefined"!=typeof window?window:i.g,rt="afterTween",ot="afterTweenEnd",st="beforeTween",at="tweenCreated",ct="function",lt="string",ht=nt.requestAnimationFrame||nt.webkitRequestAnimationFrame||nt.oRequestAnimationFrame||nt.msRequestAnimationFrame||nt.mozCancelRequestAnimationFrame&&nt.mozRequestAnimationFrame||setTimeout,ut=function(){},dt=null,ft=null,pt=J({},n),gt=function(t,e,i,n,r,o,s){var a,c,l,h=t<o?0:(t-o)/r,u=!1;for(var d in s&&s.call&&(u=!0,a=s(h)),e)u||(a=((c=s[d]).call?c:pt[c])(h)),l=i[d],e[d]=l+(n[d]-l)*a;return e},mt=function(t,e){var i=t._timestamp,n=t._currentState,r=t._delay;if(!(e<i+r)){var o=t._duration,s=t._targetState,a=i+r+o,c=e>a?a:e;t._hasEnded=c>=a;var l=o-(a-c),h=t._filters.length>0;if(t._hasEnded)return t._render(s,t._data,l),t.stop(!0);h&&t._applyFilter(st),c<i+r?i=o=c=1:i+=r,gt(c,n,t._originalState,s,o,i,t._easing),h&&t._applyFilter(rt),t._render(n,t._data,l)}},bt=function(){for(var t,e=St.now(),i=dt;i;)t=i._next,mt(i,e),i=t},vt=Date.now||function(){return+new Date},yt=!1,xt=function(t){t&&yt||(yt=t,t&&_t())},_t=function t(){Z=vt(),yt&&ht.call(nt,t,16.666666666666668),bt()},wt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:it,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Array.isArray(e))return V.apply(void 0,X(e));var n=Y(e);if(pt[e])return pt[e];if(n===lt||n===ct)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||it;return i},kt=function(t){t===dt?(dt=t._next)?dt._previous=null:ft=null:t===ft?(ft=t._previous)?ft._next=null:dt=null:(tt=t._previous,et=t._next,tt._next=et,et._previous=tt),t._previous=t._next=null},Ot="function"==typeof Promise?Promise:null;W=Symbol.toStringTag;var St=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;U(this,t),Q(this,W,"Promise"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=ut,this._render=ut,this._promiseCtor=Ot,i&&this.setConfig(i)}var e;return e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?ut:s,c=i.finish,l=i.render,h=void 0===l?this._config.step||ut:l,u=i.step,d=void 0===u?ut:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,c&&(this._resolve=c);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in f)m[y]=f[y];var x=!1;for(var _ in m){var w=m[_];x||Y(w)!==lt||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=wt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(at)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor((function(t,e){i._resolve=t,i._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"finally",value:function(t){return this.then().finally(t)}},{key:"get",value:function(){return J({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,kt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===dt?(dt=this,ft=this):(this._previous=ft,ft._next=this,ft=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,mt(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,kt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(st),gt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(rt),this._applyFilter(ot))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"hasEnded",value:function(){return this._hasEnded}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=J({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}],e&&q(t.prototype,e),t}();function Mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new St;return e.tween(t),e.tweenable=e,e}Q(St,"now",(function(){return Z})),Q(St,"setScheduleFunction",(function(t){return ht=t})),Q(St,"filters",{}),Q(St,"formulas",pt),xt(!0);var Et,Pt,Tt=/(\d|-|\.)/,Lt=/([^\-0-9.]+)/g,At=/[0-9.-]+/g,Ct=(Et=At.source,Pt=/,\s*/.source,new RegExp("rgba?\\(".concat(Et).concat(Pt).concat(Et).concat(Pt).concat(Et,"(").concat(Pt).concat(Et,")?\\)"),"g")),Dt=/^.*\(/,jt=/#([0-9]|[a-f]){3,6}/gi,It="VAL",Rt=function(t,e){return t.map((function(t,i){return"_".concat(e,"_").concat(i)}))};function Ft(t){return parseInt(t,16)}var zt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Ft(e.substr(0,2)),Ft(e.substr(2,2)),Ft(e.substr(4,2))]).join(","),")");var e},Nt=function(t,e,i){var n=e.match(t),r=e.replace(t,It);return n&&n.forEach((function(t){return r=r.replace(It,i(t))})),r},Bt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(jt)&&(t[e]=Nt(jt,i,zt))}},Wt=function(t){var e=t.match(At),i=e.slice(0,3).map(Math.floor),n=t.match(Dt)[0];if(3===e.length)return"".concat(n).concat(i.join(","),")");if(4===e.length)return"".concat(n).concat(i.join(","),",").concat(e[3],")");throw new Error("Invalid rgbChunk: ".concat(t))},Vt=function(t){return t.match(At)},Ht=function(t,e){var i={};return e.forEach((function(e){i[e]=t[e],delete t[e]})),i},$t=function(t,e){return e.map((function(e){return t[e]}))},Ut=function(t,e){return e.forEach((function(e){return t=t.replace(It,+e.toFixed(4))})),t},qt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Yt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Bt),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(Lt),i?(1===i.length||e.charAt(0).match(Tt))&&i.unshift(""):i=["",""],i.join(It)),chunkNames:Rt(Vt(o),r)})}return n}(e)}function Xt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach((function(e,i){return t[e]=o[i]||s}))}else n.forEach((function(e){return t[e]=r}));delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach((function(t){return function(t,e){var i=function(i){Vt(t[i]).forEach((function(n,r){return t[e[i].chunkNames[r]]=+n})),delete t[i]};for(var n in e)i(n)}(t,o)}))}function Gt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach((function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=Ut(o,$t(Ht(t,r),r));t[i]=Nt(Ct,s,Wt)}}(t,o)})),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map((function(e){var i=t[e];return delete t[e],i})).join(" "):r}}(r,o)}function Kt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Jt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Kt(Object(i),!0).forEach((function(e){Qt(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Kt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Qt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Zt=new St,te=St.filters,ee=function(t,e,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=Jt({},t),s=wt(t,n);for(var a in Zt._filters.length=0,Zt.set({}),Zt._currentState=o,Zt._originalState=t,Zt._targetState=e,Zt._easing=s,te)te[a].doesApply(Zt)&&Zt._filters.push(te[a]);Zt._applyFilter("tweenCreated"),Zt._applyFilter("beforeTween");var c=gt(i,o,t,e,1,r,s);return Zt._applyFilter("afterTween"),c};function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function ne(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function re(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function oe(t,e){var i=e.get(t);if(!i)throw new TypeError("attempted to get private field on non-instance");return i.get?i.get.call(t):i.value}var se=new WeakMap,ae=function(){function t(){ne(this,t),se.set(this,{writable:!0,value:[]});for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];i.forEach(this.add.bind(this))}var e;return(e=[{key:"add",value:function(t){return oe(this,se).push(t),t}},{key:"remove",value:function(t){var e=oe(this,se).indexOf(t);return~e&&oe(this,se).splice(e,1),t}},{key:"empty",value:function(){return this.tweenables.map(this.remove.bind(this))}},{key:"isPlaying",value:function(){return oe(this,se).some((function(t){return t.isPlaying()}))}},{key:"play",value:function(){return oe(this,se).forEach((function(t){return t.tween()})),this}},{key:"pause",value:function(){return oe(this,se).forEach((function(t){return t.pause()})),this}},{key:"resume",value:function(){return this.playingTweenables.forEach((function(t){return t.resume()})),this}},{key:"stop",value:function(t){return oe(this,se).forEach((function(e){return e.stop(t)})),this}},{key:"tweenables",get:function(){return function(t){if(Array.isArray(t))return ie(t)}(t=oe(this,se))||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ie(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ie(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var t}},{key:"playingTweenables",get:function(){return oe(this,se).filter((function(t){return!t.hasEnded()}))}},{key:"promises",get:function(){return oe(this,se).map((function(t){return t.then()}))}}])&&re(t.prototype,e),t}();St.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},"object"==typeof i&&"object"==typeof e?e.exports=o():"function"==typeof n&&n.amd?n("shifty",[],o):"object"==typeof i?i.shifty=o():r.shifty=o()},{}],3:[function(t,e,i){var n=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};o.prototype=new n,o.prototype.constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":8,"./utils":10}],4:[function(t,e,i){var n=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate=e.vertical?"M {center},100 L {center},0":"M 0,{center} L 100,{center}",n.apply(this,arguments)};o.prototype=new n,o.prototype.constructor=o,o.prototype._initializeSvg=function(t,e){var i=e.vertical?"0 0 "+e.strokeWidth+" 100":"0 0 100 "+e.strokeWidth;t.setAttribute("viewBox",i),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":8,"./utils":10}],5:[function(t,e,i){e.exports={Line:t("./line"),Circle:t("./circle"),SemiCircle:t("./semicircle"),Square:t("./square"),Path:t("./path"),Shape:t("./shape"),utils:t("./utils")}},{"./circle":3,"./line":4,"./path":6,"./semicircle":7,"./shape":8,"./square":9,"./utils":10}],6:[function(t,e,i){var n=t("shifty"),r=t("./utils"),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),c=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var l=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:l},c.from),to:r.extend({offset:h},c.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then((function(t){r.isFunction(i)&&i()})).catch((function(t){throw console.error("Error in tweening:",t),t}))},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(!0),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},e.exports=a},{"./utils":10,shifty:2}],7:[function(t,e,i){var n=t("./shape"),r=t("./circle"),o=t("./utils"),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};s.prototype=new n,s.prototype.constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,e.exports=s},{"./circle":3,"./shape":8,"./utils":10}],8:[function(t,e,i){var n=t("./path"),r=t("./utils"),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},e.exports=s},{"./path":6,"./utils":10}],9:[function(t,e,i){var n=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};o.prototype=new n,o.prototype.constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},e.exports=o},{"./shape":8,"./utils":10}],10:[function(t,e,i){var n=t("lodash.merge"),r="Webkit Moz O ms".split(" "),o=.001;function s(t,e){var i=t;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=new RegExp("\\{"+n+"\\}","g");i=i.replace(o,r)}return i}function a(t,e,i){for(var n=t.style,o=0;o<r.length;++o)n[r[o]+l(e)]=i;n[e]=i}function c(t,e){p(e,(function(e,i){null!=e&&(f(e)&&!0===e.prefix?a(t,i,e.value):t.style[i]=e)}))}function l(t){return t.charAt(0).toUpperCase()+t.slice(1)}function h(t){return"string"==typeof t||t instanceof String}function u(t){return"function"==typeof t}function d(t){return"[object Array]"===Object.prototype.toString.call(t)}function f(t){return!d(t)&&"object"==typeof t&&!!t}function p(t,e){for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)}function g(t,e){return Math.abs(t-e)<o}function m(t){for(;t.firstChild;)t.removeChild(t.firstChild)}e.exports={extend:n,render:s,setStyle:a,setStyles:c,capitalize:l,isString:h,isFunction:u,isObject:f,forEachObject:p,floatEquals:g,removeChildren:m}},{"lodash.merge":1}]},{},[5])(5)},951:function(t,e){var i,n,r,o;o=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),c=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|c)?"Byte":"Bytes",magnitude:s,result:a,fixed:c,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=o():(n=[],void 0===(r="function"==typeof(i=o)?i.apply(e,n):i)||(t.exports=r))},998:function(t,e){var i,n,r;n=[],i=function(){"use strict";function t(t,e){var i,n,r;for(i=1,n=arguments.length;i<n;++i)if(null!=(e=arguments[i]))for(r in e)a(e,r)&&(t[r]=e[r]);return t}function e(t,e){return e.length-t.length}function i(t,e){return t.factor-e.factor}function n(t){return t.replace(/([.*+?=^!:${}()|[\]/\\])/g,"\\$1")}function r(t,e){var i,n;for(i=0,n=t.length;i<n;++i)e(t[i],i)}function o(t,e){var i;for(i in t)a(t,i)&&e(t[i],i)}var s,a=(s=Object.prototype.hasOwnProperty,function(t,e){return null!=t&&s.call(t,e)});function c(t,e){for(;"string"==typeof e;)e=t[e];return e}function l(t){this._prefixes=t;var r=[],s=[];o(t,(function(t,e){r.push(n(e)),s.push({factor:t,prefix:e})}));var c=this._lcPrefixes={};o(t,(function(e,i){var n=i.toLowerCase();a(t,n)||(c[n]=i)})),s.sort(i),this._list=s,r.sort(e),this._regexp=new RegExp("^\\s*(-)?\\s*(\\d+(?:\\.\\d+)?)\\s*("+r.join("|")+")\\s*(.*)\\s*?$","i")}l.create=function(t,e,i){var n={};return void 0===i&&(i=0),r(t,(function(t,r){n[t]=Math.pow(e,r+i)})),new l(n)},l.prototype.findPrefix=function(t){for(var e,i=this._list,n=0,r=i.length-1;n!==r;)i[e=n+r+1>>1].factor>t?r=e-1:n=e;return i[n]},l.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:l.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:l.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function f(e,i){var n=v(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=c(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=c(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var l,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");l=o._prefixes[u]}else{var f=o.findPrefix(e);if(void 0!==r)do{var p=(l=f.factor)/r;e=Math.round(e/p)*p}while((f=o.findPrefix(e)).factor!==l);else l=f.factor;u=f.prefix}return{prefix:u,value:void 0===r?e/l:Math.round(e*r/l)/r}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=v,f.Scale=l,f},void 0===(r="function"==typeof i?i.apply(e,n):i)||(t.exports=r)}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,i),o.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}(),function(){"use strict";i(617),i(712);var t=i(544),e=i.n(t);const n={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"sailing_boat",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter((t=>t)).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t<o.length;t++){const r=o[t].split(",");let a;a=!0===i?[]:{};for(let t=0;t<r.length;t++){const o=r[t].trim().split("_");if(o.length<=1||void 0===n[o[0]])continue;const s=o.shift(),c=o.join("_");if(!0===i){if("f"===s||"q"===s)for(const t in this.elements[e])s+"_"===this.elements[e][t].substr(0,2)&&this.elements[e].splice(t,1);a.push(r[t])}else a[n[s]]=c.trim()}let c=0;c=!0===i?a.length:Object.keys(a).length,c&&(!0===i&&(a=a.join(",")),s.push(a))}return s.length&&(r=!0===i?s.join("/").trim():s),r},_reset(){for(const t of this.fields)t.value=null;for(const t in this.button)this._build(t),this._refresh(null,t)},_input(t){if(void 0!==t.dataset.context&&t.dataset.context.length){const e=t.dataset.context;this._setLoading(e),this._build(e)}},_init(){if("undefined"!=typeof CLD_GLOBAL_TRANSFORMATIONS){const t=this;document.addEventListener("DOMContentLoaded",(function(){for(const e in t.button)t.button[e]&&t.button[e].addEventListener("click",(function(i){t._refresh(i,e)}));for(const e of t.fields)e.addEventListener("input",(function(){t._input(this)})),e.addEventListener("change",(function(){t._input(this)}));for(const e in CLD_GLOBAL_TRANSFORMATIONS)t._build(e),t._refresh(null,e)})),jQuery(document).ajaxComplete((function(e,i,n){-1!==n.data.indexOf("action=add-tag")&&-1===i.responseText.indexOf("wp_error")&&t._reset()}))}}};n._init();function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function s(t,e,i){return(e=o(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function a(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;i[n]=t[n]}return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)i=o[n],e.includes(i)||{}.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var c,l,h,u,d=i(616),f=i.n(d);i(604),f()(console.error);c={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},l=["(","?"],h={")":["("],":":["?","?:"]},u=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var p={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function g(t){var e=function(t){for(var e,i,n,r,o=[],s=[];e=t.match(u);){for(i=e[0],(n=t.substr(0,e.index).trim())&&o.push(n);r=s.pop();){if(h[i]){if(h[i][0]===r){i=h[i][1]||i;break}}else if(l.indexOf(r)>=0||c[r]<c[i]){s.push(r);break}o.push(r)}h[i]||s.push(i),t=t.substr(e.index+i.length)}return(t=t.trim())&&o.push(t),o.concat(s.reverse())}(t);return function(t){return function(t,e){var i,n,r,o,s,a,c=[];for(i=0;i<t.length;i++){if(s=t[i],o=p[s]){for(n=o.length,r=Array(n);n--;)r[n]=c.pop();try{a=o.apply(null,r)}catch(t){return t}}else a=e.hasOwnProperty(s)?e[s]:+s;c.push(a)}return c[0]}(e,t)}}var m={contextDelimiter:"",onMissingKey:null};function b(t,e){var i;for(i in this.data=t,this.pluralForms={},this.options={},m)this.options[i]=void 0!==e&&i in e?e[i]:m[i]}function v(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function y(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?v(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}b.prototype.getPluralForm=function(t,e){var i,n,r,o=this.pluralForms[t];return o||("function"!=typeof(r=(i=this.data[t][""])["Plural-Forms"]||i["plural-forms"]||i.plural_forms)&&(n=function(t){var e,i,n;for(e=t.split(";"),i=0;i<e.length;i++)if(0===(n=e[i].trim()).indexOf("plural="))return n.substr(7)}(i["Plural-Forms"]||i["plural-forms"]||i.plural_forms),r=function(t){var e=g(t);return function(t){return+e({n:t})}}(n)),o=this.pluralForms[t]=r),o(e)},b.prototype.dcnpgettext=function(t,e,i,n,r){var o,s,a;return o=void 0===r?0:this.getPluralForm(t,r),s=i,e&&(s=e+this.options.contextDelimiter+i),(a=this.data[t][s])&&a[o]?a[o]:(this.options.onMissingKey&&this.options.onMissingKey(i,t),0===o?i:n)};var x={"":{plural_forms:function(t){return 1===t?0:1}}},_=/^i18n\.(n?gettext|has_translation)(_|$)/;var w=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var k=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var O=function(t,e){return function(i,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(k(i)&&w(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var c,l=s[i].handlers;for(c=l.length;c>0&&!(o>=l[c-1].priority);c--);c===l.length?l[c]=a:l.splice(c,0,a),s.__current.forEach((function(t){t.name===i&&t.currentIndex>=c&&t.currentIndex++}))}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var S=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(k(n)&&(i||w(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,c=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach((function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--})))},l=a.length-1;l>=0;l--)c(l);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var M=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some((function(t){return t.namespace===n})):i in r}};var E=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),c=1;c<s;c++)a[c-1]=arguments[c];if(!o||!o.length)return i?a[0]:void 0;var l={name:n,currentIndex:0};for(r.__current.push(l);l.currentIndex<o.length;){var h=o[l.currentIndex].callback.apply(null,a);i&&(a[0]=h),l.currentIndex++}return r.__current.pop(),i?a[0]:void 0}};var P=function(t,e){return function(){var i,n,r=t[e];return null!==(i=null===(n=r.__current[r.__current.length-1])||void 0===n?void 0:n.name)&&void 0!==i?i:null}};var T=function(t,e){return function(i){var n=t[e];return void 0===i?void 0!==n.__current[0]:!!n.__current[0]&&i===n.__current[0].name}};var L=function(t,e){return function(i){var n=t[e];if(k(i))return n[i]&&n[i].runs?n[i].runs:0}},A=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=O(this,"actions"),this.addFilter=O(this,"filters"),this.removeAction=S(this,"actions"),this.removeFilter=S(this,"filters"),this.hasAction=M(this,"actions"),this.hasFilter=M(this,"filters"),this.removeAllActions=S(this,"actions",!0),this.removeAllFilters=S(this,"filters",!0),this.doAction=E(this,"actions"),this.applyFilters=E(this,"filters",!0),this.currentAction=P(this,"actions"),this.currentFilter=P(this,"filters"),this.doingAction=T(this,"actions"),this.doingFilter=T(this,"filters"),this.didAction=L(this,"actions"),this.didFilter=L(this,"filters")};var C=function(){return new A}(),D=(C.addAction,C.addFilter,C.removeAction,C.removeFilter,C.hasAction,C.hasFilter,C.removeAllActions,C.removeAllFilters,C.doAction,C.applyFilters,C.currentAction,C.currentFilter,C.doingAction,C.doingFilter,C.didAction,C.didFilter,C.actions,C.filters,function(t,e,i){var n=new b({}),r=new Set,o=function(){r.forEach((function(t){return t()}))},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=y(y(y({},x),n.data[e]),t),n.data[e][""]=y(y({},x[""]),n.data[e][""])},a=function(t,e){s(t,e),o()},c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},l=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},h=function(t,e,n){var r=c(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+l(n),r,t,e,n)):r};if(t&&a(t,e),i){var u=function(t){_.test(t)&&o()};i.addAction("hookAdded","core/i18n",u),i.addAction("hookRemoved","core/i18n",u)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:a,resetLocaleData:function(t,e){n.data={},n.pluralForms={},a(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=c(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+l(e),n,t,e)):n},_x:h,_n:function(t,e,n,r){var o=c(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+l(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=c(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+l(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===h("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,c=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(c=i.applyFilters("i18n.has_translation",c,t,e,r),c=i.applyFilters("i18n.has_translation_"+l(r),c,t,e,r)),c}}}(void 0,void 0,C)),j=(D.getLocaleData.bind(D),D.setLocaleData.bind(D),D.resetLocaleData.bind(D),D.subscribe.bind(D),D.__.bind(D));D._x.bind(D),D._n.bind(D),D._nx.bind(D),D.isRTL.bind(D),D.hasTranslation.bind(D);function I(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function R(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?I(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var F=function(t){var e=function t(e,i){var n=e.headers,r=void 0===n?{}:n;for(var o in r)if("x-wp-nonce"===o.toLowerCase()&&r[o]===t.nonce)return i(e);return i(R(R({},e),{},{headers:R(R({},r),{},{"X-WP-Nonce":t.nonce})}))};return e.nonce=t,e};function z(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function N(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?z(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):z(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var B=function(t,e){var i,n,r=t.path;return"string"==typeof t.namespace&&"string"==typeof t.endpoint&&(i=t.namespace.replace(/^\/|\/$/g,""),r=(n=t.endpoint.replace(/^\//,""))?i+"/"+n:i),delete t.namespace,delete t.endpoint,e(N(N({},t),{},{path:r}))};function W(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function V(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?W(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):W(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var H=function(t){return function(e,i){return B(e,(function(e){var n,r=e.url,o=e.path;return"string"==typeof o&&(n=t,-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(o=o.replace("?","&")),r=n+o),i(V(V({},e),{},{url:r}))}))}};function $(t){var e=t.split("?"),i=e[1],n=e[0];return i?n+"?"+i.split("&").map((function(t){return t.split("=")})).sort((function(t,e){return t[0].localeCompare(e[0])})).map((function(t){return t.join("=")})).join("&"):n}var U=function(t){var e=Object.keys(t).reduce((function(e,i){return e[$(i)]=t[i],e}),{});return function(t,i){var n=t.parse,r=void 0===n||n;if("string"==typeof t.path){var o=t.method||"GET",s=$(t.path);if("GET"===o&&e[s]){var a=e[s];return delete e[s],Promise.resolve(r?a.body:new window.Response(JSON.stringify(a.body),{status:200,statusText:"OK",headers:a.headers}))}if("OPTIONS"===o&&e[o]&&e[o][s])return Promise.resolve(e[o][s])}return i(t)}};function q(t,e,i,n,r,o,s){try{var a=t[o](s),c=a.value}catch(t){return void i(t)}a.done?e(c):Promise.resolve(c).then(n,r)}var Y=i(756),X=i.n(Y);function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function K(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,r,o,s,a=[],c=!0,l=!1;try{if(o=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;c=!1}else for(;!(c=(n=o.call(i)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,r=t}finally{try{if(!c&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(l)throw r}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?G(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Q(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?J(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):J(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Z(t){return(function(t){var e;try{e=new URL(t,"http://example.com").search.substring(1)}catch(t){}if(e)return e}(t)||"").replace(/\+/g,"%20").split("&").reduce((function(t,e){var i=K(e.split("=").filter(Boolean).map(decodeURIComponent),2),n=i[0],r=i[1],o=void 0===r?"":r;n&&function(t,e,i){for(var n=e.length,r=n-1,o=0;o<n;o++){var s=e[o];!s&&Array.isArray(t)&&(s=t.length.toString());var a=!isNaN(Number(e[o+1]));t[s]=o===r?i:t[s]||(a?[]:{}),Array.isArray(t[s])&&!a&&(t[s]=Q({},t[s])),t=t[s]}}(t,n.replace(/\]/g,"").split("["),o);return t}),{})}function tt(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(!t)return;if("string"==typeof t)return et(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return et(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function et(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function it(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(Z(t),e),i=i.substr(0,n)),i+"?"+function(t){for(var e,i="",n=Object.entries(t);e=n.shift();){var r=K(e,2),o=r[0],s=r[1];if(Array.isArray(s)||s&&s.constructor===Object){var a,c=tt(Object.entries(s).reverse());try{for(c.s();!(a=c.n()).done;){var l=K(a.value,2),h=l[0],u=l[1];n.unshift(["".concat(o,"[").concat(h,"]"),u])}}catch(t){c.e(t)}finally{c.f()}}else void 0!==s&&(null===s&&(s=""),i+="&"+[o,s].map(encodeURIComponent).join("="))}return i.substr(1)}(e)}function nt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function rt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):nt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var ot=function(t){return t.json?t.json():Promise.reject(t)},st=function(t){return function(t){if(!t)return{};var e=t.match(/<([^>]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},at=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},ct=function(){var t,e=(t=X().mark((function t(e,i){var n,r,o,s,c,l;return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(at(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,Et(rt(rt({},(u={per_page:100},d=void 0,f=void 0,d=(h=e).path,f=h.url,rt(rt({},a(h,["path","url"])),{},{url:f&&it(f,u),path:d&&it(d,u)}))),{},{parse:!1}));case 6:return n=t.sent,t.next=9,ot(n);case 9:if(r=t.sent,Array.isArray(r)){t.next=12;break}return t.abrupt("return",r);case 12:if(o=st(n)){t.next=15;break}return t.abrupt("return",r);case 15:s=[].concat(r);case 16:if(!o){t.next=27;break}return t.next=19,Et(rt(rt({},e),{},{path:void 0,url:o,parse:!1}));case 19:return c=t.sent,t.next=22,ot(c);case 22:l=t.sent,s=s.concat(l),o=st(c),t.next=16;break;case 27:return t.abrupt("return",s);case 28:case"end":return t.stop()}var h,u,d,f}),t)})),function(){var e=this,i=arguments;return new Promise((function(n,r){var o=t.apply(e,i);function s(t){q(o,n,r,s,a,"next",t)}function a(t){q(o,n,r,s,a,"throw",t)}s(void 0)}))});return function(t,i){return e.apply(this,arguments)}}(),lt=ct;function ht(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function ut(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ht(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var dt=new Set(["PATCH","PUT","DELETE"]);function ft(t,e){return void 0!==function(t,e){return Z(t)[e]}(t,e)}var pt=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(function(t){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?t:204===t.status?null:t.json?t.json():Promise.reject(t)}(t,e)).catch((function(t){return gt(t,e)}))};function gt(t){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))throw t;return function(t){var e={code:"invalid_json",message:j("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch((function(){throw e}))}(t).then((function(t){var e={code:"unknown_error",message:j("An unknown error occurred.")};throw t||e}))}function mt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function bt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):mt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var vt=function(t,e){if(!(t.path&&-1!==t.path.indexOf("/wp/v2/media")||t.url&&-1!==t.url.indexOf("/wp/v2/media")))return e(t);var i=0,n=function t(n){return i++,e({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return i<5?t(n):(e({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())}))};return e(bt(bt({},t),{},{parse:!1})).catch((function(e){var i=e.headers.get("x-wp-upload-attachment-id");return e.status>=500&&e.status<600&&i?n(i).catch((function(){return!1!==t.parse?Promise.reject({code:"post_process",message:j("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)})):gt(e,t.parse)})).then((function(e){return pt(e,t.parse)}))};function yt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function xt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):yt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var _t={Accept:"application/json, */*;q=0.1"},wt={credentials:"include"},kt=[function(t,e){return"string"!=typeof t.url||ft(t.url,"_locale")||(t.url=it(t.url,{_locale:"user"})),"string"!=typeof t.path||ft(t.path,"_locale")||(t.path=it(t.path,{_locale:"user"})),e(t)},B,function(t,e){var i=t.method,n=void 0===i?"GET":i;return dt.has(n.toUpperCase())&&(t=ut(ut({},t),{},{headers:ut(ut({},t.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),e(t)},lt];var Ot=function(t){if(t.status>=200&&t.status<300)return t;throw t},St=function(t){var e=t.url,i=t.path,n=t.data,r=t.parse,o=void 0===r||r,s=a(t,["url","path","data","parse"]),c=t.body,l=t.headers;return l=xt(xt({},_t),l),n&&(c=JSON.stringify(n),l["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,xt(xt(xt({},wt),s),{},{body:c,headers:l})).then((function(t){return Promise.resolve(t).then(Ot).catch((function(t){return gt(t,o)})).then((function(t){return pt(t,o)}))}),(function(){throw{code:"fetch_error",message:j("You are probably offline.")}}))};function Mt(t){return kt.reduceRight((function(t,e){return function(i){return e(i,t)}}),St)(t).catch((function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(Mt.nonceEndpoint).then(Ot).then((function(t){return t.text()})).then((function(e){return Mt.nonceMiddleware.nonce=e,Mt(t)}))}))}Mt.use=function(t){kt.unshift(t)},Mt.setFetchHandler=function(t){St=t},Mt.createNonceMiddleware=F,Mt.createPreloadingMiddleware=U,Mt.createRootURLMiddleware=H,Mt.fetchAllMiddleware=lt,Mt.mediaUploadMiddleware=vt;var Et=Mt;const Pt={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(Et.use(Et.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o<n.assets.length;o++){const s=n.assets[o];wp.ajax.post("cloudinary-down-sync",{nonce:CLDN.nonce,asset:s}).done((function(n){e.style.marginRight="220px",i.style.display="block";const o=t.makeProgress(n),s="download-"+n.public_id;r[s]=o,i.appendChild(o),setTimeout((()=>{o.style.opacity=1}),250),Et({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then((t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout((()=>{n.style.opacity=0,setTimeout((()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")}),1e3)}),500)}))}))}}}),window.addEventListener("resize",(function(){t._resize()})),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};window.addEventListener("load",(()=>Pt._init()));const Tt={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach((e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",(i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout((function(){t._dismiss(e)}),5)}))}))}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout((function(){t.remove()}),400),0<i&&wp.ajax.send({url:CLDIS.url,data:{token:e,duration:i,_wpnonce:CLDIS.nonce}})}};window.addEventListener("load",Tt._init());function Lt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function At(t){return t instanceof Lt(t).Element||t instanceof Element}function Ct(t){return t instanceof Lt(t).HTMLElement||t instanceof HTMLElement}function Dt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Lt(t).ShadowRoot||t instanceof ShadowRoot)}var jt=Math.max,It=Math.min,Rt=Math.round;function Ft(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function zt(){return!/^((?!chrome|android).)*safari/i.test(Ft())}function Nt(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&Ct(t)&&(r=t.offsetWidth>0&&Rt(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Rt(n.height)/t.offsetHeight||1);var s=(At(t)?Lt(t):window).visualViewport,a=!zt()&&i,c=(n.left+(a&&s?s.offsetLeft:0))/r,l=(n.top+(a&&s?s.offsetTop:0))/o,h=n.width/r,u=n.height/o;return{width:h,height:u,top:l,right:c+h,bottom:l+u,left:c,x:c,y:l}}function Bt(t){var e=Lt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Wt(t){return t?(t.nodeName||"").toLowerCase():null}function Vt(t){return((At(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ht(t){return Nt(Vt(t)).left+Bt(t).scrollLeft}function $t(t){return Lt(t).getComputedStyle(t)}function Ut(t){var e=$t(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function qt(t,e,i){void 0===i&&(i=!1);var n,r,o=Ct(e),s=Ct(e)&&function(t){var e=t.getBoundingClientRect(),i=Rt(e.width)/t.offsetWidth||1,n=Rt(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=Vt(e),c=Nt(t,s,i),l={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==Wt(e)||Ut(a))&&(l=(n=e)!==Lt(n)&&Ct(n)?{scrollLeft:(r=n).scrollLeft,scrollTop:r.scrollTop}:Bt(n)),Ct(e)?((h=Nt(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Ht(a))),{x:c.left+l.scrollLeft-h.x,y:c.top+l.scrollTop-h.y,width:c.width,height:c.height}}function Yt(t){var e=Nt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Xt(t){return"html"===Wt(t)?t:t.assignedSlot||t.parentNode||(Dt(t)?t.host:null)||Vt(t)}function Gt(t){return["html","body","#document"].indexOf(Wt(t))>=0?t.ownerDocument.body:Ct(t)&&Ut(t)?t:Gt(Xt(t))}function Kt(t,e){var i;void 0===e&&(e=[]);var n=Gt(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Lt(n),s=r?[o].concat(o.visualViewport||[],Ut(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(Kt(Xt(s)))}function Jt(t){return["table","td","th"].indexOf(Wt(t))>=0}function Qt(t){return Ct(t)&&"fixed"!==$t(t).position?t.offsetParent:null}function Zt(t){for(var e=Lt(t),i=Qt(t);i&&Jt(i)&&"static"===$t(i).position;)i=Qt(i);return i&&("html"===Wt(i)||"body"===Wt(i)&&"static"===$t(i).position)?e:i||function(t){var e=/firefox/i.test(Ft());if(/Trident/i.test(Ft())&&Ct(t)&&"fixed"===$t(t).position)return null;var i=Xt(t);for(Dt(i)&&(i=i.host);Ct(i)&&["html","body"].indexOf(Wt(i))<0;){var n=$t(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var te="top",ee="bottom",ie="right",ne="left",re="auto",oe=[te,ee,ie,ne],se="start",ae="end",ce="viewport",le="popper",he=oe.reduce((function(t,e){return t.concat([e+"-"+se,e+"-"+ae])}),[]),ue=[].concat(oe,[re]).reduce((function(t,e){return t.concat([e,e+"-"+se,e+"-"+ae])}),[]),de=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function fe(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||r(t)})),n}var pe={placement:"bottom",modifiers:[],strategy:"absolute"};function ge(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function me(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,r=e.defaultOptions,o=void 0===r?pe:r;return function(t,e,i){void 0===i&&(i=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},pe,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],l=!1,h={state:a,setOptions:function(i){var r="function"==typeof i?i(a.options):i;u(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:At(t)?Kt(t):t.contextElement?Kt(t.contextElement):[],popper:Kt(e)};var s=function(t){var e=fe(t);return de.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}(function(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(n,a.options.modifiers)));return a.orderedModifiers=s.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,r=t.effect;if("function"==typeof r){var o=r({state:a,name:e,instance:h,options:n}),s=function(){};c.push(o||s)}})),h.update()},forceUpdate:function(){if(!l){var t=a.elements,e=t.reference,i=t.popper;if(ge(e,i)){a.rects={reference:qt(e,Zt(i),"fixed"===a.options.strategy),popper:Yt(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var r=a.orderedModifiers[n],o=r.fn,s=r.options,c=void 0===s?{}:s,u=r.name;"function"==typeof o&&(a=o({state:a,options:c,name:u,instance:h})||a)}else a.reset=!1,n=-1}}},update:(r=function(){return new Promise((function(t){h.forceUpdate(),t(a)}))},function(){return s||(s=new Promise((function(t){Promise.resolve().then((function(){s=void 0,t(r())}))}))),s}),destroy:function(){u(),l=!0}};if(!ge(t,e))return h;function u(){c.forEach((function(t){return t()})),c=[]}return h.setOptions(i).then((function(t){!l&&i.onFirstUpdate&&i.onFirstUpdate(t)})),h}}var be={passive:!0};function ve(t){return t.split("-")[0]}function ye(t){return t.split("-")[1]}function xe(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function _e(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?ve(r):null,s=r?ye(r):null,a=i.x+i.width/2-n.width/2,c=i.y+i.height/2-n.height/2;switch(o){case te:e={x:a,y:i.y-n.height};break;case ee:e={x:a,y:i.y+i.height};break;case ie:e={x:i.x+i.width,y:c};break;case ne:e={x:i.x-n.width,y:c};break;default:e={x:i.x,y:i.y}}var l=o?xe(o):null;if(null!=l){var h="y"===l?"height":"width";switch(s){case se:e[l]=e[l]-(i[h]/2-n[h]/2);break;case ae:e[l]=e[l]+(i[h]/2-n[h]/2)}}return e}var we={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ke(t){var e,i=t.popper,n=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,c=t.gpuAcceleration,l=t.adaptive,h=t.roundOffsets,u=t.isFixed,d=s.x,f=void 0===d?0:d,p=s.y,g=void 0===p?0:p,m="function"==typeof h?h({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var b=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),y=ne,x=te,_=window;if(l){var w=Zt(i),k="clientHeight",O="clientWidth";if(w===Lt(i)&&"static"!==$t(w=Vt(i)).position&&"absolute"===a&&(k="scrollHeight",O="scrollWidth"),r===te||(r===ne||r===ie)&&o===ae)x=ee,g-=(u&&w===_&&_.visualViewport?_.visualViewport.height:w[k])-n.height,g*=c?1:-1;if(r===ne||(r===te||r===ee)&&o===ae)y=ie,f-=(u&&w===_&&_.visualViewport?_.visualViewport.width:w[O])-n.width,f*=c?1:-1}var S,M=Object.assign({position:a},l&&we),E=!0===h?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:Rt(e*n)/n||0,y:Rt(i*n)/n||0}}({x:f,y:g}):{x:f,y:g};return f=E.x,g=E.y,c?Object.assign({},M,((S={})[x]=v?"0":"",S[y]=b?"0":"",S.transform=(_.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",S)):Object.assign({},M,((e={})[x]=v?g+"px":"",e[y]=b?f+"px":"",e.transform="",e))}var Oe={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];Ct(r)&&Wt(r)&&(Object.assign(r.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});Ct(n)&&Wt(n)&&(Object.assign(n.style,o),Object.keys(r).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};var Se={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=ue.reduce((function(t,i){return t[i]=function(t,e,i){var n=ve(t),r=[ne,te].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[ne,ie].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t}),{}),a=s[e.placement],c=a.x,l=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=l),e.modifiersData[n]=s}},Me={left:"right",right:"left",bottom:"top",top:"bottom"};function Ee(t){return t.replace(/left|right|bottom|top/g,(function(t){return Me[t]}))}var Pe={start:"end",end:"start"};function Te(t){return t.replace(/start|end/g,(function(t){return Pe[t]}))}function Le(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&Dt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ae(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ce(t,e,i){return e===ce?Ae(function(t,e){var i=Lt(t),n=Vt(t),r=i.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,c=0;if(r){o=r.width,s=r.height;var l=zt();(l||!l&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:o,height:s,x:a+Ht(t),y:c}}(t,i)):At(e)?function(t,e){var i=Nt(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):Ae(function(t){var e,i=Vt(t),n=Bt(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=jt(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=jt(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+Ht(t),c=-n.scrollTop;return"rtl"===$t(r||i).direction&&(a+=jt(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:c}}(Vt(t)))}function De(t,e,i,n){var r="clippingParents"===e?function(t){var e=Kt(Xt(t)),i=["absolute","fixed"].indexOf($t(t).position)>=0&&Ct(t)?Zt(t):t;return At(i)?e.filter((function(t){return At(t)&&Le(t,i)&&"body"!==Wt(t)})):[]}(t):[].concat(e),o=[].concat(r,[i]),s=o[0],a=o.reduce((function(e,i){var r=Ce(t,i,n);return e.top=jt(r.top,e.top),e.right=It(r.right,e.right),e.bottom=It(r.bottom,e.bottom),e.left=jt(r.left,e.left),e}),Ce(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function je(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Ie(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}function Re(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=void 0===n?t.placement:n,o=i.strategy,s=void 0===o?t.strategy:o,a=i.boundary,c=void 0===a?"clippingParents":a,l=i.rootBoundary,h=void 0===l?ce:l,u=i.elementContext,d=void 0===u?le:u,f=i.altBoundary,p=void 0!==f&&f,g=i.padding,m=void 0===g?0:g,b=je("number"!=typeof m?m:Ie(m,oe)),v=d===le?"reference":le,y=t.rects.popper,x=t.elements[p?v:d],_=De(At(x)?x:x.contextElement||Vt(t.elements.popper),c,h,s),w=Nt(t.elements.reference),k=_e({reference:w,element:y,strategy:"absolute",placement:r}),O=Ae(Object.assign({},y,k)),S=d===le?O:w,M={top:_.top-S.top+b.top,bottom:S.bottom-_.bottom+b.bottom,left:_.left-S.left+b.left,right:S.right-_.right+b.right},E=t.modifiersData.offset;if(d===le&&E){var P=E[r];Object.keys(M).forEach((function(t){var e=[ie,ee].indexOf(t)>=0?1:-1,i=[te,ee].indexOf(t)>=0?"y":"x";M[t]+=P[i]*e}))}return M}function Fe(t,e,i){return jt(t,It(e,i))}var ze={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,c=i.boundary,l=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,f=void 0===d||d,p=i.tetherOffset,g=void 0===p?0:p,m=Re(e,{boundary:c,rootBoundary:l,padding:u,altBoundary:h}),b=ve(e.placement),v=ye(e.placement),y=!v,x=xe(b),_="x"===x?"y":"x",w=e.modifiersData.popperOffsets,k=e.rects.reference,O=e.rects.popper,S="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,M="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),E=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(w){if(o){var T,L="y"===x?te:ne,A="y"===x?ee:ie,C="y"===x?"height":"width",D=w[x],j=D+m[L],I=D-m[A],R=f?-O[C]/2:0,F=v===se?k[C]:O[C],z=v===se?-O[C]:-k[C],N=e.elements.arrow,B=f&&N?Yt(N):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=W[L],H=W[A],$=Fe(0,k[C],B[C]),U=y?k[C]/2-R-$-V-M.mainAxis:F-$-V-M.mainAxis,q=y?-k[C]/2+R+$+H+M.mainAxis:z+$+H+M.mainAxis,Y=e.elements.arrow&&Zt(e.elements.arrow),X=Y?"y"===x?Y.clientTop||0:Y.clientLeft||0:0,G=null!=(T=null==E?void 0:E[x])?T:0,K=D+q-G,J=Fe(f?It(j,D+U-G-X):j,D,f?jt(I,K):I);w[x]=J,P[x]=J-D}if(a){var Q,Z="x"===x?te:ne,tt="x"===x?ee:ie,et=w[_],it="y"===_?"height":"width",nt=et+m[Z],rt=et-m[tt],ot=-1!==[te,ne].indexOf(b),st=null!=(Q=null==E?void 0:E[_])?Q:0,at=ot?nt:et-k[it]-O[it]-st+M.altAxis,ct=ot?et+k[it]+O[it]-st-M.altAxis:rt,lt=f&&ot?function(t,e,i){var n=Fe(t,e,i);return n>i?i:n}(at,et,ct):Fe(f?at:nt,et,f?ct:rt);w[_]=lt,P[_]=lt-et}e.modifiersData[n]=P}},requiresIfExists:["offset"]};var Ne={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=ve(i.placement),c=xe(a),l=[ne,ie].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return je("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ie(t,oe))}(r.padding,i),u=Yt(o),d="y"===c?te:ne,f="y"===c?ee:ie,p=i.rects.reference[l]+i.rects.reference[c]-s[c]-i.rects.popper[l],g=s[c]-i.rects.reference[c],m=Zt(o),b=m?"y"===c?m.clientHeight||0:m.clientWidth||0:0,v=p/2-g/2,y=h[d],x=b-u[l]-h[f],_=b/2-u[l]/2+v,w=Fe(y,_,x),k=c;i.modifiersData[n]=((e={})[k]=w,e.centerOffset=w-_,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Le(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Be(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function We(t){return[te,ie,ee,ne].some((function(e){return t[e]>=0}))}var Ve=me({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,s=n.resize,a=void 0===s||s,c=Lt(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&l.forEach((function(t){t.addEventListener("scroll",i.update,be)})),a&&c.addEventListener("resize",i.update,be),function(){o&&l.forEach((function(t){t.removeEventListener("scroll",i.update,be)})),a&&c.removeEventListener("resize",i.update,be)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=_e({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,c=void 0===a||a,l={placement:ve(e.placement),variation:ye(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,ke(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,ke(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Oe,Se,{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,c=i.fallbackPlacements,l=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=ve(m),v=c||(b===m||!p?[Ee(m)]:function(t){if(ve(t)===re)return[];var e=Ee(t);return[Te(t),e,Te(e)]}(m)),y=[m].concat(v).reduce((function(t,i){return t.concat(ve(i)===re?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,c=i.allowedAutoPlacements,l=void 0===c?ue:c,h=ye(n),u=h?a?he:he.filter((function(t){return ye(t)===h})):oe,d=u.filter((function(t){return l.indexOf(t)>=0}));0===d.length&&(d=u);var f=d.reduce((function(e,i){return e[i]=Re(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[ve(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}(e,{placement:i,boundary:h,rootBoundary:u,padding:l,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),x=e.rects.reference,_=e.rects.popper,w=new Map,k=!0,O=y[0],S=0;S<y.length;S++){var M=y[S],E=ve(M),P=ye(M)===se,T=[te,ee].indexOf(E)>=0,L=T?"width":"height",A=Re(e,{placement:M,boundary:h,rootBoundary:u,altBoundary:d,padding:l}),C=T?P?ie:ne:P?ee:te;x[L]>_[L]&&(C=Ee(C));var D=Ee(C),j=[];if(o&&j.push(A[E]<=0),a&&j.push(A[C]<=0,A[D]<=0),j.every((function(t){return t}))){O=M,k=!1;break}w.set(M,j)}if(k)for(var I=function(t){var e=y.find((function(e){var i=w.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return O=e,"break"},R=p?3:1;R>0;R--){if("break"===I(R))break}e.placement!==O&&(e.modifiersData[n]._skip=!0,e.placement=O,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},ze,Ne,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=Re(e,{elementContext:"reference"}),a=Re(e,{altBoundary:!0}),c=Be(s,n),l=Be(a,r,o),h=We(c),u=We(l);e.modifiersData[i]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),He="tippy-content",$e="tippy-backdrop",Ue="tippy-arrow",qe="tippy-svg-arrow",Ye={passive:!0,capture:!0},Xe=function(){return document.body};function Ge(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function Ke(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function Je(t,e){return"function"==typeof t?t.apply(void 0,e):t}function Qe(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout((function(){t(n)}),e)};var i}function Ze(t){return[].concat(t)}function ti(t,e){-1===t.indexOf(e)&&t.push(e)}function ei(t){return t.split("-")[0]}function ii(t){return[].slice.call(t)}function ni(t){return Object.keys(t).reduce((function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e}),{})}function ri(){return document.createElement("div")}function oi(t){return["Element","Fragment"].some((function(e){return Ke(t,e)}))}function si(t){return Ke(t,"MouseEvent")}function ai(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function ci(t){return oi(t)?[t]:function(t){return Ke(t,"NodeList")}(t)?ii(t):Array.isArray(t)?t:ii(document.querySelectorAll(t))}function li(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function hi(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function ui(t){var e,i=Ze(t)[0];return null!=i&&null!=(e=i.ownerDocument)&&e.body?i.ownerDocument:document}function di(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[n](e,i)}))}function fi(t,e){for(var i=e;i;){var n;if(t.contains(i))return!0;i=null==i.getRootNode||null==(n=i.getRootNode())?void 0:n.host}return!1}var pi={isTouch:!1},gi=0;function mi(){pi.isTouch||(pi.isTouch=!0,window.performance&&document.addEventListener("mousemove",bi))}function bi(){var t=performance.now();t-gi<20&&(pi.isTouch=!1,document.removeEventListener("mousemove",bi)),gi=t}function vi(){var t=document.activeElement;if(ai(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var yi=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var xi={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},_i=Object.assign({appendTo:Xe,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},xi,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),wi=Object.keys(_i);function ki(t){var e=(t.plugins||[]).reduce((function(e,i){var n,r=i.name,o=i.defaultValue;r&&(e[r]=void 0!==t[r]?t[r]:null!=(n=_i[r])?n:o);return e}),{});return Object.assign({},t,e)}function Oi(t,e){var i=Object.assign({},e,{content:Je(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(ki(Object.assign({},_i,{plugins:e}))):wi).reduce((function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e}),{})}(t,e.plugins));return i.aria=Object.assign({},_i.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Si(t,e){t.innerHTML=e}function Mi(t){var e=ri();return!0===t?e.className=Ue:(e.className=qe,oi(t)?e.appendChild(t):Si(e,t)),e}function Ei(t,e){oi(e.content)?(Si(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Si(t,e.content):t.textContent=e.content)}function Pi(t){var e=t.firstElementChild,i=ii(e.children);return{box:e,content:i.find((function(t){return t.classList.contains(He)})),arrow:i.find((function(t){return t.classList.contains(Ue)||t.classList.contains(qe)})),backdrop:i.find((function(t){return t.classList.contains($e)}))}}function Ti(t){var e=ri(),i=ri();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=ri();function r(i,n){var r=Pi(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Ei(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Mi(n.arrow))):o.appendChild(Mi(n.arrow)):a&&o.removeChild(a)}return n.className=He,n.setAttribute("data-state","hidden"),Ei(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Ti.$$tippy=!0;var Li=1,Ai=[],Ci=[];function Di(t,e){var i,n,r,o,s,a,c,l,h=Oi(t,Object.assign({},_i,ki(ni(e)))),u=!1,d=!1,f=!1,p=!1,g=[],m=Qe(Y,h.interactiveDebounce),b=Li++,v=(l=h.plugins).filter((function(t,e){return l.indexOf(t)===e})),y={id:b,reference:t,popper:ri(),popperInstance:null,props:h,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(r)},setProps:function(e){0;if(y.state.isDestroyed)return;D("onBeforeUpdate",[y,e]),U();var i=y.props,n=Oi(t,Object.assign({},i,ni(e),{ignoreAttributes:!0}));y.props=n,$(),i.interactiveDebounce!==n.interactiveDebounce&&(R(),m=Qe(Y,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?Ze(i.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&t.removeAttribute("aria-expanded");I(),C(),w&&w(i,n);y.popperInstance&&(J(),Z().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));D("onAfterUpdate",[y,e])},setContent:function(t){y.setProps({content:t})},show:function(){0;var t=y.state.isVisible,e=y.state.isDestroyed,i=!y.state.isEnabled,n=pi.isTouch&&!y.props.touch,r=Ge(y.props.duration,0,_i.duration);if(t||e||i||n)return;if(P().hasAttribute("disabled"))return;if(D("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,E()&&(_.style.visibility="visible");C(),B(),y.state.isMounted||(_.style.transition="none");if(E()){var o=L();li([o.box,o.content],0)}a=function(){var t;if(y.state.isVisible&&!p){if(p=!0,_.offsetHeight,_.style.transition=y.props.moveTransition,E()&&y.props.animation){var e=L(),i=e.box,n=e.content;li([i,n],r),hi([i,n],"visible")}j(),I(),ti(Ci,y),null==(t=y.popperInstance)||t.forceUpdate(),D("onMount",[y]),y.props.animation&&E()&&function(t,e){V(t,e)}(r,(function(){y.state.isShown=!0,D("onShown",[y])}))}},function(){var t,e=y.props.appendTo,i=P();t=y.props.interactive&&e===Xe||"parent"===e?i.parentNode:Je(e,[i]);t.contains(_)||t.appendChild(_);y.state.isMounted=!0,J(),!1}()},hide:function(){0;var t=!y.state.isVisible,e=y.state.isDestroyed,i=!y.state.isEnabled,n=Ge(y.props.duration,1,_i.duration);if(t||e||i)return;if(D("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,p=!1,u=!1,E()&&(_.style.visibility="hidden");if(R(),W(),C(!0),E()){var r=L(),o=r.box,s=r.content;y.props.animation&&(li([o,s],n),hi([o,s],"hidden"))}j(),I(),y.props.animation?E()&&function(t,e){V(t,(function(){!y.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&e()}))}(n,y.unmount):y.unmount()},hideWithInteractivity:function(t){0;T().addEventListener("mousemove",m),ti(Ai,m),m(t)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){0;y.state.isVisible&&y.hide();if(!y.state.isMounted)return;Q(),Z().forEach((function(t){t._tippy.unmount()})),_.parentNode&&_.parentNode.removeChild(_);Ci=Ci.filter((function(t){return t!==y})),y.state.isMounted=!1,D("onHidden",[y])},destroy:function(){0;if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),U(),delete t._tippy,y.state.isDestroyed=!0,D("onDestroy",[y])}};if(!h.render)return y;var x=h.render(y),_=x.popper,w=x.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+y.id,y.popper=_,t._tippy=y,_._tippy=y;var k=v.map((function(t){return t.fn(y)})),O=t.hasAttribute("aria-expanded");return $(),I(),C(),D("onCreate",[y]),h.showOnCreate&&tt(),_.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),_.addEventListener("mouseleave",(function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",m)})),y;function S(){var t=y.props.touch;return Array.isArray(t)?t:[t,0]}function M(){return"hold"===S()[0]}function E(){var t;return!(null==(t=y.props.render)||!t.$$tippy)}function P(){return c||t}function T(){var t=P().parentNode;return t?ui(t):document}function L(){return Pi(_)}function A(t){return y.state.isMounted&&!y.state.isVisible||pi.isTouch||o&&"focus"===o.type?0:Ge(y.props.delay,t?0:1,_i.delay)}function C(t){void 0===t&&(t=!1),_.style.pointerEvents=y.props.interactive&&!t?"":"none",_.style.zIndex=""+y.props.zIndex}function D(t,e,i){var n;(void 0===i&&(i=!0),k.forEach((function(i){i[t]&&i[t].apply(i,e)})),i)&&(n=y.props)[t].apply(n,e)}function j(){var e=y.props.aria;if(e.content){var i="aria-"+e.content,n=_.id;Ze(y.props.triggerTarget||t).forEach((function(t){var e=t.getAttribute(i);if(y.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}}))}}function I(){!O&&y.props.aria.expanded&&Ze(y.props.triggerTarget||t).forEach((function(t){y.props.interactive?t.setAttribute("aria-expanded",y.state.isVisible&&t===P()?"true":"false"):t.removeAttribute("aria-expanded")}))}function R(){T().removeEventListener("mousemove",m),Ai=Ai.filter((function(t){return t!==m}))}function F(e){if(!pi.isTouch||!f&&"mousedown"!==e.type){var i=e.composedPath&&e.composedPath()[0]||e.target;if(!y.props.interactive||!fi(_,i)){if(Ze(y.props.triggerTarget||t).some((function(t){return fi(t,i)}))){if(pi.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[y,e]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),d=!0,setTimeout((function(){d=!1})),y.state.isMounted||W())}}}function z(){f=!0}function N(){f=!1}function B(){var t=T();t.addEventListener("mousedown",F,!0),t.addEventListener("touchend",F,Ye),t.addEventListener("touchstart",N,Ye),t.addEventListener("touchmove",z,Ye)}function W(){var t=T();t.removeEventListener("mousedown",F,!0),t.removeEventListener("touchend",F,Ye),t.removeEventListener("touchstart",N,Ye),t.removeEventListener("touchmove",z,Ye)}function V(t,e){var i=L().box;function n(t){t.target===i&&(di(i,"remove",n),e())}if(0===t)return e();di(i,"remove",s),di(i,"add",n),s=n}function H(e,i,n){void 0===n&&(n=!1),Ze(y.props.triggerTarget||t).forEach((function(t){t.addEventListener(e,i,n),g.push({node:t,eventType:e,handler:i,options:n})}))}function $(){var t;M()&&(H("touchstart",q,{passive:!0}),H("touchend",X,{passive:!0})),(t=y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(H(t,q),t){case"mouseenter":H("mouseleave",X);break;case"focus":H(yi?"focusout":"blur",G);break;case"focusin":H("focusout",G)}}))}function U(){g.forEach((function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)})),g=[]}function q(t){var e,i=!1;if(y.state.isEnabled&&!K(t)&&!d){var n="focus"===(null==(e=o)?void 0:e.type);o=t,c=t.currentTarget,I(),!y.state.isVisible&&si(t)&&Ai.forEach((function(e){return e(t)})),"click"===t.type&&(y.props.trigger.indexOf("mouseenter")<0||u)&&!1!==y.props.hideOnClick&&y.state.isVisible?i=!0:tt(t),"click"===t.type&&(u=!i),i&&!n&&et(t)}}function Y(t){var e=t.target,i=P().contains(e)||_.contains(e);if("mousemove"!==t.type||!i){var n=Z().concat(_).map((function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:h}:null})).filter(Boolean);(function(t,e){var i=e.clientX,n=e.clientY;return t.every((function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=ei(r.placement),a=r.modifiersData.offset;if(!a)return!0;var c="bottom"===s?a.top.y:0,l="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+c>o,f=n-e.bottom-l>o,p=e.left-i+h>o,g=i-e.right-u>o;return d||f||p||g}))})(n,t)&&(R(),et(t))}}function X(t){K(t)||y.props.trigger.indexOf("click")>=0&&u||(y.props.interactive?y.hideWithInteractivity(t):et(t))}function G(t){y.props.trigger.indexOf("focusin")<0&&t.target!==P()||y.props.interactive&&t.relatedTarget&&_.contains(t.relatedTarget)||et(t)}function K(t){return!!pi.isTouch&&M()!==t.type.indexOf("touch")>=0}function J(){Q();var e=y.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,c=E()?Pi(_).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||P()}:t,h={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(E()){var i=L().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)})),e.attributes.popper={}}}},u=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},h];E()&&c&&u.push({name:"arrow",options:{element:c,padding:3}}),u.push.apply(u,(null==i?void 0:i.modifiers)||[]),y.popperInstance=Ve(l,_,Object.assign({},i,{placement:n,onFirstUpdate:a,modifiers:u}))}function Q(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Z(){return ii(_.querySelectorAll("[data-tippy-root]"))}function tt(t){y.clearDelayTimeouts(),t&&D("onTrigger",[y,t]),B();var e=A(!0),n=S(),r=n[0],o=n[1];pi.isTouch&&"hold"===r&&o&&(e=o),e?i=setTimeout((function(){y.show()}),e):y.show()}function et(t){if(y.clearDelayTimeouts(),D("onUntrigger",[y,t]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&u)){var e=A(!1);e?n=setTimeout((function(){y.state.isVisible&&y.hide()}),e):r=requestAnimationFrame((function(){y.hide()}))}}else W()}}function ji(t,e){void 0===e&&(e={});var i=_i.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",mi,Ye),window.addEventListener("blur",vi);var n=Object.assign({},e,{plugins:i}),r=ci(t).reduce((function(t,e){var i=e&&Di(e,n);return i&&t.push(i),t}),[]);return oi(t)?r[0]:r}ji.defaultProps=_i,ji.setDefaultProps=function(t){Object.keys(t).forEach((function(e){_i[e]=t[e]}))},ji.currentInput=pi;Object.assign({},Oe,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});ji.setDefaultProps({render:Ti});var Ii=ji,Ri=i(951),Fi=i.n(Ri);const zi={controlled:null,bind(t){this.controlled=t,this.controlled.forEach((t=>{this._main(t)})),this._init()},_init(){this.controlled.forEach((t=>{this._checkUp(t)}))},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map((e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i})),this._bindEvents(t),t.mains.forEach((t=>{this._bindEvents(t)}))},_bindEvents(t){t.eventBound||(t.addEventListener("click",(e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)})),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1<i&&t.elements.splice(i,1)},_checkDown(t){t.elements&&(t.classList.remove("partial"),t.elements.forEach((e=>{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))})),t.elements.forEach((e=>{this._checkDown(e),e.elements||this._checkUp(e,t)})))},_checkUp(t,e){t.mains&&[...t.mains].forEach((t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)}))},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach((n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)}));let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach((e=>{e.checked&&(t.filesize+=e.filesize)}));let e=null;0<t.filesize&&(e=Fi()(t.filesize,{spacer:" "}).human("jedec")),t.sizespan.innerText=e}}};var Ni=zi,Bi=i(941),Wi=i.n(Bi);function Vi(){}const Hi=function(){let t=0;return function(){return t++}}();function $i(t){return null==t}function Ui(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function qi(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const Yi=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function Xi(t,e){return Yi(t)?t:e}function Gi(t,e){return void 0===t?e:t}const Ki=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Ji(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function Qi(t,e,i,n){let r,o,s;if(Ui(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r<o;r++)e.call(i,t[r],r);else if(qi(t))for(s=Object.keys(t),o=s.length,r=0;r<o;r++)e.call(i,t[s[r]],s[r])}function Zi(t,e){let i,n,r,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(r=t[i],o=e[i],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function tn(t){if(Ui(t))return t.map(tn);if(qi(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let r=0;for(;r<n;++r)e[i[r]]=tn(t[i[r]]);return e}return t}function en(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function nn(t,e,i,n){if(!en(t))return;const r=e[t],o=i[t];qi(r)&&qi(o)?rn(r,o,n):e[t]=tn(o)}function rn(t,e,i){const n=Ui(e)?e:[e],r=n.length;if(!qi(t))return t;const o=(i=i||{}).merger||nn;for(let s=0;s<r;++s){if(!qi(e=n[s]))continue;const r=Object.keys(e);for(let n=0,s=r.length;n<s;++n)o(r[n],t,e,i)}return t}function on(t,e){return rn(t,e,{merger:sn})}function sn(t,e,i){if(!en(t))return;const n=e[t],r=i[t];qi(n)&&qi(r)?on(n,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=tn(r))}const an={"":t=>t,x:t=>t.x,y:t=>t.y};function cn(t,e){const i=an[e]||(an[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function ln(t){return t.charAt(0).toUpperCase()+t.slice(1)}const hn=t=>void 0!==t,un=t=>"function"==typeof t,dn=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const fn=Math.PI,pn=2*fn,gn=pn+fn,mn=Number.POSITIVE_INFINITY,bn=fn/180,vn=fn/2,yn=fn/4,xn=2*fn/3,_n=Math.log10,wn=Math.sign;function kn(t){const e=Math.round(t);t=Sn(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(_n(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function On(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Sn(t,e,i){return Math.abs(t-e)<i}function Mn(t,e,i){let n,r,o;for(n=0,r=t.length;n<r;n++)o=t[n][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function En(t){return t*(fn/180)}function Pn(t){return t*(180/fn)}function Tn(t){if(!Yi(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ln(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*fn&&(o+=pn),{angle:o,distance:r}}function An(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Cn(t,e){return(t-e+gn)%pn-fn}function Dn(t){return(t%pn+pn)%pn}function jn(t,e,i,n){const r=Dn(t),o=Dn(e),s=Dn(i),a=Dn(o-r),c=Dn(s-r),l=Dn(r-o),h=Dn(r-s);return r===o||r===s||n&&o===s||a>c&&l<h}function In(t,e,i){return Math.max(e,Math.min(i,t))}function Rn(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function Fn(t,e,i){i=i||(i=>t[i]<e);let n,r=t.length-1,o=0;for(;r-o>1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const zn=(t,e,i,n)=>Fn(t,i,n?n=>t[n][e]<=i:n=>t[n][e]<i),Nn=(t,e,i)=>Fn(t,i,(n=>t[n][e]>=i));const Bn=["push","pop","shift","splice","unshift"];function Wn(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Bn.forEach((e=>{delete t[e]})),delete t._chartjs)}function Vn(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}const Hn="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function $n(t,e,i){const n=i||(t=>Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,Hn.call(window,(()=>{r=!1,t.apply(e,o)})))}}const Un=t=>"start"===t?"left":"end"===t?"right":"center",qn=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Yn(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,c=s.axis,{min:l,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=In(Math.min(zn(a,s.axis,l).lo,i?n:zn(e,c,s.getPixelForValue(l)).lo),0,n-1)),o=d?In(Math.max(zn(a,s.axis,h,!0).hi+1,i?0:zn(e,c,s.getPixelForValue(h),!0).hi+1),r,n)-r:n-r}return{start:r,count:o}}function Xn(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}const Gn=t=>0===t||1===t,Kn=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*pn/i),Jn=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*pn/i)+1,Qn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*vn),easeOutSine:t=>Math.sin(t*vn),easeInOutSine:t=>-.5*(Math.cos(fn*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Gn(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Gn(t)?t:Kn(t,.075,.3),easeOutElastic:t=>Gn(t)?t:Jn(t,.075,.3),easeInOutElastic(t){const e=.1125;return Gn(t)?t:t<.5?.5*Kn(2*t,e,.45):.5+.5*Jn(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Qn.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Qn.easeInBounce(2*t):.5*Qn.easeOutBounce(2*t-1)+.5};function Zn(t){return t+.5|0}const tr=(t,e,i)=>Math.max(Math.min(t,i),e);function er(t){return tr(Zn(2.55*t),0,255)}function ir(t){return tr(Zn(255*t),0,255)}function nr(t){return tr(Zn(t/2.55)/100,0,1)}function rr(t){return tr(Zn(100*t),0,100)}const or={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},sr=[..."0123456789ABCDEF"],ar=t=>sr[15&t],cr=t=>sr[(240&t)>>4]+sr[15&t],lr=t=>(240&t)>>4==(15&t);function hr(t){var e=(t=>lr(t.r)&&lr(t.g)&&lr(t.b)&&lr(t.a))(t)?ar:cr;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const ur=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function dr(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function fr(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function pr(t,e,i){const n=dr(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function gr(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,c,l;return r!==o&&(l=r-o,c=s>.5?l/(2-r-o):l/(r+o),a=function(t,e,i,n,r){return t===r?(e-i)/n+(e<i?6:0):e===r?(i-t)/n+2:(t-e)/n+4}(e,i,n,l,r),a=60*a+.5),[0|a,c||0,s]}function mr(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(ir)}function br(t,e,i){return mr(dr,t,e,i)}function vr(t){return(t%360+360)%360}function yr(t){const e=ur.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?er(+e[5]):ir(+e[5]));const r=vr(+e[2]),o=+e[3]/100,s=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return mr(pr,t,e,i)}(r,o,s):"hsv"===e[1]?function(t,e,i){return mr(fr,t,e,i)}(r,o,s):br(r,o,s),{r:i[0],g:i[1],b:i[2],a:n}}const xr={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},_r={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let wr;function kr(t){wr||(wr=function(){const t={},e=Object.keys(_r),i=Object.keys(xr);let n,r,o,s,a;for(n=0;n<e.length;n++){for(s=a=e[n],r=0;r<i.length;r++)o=i[r],a=a.replace(o,xr[o]);o=parseInt(_r[s],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),wr.transparent=[0,0,0,0]);const e=wr[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Or=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Sr=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Mr=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Er(t,e,i){if(t){let n=gr(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=br(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Pr(t,e){return t?Object.assign(e||{},t):t}function Tr(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ir(t[3]))):(e=Pr(t,{r:0,g:0,b:0,a:1})).a=ir(e.a),e}function Lr(t){return"r"===t.charAt(0)?function(t){const e=Or.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?er(t):tr(255*t,0,255)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?er(i):tr(i,0,255)),n=255&(e[4]?er(n):tr(n,0,255)),r=255&(e[6]?er(r):tr(r,0,255)),{r:i,g:n,b:r,a:o}}}(t):yr(t)}class Ar{constructor(t){if(t instanceof Ar)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Tr(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*or[n[1]],g:255&17*or[n[2]],b:255&17*or[n[3]],a:5===o?17*or[n[4]]:255}:7!==o&&9!==o||(r={r:or[n[1]]<<4|or[n[2]],g:or[n[3]]<<4|or[n[4]],b:or[n[5]]<<4|or[n[6]],a:9===o?or[n[7]]<<4|or[n[8]]:255})),i=r||kr(t)||Lr(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Pr(this._rgb);return t&&(t.a=nr(t.a)),t}set rgb(t){this._rgb=Tr(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${nr(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?hr(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=gr(t),i=e[0],n=rr(e[1]),r=rr(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${nr(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let r;const o=e===r?.5:e,s=2*o-1,a=i.a-n.a,c=((s*a==-1?s:(s+a)/(1+s*a))+1)/2;r=1-c,i.r=255&c*i.r+r*n.r+.5,i.g=255&c*i.g+r*n.g+.5,i.b=255&c*i.b+r*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=Mr(nr(t.r)),r=Mr(nr(t.g)),o=Mr(nr(t.b));return{r:ir(Sr(n+i*(Mr(nr(e.r))-n))),g:ir(Sr(r+i*(Mr(nr(e.g))-r))),b:ir(Sr(o+i*(Mr(nr(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Ar(this.rgb)}alpha(t){return this._rgb.a=ir(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Zn(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Er(this._rgb,2,t),this}darken(t){return Er(this._rgb,2,-t),this}saturate(t){return Er(this._rgb,1,t),this}desaturate(t){return Er(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=gr(t);i[0]=vr(i[0]+e),i=br(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Cr(t){return new Ar(t)}function Dr(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function jr(t){return Dr(t)?t:Cr(t)}function Ir(t){return Dr(t)?t:Cr(t).saturate(.5).darken(.1).hexString()}const Rr=Object.create(null),Fr=Object.create(null);function zr(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function Nr(t,e,i){return"string"==typeof e?rn(zr(t,e),i):rn(zr(t,""),e)}var Br=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Ir(e.backgroundColor),this.hoverBorderColor=(t,e)=>Ir(e.borderColor),this.hoverColor=(t,e)=>Ir(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Nr(this,t,e)}get(t){return zr(this,t)}describe(t,e){return Nr(Fr,t,e)}override(t,e){return Nr(Rr,t,e)}route(t,e,i,n){const r=zr(this,t),o=zr(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return qi(t)?Object.assign({},e,t):Gi(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Wr(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function Vr(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let c,l,h,u,d;for(c=0;c<a;c++)if(u=i[c],null!=u&&!0!==Ui(u))s=Wr(t,r,o,s,u);else if(Ui(u))for(l=0,h=u.length;l<h;l++)d=u[l],null==d||Ui(d)||(s=Wr(t,r,o,s,d));t.restore();const f=o.length/2;if(f>i.length){for(c=0;c<f;c++)delete r[o[c]];o.splice(0,f)}return s}function Hr(t,e,i){const n=t.currentDevicePixelRatio,r=0!==i?Math.max(i/2,.5):0;return Math.round((e-r)*n)/n+r}function $r(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ur(t,e,i,n){qr(t,e,i,n,null)}function qr(t,e,i,n,r){let o,s,a,c,l,h;const u=e.pointStyle,d=e.rotation,f=e.radius;let p=(d||0)*bn;if(u&&"object"==typeof u&&(o=u.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(p),t.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),void t.restore();if(!(isNaN(f)||f<=0)){switch(t.beginPath(),u){default:r?t.ellipse(i,n,r/2,f,0,0,pn):t.arc(i,n,f,0,pn),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(p)*f,n-Math.cos(p)*f),p+=xn,t.lineTo(i+Math.sin(p)*f,n-Math.cos(p)*f),p+=xn,t.lineTo(i+Math.sin(p)*f,n-Math.cos(p)*f),t.closePath();break;case"rectRounded":l=.516*f,c=f-l,s=Math.cos(p+yn)*c,a=Math.sin(p+yn)*c,t.arc(i-s,n-a,l,p-fn,p-vn),t.arc(i+a,n-s,l,p-vn,p),t.arc(i+s,n+a,l,p,p+vn),t.arc(i-a,n+s,l,p+vn,p+fn),t.closePath();break;case"rect":if(!d){c=Math.SQRT1_2*f,h=r?r/2:c,t.rect(i-h,n-c,2*h,2*c);break}p+=yn;case"rectRot":s=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":p+=yn;case"cross":s=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),p+=yn,s=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=r?r/2:Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(p)*f,n+Math.sin(p)*f)}t.fill(),e.borderWidth>0&&t.stroke()}}function Yr(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Xr(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Gr(t){t.restore()}function Kr(t,e,i,n,r){if(!e)return t.lineTo(i.x,i.y);if("middle"===r){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===r!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Jr(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Qr(t,e,i,n,r,o={}){const s=Ui(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let c,l;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);$i(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),c=0;c<s.length;++c)l=s[c],a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),$i(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(l,i,n,o.maxWidth)),t.fillText(l,i,n,o.maxWidth),Zr(t,i,n,l,o),n+=r.lineHeight;t.restore()}function Zr(t,e,i,n,r){if(r.strikethrough||r.underline){const o=t.measureText(n),s=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,c=i-o.actualBoundingBoxAscent,l=i+o.actualBoundingBoxDescent,h=r.strikethrough?(c+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(s,h),t.lineTo(a,h),t.stroke()}}function to(t,e){const{x:i,y:n,w:r,h:o,radius:s}=e;t.arc(i+s.topLeft,n+s.topLeft,s.topLeft,-vn,fn,!0),t.lineTo(i,n+o-s.bottomLeft),t.arc(i+s.bottomLeft,n+o-s.bottomLeft,s.bottomLeft,fn,vn,!0),t.lineTo(i+r-s.bottomRight,n+o),t.arc(i+r-s.bottomRight,n+o-s.bottomRight,s.bottomRight,vn,0,!0),t.lineTo(i+r,n+s.topRight),t.arc(i+r-s.topRight,n+s.topRight,s.topRight,0,-vn,!0),t.lineTo(i+s.topLeft,n)}const eo=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),io=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function no(t,e){const i=(""+t).match(eo);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function ro(t,e){const i={},n=qi(e),r=n?Object.keys(e):e,o=qi(t)?n?i=>Gi(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function oo(t){return ro(t,{top:"y",right:"x",bottom:"y",left:"x"})}function so(t){return ro(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ao(t){const e=oo(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function co(t,e){t=t||{},e=e||Br.font;let i=Gi(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=Gi(t.style,e.style);n&&!(""+n).match(io)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:Gi(t.family,e.family),lineHeight:no(Gi(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:Gi(t.weight,e.weight),string:""};return r.string=function(t){return!t||$i(t.size)||$i(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function lo(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;r<o;++r)if(s=t[r],void 0!==s&&(void 0!==e&&"function"==typeof s&&(s=s(e),a=!1),void 0!==i&&Ui(s)&&(s=s[i%s.length],a=!1),void 0!==s))return n&&!a&&(n.cacheable=!1),s}function ho(t,e){return Object.assign(Object.create(t),e)}function uo(t,e=[""],i=t,n,r=()=>t[0]){hn(n)||(n=ko("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>uo([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>bo(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=ko(go(o,t),i),hn(r))return mo(t,r)?_o(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Oo(t).includes(e),ownKeys:t=>Oo(t),set(t,e,i){const n=t._storage||(t._storage=r());return t[e]=n[e]=i,delete t._keys,!0}})}function fo(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:po(t,n),setContext:e=>fo(t,e,i,n),override:r=>fo(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>bo(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];un(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),mo(t,e)&&(e=_o(r._scopes,r,t,e));return e}(e,a,t,i));Ui(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(hn(o.index)&&n(t))e=e[o.index%e.length];else if(qi(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const c of i){const i=_o(n,r,t,c);e.push(fo(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));mo(e,a)&&(a=fo(a,r,o&&o[e],s));return a}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function po(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:un(i)?i:()=>i,isIndexable:un(n)?n:()=>n}}const go=(t,e)=>t?t+ln(e):e,mo=(t,e)=>qi(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function bo(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function vo(t,e,i){return un(t)?t(e,i):t}const yo=(t,e)=>!0===t?e:"string"==typeof t?cn(e,t):void 0;function xo(t,e,i,n,r){for(const o of e){const e=yo(i,o);if(e){t.add(e);const o=vo(e._fallback,i,r);if(hn(o)&&o!==i&&o!==n)return o}else if(!1===e&&hn(n)&&i!==n)return null}return!1}function _o(t,e,i,n){const r=e._rootScopes,o=vo(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let c=wo(a,s,i,o||i,n);return null!==c&&((!hn(o)||o===i||(c=wo(a,s,o,c,n),null!==c))&&uo(Array.from(a),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(Ui(r)&&qi(i))return i;return r}(e,i,n))))}function wo(t,e,i,n,r){for(;i;)i=xo(t,e,i,n,r);return i}function ko(t,e){for(const i of e){if(!i)continue;const e=i[t];if(hn(e))return e}}function Oo(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function So(t,e,i,n){const{iScale:r}=t,{key:o="r"}=this._parsing,s=new Array(n);let a,c,l,h;for(a=0,c=n;a<c;++a)l=a+i,h=e[l],s[a]={r:r.parse(cn(h,o),l)};return s}const Mo=Number.EPSILON||1e-14,Eo=(t,e)=>e<t.length&&!t[e].skip&&t[e],Po=t=>"x"===t?"y":"x";function To(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=An(o,r),c=An(s,o);let l=a/(a+c),h=c/(a+c);l=isNaN(l)?0:l,h=isNaN(h)?0:h;const u=n*l,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Lo(t,e="x"){const i=Po(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,c,l=Eo(t,0);for(s=0;s<n;++s)if(a=c,c=l,l=Eo(t,s+1),c){if(l){const t=l[e]-c[e];r[s]=0!==t?(l[i]-c[i])/t:0}o[s]=a?l?wn(r[s-1])!==wn(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}!function(t,e,i){const n=t.length;let r,o,s,a,c,l=Eo(t,0);for(let h=0;h<n-1;++h)c=l,l=Eo(t,h+1),c&&l&&(Sn(e[h],0,Mo)?i[h]=i[h+1]=0:(r=i[h]/e[h],o=i[h+1]/e[h],a=Math.pow(r,2)+Math.pow(o,2),a<=9||(s=3/Math.sqrt(a),i[h]=r*s*e[h],i[h+1]=o*s*e[h])))}(t,r,o),function(t,e,i="x"){const n=Po(i),r=t.length;let o,s,a,c=Eo(t,0);for(let l=0;l<r;++l){if(s=a,a=c,c=Eo(t,l+1),!a)continue;const r=a[i],h=a[n];s&&(o=(r-s[i])/3,a[`cp1${i}`]=r-o,a[`cp1${n}`]=h-o*e[l]),c&&(o=(c[i]-r)/3,a[`cp2${i}`]=r+o,a[`cp2${n}`]=h+o*e[l])}}(t,o,e)}function Ao(t,e,i){return Math.max(Math.min(t,i),e)}function Co(t,e,i,n,r){let o,s,a,c;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Lo(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;o<s;++o)a=t[o],c=To(i,a,t[Math.min(o+1,s-(n?0:1))%s],e.tension),a.cp1x=c.previous.x,a.cp1y=c.previous.y,a.cp2x=c.next.x,a.cp2y=c.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,r,o,s,a=Yr(t[0],e);for(i=0,n=t.length;i<n;++i)s=o,o=a,a=i<n-1&&Yr(t[i+1],e),o&&(r=t[i],s&&(r.cp1x=Ao(r.cp1x,e.left,e.right),r.cp1y=Ao(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=Ao(r.cp2x,e.left,e.right),r.cp2y=Ao(r.cp2y,e.top,e.bottom)))}(t,i)}function Do(){return"undefined"!=typeof window&&"undefined"!=typeof document}function jo(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Io(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const Ro=t=>window.getComputedStyle(t,null);const Fo=["top","right","bottom","left"];function zo(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=Fo[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function No(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,r=Ro(i),o="border-box"===r.boxSizing,s=zo(r,"padding"),a=zo(r,"border","width"),{x:c,y:l,box:h}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:r,offsetY:o}=n;let s,a,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(r,o,t.target))s=r,a=o;else{const t=e.getBoundingClientRect();s=n.clientX-t.left,a=n.clientY-t.top,c=!0}return{x:s,y:a,box:c}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((c-u)/f*i.width/n),y:Math.round((l-d)/p*i.height/n)}}const Bo=t=>Math.round(10*t)/10;function Wo(t,e,i,n){const r=Ro(t),o=zo(r,"margin"),s=Io(r.maxWidth,t,"clientWidth")||mn,a=Io(r.maxHeight,t,"clientHeight")||mn,c=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=jo(t);if(o){const t=o.getBoundingClientRect(),s=Ro(o),a=zo(s,"border","width"),c=zo(s,"padding");e=t.width-c.width-a.width,i=t.height-c.height-a.height,n=Io(s.maxWidth,o,"clientWidth"),r=Io(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||mn,maxHeight:r||mn}}(t,e,i);let{width:l,height:h}=c;if("content-box"===r.boxSizing){const t=zo(r,"border","width"),e=zo(r,"padding");l-=e.width+t.width,h-=e.height+t.height}return l=Math.max(0,l-o.width),h=Math.max(0,n?Math.floor(l/n):h-o.height),l=Bo(Math.min(l,s,c.maxWidth)),h=Bo(Math.min(h,a,c.maxHeight)),l&&!h&&(h=Bo(l/2)),{width:l,height:h}}function Vo(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ho=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function $o(t,e){const i=function(t,e){return Ro(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Uo(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function qo(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Yo(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=Uo(t,r,i),a=Uo(r,o,i),c=Uo(o,e,i),l=Uo(s,a,i),h=Uo(a,c,i);return Uo(l,h,i)}const Xo=new Map;function Go(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Xo.get(i);return n||(n=new Intl.NumberFormat(t,e),Xo.set(i,n)),n}(e,i).format(t)}function Ko(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Jo(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Qo(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Zo(t){return"angle"===t?{between:jn,compare:Cn,normalize:Dn}:{between:Rn,compare:(t,e)=>t-e,normalize:t=>t}}function ts({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function es(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:c,normalize:l}=Zo(n),{start:h,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=Zo(n),c=e.length;let l,h,{start:u,end:d,loop:f}=t;if(f){for(u+=c,d+=c,l=0,h=c;l<h&&s(a(e[u%c][n]),r,o);++l)u--,d--;u%=c,d%=c}return d<u&&(d+=c),{start:u,end:d,loop:f,style:t.style}}(t,e,i),p=[];let g,m,b,v=!1,y=null;const x=()=>v||c(r,b,g)&&0!==a(r,b),_=()=>!v||0===a(o,g)||c(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=l(m[n]),g!==b&&(v=c(g,r,o),null===y&&x()&&(y=0===a(g,r)?t:i),null!==y&&_()&&(p.push(ts({start:y,end:t,loop:d,count:s,style:f})),y=null),i=t,b=g));return null!==y&&p.push(ts({start:y,end:u,loop:d,count:s,style:f})),p}function is(t,e){const i=[],n=t.segments;for(let r=0;r<n.length;r++){const o=es(n[r],t.points,e);o.length&&i.push(...o)}return i}function ns(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const r=t._chart.getContext(),o=rs(t.options),{_datasetIndex:s,options:{spanGaps:a}}=t,c=i.length,l=[];let h=o,u=e[0].start,d=u;function f(t,e,n,r){const o=a?-1:1;if(t!==e){for(t+=c;i[t%c].skip;)t-=o;for(;i[e%c].skip;)e+=o;t%c!=e%c&&(l.push({start:t%c,end:e%c,loop:n,style:r}),h=r,u=e%c)}}for(const t of e){u=a?u:t.start;let e,o=i[u%c];for(d=u+1;d<=t.end;d++){const a=i[d%c];e=rs(n.setContext(ho(r,{type:"segment",p0:o,p1:a,p0DataIndex:(d-1)%c,p1DataIndex:d%c,datasetIndex:s}))),os(e,h)&&f(u,d-1,t.loop,h),o=a,h=e}u<d-1&&f(u,d-1,t.loop,h)}return l}(t,e,i,n):e}function rs(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function os(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var ss=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const r=e.listeners[n],o=e.duration;r.forEach((n=>n({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=Hn.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const as="transparent",cs={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=jr(t||as),r=n.valid&&jr(e||as);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class ls{constructor(t,e,i,n){const r=e[i];n=lo([t.to,n,r,t.from]);const o=lo([t.from,r,n]);this._active=!0,this._fn=t.fn||cs[t.type||typeof o],this._easing=Qn[t.easing]||Qn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=lo([t.to,e,n,t.from]),this._from=lo([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e<i),!this._active)return this._target[n]=s,void this._notify(!0);e<0?this._target[n]=r:(a=e/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}Br.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const hs=Object.keys(Br.animation);Br.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Br.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Br.describe("animations",{_fallback:"animation"}),Br.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class us{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!qi(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!qi(n))return;const r={};for(const t of hs)r[t]=n[t];(Ui(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const r=t[n[e]];r&&r.active()&&i.push(r.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const c=o[a];if("$"===c.charAt(0))continue;if("options"===c){n.push(...this._animateOptions(t,e));continue}const l=e[c];let h=r[c];const u=i.get(c);if(h){if(u&&h.active()){h.update(u,l,s);continue}h.cancel()}u&&u.duration?(r[c]=h=new ls(u,t,c,l),n.push(h)):t[c]=l}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ss.add(this._chart,i),!0):void 0}}function ds(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function fs(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r<o;++r)i.push(n[r].index);return i}function ps(t,e,i,n={}){const r=t.keys,o="single"===n.mode;let s,a,c,l;if(null!==e){for(s=0,a=r.length;s<a;++s){if(c=+r[s],c===i){if(n.all)continue;break}l=t.values[c],Yi(l)&&(o||0===e||wn(e)===wn(l))&&(e+=l)}return e}}function gs(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function ms(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function bs(t,e,i,n){for(const r of e.getMatchingVisibleMetas(n).reverse()){const e=t[r.index];if(i&&e>0||!i&&e<0)return r.index}return null}function vs(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,c=o.axis,l=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;t<u;++t){const i=e[t],{[c]:o,[l]:u}=i;d=(i._stacks||(i._stacks={}))[l]=ms(r,h,o),d[a]=u,d._top=bs(d,s,!0,n.type),d._bottom=bs(d,s,!1,n.type)}}function ys(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function xs(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const _s=t=>"reset"===t||"none"===t,ws=(t,e)=>e?t:Object.assign({},t);class ks{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=gs(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&xs(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=Gi(i.xAxisID,ys(t,"x")),o=e.yAxisID=Gi(i.yAxisID,ys(t,"y")),s=e.rAxisID=Gi(i.rAxisID,ys(t,"r")),a=e.indexAxis,c=e.iAxisID=n(a,r,o,s),l=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(l)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Wn(this._data,this),t._stacked&&xs(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(qi(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n<r;++n)o=e[n],i[n]={x:o,y:t[o]};return i}(e);else if(i!==e){if(i){Wn(i,this);const t=this._cachedMeta;xs(t),t._parsed=[]}e&&Object.isExtensible(e)&&(r=this,(n=e)._chartjs?n._chartjs.listeners.push(r):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[r]}}),Bn.forEach((t=>{const e="_onData"+ln(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=gs(e.vScale,e),e.stack!==i.stack&&(n=!0,xs(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&vs(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,c,l,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,l=n;else{l=Ui(n[t])?this.parseArrayData(i,n,t,e):qi(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===c[s]||u&&c[s]<u[s];for(a=0;a<e;++a)i._parsed[a+t]=c=l[a],h&&(r()&&(h=!1),u=c);i._sorted=h}o&&vs(this,l)}parsePrimitiveData(t,e,i,n){const{iScale:r,vScale:o}=t,s=r.axis,a=o.axis,c=r.getLabels(),l=r===o,h=new Array(n);let u,d,f;for(u=0,d=n;u<d;++u)f=u+i,h[u]={[s]:l||r.parse(c[f],f),[a]:o.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:r,yScale:o}=t,s=new Array(n);let a,c,l,h;for(a=0,c=n;a<c;++a)l=a+i,h=e[l],s[a]={x:r.parse(h[0],l),y:o.parse(h[1],l)};return s}parseObjectData(t,e,i,n){const{xScale:r,yScale:o}=t,{xAxisKey:s="x",yAxisKey:a="y"}=this._parsing,c=new Array(n);let l,h,u,d;for(l=0,h=n;l<h;++l)u=l+i,d=e[u],c[l]={x:r.parse(cn(d,s),u),y:o.parse(cn(d,a),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,r=this._cachedMeta,o=e[t.axis];return ps({keys:fs(n,!0),values:e._stacks[t.axis]},o,r.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const r=i[e.axis];let o=null===r?NaN:r;const s=n&&i._stacks[e.axis];n&&s&&(n.values=s,o=ps(n,r,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,r=i._sorted&&t===i.iScale,o=n.length,s=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:fs(i,!0),values:null})(e,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:l,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function f(){d=n[u];const e=d[s.axis];return!Yi(d[t.axis])||l>e||h<e}for(u=0;u<o&&(f()||(this.updateRangeFromParsed(c,t,d,a),!r));++u);if(r)for(u=o-1;u>=0;--u)if(!f()){this.updateRangeFromParsed(c,t,d,a);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n<r;++n)o=e[n][t.axis],Yi(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,r;return qi(t)?(e=t.top,i=t.right,n=t.bottom,r=t.left):e=i=n=r=t,{top:e,right:i,bottom:n,left:r,disabled:!1===t}}(Gi(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=ds(t,i),r=ds(e,i);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],r=e.chartArea,o=[],s=this._drawStart||0,a=this._drawCount||n.length-s,c=this.options.drawActiveElementsOnTop;let l;for(i.dataset&&i.dataset.draw(t,r,s,a),l=s;l<s+a;++l){const e=n[l];e.hidden||(e.active&&c?o.push(e):e.draw(t,r))}for(l=0;l<o.length;++l)o[l].draw(t,r)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];r=e.$context||(e.$context=function(t,e,i){return ho(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),r.parsed=this.getParsed(t),r.raw=n.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=function(t,e){return ho(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=n,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n="active"===e,r=this._cachedDataOpts,o=t+"-"+e,s=r[o],a=this.enableOptionSharing&&hn(i);if(s)return ws(s,a);const c=this.chart.config,l=c.datasetElementScopeKeys(this._type,t),h=n?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),l),d=Object.keys(Br.elements[t]),f=c.resolveNamedOptions(u,d,(()=>this.getContext(i,n)),h);return f.$shared&&(f.$shared=a,r[o]=Object.freeze(ws(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const c=new us(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||_s(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(e,r)||r!==n;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:o}}updateElement(t,e,i,n){_s(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!_s(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r<n&&this._removeElements(r,n-r)}_insertElements(t,e,i=!0){const n=this._cachedMeta,r=n.data,o=t+e;let s;const a=t=>{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;s<o;++s)r[s]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(t,e),i&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&xs(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Os(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,r=i.length;e<r;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=Vn(n.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const c=()=>{32767!==o&&-32768!==o&&(hn(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;n<r;++n)o=e.getPixelForValue(i[n]),c();for(s=void 0,n=0,r=e.ticks.length;n<r;++n)o=e.getPixelForTick(n),c();return a}function Ss(t,e,i,n){return Ui(t)?function(t,e,i,n){const r=i.parse(t[0],n),o=i.parse(t[1],n),s=Math.min(r,o),a=Math.max(r,o);let c=s,l=a;Math.abs(s)>Math.abs(a)&&(c=a,l=s),e[i.axis]=l,e._custom={barStart:c,barEnd:l,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Ms(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,c=[];let l,h,u,d;for(l=i,h=i+n;l<h;++l)d=e[l],u={},u[r.axis]=a||r.parse(s[l],l),c.push(Ss(d,u,o,l));return c}function Es(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Ps(t,e,i,n){let r=e.borderSkipped;const o={};if(!r)return void(t.borderSkipped=o);if(!0===r)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:a,reverse:c,top:l,bottom:h}=function(t){let e,i,n,r,o;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(r="end",o="start"):(r="start",o="end"),{start:i,end:n,reverse:e,top:r,bottom:o}}(t);"middle"===r&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?r=l:(i._bottom||0)===n?r=h:(o[Ts(h,s,a,c)]=!0,r=l)),o[Ts(r,s,a,c)]=!0,t.borderSkipped=o}function Ts(t,e,i,n){var r,o,s;return n?(s=i,t=Ls(t=(r=t)===(o=e)?s:r===s?o:r,i,e)):t=Ls(t,e,i),t}function Ls(t,e,i){return"start"===t?e:"end"===t?i:t}function As(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}ks.defaults={},ks.prototype.datasetElementType=null,ks.prototype.dataElementType=null;class Cs extends ks{parsePrimitiveData(t,e,i,n){return Ms(t,e,i,n)}parseArrayData(t,e,i,n){return Ms(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:r,vScale:o}=t,{xAxisKey:s="x",yAxisKey:a="y"}=this._parsing,c="x"===r.axis?s:a,l="x"===o.axis?s:a,h=[];let u,d,f,p;for(u=i,d=i+n;u<d;++u)p=e[u],f={},f[r.axis]=r.parse(cn(p,c),u),h.push(Ss(cn(p,l),f,o,u));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const r=i._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,r=this.getParsed(t),o=r._custom,s=Es(o)?"["+o.start+", "+o.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const r="reset"===n,{index:o,_cachedMeta:{vScale:s}}=this,a=s.getBasePixel(),c=s.isHorizontal(),l=this._getRuler(),{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,n);for(let d=e;d<e+i;d++){const e=this.getParsed(d),i=r||$i(e[s.axis])?{base:a,head:a}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,l),p=(e._stacks||{})[s.axis],g={horizontal:c,base:i.base,enableBorderRadius:!p||Es(e._custom)||o===p._top||o===p._bottom,x:c?i.head:f.center,y:c?f.center:i.head,height:c?f.size:Math.abs(i.size),width:c?Math.abs(i.size):f.size};u&&(g.options=h||this.resolveDataElementOptions(d,t[d].active?"active":n));const m=g.options||t[d].options;Ps(g,m,p,o),As(g,m,l.ratio),this.updateElement(t[d],d,g,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),r=i.options.stacked,o=[],s=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if($i(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!s(i))&&((!1===r||-1===o.indexOf(i.stack)||void 0===r&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),r=void 0!==e?n.indexOf(e):-1;return-1===r?n.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let r,o;for(r=0,o=e.data.length;r<o;++r)n.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const s=t.barThickness;return{min:s||Os(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i},options:{base:n,minBarLength:r}}=this,o=n||0,s=this.getParsed(t),a=s._custom,c=Es(a);let l,h,u=s[e.axis],d=0,f=i?this.applyStack(e,s,i):u;f!==u&&(d=f-u,f=u),c&&(u=a.barStart,f=a.barEnd-a.barStart,0!==u&&wn(u)!==wn(a.barEnd)&&(d=0),d+=u);const p=$i(n)||c?d:n;let g=e.getPixelForValue(p);if(l=this.chart.getDataVisibility(t)?e.getPixelForValue(d+f):g,h=l-g,Math.abs(h)<r){h=function(t,e,i){return 0!==t?wn(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),n=Math.min(t,i),s=Math.max(t,i);g=Math.max(Math.min(g,s),n),l=g+h}if(g===e.getPixelForValue(o)){const t=wn(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:l,center:l+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=Gi(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,c="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t<r.length-1?r[t+1]:null;const c=i.categoryPercentage;null===s&&(s=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-s);const l=o-(o-Math.min(s,a))/2*c;return{chunk:Math.abs(a-s)/2*c/n,ratio:i.barPercentage,start:l}}(t,e,n,i):function(t,e,i,n){const r=i.barThickness;let o,s;return $i(r)?(o=e.min*i.categoryPercentage,s=i.barPercentage):(o=r*n,s=1),{chunk:o/n,ratio:s,start:e.pixels[t]-o/2}}(t,e,n,i),l=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);s=c.start+c.chunk*l+c.chunk/2,a=Math.min(o,c.chunk*c.ratio)}else s=i.getPixelForValue(this.getParsed(t)[i.axis],t),a=Math.min(o,e.min*e.ratio);return{base:s-a/2,head:s+a/2,center:s,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let r=0;for(;r<n;++r)null!==this.getParsed(r)[e.axis]&&i[r].draw(this._ctx)}}Cs.id="bar",Cs.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Cs.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Ds extends ks{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const r=super.parsePrimitiveData(t,e,i,n);for(let t=0;t<r.length;t++)r[t]._custom=this.resolveDataElementOptions(t+i).radius;return r}parseArrayData(t,e,i,n){const r=super.parseArrayData(t,e,i,n);for(let t=0;t<r.length;t++){const n=e[i+t];r[t]._custom=Gi(n[2],this.resolveDataElementOptions(t+i).radius)}return r}parseObjectData(t,e,i,n){const r=super.parseObjectData(t,e,i,n);for(let t=0;t<r.length;t++){const n=e[i+t];r[t]._custom=Gi(n&&n.r&&+n.r,this.resolveDataElementOptions(t+i).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,{sharedOptions:a,includeOptions:c}=this._getSharedOptions(e,n),l=o.axis,h=s.axis;for(let u=e;u<e+i;u++){const e=t[u],i=!r&&this.getParsed(u),d={},f=d[l]=r?o.getPixelForDecimal(.5):o.getPixelForValue(i[l]),p=d[h]=r?s.getBasePixel():s.getPixelForValue(i[h]);d.skip=isNaN(f)||isNaN(p),c&&(d.options=a||this.resolveDataElementOptions(u,e.active?"active":n),r&&(d.options.radius=0)),this.updateElement(e,u,d,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const r=n.radius;return"active"!==e&&(n.radius=0),n.radius+=Gi(i&&i._custom,r),n}}Ds.id="bubble",Ds.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Ds.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class js extends ks{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(qi(i[t])){const{key:t="value"}=this._parsing;s=e=>+cn(i[e],t)}for(r=t,o=t+e;r<o;++r)n._parsed[r]=s(r)}}_getRotation(){return En(this.options.rotation-90)}_getCircumference(){return En(this.options.circumference)}_getRotationExtents(){let t=pn,e=-pn;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const n=this.chart.getDatasetMeta(i).controller,r=n._getRotation(),o=n._getCircumference();t=Math.min(t,r),e=Math.max(e,r+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,r=n.data,o=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,s=Math.max((Math.min(i.width,i.height)-o)/2,0),a=Math.min((c=this.options.cutout,l=s,"string"==typeof c&&c.endsWith("%")?parseFloat(c)/100:c/l),1);var c,l;const h=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:m}=function(t,e,i){let n=1,r=1,o=0,s=0;if(e<pn){const a=t,c=a+e,l=Math.cos(a),h=Math.sin(a),u=Math.cos(c),d=Math.sin(c),f=(t,e,n)=>jn(t,a,c,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>jn(t,a,c,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,l,u),m=f(vn,h,d),b=p(fn,l,u),v=p(fn+vn,h,d);n=(g-b)/2,r=(m-v)/2,o=-(g+b)/2,s=-(m+v)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/f,v=(i.height-o)/p,y=Math.max(Math.min(b,v)/2,0),x=Ki(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/pn)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,c=(s.left+s.right)/2,l=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,n);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,r);for(g=e;g<e+i;++g){const e=this._circumference(g,r),i=t[g],o={x:c+this.offsetX,y:l+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:d,innerRadius:u};p&&(o.options=f||this.resolveDataElementOptions(g,i.active?"active":n)),m+=e,this.updateElement(i,g,o,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const r=t._parsed[i];null===r||isNaN(r)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(r))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?pn*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=Go(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n<r;++n)if(i.isDatasetVisible(n)){o=i.getDatasetMeta(n),t=o.data,s=o.controller;break}if(!t)return 0;for(n=0,r=t.length;n<r;++n)a=s.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(Gi(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}js.id="doughnut",js.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},js.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},js.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return Ui(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Is extends ks{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=Yn(e,n,o);this._drawStart=s,this._drawCount=a,Xn(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:c},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:c}=this._cachedMeta,{sharedOptions:l,includeOptions:h}=this._getSharedOptions(e,n),u=o.axis,d=s.axis,{spanGaps:f,segment:p}=this.options,g=On(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||r||"none"===n;let b=e>0&&this.getParsed(e-1);for(let f=e;f<e+i;++f){const e=t[f],i=this.getParsed(f),v=m?e:{},y=$i(i[d]),x=v[u]=o.getPixelForValue(i[u],f),_=v[d]=r||y?s.getBasePixel():s.getPixelForValue(a?this.applyStack(s,i,a):i[d],f);v.skip=isNaN(x)||isNaN(_)||y,v.stop=f>0&&Math.abs(i[u]-b[u])>g,p&&(v.parsed=i,v.raw=c.data[f]),h&&(v.options=l||this.resolveDataElementOptions(f,e.active?"active":n)),m||this.updateElement(e,f,v,n),b=i}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Is.id="line",Is.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Is.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Rs extends ks{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=Go(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}parseObjectData(t,e,i,n){return So.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.options.animation,a=this._cachedMeta.rScale,c=a.xCenter,l=a.yCenter,h=a.getIndexAngle(0)-.5*fn;let u,d=h;const f=360/this.countVisibleElements();for(u=0;u<e;++u)d+=this._computeAngle(u,n,f);for(u=e;u<e+i;u++){const e=t[u];let i=d,p=d+this._computeAngle(u,n,f),g=o.getDataVisibility(u)?a.getDistanceFromCenterForValue(this.getParsed(u).r):0;d=p,r&&(s.animateScale&&(g=0),s.animateRotate&&(i=p=h));const m={x:c,y:l,innerRadius:0,outerRadius:g,startAngle:i,endAngle:p,options:this.resolveDataElementOptions(u,e.active?"active":n)};this.updateElement(e,u,m,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?En(this.resolveDataElementOptions(t,e).angle||i):0}}Rs.id="polarArea",Rs.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Rs.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Fs extends js{}Fs.id="pie",Fs.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class zs extends ks{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return So.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this._cachedMeta.rScale,o="reset"===n;for(let s=e;s<e+i;s++){const e=t[s],i=this.resolveDataElementOptions(s,e.active?"active":n),a=r.getPointPositionForValue(s,this.getParsed(s).r),c=o?r.xCenter:a.x,l=o?r.yCenter:a.y,h={x:c,y:l,angle:a.angle,skip:isNaN(c)||isNaN(l),options:i};this.updateElement(e,s,h,n)}}}zs.id="radar",zs.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},zs.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class Ns{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return On(this.x)&&On(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Ns.defaults={},Ns.defaultRoutes=void 0;const Bs={values:t=>Ui(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=_n(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),c={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(c,this.options.ticks.format),Go(t,n,c)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(_n(t)));return 1===n||2===n||5===n?Bs.numeric.call(this,t,e,i):""}};var Ws={formatters:Bs};function Vs(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],o=r.length,s=r[0],a=r[o-1],c=[];if(o>n)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;r<t.length;r++)r===s&&(e.push(t[r]),o++,s=i[o*n])}(e,c,r,o/n),c;const l=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),r=e.length/i;if(!n)return Math.max(r,1);const o=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(n);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>r)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Hs(e,c,l,$i(n)?0:s-n,s),t=0,i=o-1;t<i;t++)Hs(e,c,l,r[t],r[t+1]);return Hs(e,c,l,a,$i(n)?e.length:a+n),c}return Hs(e,c,l),c}function Hs(t,e,i,n,r){const o=Gi(n,0),s=Math.min(Gi(r,t.length),t.length);let a,c,l,h=0;for(i=Math.ceil(i),r&&(a=r-n,i=a/Math.floor(a/i)),l=o;l<0;)h++,l=Math.round(o+h*i);for(c=Math.max(o,0);c<s;c++)c===l&&(e.push(t[c]),h++,l=Math.round(o+h*i))}Br.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ws.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Br.route("scale.ticks","color","","color"),Br.route("scale.grid","color","","borderColor"),Br.route("scale.grid","borderColor","","borderColor"),Br.route("scale.title","color","","color"),Br.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Br.describe("scales",{_fallback:"scale"}),Br.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const $s=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Us(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;o<r;o+=n)i.push(t[Math.floor(o)]);return i}function qs(t,e,i){const n=t.ticks.length,r=Math.min(e,n-1),o=t._startPixel,s=t._endPixel,a=1e-6;let c,l=t.getPixelForTick(r);if(!(i&&(c=1===n?Math.max(l-o,s-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(r-1))/2,l+=r<e?c:-c,l<o-a||l>s+a)))return l}function Ys(t){return t.drawTicks?t.tickLength:0}function Xs(t,e){if(!t.display)return 0;const i=co(t.font,e),n=ao(t.padding);return(Ui(t.text)?t.text.length:1)*i.lineHeight+n.height}function Gs(t,e,i){let n=Un(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class Ks extends Ns{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=Xi(t,Number.POSITIVE_INFINITY),e=Xi(e,Number.NEGATIVE_INFINITY),i=Xi(i,Number.POSITIVE_INFINITY),n=Xi(n,Number.NEGATIVE_INFINITY),{min:Xi(t,i),max:Xi(e,n),minDefined:Yi(t),maxDefined:Yi(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,c=s.length;a<c;++a)e=s[a].controller.getMinMax(this,t),r||(i=Math.min(i,e.min)),o||(n=Math.max(n,e.max));return i=o&&i>n?n:i,n=r&&i>n?i:n,{min:Xi(i,Xi(n,i)),max:Xi(n,Xi(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ji(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=Ki(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s<this.ticks.length;this._convertTicksToLabels(a?Us(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=Vs(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Ji(this.options.afterUpdate,[this])}beforeSetDimensions(){Ji(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Ji(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Ji(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Ji(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,r;for(i=0,n=t.length;i<n;i++)r=t[i],r.label=Ji(e.callback,[r.value,i,t],this)}afterTickToLabelConversion(){Ji(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Ji(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=this.ticks.length,n=e.minRotation||0,r=e.maxRotation;let o,s,a,c=n;if(!this._isVisible()||!e.display||n>=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const l=this._getLabelSizes(),h=l.widest.width,u=l.highest.height,d=In(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Ys(t.grid)-e.padding-Xs(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),c=Pn(Math.min(Math.asin(In((l.highest.height+6)/o,-1,1)),Math.asin(In(s/a,-1,1))-Math.asin(In(u/a,-1,1)))),c=Math.max(n,Math.min(r,c))),this.labelRotation=c}afterCalculateLabelRotation(){Ji(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ji(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Xs(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Ys(r)+o):(t.height=this.maxHeight,t.width=Ys(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,c=En(this.labelRotation),l=Math.cos(c),h=Math.sin(c);if(s){const e=i.mirror?0:h*r.width+l*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:l*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,l)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,c="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?c?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:"inner"!==r&&(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-l+o)*this.width/(this.width-l),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ji(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)$i(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Us(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,r=[],o=[];let s,a,c,l,h,u,d,f,p,g,m,b=0,v=0;for(s=0;s<e;++s){if(l=t[s].label,h=this._resolveTickFontOptions(s),i.font=u=h.string,d=n[u]=n[u]||{data:{},gc:[]},f=h.lineHeight,p=g=0,$i(l)||Ui(l)){if(Ui(l))for(a=0,c=l.length;a<c;++a)m=l[a],$i(m)||Ui(m)||(p=Wr(i,d.data,d.gc,p,m),g+=f)}else p=Wr(i,d.data,d.gc,p,l),g=f;r.push(p),o.push(g),b=Math.max(p,b),v=Math.max(g,v)}!function(t,e){Qi(t,(t=>{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r<n;++r)delete t.data[i[r]];i.splice(0,n)}}))}(n,e);const y=r.indexOf(b),x=o.indexOf(v),_=t=>({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(y),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return In(this._alignToPixels?Hr(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return ho(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=ho(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=En(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),r=this._getLabelSizes(),o=t.autoSkipPadding||0,s=r?r.widest.width+o:0,a=r?r.highest.height+o:0;return this.isHorizontal()?a*i>s*n?s/i:a/n:a*n<s*i?a/i:s/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),c=this.ticks.length+(s?1:0),l=Ys(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return Hr(i,t,d)};let g,m,b,v,y,x,_,w,k,O,S,M;if("top"===o)g=p(this.bottom),x=this.bottom-l,w=g-f,O=p(t.top)+f,M=t.bottom;else if("bottom"===o)g=p(this.top),O=t.top,M=p(t.bottom)-f,x=g+f,w=this.top+l;else if("left"===o)g=p(this.right),y=this.right-l,_=g-f,k=p(t.left)+f,S=t.right;else if("right"===o)g=p(this.left),k=t.left,S=p(t.right)-f,y=g+f,_=this.left+l;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(qi(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}O=t.top,M=t.bottom,x=g+f,w=x+l}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(qi(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}y=g-f,_=y-l,k=t.left,S=t.right}const E=Gi(n.ticks.maxTicksLimit,c),P=Math.max(1,Math.ceil(c/E));for(m=0;m<c;m+=P){const t=r.setContext(this.getContext(m)),e=t.lineWidth,n=t.color,o=t.borderDash||[],c=t.borderDashOffset,l=t.tickWidth,u=t.tickColor,d=t.tickBorderDash||[],f=t.tickBorderDashOffset;b=qs(this,m,s),void 0!==b&&(v=Hr(i,b,e),a?y=_=k=S=v:x=w=O=M=v,h.push({tx1:y,ty1:x,tx2:_,ty2:w,x1:k,y1:O,x2:S,y2:M,width:e,color:n,borderDash:o,borderDashOffset:c,tickWidth:l,tickColor:u,tickBorderDash:d,tickBorderDashOffset:f}))}return this._ticksLength=c,this._borderValue=g,h}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:r}=i,o=this.isHorizontal(),s=this.ticks,{align:a,crossAlign:c,padding:l,mirror:h}=r,u=Ys(i.grid),d=u+l,f=h?-l:d,p=-En(this.labelRotation),g=[];let m,b,v,y,x,_,w,k,O,S,M,E,P="middle";if("top"===n)_=this.bottom-f,w=this._getXAxisLabelAlignment();else if("bottom"===n)_=this.top+f,w=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,x=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,x=t.x}else if("x"===e){if("center"===n)_=(t.top+t.bottom)/2+d;else if(qi(n)){const t=Object.keys(n)[0],e=n[t];_=this.chart.scales[t].getPixelForValue(e)+d}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)x=(t.left+t.right)/2-d;else if(qi(n)){const t=Object.keys(n)[0],e=n[t];x=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===a?P="top":"end"===a&&(P="bottom"));const T=this._getLabelSizes();for(m=0,b=s.length;m<b;++m){v=s[m],y=v.label;const t=r.setContext(this.getContext(m));k=this.getPixelForTick(m)+r.labelOffset,O=this._resolveTickFontOptions(m),S=O.lineHeight,M=Ui(y)?y.length:1;const e=M/2,i=t.color,a=t.textStrokeColor,l=t.textStrokeWidth;let u,d=w;if(o?(x=k,"inner"===w&&(d=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),E="top"===n?"near"===c||0!==p?-M*S+S/2:"center"===c?-T.highest.height/2-e*S+S:-T.highest.height+S/2:"near"===c||0!==p?S/2:"center"===c?T.highest.height/2-e*S:T.highest.height-M*S,h&&(E*=-1)):(_=k,E=(1-M)*S/2),t.showLabelBackdrop){const e=ao(t.backdropPadding),i=T.heights[m],n=T.widths[m];let r=_+E-e.top,o=x-e.left;switch(P){case"middle":r-=i/2;break;case"bottom":r-=i}switch(w){case"center":o-=n/2;break;case"right":o-=n}u={left:o,top:r,width:n+e.width,height:i+e.height,color:t.backdropColor}}g.push({rotation:p,label:y,font:O,color:i,strokeColor:a,strokeWidth:l,textOffset:E,textAlign:d,textBaseline:P,translation:[x,_],backdrop:u})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-En(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:r}}=this.options,o=t+r,s=this._getLabelSizes().widest.width;let a,c;return"left"===e?n?(c=this.right+r,"near"===i?a="left":"center"===i?(a="center",c+=s/2):(a="right",c+=s)):(c=this.right-o,"near"===i?a="right":"center"===i?(a="center",c-=s/2):(a="left",c=this.left)):"right"===e?n?(c=this.left+r,"near"===i?a="right":"center"===i?(a="center",c-=s/2):(a="left",c-=s)):(c=this.left+o,"near"===i?a="left":"center"===i?(a="center",c+=s/2):(a="right",c=this.right)):a="right",{textAlign:a,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:r,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,r,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r<o;++r){const t=n[r];e.drawOnChartArea&&s({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&s({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:i}}=this,n=i.setContext(this.getContext()),r=i.drawBorder?n.borderWidth:0;if(!r)return;const o=i.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let a,c,l,h;this.isHorizontal()?(a=Hr(t,this.left,r)-r/2,c=Hr(t,this.right,o)+o/2,l=h=s):(l=Hr(t,this.top,r)-r/2,h=Hr(t,this.bottom,o)+o/2,a=c=s),e.save(),e.lineWidth=n.borderWidth,e.strokeStyle=n.borderColor,e.beginPath(),e.moveTo(a,l),e.lineTo(c,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&Xr(e,i);const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));let r,o;for(r=0,o=n.length;r<o;++r){const t=n[r],i=t.font,o=t.label;t.backdrop&&(e.fillStyle=t.backdrop.color,e.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),Qr(e,o,0,t.textOffset,i,t)}i&&Gr(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const r=co(i.font),o=ao(i.padding),s=i.align;let a=r.lineHeight/2;"bottom"===e||"center"===e||qi(e)?(a+=o.bottom,Ui(i.text)&&(a+=r.lineHeight*(i.text.length-1))):a+=o.top;const{titleX:c,titleY:l,maxWidth:h,rotation:u}=function(t,e,i,n){const{top:r,left:o,bottom:s,right:a,chart:c}=t,{chartArea:l,scales:h}=c;let u,d,f,p=0;const g=s-r,m=a-o;if(t.isHorizontal()){if(d=qn(n,o,a),qi(i)){const t=Object.keys(i)[0],n=i[t];f=h[t].getPixelForValue(n)+g-e}else f="center"===i?(l.bottom+l.top)/2+g-e:$s(t,i,e);u=a-o}else{if(qi(i)){const t=Object.keys(i)[0],n=i[t];d=h[t].getPixelForValue(n)-m+e}else d="center"===i?(l.left+l.right)/2-m+e:$s(t,i,e);f=qn(n,s,r),p="left"===i?-vn:vn}return{titleX:d,titleY:f,maxWidth:u,rotation:p}}(this,a,e,s);Qr(t,i.text,0,0,r,{color:i.color,maxWidth:h,rotation:u,textAlign:Gs(s,e,n),textBaseline:"middle",translation:[c,l]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=Gi(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===Ks.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r<o;++r){const o=e[r];o[i]!==this.id||t&&o.type!==t||n.push(o)}return n}_resolveTickFontOptions(t){return co(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Js{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,r=t.id,o=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in n||(n[r]=t,function(t,e,i){const n=rn(Object.create(null),[i?Br.get(i):{},Br.get(e),t.defaults]);Br.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),c=s.join(".");Br.route(o,r,c,a)}))}(e,t.defaultRoutes);t.descriptors&&Br.describe(e,t.descriptors)}(t,o,i),this.override&&Br.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Br[n]&&(delete Br[n][i],this.override&&delete Rr[i])}}var Qs=new class{constructor(){this.controllers=new Js(ks,"datasets",!0),this.elements=new Js(Ns,"elements"),this.plugins=new Js(Object,"plugins"),this.scales=new Js(Ks,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):Qi(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=ln(t);Ji(i["before"+n],[],i),e[t](i),Ji(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class Zs extends ks{update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:r,count:o}=Yn(e,i,n);if(this._drawStart=r,this._drawCount=o,Xn(e)&&(r=0,o=i.length),this.options.showLine){const{dataset:r,_dataset:o}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const s=this.resolveDatasetElementOptions(t);s.segment=this.options.segment,this.updateElement(r,void 0,{animated:!n,options:s},t)}this.updateElements(i,r,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=Qs.getElement("line")),super.addElements()}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:c}=this._cachedMeta,l=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(l),u=this.includeOptions(n,h),d=o.axis,f=s.axis,{spanGaps:p,segment:g}=this.options,m=On(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=e>0&&this.getParsed(e-1);for(let l=e;l<e+i;++l){const e=t[l],i=this.getParsed(l),p=b?e:{},y=$i(i[f]),x=p[d]=o.getPixelForValue(i[d],l),_=p[f]=r||y?s.getBasePixel():s.getPixelForValue(a?this.applyStack(s,i,a):i[f],l);p.skip=isNaN(x)||isNaN(_)||y,p.stop=l>0&&Math.abs(i[d]-v[d])>m,g&&(p.parsed=i,p.raw=c.data[l]),u&&(p.options=h||this.resolveDataElementOptions(l,e.active?"active":n)),b||this.updateElement(e,l,p,n),v=i}this.updateSharedOptions(h,n,l)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const r=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,r,o)/2}}Zs.id="scatter",Zs.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Zs.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var ta=Object.freeze({__proto__:null,BarController:Cs,BubbleController:Ds,DoughnutController:js,LineController:Is,PolarAreaController:Rs,PieController:Fs,RadarController:zs,ScatterController:Zs});function ea(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ia{constructor(t){this.options=t||{}}init(t){}formats(){return ea()}parse(t,e){return ea()}format(t,e){return ea()}add(t,e,i){return ea()}diff(t,e,i){return ea()}startOf(t,e,i){return ea()}endOf(t,e){return ea()}}ia.override=function(t){Object.assign(ia.prototype,t)};var na={_date:ia};function ra(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&s&&o.length){const t=a._reversePixels?Nn:zn;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function oa(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t<i;++t){const{index:i,data:a}=o[t],{lo:c,hi:l}=ra(o[t],e,s,r);for(let t=c;t<=l;++t){const e=a[t];e.skip||n(e,i,t)}}}function sa(t,e,i,n,r){const o=[];if(!r&&!t.isPointInArea(e))return o;return oa(t,i,e,(function(i,s,a){(r||Yr(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&o.push({element:i,datasetIndex:s,index:a})}),!0),o}function aa(t,e,i,n,r,o){let s=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const r=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}(i);let c=Number.POSITIVE_INFINITY;return oa(t,i,e,(function(i,l,h){const u=i.inRange(e.x,e.y,r);if(n&&!u)return;const d=i.getCenterPoint(r);if(!(!!o||t.isPointInArea(d))&&!u)return;const f=a(e,d);f<c?(s=[{element:i,datasetIndex:l,index:h}],c=f):f===c&&s.push({element:i,datasetIndex:l,index:h})})),s}function ca(t,e,i,n,r,o){return o||t.isPointInArea(e)?"r"!==i||n?aa(t,e,i,n,r,o):function(t,e,i,n){let r=[];return oa(t,i,e,(function(t,i,o){const{startAngle:s,endAngle:a}=t.getProps(["startAngle","endAngle"],n),{angle:c}=Ln(t,{x:e.x,y:e.y});jn(c,s,a)&&r.push({element:t,datasetIndex:i,index:o})})),r}(t,e,i,r):[]}function la(t,e,i,n,r){const o=[],s="x"===i?"inXRange":"inYRange";let a=!1;return oa(t,i,e,((t,n,c)=>{t[s](e[i],r)&&(o.push({element:t,datasetIndex:n,index:c}),a=a||t.inRange(e.x,e.y,r))})),n&&!a?[]:o}var ha={evaluateInteractionItems:oa,modes:{index(t,e,i,n){const r=No(e,t),o=i.axis||"x",s=i.includeInvisible||!1,a=i.intersect?sa(t,r,o,n,s):ca(t,r,o,!1,n,s),c=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&c.push({element:i,datasetIndex:t.index,index:e})})),c):[]},dataset(t,e,i,n){const r=No(e,t),o=i.axis||"xy",s=i.includeInvisible||!1;let a=i.intersect?sa(t,r,o,n,s):ca(t,r,o,!1,n,s);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>sa(t,No(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const r=No(e,t),o=i.axis||"xy",s=i.includeInvisible||!1;return ca(t,r,o,i.intersect,n,s)},x:(t,e,i,n)=>la(t,No(e,t),"x",i.intersect,n),y:(t,e,i,n)=>la(t,No(e,t),"y",i.intersect,n)}};const ua=["left","top","right","bottom"];function da(t,e){return t.filter((t=>t.pos===e))}function fa(t,e){return t.filter((t=>-1===ua.indexOf(t.pos)&&t.box.axis===e))}function pa(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function ga(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!ua.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o<s;++o){a=t[o];const{fullSize:s}=a.box,c=i[a.stack],l=c&&a.stackWeight/c.weight;a.horizontal?(a.width=l?l*n:s&&e.availableWidth,a.height=r):(a.width=n,a.height=l?l*r:s&&e.availableHeight)}return i}function ma(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function ba(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function va(t,e,i,n){const{pos:r,box:o}=i,s=t.maxPadding;if(!qi(r)){i.size&&(t[r]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[r]+=i.size}o.getPadding&&ba(s,o.getPadding());const a=Math.max(0,e.outerWidth-ma(s,t,"left","right")),c=Math.max(0,e.outerHeight-ma(s,t,"top","bottom")),l=a!==t.w,h=c!==t.h;return t.w=a,t.h=c,i.horizontal?{same:l,other:h}:{same:h,other:l}}function ya(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function xa(t,e,i,n){const r=[];let o,s,a,c,l,h;for(o=0,s=t.length,l=0;o<s;++o){a=t[o],c=a.box,c.update(a.width||e.w,a.height||e.h,ya(a.horizontal,e));const{same:s,other:u}=va(e,i,a,n);l|=s&&r.length,h=h||u,c.fullSize||r.push(a)}return l&&xa(r,e,i,n)||h}function _a(t,e,i,n,r){t.top=i,t.left=e,t.right=e+n,t.bottom=i+r,t.width=n,t.height=r}function wa(t,e,i,n){const r=i.padding;let{x:o,y:s}=e;for(const a of t){const t=a.box,c=n[a.stack]||{count:1,placed:0,weight:1},l=a.stackWeight/c.weight||1;if(a.horizontal){const n=e.w*l,o=c.size||t.height;hn(c.start)&&(s=c.start),t.fullSize?_a(t,r.left,s,i.outerWidth-r.right-r.left,o):_a(t,e.left+c.placed,s,n,o),c.start=s,c.placed+=n,s=t.bottom}else{const n=e.h*l,s=c.size||t.width;hn(c.start)&&(o=c.start),t.fullSize?_a(t,o,r.top,s,i.outerHeight-r.bottom-r.top):_a(t,o,e.top+c.placed,s,n),c.start=o,c.placed+=n,o=t.right}}e.x=o,e.y=s}Br.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var ka={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const r=ao(t.options.layout.padding),o=Math.max(e-r.width,0),s=Math.max(i-r.height,0),a=function(t){const e=function(t){const e=[];let i,n,r,o,s,a;for(i=0,n=(t||[]).length;i<n;++i)r=t[i],({position:o,options:{stack:s,stackWeight:a=1}}=r),e.push({index:i,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&o+s,stackWeight:a});return e}(t),i=pa(e.filter((t=>t.box.fullSize)),!0),n=pa(da(e,"left"),!0),r=pa(da(e,"right")),o=pa(da(e,"top"),!0),s=pa(da(e,"bottom")),a=fa(e,"x"),c=fa(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(c).concat(s).concat(a),chartArea:da(e,"chartArea"),vertical:n.concat(r).concat(c),horizontal:o.concat(s).concat(a)}}(t.boxes),c=a.vertical,l=a.horizontal;Qi(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=c.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);ba(d,ao(n));const f=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),p=ga(c.concat(l),u);xa(a.fullSize,f,u,p),xa(c,f,u,p),xa(l,f,u,p)&&xa(c,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),wa(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,wa(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Qi(a.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class Oa{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Sa extends Oa{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ma="$chartjs",Ea={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Pa=t=>null===t||""===t;const Ta=!!Ho&&{passive:!0};function La(t,e,i){t.canvas.removeEventListener(e,i,Ta)}function Aa(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Ca(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Aa(i.addedNodes,n),e=e&&!Aa(i.removedNodes,n);e&&i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function Da(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Aa(i.removedNodes,n),e=e&&!Aa(i.addedNodes,n);e&&i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const ja=new Map;let Ia=0;function Ra(){const t=window.devicePixelRatio;t!==Ia&&(Ia=t,ja.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function Fa(t,e,i){const n=t.canvas,r=n&&jo(n);if(!r)return;const o=$n(((t,e)=>{const n=r.clientWidth;i(t,e),n<r.clientWidth&&i()}),window),s=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)}));return s.observe(r),function(t,e){ja.size||window.addEventListener("resize",Ra),ja.set(t,e)}(t,o),s}function za(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){ja.delete(t),ja.size||window.removeEventListener("resize",Ra)}(t)}function Na(t,e,i){const n=t.canvas,r=$n((e=>{null!==t.ctx&&i(function(t,e){const i=Ea[t.type]||t.type,{x:n,y:r}=No(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Ta)}(n,e,r),r}class Ba extends Oa{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t[Ma]={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Pa(r)){const e=$o(t,"width");void 0!==e&&(t.width=e)}if(Pa(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=$o(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Ma])return!1;const i=e[Ma].initial;["height","width"].forEach((t=>{const n=i[t];$i(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e[Ma],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Ca,detach:Da,resize:Fa}[e]||Na;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:za,detach:za,resize:za}[e]||La)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return Wo(t,e,i,n)}isAttached(t){const e=jo(t);return!(!e||!e.isConnected)}}class Wa{constructor(){this._init=[]}notify(t,e,i,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const r=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(r,t,e,i);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,n){n=n||{};for(const r of t){const t=r.plugin;if(!1===Ji(t[i],[e,n,r.options],t)&&n.cancelable)return!1}return!0}invalidate(){$i(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=Gi(i.options&&i.options.plugins,{}),r=function(t){const e={},i=[],n=Object.keys(Qs.plugins.items);for(let t=0;t<n.length;t++)i.push(Qs.getPlugin(n[t]));const r=t.plugins||[];for(let t=0;t<r.length;t++){const n=r[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,r){const o=[],s=t.getContext();for(const a of e){const e=a.id,c=Va(n[e],r);null!==c&&o.push({plugin:a,options:Ha(t.config,{plugin:a,local:i[e]},c,s)})}return o}(t,r,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Va(t,e){return e||!1!==t?!0===t?{}:t:null}function Ha(t,{plugin:e,local:i},n,r){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(n,o);return i&&e.defaults&&s.push(e.defaults),t.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $a(t,e){const i=Br.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ua(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function qa(t){const e=t.options||(t.options={});e.plugins=Gi(e.plugins,{}),e.scales=function(t,e){const i=Rr[t.type]||{scales:{}},n=e.scales||{},r=$a(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!qi(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=Ua(t,e),c=function(t,e){return t===e?"_index_":"_value_"}(a,r),l=i.scales||{};o[a]=o[a]||t,s[t]=on(Object.create(null),[{axis:a},e,l[a],l[c]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,a=i.indexAxis||$a(r,e),c=(Rr[r]||{}).scales||{};Object.keys(c).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),on(s[r],[{axis:e},n[r],c[t]])}))})),Object.keys(s).forEach((t=>{const e=s[t];on(e,[Br.scales[e.type],Br.scale])})),s}(t,e)}function Ya(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Xa=new Map,Ga=new Set;function Ka(t,e){let i=Xa.get(t);return i||(i=e(),Xa.set(t,i),Ga.add(i)),i}const Ja=(t,e,i)=>{const n=cn(e,i);void 0!==n&&t.add(n)};class Qa{constructor(t){this._config=function(t){return(t=t||{}).data=Ya(t.data),qa(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Ya(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),qa(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ka(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Ka(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Ka(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Ka(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach((e=>{t&&(a.add(t),e.forEach((e=>Ja(a,t,e)))),e.forEach((t=>Ja(a,n,t))),e.forEach((t=>Ja(a,Rr[r]||{},t))),e.forEach((t=>Ja(a,Br,t))),e.forEach((t=>Ja(a,Fr,t)))}));const c=Array.from(a);return 0===c.length&&c.push(Object.create(null)),Ga.has(e)&&o.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Rr[e]||{},Br.datasets[e]||{},{type:e},Br,Fr]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=Za(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=po(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(un(s)||tc(s))||o&&Ui(s))return!0}return!1}(o,e)){r.$shared=!1;a=fo(o,i=un(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=Za(this._resolverCache,t,i);return qi(e)?fo(r,e,void 0,n):r}}function Za(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:uo(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)}return o}const tc=t=>qi(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||un(t[i])),!1);const ec=["top","bottom","left","right","chartArea"];function ic(t,e){return"top"===t||"bottom"===t||-1===ec.indexOf(t)&&"x"===e}function nc(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function rc(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Ji(i&&i.onComplete,[t],e)}function oc(t){const e=t.chart,i=e.options.animation;Ji(i&&i.onProgress,[t],e)}function sc(t){return Do()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ac={},cc=t=>{const e=sc(t);return Object.values(ac).filter((t=>t.canvas===e)).pop()};function lc(t,e,i){const n=Object.keys(t);for(const r of n){const n=+r;if(n>=e){const o=t[r];delete t[r],(i>0||n>e)&&(t[n+i]=o)}}}class hc{constructor(t,e){const i=this.config=new Qa(e),n=sc(t),r=cc(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Do()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Sa:Ba}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,c=a&&a.height,l=a&&a.width;this.id=Hi(),this.ctx=s,this.canvas=a,this.width=l,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Wa,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],ac[this.id]=this,s&&a?(ss.listen(this,"complete",rc),ss.listen(this,"progress",oc),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return $i(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Vo(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return $r(this.canvas,this.ctx),this}stop(){return ss.stop(this),this}resize(t,e){ss.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Vo(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),Ji(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){Qi(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=Ua(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),Qi(r,(e=>{const r=e.options,o=r.id,s=Ua(o,r),a=Gi(r.type,e.dtype);void 0!==r.position&&ic(r.position,s)===ic(e.dposition)||(r.position=e.dposition),n[o]=!0;let c=null;if(o in i&&i[o].type===a)c=i[o];else{c=new(Qs.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,t)})),Qi(n,((t,e)=>{t||delete i[e]})),Qi(i,(t=>{ka.configure(this,t,t.options),ka.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(nc("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let r=this.getDatasetMeta(i);const o=n.type||this.config.type;if(r.type&&r.type!==o&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=o,r.indexAxis=n.indexAxis||$a(o,this.options),r.order=n.order||0,r.index=i,r.label=""+n.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const e=Qs.getController(o),{datasetElementType:n,dataElementType:s}=Br.datasets[o];Object.assign(e.prototype,{dataElementType:Qs.getElement(s),datasetElementType:n&&Qs.getElement(n)}),r.controller=new e(this,i),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){Qi(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===r.indexOf(e);e.buildOrUpdateElements(i),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),n||Qi(r,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(nc("z","_idx"));const{_active:s,_lastEvent:a}=this;a?this._eventHandler(a,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Qi(this.scales,(t=>{ka.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);dn(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:r}of e){lc(t,n,"_removeElements"===i?-r:r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),n=i(0);for(let t=1;t<e;t++)if(!dn(n,i(t)))return;return Array.from(n).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ka.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Qi(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,un(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(ss.has(this)?this.attached&&!ss.running(this)&&ss.start(this):(this.draw(),rc({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,r;for(n=0,r=e.length;n<r;++n){const r=e[n];t&&!r.visible||i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&Xr(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&Gr(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Yr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const r=ha.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=ho(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);hn(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ss.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),$r(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete ac[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};Qi(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){Qi(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},Qi(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s<a;++s){o=t[s];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[n+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!Zi(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:r}=this,o=e,s=this._getActiveElements(t,n,i,o),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),c=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,Ji(r.onHover,[t,s,this],this),a&&Ji(r.onClick,[t,s,this],this));const l=!Zi(s,n);return(l||e)&&(this._active=s,this._updateHoverStyles(s,n,e)),this._lastEvent=c,l}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,n)}}const uc=()=>Qi(hc.instances,(t=>t._plugins.invalidate())),dc=!0;function fc(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:c}=e;let l=r/a;t.beginPath(),t.arc(o,s,a,n-l,i+l),c>r?(l=r/c,t.arc(o,s,c,i+l,n-l,!0)):t.arc(o,s,r,i+vn,n-vn),t.closePath(),t.clip()}function pc(t,e,i,n){const r=ro(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return In(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:In(r.innerStart,0,s),innerEnd:In(r.innerEnd,0,s)}}function gc(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function mc(t,e,i,n,r,o){const{x:s,y:a,startAngle:c,pixelMargin:l,innerRadius:h}=e,u=Math.max(e.outerRadius+n+i-l,0),d=h>0?h+n+i+l:0;let f=0;const p=r-c;if(n){const t=((h>0?h-n:0)+(u>0?u-n:0))/2;f=(p-(0!==t?p*t/(t+n):p))/2}const g=(p-Math.max(.001,p*u-i/fn)/u)/2,m=c+g+f,b=r-g-f,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:_}=pc(e,d,u,b-m),w=u-v,k=u-y,O=m+v/w,S=b-y/k,M=d+x,E=d+_,P=m+x/M,T=b-_/E;if(t.beginPath(),o){if(t.arc(s,a,u,O,S),y>0){const e=gc(k,S,s,a);t.arc(e.x,e.y,y,S,b+vn)}const e=gc(E,b,s,a);if(t.lineTo(e.x,e.y),_>0){const e=gc(E,T,s,a);t.arc(e.x,e.y,_,b+vn,T+Math.PI)}if(t.arc(s,a,d,b-_/d,m+x/d,!0),x>0){const e=gc(M,P,s,a);t.arc(e.x,e.y,x,P+Math.PI,m-vn)}const i=gc(w,m,s,a);if(t.lineTo(i.x,i.y),v>0){const e=gc(w,O,s,a);t.arc(e.x,e.y,v,m-vn,O)}}else{t.moveTo(s,a);const e=Math.cos(O)*u+s,i=Math.sin(O)*u+a;t.lineTo(e,i);const n=Math.cos(S)*u+s,r=Math.sin(S)*u+a;t.lineTo(n,r)}t.closePath()}function bc(t,e,i,n,r,o){const{options:s}=e,{borderWidth:a,borderJoinStyle:c}=s,l="inner"===s.borderAlign;a&&(l?(t.lineWidth=2*a,t.lineJoin=c||"round"):(t.lineWidth=a,t.lineJoin=c||"bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,c=Math.max(e.outerRadius-s,0),l=e.innerRadius+s;let h;for(i&&fc(t,e,o+pn),t.beginPath(),t.arc(n,r,l,o+pn,o,!0),h=0;h<a;++h)t.stroke();for(t.beginPath(),t.arc(n,r,c,o,o+pn),h=0;h<a;++h)t.stroke()}(t,e,l),l&&fc(t,e,r),mc(t,e,i,n,r,o),t.stroke())}Object.defineProperties(hc,{defaults:{enumerable:dc,value:Br},instances:{enumerable:dc,value:ac},overrides:{enumerable:dc,value:Rr},registry:{enumerable:dc,value:Qs},version:{enumerable:dc,value:"3.9.1"},getChart:{enumerable:dc,value:cc},register:{enumerable:dc,value:(...t)=>{Qs.add(...t),uc()}},unregister:{enumerable:dc,value:(...t)=>{Qs.remove(...t),uc()}}});class vc extends Ns{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=Ln(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:c,outerRadius:l,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2,d=Gi(h,a-s)>=pn||jn(r,s,a),f=Rn(o,c+u,l+u);return d&&f}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:c}=this.options,l=(n+r)/2,h=(o+s+c+a)/2;return{x:e+Math.cos(l)*h,y:i+Math.sin(l)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>pn?Math.floor(i/pn):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(n){s=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*s,Math.sin(e)*s),this.circumference>=fn&&(s=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const a=function(t,e,i,n,r){const{fullCircles:o,startAngle:s,circumference:a}=e;let c=e.endAngle;if(o){mc(t,e,i,n,s+pn,r);for(let e=0;e<o;++e)t.fill();isNaN(a)||(c=s+a%pn,a%pn==0&&(c+=pn))}return mc(t,e,i,n,c,r),t.fill(),c}(t,this,s,r,o);bc(t,this,s,r,a,o),t.restore()}}function yc(t,e,i=e){t.lineCap=Gi(i.borderCapStyle,e.borderCapStyle),t.setLineDash(Gi(i.borderDash,e.borderDash)),t.lineDashOffset=Gi(i.borderDashOffset,e.borderDashOffset),t.lineJoin=Gi(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Gi(i.borderWidth,e.borderWidth),t.strokeStyle=Gi(i.borderColor,e.borderColor)}function xc(t,e,i){t.lineTo(i.x,i.y)}function _c(t,e,i={}){const n=t.length,{start:r=0,end:o=n-1}=i,{start:s,end:a}=e,c=Math.max(r,s),l=Math.min(o,a),h=r<s&&o<s||r>a&&o>a;return{count:n,start:c,loop:e.loop,ilen:l<c&&!h?n+l-c:l-c}}function wc(t,e,i,n){const{points:r,options:o}=e,{count:s,start:a,loop:c,ilen:l}=_c(r,i,n),h=function(t){return t.stepped?Kr:t.tension||"monotone"===t.cubicInterpolationMode?Jr:xc}(o);let u,d,f,{move:p=!0,reverse:g}=n||{};for(u=0;u<=l;++u)d=r[(a+(g?l-u:u))%s],d.skip||(p?(t.moveTo(d.x,d.y),p=!1):h(t,f,d,g,o.stepped),f=d);return c&&(d=r[(a+(g?l:0))%s],h(t,f,d,g,o.stepped)),!!c}function kc(t,e,i,n){const r=e.points,{count:o,start:s,ilen:a}=_c(r,i,n),{move:c=!0,reverse:l}=n||{};let h,u,d,f,p,g,m=0,b=0;const v=t=>(s+(l?a-t:t))%o,y=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(c&&(u=r[v(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[v(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(i<f?f=i:i>p&&(p=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,f=p=i),g=i}y()}function Oc(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?kc:wc}vc.id="arc",vc.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},vc.defaultRoutes={backgroundColor:"backgroundColor"};const Sc="function"==typeof Path2D;function Mc(t,e,i,n){Sc&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),yc(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Oc(e);for(const a of r)yc(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Ec extends Ns{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Co(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,i&&(o+=r);o>r&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return ns(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,c=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?c.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,c.skip&&(e=s)),c=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a<s?a+r:a,!!t._fullLoop&&0===s&&a===r-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],r=this.points,o=is(this,{property:e,start:n,end:n});if(!o.length)return;const s=[],a=function(t){return t.stepped?qo:t.tension||"monotone"===t.cubicInterpolationMode?Yo:Uo}(i);let c,l;for(c=0,l=o.length;c<l;++c){const{start:l,end:h}=o[c],u=r[l],d=r[h];if(u===d){s.push(u);continue}const f=a(u,d,Math.abs((n-u[e])/(d[e]-u[e])),i.stepped);f[e]=t[e],s.push(f)}return 1===s.length?s[0]:s}pathSegment(t,e,i){return Oc(this)(t,this,e,i)}path(t,e,i){const n=this.segments,r=Oc(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const s of n)o&=r(t,this,s,{start:e,end:e+i-1});return!!o}draw(t,e,i,n){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),Mc(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Pc(t,e,i,n){const r=t.options,{[i]:o}=t.getProps([i],n);return Math.abs(e-o)<r.radius+r.hitRadius}Ec.id="line",Ec.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Ec.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Ec.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Tc extends Ns{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Pc(this,t,"x",e)}inYRange(t,e){return Pc(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Yr(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Ur(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Lc(t,e){const{x:i,y:n,base:r,width:o,height:s}=t.getProps(["x","y","base","width","height"],e);let a,c,l,h,u;return t.horizontal?(u=s/2,a=Math.min(i,r),c=Math.max(i,r),l=n-u,h=n+u):(u=o/2,a=i-u,c=i+u,l=Math.min(n,r),h=Math.max(n,r)),{left:a,top:l,right:c,bottom:h}}function Ac(t,e,i,n){return t?0:In(e,i,n)}function Cc(t){const e=Lc(t),i=e.right-e.left,n=e.bottom-e.top,r=function(t,e,i){const n=t.options.borderWidth,r=t.borderSkipped,o=oo(n);return{t:Ac(r.top,o.top,0,i),r:Ac(r.right,o.right,0,e),b:Ac(r.bottom,o.bottom,0,i),l:Ac(r.left,o.left,0,e)}}(t,i/2,n/2),o=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,o=so(r),s=Math.min(e,i),a=t.borderSkipped,c=n||qi(r);return{topLeft:Ac(!c||a.top||a.left,o.topLeft,0,s),topRight:Ac(!c||a.top||a.right,o.topRight,0,s),bottomLeft:Ac(!c||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:Ac(!c||a.bottom||a.right,o.bottomRight,0,s)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:o},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,o.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(r.b,r.r))}}}}function Dc(t,e,i,n){const r=null===e,o=null===i,s=t&&!(r&&o)&&Lc(t,n);return s&&(r||Rn(e,s.left,s.right))&&(o||Rn(i,s.top,s.bottom))}function jc(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ic(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}Tc.id="point",Tc.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Tc.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Rc extends Ns{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=Cc(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?to:jc;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Ic(o,e,r)),t.clip(),s(t,Ic(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Ic(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Dc(this,t,e,i)}inXRange(t,e){return Dc(this,t,null,e)}inYRange(t,e){return Dc(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Rc.id="bar",Rc.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Rc.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Fc=Object.freeze({__proto__:null,ArcElement:vc,LineElement:Ec,PointElement:Tc,BarElement:Rc});function zc(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Nc(t){t.data.datasets.forEach((t=>{zc(t)}))}var Bc={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Nc(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),c=o||e.data;if("y"===lo([s,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const l=t.scales[a.xAxisID];if("linear"!==l.type&&"time"!==l.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:c,maxDefined:l}=o.getUserBounds();return c&&(r=In(zn(e,o.axis,s).lo,0,i-1)),n=l?In(zn(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,c);if(u<=(i.threshold||4*n))return void zc(e);let d;switch($i(o)&&(e._data=c,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let c=0;const l=e+i-1;let h,u,d,f,p,g=e;for(s[c++]=t[g],h=0;h<o-2;h++){let n,r=0,o=0;const l=Math.floor((h+1)*a)+1+e,m=Math.min(Math.floor((h+2)*a)+1,i)+e,b=m-l;for(n=l;n<m;n++)r+=t[n].x,o+=t[n].y;r/=b,o/=b;const v=Math.floor(h*a)+1+e,y=Math.min(Math.floor((h+1)*a)+1,i)+e,{x:x,y:_}=t[g];for(d=f=-1,n=v;n<y;n++)f=.5*Math.abs((x-r)*(t[n].y-_)-(x-t[n].x)*(o-_)),f>d&&(d=f,u=t[n],p=n);s[c++]=u,g=p}return s[c++]=t[l],s}(c,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,c,l,h,u,d,f,p=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(r=e;r<e+i;++r){o=t[r],s=(o.x-v)/y*n,a=o.y;const e=0|s;if(e===c)a<d?(d=a,l=r):a>f&&(f=a,h=r),p=(g*p+o.x)/++g;else{const i=r-1;if(!$i(l)&&!$i(h)){const e=Math.min(l,h),n=Math.max(l,h);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(o),c=e,g=0,d=f=a,l=h=u=r}}return m}(c,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d}))},destroy(t){Nc(t)}};function Wc(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=Dn(r),o=Dn(o)),{property:t,start:r,end:o}}function Vc(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Hc(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function $c(t,e){let i=[],n=!1;return Ui(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},r=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=Vc(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))})),o}(t,e),i.length?new Ec({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Uc(t){return t&&!1!==t.fill}function qc(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!Yi(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function Yc(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=Gi(i&&i.target,i);void 0===n&&(n=!!e.backgroundColor);if(!1===n||null===n)return!1;if(!0===n)return"origin";return n}(t);if(qi(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return Yi(r)&&Math.floor(r)===r?function(t,e,i,n){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=n)return!1;return i}(n[0],e,r,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Xc(t,e,i){const n=[];for(let r=0;r<i.length;r++){const o=i[r],{first:s,last:a,point:c}=Gc(o,e,"x");if(!(!c||s&&a))if(s)n.unshift(c);else if(t.push(c),!a)break}t.push(...n)}function Gc(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const r=n[i],o=t.segments,s=t.points;let a=!1,c=!1;for(let t=0;t<o.length;t++){const e=o[t],n=s[e.start][i],l=s[e.end][i];if(Rn(r,n,l)){a=r===n,c=r===l;break}}return{first:a,last:c,point:n}}class Kc{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:pn},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function Jc(t){const{chart:e,fill:i,line:n}=t;if(Yi(i))return function(t,e){const i=t.getDatasetMeta(e),n=i&&t.isDatasetVisible(e);return n?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t<n.length;t++){const r=n[t];if(r.index===e)break;r.hidden||i.unshift(r.dataset)}return i}(e,i);a.push($c({x:null,y:e.bottom},n));for(let t=0;t<o.length;t++){const e=o[t];for(let t=e.start;t<=e.end;t++)Xc(r,s[t],a)}return new Ec({points:r,options:{}})}(t);if("shape"===i)return!0;const r=function(t){const e=t.scale||{};if(e.getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=n.reverse?e.max:e.min,s=function(t,e,i){let n;return n="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:qi(t)?t.value:e.getBaseValue(),n}(i,e,o),a=[];if(n.grid.circular){const t=e.getPointPositionForValue(0,o);return new Kc({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(s)})}for(let t=0;t<r;++t)a.push(e.getPointPositionForValue(t,s));return a}(t);return function(t){const{scale:e={},fill:i}=t,n=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:qi(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(Yi(n)){const t=e.isHorizontal();return{x:t?n:null,y:t?null:n}}return null}(t)}(t);return r instanceof Kc?r:$c(r,n)}function Qc(t,e,i){const n=Jc(e),{line:r,scale:o,axis:s}=e,a=r.options,c=a.fill,l=a.backgroundColor,{above:h=l,below:u=l}=c||{};n&&r.points.length&&(Xr(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,c=i._loop?"angle":e.axis;t.save(),"x"===c&&o!==r&&(Zc(t,n,s.top),tl(t,{line:i,target:n,color:r,scale:a,property:c}),t.restore(),t.save(),Zc(t,n,s.bottom));tl(t,{line:i,target:n,color:o,scale:a,property:c}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),Gr(t))}function Zc(t,e,i){const{segments:n,points:r}=e;let o=!0,s=!1;t.beginPath();for(const a of n){const{start:n,end:c}=a,l=r[n],h=r[Vc(n,c,r)];o?(t.moveTo(l.x,l.y),o=!1):(t.lineTo(l.x,i),t.lineTo(l.x,l.y)),s=!!e.pathSegment(t,a,{move:s}),s?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function tl(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=Vc(n,a,r);const c=Wc(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:c,start:r[n],end:r[a]});continue}const l=is(e,c);for(const e of l){const n=Wc(i,o[e.start],o[e.end],e.loop),a=es(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:Hc(c,n,"start",Math.max)},end:{[i]:Hc(c,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:c,start:l,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,el(t,s,u&&Wc(r,l,h)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():il(t,n,h,r);const e=!!n.pathSegment(t,c,{move:d,reverse:!0});f=d&&e,f||il(t,n,l,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function el(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function il(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}var nl={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,c;for(s=0;s<n;++s)o=t.getDatasetMeta(s),a=o.dataset,c=null,a&&a.options&&a instanceof Ec&&(c={visible:t.isDatasetVisible(s),index:s,fill:Yc(a,s,n),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=c,r.push(c);for(s=0;s<n;++s)c=r[s],c&&!1!==c.fill&&(c.fill=qc(r,s,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,r=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let e=r.length-1;e>=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&i.fill&&Qc(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;Uc(i)&&Qc(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;Uc(n)&&"beforeDatasetDraw"===i.drawTime&&Qc(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const rl=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class ol extends Ns{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Ji(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=co(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=rl(i,r);let c,l;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,l=this._fitRows(o,r,s,a)+10):(l=this.maxHeight,c=this._fitCols(o,r,s,a)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(l,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],c=this.lineWidths=[0],l=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-l;return this.legendItems.forEach(((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||c[c.length-1]+p+2*s>o)&&(h+=l,c[c.length-(f>0?0:1)]=0,d+=l,u++),a[f]={left:0,top:d,row:u,width:p,height:n},c[c.length-1]+=p+s})),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],c=this.columnSizes=[],l=o-t;let h=s,u=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>l&&(h+=u+s,c.push({width:u,height:d}),f+=u+s,p++,u=d=0),a[o]={left:f,top:d,col:p,width:g,height:n},u=Math.max(u,g),d+=n+s})),h+=u,c.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=Ko(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=qn(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=qn(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=qn(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=qn(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Xr(t,this),this._draw(),Gr(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=Br.color,a=Ko(t.rtl,this.left,this.width),c=co(o.font),{color:l,padding:h}=o,u=c.size,d=u/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=rl(o,u),b=this.isHorizontal(),v=this._computeTitleHeight();f=b?{x:qn(r,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:qn(r,this.top+v+h,this.bottom-e[0].height),line:0},Jo(this.ctx,t.textDirection);const y=m+h;this.legendItems.forEach(((x,_)=>{n.strokeStyle=x.fontColor||l,n.fillStyle=x.fontColor||l;const w=n.measureText(x.text).width,k=a.textAlign(x.textAlign||(x.textAlign=o.textAlign)),O=p+d+w;let S=f.x,M=f.y;a.setWidth(this.width),b?_>0&&S+O+h>this.right&&(M=f.y+=y,f.line++,S=f.x=qn(r,this.left+h,this.right-i[f.line])):_>0&&M+y>this.bottom&&(S=f.x=S+e[f.line].width+h,f.line++,M=f.y=qn(r,this.top+v+h,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const r=Gi(i.lineWidth,1);if(n.fillStyle=Gi(i.fillStyle,s),n.lineCap=Gi(i.lineCap,"butt"),n.lineDashOffset=Gi(i.lineDashOffset,0),n.lineJoin=Gi(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=Gi(i.strokeStyle,s),n.setLineDash(Gi(i.lineDash,[])),o.usePointStyle){const s={radius:g*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},c=a.xPlus(t,p/2);qr(n,s,c,e+d,o.pointStyleWidth&&p)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,p),c=so(i.borderRadius);n.beginPath(),Object.values(c).some((t=>0!==t))?to(n,{x:s,y:o,w:p,h:g,radius:c}):n.rect(s,o,p,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(S),M,x),S=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,S+p+d,b?S+O:this.right,t.rtl),function(t,e,i){Qr(n,i.text,t,e+m/2,c,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(S),M,x),b?f.x+=O+h:f.y+=y})),Qo(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=co(e.font),n=ao(e.padding);if(!e.display)return;const r=Ko(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,c=n.top+a;let l,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),l=this.top+c,h=qn(t.align,h,this.right-u);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);l=c+qn(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=qn(s,h,h+u);o.textAlign=r.textAlign(Un(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,Qr(o,e.text,d,l,i)}_computeTitleHeight(){const t=this.options.title,e=co(t.font),i=ao(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(Rn(t,this.left,this.right)&&Rn(e,this.top,this.bottom))for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(n=r[i],Rn(t,n.left,n.left+n.width)&&Rn(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&Ji(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&Ji(e.onHover,[t,i,this],this)}else i&&Ji(e.onClick,[t,i,this],this);var n,r}}var sl={id:"legend",_element:ol,start(t,e,i){const n=t.legend=new ol({ctx:t.ctx,options:i,chart:t});ka.configure(t,n,i),ka.addBox(t,n)},stop(t){ka.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;ka.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const s=t.controller.getStyle(i?0:void 0),a=ao(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class al extends Ns{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=Ui(i.text)?i.text.length:1;this._padding=ao(i.padding);const r=n*co(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,c,l,h=0;return this.isHorizontal()?(c=qn(s,i,r),l=e+t,a=r-i):("left"===o.position?(c=i+t,l=qn(s,n,e),h=-.5*fn):(c=r-t,l=qn(s,e,n),h=.5*fn),a=n-e),{titleX:c,titleY:l,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=co(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);Qr(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:Un(e.align),textBaseline:"middle",translation:[r,o]})}}var cl={id:"title",_element:al,start(t,e,i){!function(t,e){const i=new al({ctx:t.ctx,options:e,chart:t});ka.configure(t,i,e),ka.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;ka.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;ka.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ll=new WeakMap;var hl={id:"subtitle",start(t,e,i){const n=new al({ctx:t.ctx,options:i,chart:t});ka.configure(t,n,i),ka.addBox(t,n),ll.set(t,n)},stop(t){ka.removeBox(t,ll.get(t)),ll.delete(t)},beforeUpdate(t,e,i){const n=ll.get(t);ka.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ul={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,r+=t.y,++o}}return{x:n/o,y:r/o}},nearest(t,e){if(!t.length)return!1;let i,n,r,o=e.x,s=e.y,a=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=An(e,n.getCenterPoint());t<a&&(a=t,r=n)}}if(r){const t=r.tooltipPosition();o=t.x,s=t.y}return{x:o,y:s}}};function dl(t,e){return e&&(Ui(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function fl(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function pl(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function gl(t,e){const i=t.chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,c=co(e.bodyFont),l=co(e.titleFont),h=co(e.footerFont),u=o.length,d=r.length,f=n.length,p=ao(e.padding);let g=p.height,m=0,b=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*l.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,c.lineHeight):c.lineHeight)+(b-f)*c.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=l.string,Qi(t.title,y),i.font=c.string,Qi(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?s+2+e.boxPadding:0,Qi(n,(t=>{Qi(t.before,y),Qi(t.lines,y),Qi(t.after,y)})),v=0,i.font=h.string,Qi(t.footer,y),i.restore(),m+=p.width,{width:m,height:g}}function ml(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:c}}=t;let l="center";return"center"===n?l=r<=(a+c)/2?"left":"right":r<=o/2?l="left":r>=s-o/2&&(l="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(l,t,e,i)&&(l="center"),l}function bl(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||ml(t,e,i,n),yAlign:n}}function vl(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:c}=i,l=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=so(s);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,c,l);return"center"===c?"left"===a?p+=l:"right"===a&&(p-=l):"left"===a?p-=Math.max(h,d)+r:"right"===a&&(p+=Math.max(u,f)+r),{x:In(p,0,n.width-e.width),y:In(g,0,n.height-e.height)}}function yl(t,e,i){const n=ao(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function xl(t){return dl([],fl(t))}function _l(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class wl extends Ns{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new us(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,ho(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=dl(s,fl(n)),s=dl(s,fl(r)),s=dl(s,fl(o)),s}getBeforeBody(t,e){return xl(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return Qi(t,(t=>{const e={before:[],lines:[],after:[]},r=_l(i,t);dl(e.before,fl(r.beforeLabel.call(this,t))),dl(e.lines,r.label.call(this,t)),dl(e.after,fl(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return xl(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=dl(s,fl(n)),s=dl(s,fl(r)),s=dl(s,fl(o)),s}_createItems(t){const e=this._active,i=this.chart.data,n=[],r=[],o=[];let s,a,c=[];for(s=0,a=e.length;s<a;++s)c.push(pl(this.chart,e[s]));return t.filter&&(c=c.filter(((e,n,r)=>t.filter(e,n,r,i)))),t.itemSort&&(c=c.sort(((e,n)=>t.itemSort(e,n,i)))),Qi(c,(e=>{const i=_l(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=c,c}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=ul[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=gl(this,i),s=Object.assign({},t,e),a=bl(this.chart,i,s),c=vl(i,s,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:c,bottomLeft:l,bottomRight:h}=so(s),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,v,y,x;return"center"===r?(y=d+p/2,"left"===n?(g=u,m=g-o,v=y+o,x=y-o):(g=u+f,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?u+Math.max(a,l)+o:"right"===n?u+f-Math.max(c,h)-o:this.caretX,"top"===r?(v=d,y=v-o,g=m-o,b=m+o):(v=d+p,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const c=Ko(i.rtl,this.x,this.width);for(t.x=yl(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",o=co(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a<r;++a)e.fillText(n[a],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,a+1===r&&(t.y+=i.titleMarginBottom-s)}}_drawColorBox(t,e,i,n,r){const o=this.labelColors[i],s=this.labelPointStyles[i],{boxHeight:a,boxWidth:c,boxPadding:l}=r,h=co(r.bodyFont),u=yl(this,"left",r),d=n.x(u),f=a<h.lineHeight?(h.lineHeight-a)/2:0,p=e.y+f;if(r.usePointStyle){const e={radius:Math.min(c,a)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=n.leftForLtr(d,c)+c/2,l=p+a/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Ur(t,e,i,l),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Ur(t,e,i,l)}else{t.lineWidth=qi(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=n.leftForLtr(d,c-l),i=n.leftForLtr(n.xPlus(d,1),c-l-2),s=so(o.borderRadius);Object.values(s).some((t=>0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,to(t,{x:e,y:p,w:c,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),to(t,{x:i,y:p+1,w:c-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,c,a),t.strokeRect(e,p,c,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,c-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:c,boxPadding:l}=i,h=co(i.bodyFont);let u=h.lineHeight,d=0;const f=Ko(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},g=f.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=yl(this,g,i),e.fillStyle=i.bodyColor,Qi(this.beforeBody,p),d=s&&"right"!==g?"center"===o?c/2+l:c+2+l:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,Qi(m.before,p),v=m.lines,s&&v.length&&(this._drawColorBox(e,t,y,f,i),u=Math.max(h.lineHeight,a)),x=0,w=v.length;x<w;++x)p(v[x]),u=h.lineHeight;Qi(m.after,p)}d=0,u=h.lineHeight,Qi(this.afterBody,p),t.y-=r}drawFooter(t,e,i){const n=this.footer,r=n.length;let o,s;if(r){const a=Ko(i.rtl,this.x,this.width);for(t.x=yl(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",o=co(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,s=0;s<r;++s)e.fillText(n[s],a.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:r,yAlign:o}=this,{x:s,y:a}=t,{width:c,height:l}=i,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=so(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(s+h,a),"top"===o&&this.drawCaret(t,e,i,n),e.lineTo(s+c-u,a),e.quadraticCurveTo(s+c,a,s+c,a+u),"center"===o&&"right"===r&&this.drawCaret(t,e,i,n),e.lineTo(s+c,a+l-f),e.quadraticCurveTo(s+c,a+l,s+c-f,a+l),"bottom"===o&&this.drawCaret(t,e,i,n),e.lineTo(s+d,a+l),e.quadraticCurveTo(s,a+l,s,a+l-d),"center"===o&&"left"===r&&this.drawCaret(t,e,i,n),e.lineTo(s,a+h),e.quadraticCurveTo(s,a,s+h,a),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=ul[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=gl(this,t),s=Object.assign({},i,this._size),a=bl(e,t,s),c=vl(t,s,a,e);n._to===c.x&&r._to===c.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=ao(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),Jo(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),Qo(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!Zi(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,r=this._active||[],o=this._getActiveElements(t,r,e,i),s=this._positionChanged(o,t),a=e||!Zi(o,r)||s;return a&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const r=this.options;if("mouseout"===t.type)return[];if(!n)return e;const o=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=ul[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}wl.positioners=ul;var kl={id:"tooltip",_element:wl,positioners:ul,afterInit(t,e,i){i&&(t.tooltip=new wl({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Vi,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:Vi,beforeBody:Vi,beforeLabel:Vi,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return $i(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Vi,afterBody:Vi,beforeFooter:Vi,footer:Vi,afterFooter:Vi}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Ol=Object.freeze({__proto__:null,Decimation:Bc,Filler:nl,Legend:sl,SubTitle:hl,Title:cl,Tooltip:kl});function Sl(t,e,i,n){const r=t.indexOf(e);if(-1===r)return((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n);return r!==t.lastIndexOf(e)?i:r}class Ml extends Ks{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if($i(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:In(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Sl(i,t,Gi(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function El(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:c,maxTicks:l,maxDigits:h,includeBounds:u}=t,d=r||1,f=l-1,{min:p,max:g}=e,m=!$i(o),b=!$i(s),v=!$i(c),y=(g-p)/(h+1);let x,_,w,k,O=kn((g-p)/f/d)*d;if(O<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/O)-Math.floor(p/O),k>f&&(O=kn(k*O/f/d)*d),$i(a)||(x=Math.pow(10,a),O=Math.ceil(O*x)/x),"ticks"===n?(_=Math.floor(p/O)*O,w=Math.ceil(g/O)*O):(_=p,w=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,O/1e3)?(k=Math.round(Math.min((s-o)/O,l)),O=(s-o)/k,_=o,w=s):v?(_=m?o:_,w=b?s:w,k=c-1,O=(w-_)/k):(k=(w-_)/O,k=Sn(k,Math.round(k),O/1e3)?Math.round(k):Math.ceil(k));const S=Math.max(Tn(O),Tn(_));x=Math.pow(10,$i(a)?S:a),_=Math.round(_*x)/x,w=Math.round(w*x)/x;let M=0;for(m&&(u&&_!==o?(i.push({value:o}),_<o&&M++,Sn(Math.round((_+M*O)*x)/x,o,Pl(o,y,t))&&M++):_<o&&M++);M<k;++M)i.push({value:Math.round((_+M*O)*x)/x});return b&&u&&w!==s?i.length&&Sn(i[i.length-1].value,s,Pl(s,y,t))?i[i.length-1].value=s:i.push({value:s}):b&&w!==s||i.push({value:w}),i}function Pl(t,e,{horizontal:i,minRotation:n}){const r=En(n),o=(i?Math.sin(r):Math.cos(r))||.001,s=.75*e*(""+t).length;return Math.min(e/o,s)}Ml.id="category",Ml.defaults={ticks:{callback:Ml.prototype.getLabelForValue}};class Tl extends Ks{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return $i(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:r}=this;const o=t=>n=e?n:t,s=t=>r=i?r:t;if(t){const t=wn(n),e=wn(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=El({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Mn(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Go(t,this.chart.options.locale,this.options.ticks.format)}}class Ll extends Tl{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Yi(t)?t:0,this.max=Yi(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=En(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Al(t){return 1===t/Math.pow(10,Math.floor(_n(t)))}Ll.id="linear",Ll.defaults={ticks:{callback:Ws.formatters.numeric}};class Cl extends Ks{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Tl.prototype.parse.apply(this,[t,e]);if(0!==i)return Yi(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Yi(t)?Math.max(0,t):null,this.max=Yi(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(_n(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(_n(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=Xi(t.min,Math.pow(10,Math.floor(_n(e.min)))),s=Math.floor(_n(o)),a=Math.floor(o/Math.pow(10,s)),c=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Al(o)}),++a,10===a&&(a=1,++s,c=s>=0?1:c),o=Math.round(a*Math.pow(10,s)*c)/c}while(s<i||s===i&&a<n);const l=Xi(t.max,o);return r.push({value:l,major:Al(o)}),r}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&Mn(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Go(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=_n(t),this._valueRange=_n(this.max)-_n(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(_n(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Dl(t){const e=t.ticks;if(e.display&&t.display){const t=ao(e.backdropPadding);return Gi(e.font&&e.font.size,Br.font.size)+t.height}return 0}function jl(t,e,i,n,r){return t===n||t===r?{start:e-i/2,end:e+i/2}:t<n||t>r?{start:e-i,end:e}:{start:e,end:e+i}}function Il(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],r=[],o=t._pointLabels.length,s=t.options.pointLabels,a=s.centerPointLabels?fn/o:0;for(let u=0;u<o;u++){const o=s.setContext(t.getPointLabelContext(u));r[u]=o.padding;const d=t.getPointPosition(u,t.drawingArea+r[u],a),f=co(o.font),p=(c=t.ctx,l=f,h=Ui(h=t._pointLabels[u])?h:[h],{w:Vr(c,l.string,h),h:h.length*l.lineHeight});n[u]=p;const g=Dn(t.getIndexAngle(u)+a),m=Math.round(Pn(g));Rl(i,e,g,jl(m,d.x,p.w,0,180),jl(m,d.y,p.h,90,270))}var c,l,h;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const n=[],r=t._pointLabels.length,o=t.options,s=Dl(o)/2,a=t.drawingArea,c=o.pointLabels.centerPointLabels?fn/r:0;for(let o=0;o<r;o++){const r=t.getPointPosition(o,a+s+i[o],c),l=Math.round(Pn(Dn(r.angle+vn))),h=e[o],u=Nl(r.y,h.h,l),d=Fl(l),f=zl(r.x,h.w,d);n.push({x:r.x,y:u,textAlign:d,left:f,top:u,right:f+h.w,bottom:u+h.h})}return n}(t,n,r)}function Rl(t,e,i,n,r){const o=Math.abs(Math.sin(i)),s=Math.abs(Math.cos(i));let a=0,c=0;n.start<e.l?(a=(e.l-n.start)/o,t.l=Math.min(t.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),r.start<e.t?(c=(e.t-r.start)/s,t.t=Math.min(t.t,e.t-c)):r.end>e.b&&(c=(r.end-e.b)/s,t.b=Math.max(t.b,e.b+c))}function Fl(t){return 0===t||180===t?"center":t<180?"left":"right"}function zl(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Nl(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Bl(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,pn);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o<n;o++)i=t.getPointPosition(o,e),r.lineTo(i.x,i.y)}}Cl.id="logarithmic",Cl.defaults={ticks:{callback:Ws.formatters.logarithmic,major:{enabled:!0}}};class Wl extends Tl{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=ao(Dl(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=Yi(t)&&!isNaN(t)?t:0,this.max=Yi(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Dl(this.options))}generateTickLabels(t){Tl.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=Ji(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Il(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){return Dn(t*(pn/(this._pointLabels.length||1))+En(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if($i(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if($i(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return ho(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-vn+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:r}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Bl(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n}=e,r=this._pointLabels.length;let o,s,a;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let r=e-1;r>=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=co(e.font),{x:s,y:a,textAlign:c,left:l,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:f}=e;if(!$i(f)){const t=so(e.borderRadius),n=ao(e.backdropPadding);i.fillStyle=f;const r=l-n.left,o=h-n.top,s=u-l+n.width,a=d-h+n.height;Object.values(t).some((t=>0!==t))?(i.beginPath(),to(i,{x:r,y:o,w:s,h:a,radius:t}),i.fill()):i.fillRect(r,o,s,a)}Qr(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:c,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),Bl(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}})),i.display){for(t.save(),o=r-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:c}=n;c&&r&&(t.lineWidth=c,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),c=co(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=c.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=ao(a.backdropPadding);t.fillRect(-o/2-e.left,-r-c.size/2-e.top,o+e.width,c.size+e.height)}Qr(t,n.label,0,-r,c,{color:a.color})})),t.restore()}drawTitle(){}}Wl.id="radialLinear",Wl.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ws.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},Wl.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Wl.descriptors={angleLines:{_fallback:"grid"}};const Vl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Hl=Object.keys(Vl);function $l(t,e){return t-e}function Ul(t,e){if($i(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),Yi(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!On(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function ql(t,e,i,n){const r=Hl.length;for(let o=Hl.indexOf(t);o<r-1;++o){const t=Vl[Hl[o]],r=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(r*t.size))<=n)return Hl[o]}return Hl[r-1]}function Yl(t,e,i){if(i){if(i.length){const{lo:n,hi:r}=Fn(i,e);t[i[n]>=e?i[n]:i[r]]=!0}}else t[e]=!0}function Xl(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s<o;++s)a=e[s],r[a]=s,n.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,n){const r=t._adapter,o=+r.startOf(e[0].value,n),s=e[e.length-1].value;let a,c;for(a=o;a<=s;a=+r.add(a,1,n))c=i[a],c>=0&&(e[c].major=!0);return e}(t,n,r,i):n}class Gl extends Ks{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new na._date(t.adapters.date);n.init(e),on(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Ul(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=Yi(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=Yi(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;n<r&&t[n]<e;)n++;for(;r>n&&t[r-1]>i;)r--;return n>0||r<t.length?t.slice(n,r):t}(n,r,this.max);return this._unit=e.unit||(i.autoSkip?ql(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(t,e,i,n,r){for(let o=Hl.length-1;o>=Hl.indexOf(i);o--){const i=Hl[o];if(Vl[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return Hl[i?Hl.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Hl.indexOf(t)+1,i=Hl.length;e<i;++e)if(Vl[Hl[e]].common)return Hl[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&o.reverse(),Xl(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t){let e,i,n=0,r=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),r=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=In(n,0,o),r=In(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,r=n.time,o=r.unit||ql(r.minUnit,e,i,this._getLabelCapacity(e)),s=Gi(r.stepSize,1),a="week"===o&&r.isoWeekday,c=On(a)||!0===a,l={};let h,u,d=e;if(c&&(d=+t.startOf(d,"isoWeek",a)),d=+t.startOf(d,c?"day":o),t.diff(i,e,o)>1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;h<i;h=+t.add(h,s,o),u++)Yl(l,h,f);return h!==i&&"ticks"!==n.bounds&&1!==u||Yl(l,h,f),Object.keys(l).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,c=s&&o[s],l=a&&o[a],h=i[e],u=a&&l&&h&&h.major,d=this._adapter.format(t,n||(u?l:c)),f=r.ticks.callback;return f?Ji(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=En(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(n),o=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:i*r+s*o,h:i*o+s*r}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,r=this._tickFormatFunction(t,0,Xl(this,[t],this._majorUnit),n),o=this._getLabelSize(r),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(Ul(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Vn(t.sort($l))}}function Kl(t,e,i){let n,r,o,s,a=0,c=t.length-1;i?(e>=t[a].pos&&e<=t[c].pos&&({lo:a,hi:c}=zn(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[c])):(e>=t[a].time&&e<=t[c].time&&({lo:a,hi:c}=zn(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[c]));const l=r-n;return l?o+(s-o)*(e-n)/l:o}Gl.id="time",Gl.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Jl extends Gl{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Kl(e,this.min),this._tableRange=Kl(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,c,l;for(o=0,s=t.length;o<s;++o)c=t[o],c>=e&&c<=i&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o<s;++o)l=n[o+1],a=n[o-1],c=n[o],Math.round((l+a)/2)!==c&&r.push({time:c,pos:o/(s-1)});return r}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Kl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Kl(this._table,i*this._tableRange+this._minPos,!0)}}Jl.id="timeseries",Jl.defaults=Gl.defaults;const Ql=[ta,Fc,Ol,Object.freeze({__proto__:null,CategoryScale:Ml,LinearScale:Ll,LogarithmicScale:Cl,RadialLinearScale:Wl,TimeScale:Gl,TimeSeriesScale:Jl})];hc.register(...Ql);var Zl=hc,th=i(998),eh=i.n(th);const ih={data:{},nonce:"",context:null,init(t){this.context=t;const e=t.querySelectorAll("[data-progress]"),i=t.querySelectorAll("[data-chart]");[...e].forEach((t=>{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t),this.nonce||(this.nonce=t.dataset?.nonce)}));for(const t in this.data)this.getValues(t);[...i].forEach((t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new Zl(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>eh()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})}))},line(t){new(Wi().Line)(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new(Wi().Circle)(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Et({path:t,method:"GET",headers:{"X-WP-Nonce":this.nonce}}).then((e=>{this.data[t].items.forEach((i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout((()=>{this.getValues(t)}),1e4))}));for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach((i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))})),n.forEach((i=>{i.innerText=e[t],i.classList.contains("cld-toggle")&&(e[t]?i.classList.remove("hidden"):i.classList.add("hidden"))}))}}))},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}};var nh=ih;var rh={key:"_cld_pending_state",data:null,pending:null,changed:!1,previous:{},init(){this.data=cldData.stateData?cldData.stateData:{};let t=localStorage.getItem(this.key);t&&(t=JSON.parse(t),this.data={...this.data,...t},this.sendStates()),this.previous=JSON.stringify(this.data)},_update(){this.pending&&(clearTimeout(this.pending),localStorage.removeItem(this.key)),this.previous!==JSON.stringify(this.data)&&(this.pending=setTimeout((()=>this.sendStates()),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then((t=>t.json())).then((t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))}))}};var oh={init(t){[...t.querySelectorAll("[data-remove]")].forEach((t=>{t.addEventListener("click",(e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)}))}))}};const sh={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach((t=>this.bind(t)))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",(e=>{t.focus()})),t.addEventListener("focus",(e=>{t.innerText=null})),t.addEventListener("blur",(e=>{3<t.innerText.length&&this.captureTag(t,t.innerText),t.innerText=t.dataset.placeholder})),t.addEventListener("keydown",(i=>{if("Tab"===i.key)3<t.innerText.length&&(i.preventDefault(),this.captureTag(t,t.innerText));else if("Escape"===i.key)t.blur();else if("Backspace"===i.key&&0===t.innerText.length){const i=t.boundDisplay.lastChild.previousSibling;i&&(i.parentNode.removeChild(i),this.values[e].pop(),this.updateInput(e))}})),t.addEventListener("keypress",(e=>{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3<t.innerText.length&&this.captureTag(t,t.innerText))})),n.forEach((t=>{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",(e=>{e.stopPropagation(),this.deleteTag(t)}))}))},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout((()=>{e.parentNode.removeChild(e)}),500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout((()=>{t.classList.remove("pulse")}),1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",(()=>this.deleteTag(n))),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout((()=>{i.classList.remove("pulse")}),500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};var ah=sh;var ch={suffixInputs:null,init(t){this.suffixInputs=t.querySelectorAll("[data-suffix]"),[...this.suffixInputs].forEach((t=>this.bindInput(t)))},bindInput(t){const e=document.getElementById(t.dataset.suffix),i=e.dataset.template.split("@value");this.setSuffix(e,i,t.value),t.addEventListener("change",(()=>this.setSuffix(e,i,t.value))),t.addEventListener("input",(()=>this.setSuffix(e,i,t.value)))},setSuffix(t,e,i){t.innerHTML="",t.classList.add("hidden"),-1===["none","off",""].indexOf(i)&&t.classList.remove("hidden");const n=document.createTextNode(e.join(i));t.appendChild(n)}};const lh={wrappers:null,frame:null,error:'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="rgba(0,0,0,0.1)"/><text x="50%" y="50%" fill="red" text-anchor="middle" dominant-baseline="middle">%26%23x26A0%3B︎</text></svg>',init(t){this.wrappers=t.querySelectorAll(".cld-size-items"),this.wrappers.forEach((t=>{const e=t.querySelectorAll(".cld-size-selector-item");e.forEach((i=>{i.addEventListener("click",(()=>{e.forEach((t=>{delete t.dataset.selected})),i.dataset.selected=!0,this.switchSizeContent(t,i.dataset.size)}))}));const i=t.querySelector(".cld-size-selector-item[data-selected]");i&&this.switchSizeContent(t,i.dataset.size)}))},switchSizeContent(t,e){t.querySelectorAll(".cld-size-content").forEach((t=>{t.style.display="none"}));const i=t.querySelector(`.cld-size-content[data-size="${e}"]`);i&&(i.style.display="block",this.buildImages(t,i))},buildImages(t,e){const i=t.dataset.base,n=e.querySelector(".regular-text"),r=e.querySelector(".disable-toggle");if(!n||!r)return;const o=e.querySelectorAll("img"),s=n.value.length?n.value.replace(" ",""):n.placeholder;if(o.forEach((t=>{const e=t.dataset.size,o=t.dataset.file;r.checked?(n.disabled=!0,t.src=`${i}/${e}/${o}`):(n.disabled=!1,t.src=`${i}/${e},${s}/${o}`),t.bound||(t.addEventListener("error",(()=>{t.src=this.error})),t.bound=!0)})),!n.bound){let i=null;n.addEventListener("input",(()=>{i&&clearTimeout(i),i=setTimeout((()=>{this.buildImages(t,e)}),1e3)})),n.bound=!0}r.bound||(r.addEventListener("change",(()=>{this.buildImages(t,e)})),r.bound=!0);const a=e.querySelector(".clear-crop-input");a&&!a.bound&&(a.addEventListener("click",(()=>{n.value="",this.buildImages(t,e)})),a.bound=!0)}};var hh=lh;const uh={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),c=t.querySelectorAll("[data-auto-suffix]"),l=t.querySelectorAll("[data-confirm]"),h={};rh.init(),Ni.bind(s),c.forEach((t=>this._autoSuffix(t))),o.forEach((t=>this._trigger(t))),i.forEach((t=>this._toggle(t))),e.forEach((t=>this._bind(t))),n.forEach((t=>this._alias(t))),a.forEach((t=>this._files(t,h))),Ii(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach((t=>{t.dispatchEvent(new Event("input"))})),l.forEach((t=>{t.addEventListener("click",(e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())}))})),nh.init(t),oh.init(t),ah.init(t),ch.init(t),hh.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map((t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t));t.addEventListener("change",(()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)})),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",(()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout((()=>{this._compileParent(i)}),10)})))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",(function(e){t.dispatchEvent(new Event("input"))})),t.addEventListener("input",(function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)}))},_alias(t){t.addEventListener("click",(function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))}))},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=rh.get(t.id);t.addEventListener("click",(function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)})),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),rh.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach((function(t){t.dataset.disabled=!1}))},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach((function(t){t.dataset.disabled=!0}))}},dh=document.querySelectorAll(".cld-settings,.cld-meta-box");dh.length&&dh.forEach((t=>{t&&window.addEventListener("load",uh._init(t))}));const fh={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,updateConnection:document.getElementById("update-connection"),cancelUpdateConnection:document.getElementById("cancel-update-connection"),config:{},didSave:!1,init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),Et.use(Et.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");this.updateConnection.addEventListener("click",(()=>{this.lockNext(),e.parentNode.classList.remove("hidden"),this.cancelUpdateConnection.classList.remove("hidden"),this.updateConnection.classList.add("hidden")})),this.cancelUpdateConnection.addEventListener("click",(()=>{this.unlockNext(),e.parentNode.classList.add("hidden"),this.cancelUpdateConnection.classList.add("hidden"),this.updateConnection.classList.remove("hidden"),this.config.cldString=!0,e.value="",this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")})),[...t].forEach((t=>{t.addEventListener("click",(()=>{this.navigate(t.dataset.navigate)}))})),this.lock.addEventListener("click",(()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach((t=>{t.disabled=t.disabled?"":"disabled"}))})),e.addEventListener("input",(t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout((()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")}),500))})),this.config.cldString&&(e.parentNode.classList.add("hidden"),this.updateConnection.classList.remove("hidden")),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",(t=>{this.hashChange()}))},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0<t&&5>t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",(()=>{this.setConfig("mediaLibrary",t.checked)}));const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",(()=>{this.setConfig("nonMedia",e.checked)}));const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",(()=>{this.setConfig("advanced",i.checked)}))},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach((t=>{this.hide(this.content[t])}))},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach((e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")}))},incompleteTab(t){Object.keys(this.tabs).forEach((t=>{this.tabs[t].classList.remove("complete","active")}))},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey)&&!this.didSave)return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString?this.showSuccess():(this.lockNext(),setTimeout((()=>{document.getElementById("connect.cloudinary_url").focus()}),0)),this.updateConnection.classList.contains("hidden")&&this.lockNext();break;case 3:if(!this.config.cldString)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back)}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Et({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then((e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))}))},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=j("Setting up Cloudinary","cloudinary"),this.didSave=!0,Et({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then((t=>{this.next.innerText=j("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)})).fail((t=>{this.didSave=!1}))}};window.addEventListener("load",(()=>fh.init()));const ph={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach((t=>{t.classList.remove("selected")})),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",(()=>ph._init()));const gh={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;Et.use(Et.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach((t=>{t.addEventListener("change",(e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout((()=>{this.toggleExtension(t),t.debounce=null}),1e3)}))}))},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Et({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then((e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach((t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach((i=>{i.innerText=e[t]}))})),this.pageReloader.style.display="block"}))},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",(()=>gh.init()));const mh={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach((t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))}))},filterActive:t=>t.filter((t=>t.classList.contains("is-active"))).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",(()=>mh.init()));i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;window.$=window.jQuery;e()}()}(); 1 (()=>{var t={951(t,e){var i,n,s,o;o=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var s=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,r=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,r),l=a.toFixed(n.fixed);return r-1<3&&!e(t,"si")&&e(t,"jedec")&&(s[1]="B"),{suffix:r?(s[0]+"MGTPEZY")[r-1]+s[1]:1==(0|l)?"Byte":"Bytes",magnitude:r,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,s){var o=e(s,"si")?1e3:1024,r=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===r||0===r)return a.toFixed(2);for(;r>0;r--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=o():(n=[],void 0===(s="function"==typeof(i=o)?i.apply(e,n):i)||(t.exports=s))},998(t,e){var i,n,s;n=[],i=function(){"use strict";function t(t,e){var i,n,s;for(i=1,n=arguments.length;i<n;++i)if(null!=(e=arguments[i]))for(s in e)a(e,s)&&(t[s]=e[s]);return t}function e(t,e){return e.length-t.length}function i(t,e){return t.factor-e.factor}function n(t){return t.replace(/([.*+?=^!:${}()|[\]/\\])/g,"\\$1")}function s(t,e){var i,n;for(i=0,n=t.length;i<n;++i)e(t[i],i)}function o(t,e){var i;for(i in t)a(t,i)&&e(t[i],i)}var r,a=(r=Object.prototype.hasOwnProperty,function(t,e){return null!=t&&r.call(t,e)});function l(t,e){for(;"string"==typeof e;)e=t[e];return e}function c(t){this._prefixes=t;var s=[],r=[];o(t,function(t,e){s.push(n(e)),r.push({factor:t,prefix:e})});var l=this._lcPrefixes={};o(t,function(e,i){var n=i.toLowerCase();a(t,n)||(l[n]=i)}),r.sort(i),this._list=r,s.sort(e),this._regexp=new RegExp("^\\s*(-)?\\s*(\\d+(?:\\.\\d+)?)\\s*("+s.join("|")+")\\s*(.*)\\s*?$","i")}c.create=function(t,e,i){var n={};return void 0===i&&(i=0),s(t,function(t,s){n[t]=Math.pow(e,s+i)}),new c(n)},c.prototype.findPrefix=function(t){for(var e,i=this._list,n=0,s=i.length-1;n!==s;)i[e=n+s+1>>1].factor>t?s=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,s=i[3];if(a(this._prefixes,s))n=this._prefixes[s];else{if(e||(s=s.toLowerCase(),!a(this._lcPrefixes,s)))return;s=this._lcPrefixes[s],n=this._prefixes[s]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:s,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},d={maxDecimals:2,separator:" ",unit:""},u={scale:"SI",strict:!1};function f(e,i){var n=(i=t({},d,i)).decimals;void 0!==n&&delete i.maxDecimals;var s=v(e,i);e=void 0!==n?s.value.toFixed(n):String(s.value);var o=s.prefix+i.unit;return""===o?e:e+i.separator+o}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},u,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var s=n.parse(e,i.strict);if(void 0===s)throw new Error("cannot parse str");return s}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},u,i);var s,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var r=i.maxDecimals,c="auto"===r;c?s=10:void 0!==r&&(s=Math.pow(10,r));var d,f=i.prefix;if(void 0!==f){if(!a(o._prefixes,f))throw new Error("invalid prefix");d=o._prefixes[f]}else{var p=o.findPrefix(e);if(void 0!==s)do{var g=(d=p.factor)/s;e=Math.round(e/g)*g}while((p=o.findPrefix(e)).factor!==d);else d=p.factor;f=p.prefix}return e=void 0===s?e/d:Math.round(e*s/d)/s,c&&Math.abs(e)>=10&&(e=Math.round(e)),{prefix:f,value:e}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=v,f.Scale=c,f},void 0===(s="function"==typeof i?i.apply(e,n):i)||(t.exports=s)},336(t){var e,i="loading"in HTMLImageElement.prototype,n="loading"in HTMLIFrameElement.prototype,s="onscroll"in window;function o(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach(function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))}),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function r(t){var o=document.createElement("div");for(o.innerHTML=function(t){var o=t.textContent||t.innerHTML,r="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((o.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((o.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return(/<img/gim.test(o)&&!i||/<iframe/gim.test(o)&&!n)&&s&&(o=void 0===e?o.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):(o=o.replace("<source",'<source srcset="'+r+'" data-lazy-remove="true"></source>\n<source')).replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+r+'" data-lazy-src=')),o}(t);o.firstChild;){var r=o.firstChild;if(s&&void 0!==e&&r.tagName&&(("img"===r.tagName.toLowerCase()||"picture"===r.tagName.toLowerCase())&&!i||"iframe"===r.tagName.toLowerCase()&&!n)){var a="picture"===r.tagName.toLowerCase()?o.querySelector("img"):r;e.observe(a)}t.parentNode.insertBefore(r,t)}t.parentNode.removeChild(t)}window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(e=new IntersectionObserver(function(t,e){t.forEach(function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),o(i)}})},{rootMargin:"0px 0px 256px 0px",threshold:.01}));var a=function(){document.querySelectorAll("noscript.loading-lazy").forEach(function(t){return r(t)}),void 0!==window.matchMedia&&window.matchMedia("print").addListener(function(t){t.matches&&document.querySelectorAll('img[loading="lazy"][data-lazy-src],iframe[loading="lazy"][data-lazy-src]').forEach(function(t){o(t)})})};/comp|inter/.test(document.readyState)?a():"addEventListener"in document?document.addEventListener("DOMContentLoaded",function(){a()}):document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&a()}),t.exports={prepareElement:r}},941(t){var e;t.exports=function(){function t(e,i,n){function s(r,a){if(!i[r]){if(!e[r]){if(o)return o(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[r]={exports:{}};e[r][0].call(c.exports,function(t){return s(e[r][1][t]||t)},c,c.exports,t,e,i,n)}return i[r].exports}for(var o=void 0,r=0;r<n.length;r++)s(n[r]);return s}return t}()({1:[function(t,e,i){(function(t){(function(){var n=200,s="__lodash_hash_undefined__",o=800,r=16,a=9007199254740991,l="[object Arguments]",c="[object Array]",h="[object AsyncFunction]",d="[object Boolean]",u="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",m="[object Map]",b="[object Number]",v="[object Null]",y="[object Object]",x="[object Proxy]",_="[object RegExp]",w="[object Set]",k="[object String]",S="[object Undefined]",M="[object WeakMap]",O="[object ArrayBuffer]",E="[object DataView]",A="[object Float64Array]",T="[object Int8Array]",C="[object Int16Array]",L="[object Int32Array]",P="[object Uint8Array]",D="[object Uint8ClampedArray]",I="[object Uint16Array]",R="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,F=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,B={};B["[object Float32Array]"]=B[A]=B[T]=B[C]=B[L]=B[P]=B[D]=B[I]=B[R]=!0,B[l]=B[c]=B[O]=B[d]=B[E]=B[u]=B[f]=B[p]=B[m]=B[b]=B[y]=B[_]=B[w]=B[k]=B[M]=!1;var N="object"==typeof t&&t&&t.Object===Object&&t,W="object"==typeof self&&self&&self.Object===Object&&self,V=N||W||Function("return this")(),H="object"==typeof i&&i&&!i.nodeType&&i,$=H&&"object"==typeof e&&e&&!e.nodeType&&e,U=$&&$.exports===H,q=U&&N.process,Y=function(){try{var t=$&&$.require&&$.require("util").types;return t||q&&q.binding&&q.binding("util")}catch(t){}}(),X=Y&&Y.isTypedArray;function G(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}function J(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n}function K(t){return function(e){return t(e)}}function Q(t,e){return null==t?void 0:t[e]}function Z(t,e){return function(i){return t(e(i))}}var tt,et=Array.prototype,it=Function.prototype,nt=Object.prototype,st=V["__core-js_shared__"],ot=it.toString,rt=nt.hasOwnProperty,at=(tt=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+tt:"",lt=nt.toString,ct=ot.call(Object),ht=RegExp("^"+ot.call(rt).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dt=U?V.Buffer:void 0,ut=V.Symbol,ft=V.Uint8Array,pt=dt?dt.allocUnsafe:void 0,gt=Z(Object.getPrototypeOf,Object),mt=Object.create,bt=nt.propertyIsEnumerable,vt=et.splice,yt=ut?ut.toStringTag:void 0,xt=function(){try{var t=ye(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),_t=dt?dt.isBuffer:void 0,wt=Math.max,kt=Date.now,St=ye(V,"Map"),Mt=ye(Object,"create"),Ot=function(){function t(){}return function(e){if(!Ve(e))return{};if(mt)return mt(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();function Et(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function At(){this.__data__=Mt?Mt(null):{},this.size=0}function Tt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Ct(t){var e=this.__data__;if(Mt){var i=e[t];return i===s?void 0:i}return rt.call(e,t)?e[t]:void 0}function Lt(t){var e=this.__data__;return Mt?void 0!==e[t]:rt.call(e,t)}function Pt(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Mt&&void 0===e?s:e,this}function Dt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function It(){this.__data__=[],this.size=0}function Rt(t){var e=this.__data__,i=te(e,t);return!(i<0||(i==e.length-1?e.pop():vt.call(e,i,1),--this.size,0))}function jt(t){var e=this.__data__,i=te(e,t);return i<0?void 0:e[i][1]}function Ft(t){return te(this.__data__,t)>-1}function zt(t,e){var i=this.__data__,n=te(i,t);return n<0?(++this.size,i.push([t,e])):i[n][1]=e,this}function Bt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function Nt(){this.size=0,this.__data__={hash:new Et,map:new(St||Dt),string:new Et}}function Wt(t){var e=ve(this,t).delete(t);return this.size-=e?1:0,e}function Vt(t){return ve(this,t).get(t)}function Ht(t){return ve(this,t).has(t)}function $t(t,e){var i=ve(this,t),n=i.size;return i.set(t,e),this.size+=i.size==n?0:1,this}function Ut(t){var e=this.__data__=new Dt(t);this.size=e.size}function qt(){this.__data__=new Dt,this.size=0}function Yt(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function Xt(t){return this.__data__.get(t)}function Gt(t){return this.__data__.has(t)}function Jt(t,e){var i=this.__data__;if(i instanceof Dt){var s=i.__data__;if(!St||s.length<n-1)return s.push([t,e]),this.size=++i.size,this;i=this.__data__=new Bt(s)}return i.set(t,e),this.size=i.size,this}function Kt(t,e){var i=je(t),n=!i&&Re(t),s=!i&&!n&&Be(t),o=!i&&!n&&!s&&Ue(t),r=i||n||s||o,a=r?J(t.length,String):[],l=a.length;for(var c in t)!e&&!rt.call(t,c)||r&&("length"==c||s&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||we(c,l))||a.push(c);return a}function Qt(t,e,i){(void 0!==i&&!Ie(t[e],i)||void 0===i&&!(e in t))&&ee(t,e,i)}function Zt(t,e,i){var n=t[e];rt.call(t,e)&&Ie(n,i)&&(void 0!==i||e in t)||ee(t,e,i)}function te(t,e){for(var i=t.length;i--;)if(Ie(t[i][0],e))return i;return-1}function ee(t,e,i){"__proto__"==e&&xt?xt(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}Et.prototype.clear=At,Et.prototype.delete=Tt,Et.prototype.get=Ct,Et.prototype.has=Lt,Et.prototype.set=Pt,Dt.prototype.clear=It,Dt.prototype.delete=Rt,Dt.prototype.get=jt,Dt.prototype.has=Ft,Dt.prototype.set=zt,Bt.prototype.clear=Nt,Bt.prototype.delete=Wt,Bt.prototype.get=Vt,Bt.prototype.has=Ht,Bt.prototype.set=$t,Ut.prototype.clear=qt,Ut.prototype.delete=Yt,Ut.prototype.get=Xt,Ut.prototype.has=Gt,Ut.prototype.set=Jt;var ie=be();function ne(t){return null==t?void 0===t?S:v:yt&&yt in Object(t)?xe(t):Ae(t)}function se(t){return He(t)&&ne(t)==l}function oe(t){return!(!Ve(t)||Me(t))&&(Ne(t)?ht:F).test(De(t))}function re(t){return He(t)&&We(t.length)&&!!B[ne(t)]}function ae(t){if(!Ve(t))return Ee(t);var e=Oe(t),i=[];for(var n in t)("constructor"!=n||!e&&rt.call(t,n))&&i.push(n);return i}function le(t,e,i,n,s){t!==e&&ie(e,function(o,r){if(s||(s=new Ut),Ve(o))ce(t,e,r,i,le,n,s);else{var a=n?n(Ce(t,r),o,r+"",t,e,s):void 0;void 0===a&&(a=o),Qt(t,r,a)}},Ye)}function ce(t,e,i,n,s,o,r){var a=Ce(t,i),l=Ce(e,i),c=r.get(l);if(c)Qt(t,i,c);else{var h=o?o(a,l,i+"",t,e,r):void 0,d=void 0===h;if(d){var u=je(l),f=!u&&Be(l),p=!u&&!f&&Ue(l);h=l,u||f||p?je(a)?h=a:ze(a)?h=pe(a):f?(d=!1,h=de(l,!0)):p?(d=!1,h=fe(l,!0)):h=[]:$e(l)||Re(l)?(h=a,Re(a)?h=qe(a):Ve(a)&&!Ne(a)||(h=_e(l))):d=!1}d&&(r.set(l,h),s(h,l,n,o,r),r.delete(l)),Qt(t,i,h)}}function he(t,e){return Le(Te(t,e,Je),t+"")}function de(t,e){if(e)return t.slice();var i=t.length,n=pt?pt(i):new t.constructor(i);return t.copy(n),n}function ue(t){var e=new t.constructor(t.byteLength);return new ft(e).set(new ft(t)),e}function fe(t,e){var i=e?ue(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function pe(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i<n;)e[i]=t[i];return e}function ge(t,e,i,n){var s=!i;i||(i={});for(var o=-1,r=e.length;++o<r;){var a=e[o],l=n?n(i[a],t[a],a,i,t):void 0;void 0===l&&(l=t[a]),s?ee(i,a,l):Zt(i,a,l)}return i}function me(t){return he(function(e,i){var n=-1,s=i.length,o=s>1?i[s-1]:void 0,r=s>2?i[2]:void 0;for(o=t.length>3&&"function"==typeof o?(s--,o):void 0,r&&ke(i[0],i[1],r)&&(o=s<3?void 0:o,s=1),e=Object(e);++n<s;){var a=i[n];a&&t(e,a,n,o)}return e})}function be(t){return function(e,i,n){for(var s=-1,o=Object(e),r=n(e),a=r.length;a--;){var l=r[t?a:++s];if(!1===i(o[l],l,o))break}return e}}function ve(t,e){var i=t.__data__;return Se(e)?i["string"==typeof e?"string":"hash"]:i.map}function ye(t,e){var i=Q(t,e);return oe(i)?i:void 0}function xe(t){var e=rt.call(t,yt),i=t[yt];try{t[yt]=void 0;var n=!0}catch(t){}var s=lt.call(t);return n&&(e?t[yt]=i:delete t[yt]),s}function _e(t){return"function"!=typeof t.constructor||Oe(t)?{}:Ot(gt(t))}function we(t,e){var i=typeof t;return!!(e=null==e?a:e)&&("number"==i||"symbol"!=i&&z.test(t))&&t>-1&&t%1==0&&t<e}function ke(t,e,i){if(!Ve(i))return!1;var n=typeof e;return!!("number"==n?Fe(i)&&we(e,i.length):"string"==n&&e in i)&&Ie(i[e],t)}function Se(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Me(t){return!!at&&at in t}function Oe(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||nt)}function Ee(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}function Ae(t){return lt.call(t)}function Te(t,e,i){return e=wt(void 0===e?t.length-1:e,0),function(){for(var n=arguments,s=-1,o=wt(n.length-e,0),r=Array(o);++s<o;)r[s]=n[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=n[s];return a[e]=i(r),G(t,this,a)}}function Ce(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Le=Pe(xt?function(t,e){return xt(t,"toString",{configurable:!0,enumerable:!1,value:Ge(e),writable:!0})}:Je);function Pe(t){var e=0,i=0;return function(){var n=kt(),s=r-(n-i);if(i=n,s>0){if(++e>=o)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function De(t){if(null!=t){try{return ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ie(t,e){return t===e||t!=t&&e!=e}var Re=se(function(){return arguments}())?se:function(t){return He(t)&&rt.call(t,"callee")&&!bt.call(t,"callee")},je=Array.isArray;function Fe(t){return null!=t&&We(t.length)&&!Ne(t)}function ze(t){return He(t)&&Fe(t)}var Be=_t||Ke;function Ne(t){if(!Ve(t))return!1;var e=ne(t);return e==p||e==g||e==h||e==x}function We(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}function Ve(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function He(t){return null!=t&&"object"==typeof t}function $e(t){if(!He(t)||ne(t)!=y)return!1;var e=gt(t);if(null===e)return!0;var i=rt.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&ot.call(i)==ct}var Ue=X?K(X):re;function qe(t){return ge(t,Ye(t))}function Ye(t){return Fe(t)?Kt(t,!0):ae(t)}var Xe=me(function(t,e,i){le(t,e,i)});function Ge(t){return function(){return t}}function Je(t){return t}function Ke(){return!1}e.exports=Xe}).call(this)}).call(this,"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,i,n){var s,o;s=self,o=function(){return function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return ae},Tweenable:function(){return Mt},interpolate:function(){return ee},processTweens:function(){return bt},setBezierFunction:function(){return H},shouldScheduleUpdate:function(){return xt},tween:function(){return Ot},unsetBezierFunction:function(){return $}});var n={};i.r(n),i.d(n,{bounce:function(){return R},bouncePast:function(){return j},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return A},easeInCirc:function(){return S},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return C},easeInOutCirc:function(){return O},easeInOutCubic:function(){return d},easeInOutExpo:function(){return k},easeInOutQuad:function(){return l},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return r},easeInQuart:function(){return u},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return T},easeOutBounce:function(){return E},easeOutCirc:function(){return M},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return B},elastic:function(){return L},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return P},swingTo:function(){return I}});var s={};i.r(s),i.d(s,{afterTween:function(){return Gt},beforeTween:function(){return Xt},doesApply:function(){return qt},tweenCreated:function(){return Yt}});var o=function(t){return t},r=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},d=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},u=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},M=function(t){return Math.sqrt(1-Math.pow(t-1,2))},O=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},A=function(t){var e=1.70158;return t*t*((e+1)*t-e)},T=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},C=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},L=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},P=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},I=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},j=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},B=function(t){return Math.pow(t,.25)};function N(t,e,i,n,s,o){var r,a,l,c,h,d=0,u=0,f=0,p=function(t){return((d*t+u)*t+f)*t},g=function(t){return(3*d*t+2*u)*t+f},m=function(t){return t>=0?t:0-t};return d=1-(f=3*e)-(u=3*(n-e)-f),l=1-(h=3*i)-(c=3*(s-i)-h),r=t,a=function(t){return 1/(200*t)}(o),function(t){return((l*t+c)*t+h)*t}(function(t,e){var i,n,s,o,r,a;for(s=t,a=0;a<8;a++){if(o=p(s)-t,m(o)<e)return s;if(r=g(s),m(r)<1e-6)break;s-=o/r}if((s=t)<(i=0))return i;if(s>(n=1))return n;for(;i<n;){if(o=p(s),m(o-t)<e)return s;t>o?i=s:n=s,s=.5*(n-i)+i}return s}(r,a))}var W,V=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.25,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.25,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.75,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.75;return function(s){return N(s,t,e,i,n,1)}},H=function(t,e,i,n,s){var o=V(e,i,n,s);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=s,Mt.formulas[t]=o},$=function(t){return delete Mt.formulas[t]};function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function q(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}function X(t){return function(t){if(Array.isArray(t))return G(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?G(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function J(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function K(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?J(Object(i),!0).forEach(function(e){Q(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):J(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Q(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Z,tt,et,it="linear",nt="undefined"!=typeof window?window:i.g,st="afterTween",ot="afterTweenEnd",rt="beforeTween",at="tweenCreated",lt="function",ct="string",ht=nt.requestAnimationFrame||nt.webkitRequestAnimationFrame||nt.oRequestAnimationFrame||nt.msRequestAnimationFrame||nt.mozCancelRequestAnimationFrame&&nt.mozRequestAnimationFrame||setTimeout,dt=function(){},ut=null,ft=null,pt=K({},n),gt=function(t,e,i,n,s,o,r){var a,l,c,h=t<o?0:(t-o)/s,d=!1;for(var u in r&&r.call&&(d=!0,a=r(h)),e)d||(a=((l=r[u]).call?l:pt[l])(h)),c=i[u],e[u]=c+(n[u]-c)*a;return e},mt=function(t,e){var i=t._timestamp,n=t._currentState,s=t._delay;if(!(e<i+s)){var o=t._duration,r=t._targetState,a=i+s+o,l=e>a?a:e;t._hasEnded=l>=a;var c=o-(a-l),h=t._filters.length>0;if(t._hasEnded)return t._render(r,t._data,c),t.stop(!0);h&&t._applyFilter(rt),l<i+s?i=o=l=1:i+=s,gt(l,n,t._originalState,r,o,i,t._easing),h&&t._applyFilter(st),t._render(n,t._data,c)}},bt=function(){for(var t,e=Mt.now(),i=ut;i;)t=i._next,mt(i,e),i=t},vt=Date.now||function(){return+new Date},yt=!1,xt=function(t){t&&yt||(yt=t,t&&_t())},_t=function t(){Z=vt(),yt&&ht.call(nt,t,16.666666666666668),bt()},wt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:it,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Array.isArray(e))return V.apply(void 0,X(e));var n=Y(e);if(pt[e])return pt[e];if(n===ct||n===lt)for(var s in t)i[s]=e;else for(var o in t)i[o]=e[o]||it;return i},kt=function(t){t===ut?(ut=t._next)?ut._previous=null:ft=null:t===ft?(ft=t._previous)?ft._next=null:ut=null:(tt=t._previous,et=t._next,tt._next=et,et._previous=tt),t._previous=t._next=null},St="function"==typeof Promise?Promise:null;W=Symbol.toStringTag;var Mt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;U(this,t),Q(this,W,"Promise"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=dt,this._render=dt,this._promiseCtor=St,i&&this.setConfig(i)}var e;return e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var s=i.promise,o=void 0===s?this._promiseCtor:s,r=i.start,a=void 0===r?dt:r,l=i.finish,c=i.render,h=void 0===c?this._config.step||dt:c,d=i.step,u=void 0===d?dt:d;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||u,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in f)m[y]=f[y];var x=!1;for(var _ in m){var w=m[_];x||Y(w)!==ct||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=wt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(at)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor(function(t,e){i._resolve=t,i._reject=e}),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"finally",value:function(t){return this.then().finally(t)}},{key:"get",value:function(){return K({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,kt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ut?(ut=this,ft=this):(this._previous=ft,ft._next=this,ft=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,mt(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,kt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(rt),gt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(st),this._applyFilter(ot))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"hasEnded",value:function(){return this._hasEnded}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=K({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}],e&&q(t.prototype,e),t}();function Ot(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new Mt;return e.tween(t),e.tweenable=e,e}Q(Mt,"now",function(){return Z}),Q(Mt,"setScheduleFunction",function(t){return ht=t}),Q(Mt,"filters",{}),Q(Mt,"formulas",pt),xt(!0);var Et,At,Tt=/(\d|-|\.)/,Ct=/([^\-0-9.]+)/g,Lt=/[0-9.-]+/g,Pt=(Et=Lt.source,At=/,\s*/.source,new RegExp("rgba?\\(".concat(Et).concat(At).concat(Et).concat(At).concat(Et,"(").concat(At).concat(Et,")?\\)"),"g")),Dt=/^.*\(/,It=/#([0-9]|[a-f]){3,6}/gi,Rt="VAL",jt=function(t,e){return t.map(function(t,i){return"_".concat(e,"_").concat(i)})};function Ft(t){return parseInt(t,16)}var zt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Ft(e.substr(0,2)),Ft(e.substr(2,2)),Ft(e.substr(4,2))]).join(","),")");var e},Bt=function(t,e,i){var n=e.match(t),s=e.replace(t,Rt);return n&&n.forEach(function(t){return s=s.replace(Rt,i(t))}),s},Nt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(It)&&(t[e]=Bt(It,i,zt))}},Wt=function(t){var e=t.match(Lt),i=e.slice(0,3).map(Math.floor),n=t.match(Dt)[0];if(3===e.length)return"".concat(n).concat(i.join(","),")");if(4===e.length)return"".concat(n).concat(i.join(","),",").concat(e[3],")");throw new Error("Invalid rgbChunk: ".concat(t))},Vt=function(t){return t.match(Lt)},Ht=function(t,e){var i={};return e.forEach(function(e){i[e]=t[e],delete t[e]}),i},$t=function(t,e){return e.map(function(e){return t[e]})},Ut=function(t,e){return e.forEach(function(e){return t=t.replace(Rt,+e.toFixed(4))}),t},qt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Yt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Nt),t._tokenData=function(t){var e,i,n={};for(var s in t){var o=t[s];"string"==typeof o&&(n[s]={formatString:(e=o,i=void 0,i=e.match(Ct),i?(1===i.length||e.charAt(0).match(Tt))&&i.unshift(""):i=["",""],i.join(Rt)),chunkNames:jt(Vt(o),s)})}return n}(e)}function Xt(t){var e=t._currentState,i=t._originalState,n=t._targetState,s=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,s=t[i];if("string"==typeof s){var o=s.split(" "),r=o[o.length-1];n.forEach(function(e,i){return t[e]=o[i]||r})}else n.forEach(function(e){return t[e]=s});delete t[i]};for(var n in e)i(n)}(s,o),[e,i,n].forEach(function(t){return function(t,e){var i=function(i){Vt(t[i]).forEach(function(n,s){return t[e[i].chunkNames[s]]=+n}),delete t[i]};for(var n in e)i(n)}(t,o)})}function Gt(t){var e=t._currentState,i=t._originalState,n=t._targetState,s=t._easing,o=t._tokenData;[e,i,n].forEach(function(t){return function(t,e){for(var i in e){var n=e[i],s=n.chunkNames,o=n.formatString,r=Ut(o,$t(Ht(t,s),s));t[i]=Bt(Pt,r,Wt)}}(t,o)}),function(t,e){for(var i in e){var n=e[i].chunkNames,s=t[n[0]];t[i]="string"==typeof s?n.map(function(e){var i=t[e];return delete t[e],i}).join(" "):s}}(s,o)}function Jt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function Kt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Jt(Object(i),!0).forEach(function(e){Qt(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Jt(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Qt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Zt=new Mt,te=Mt.filters,ee=function(t,e,i,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=Kt({},t),r=wt(t,n);for(var a in Zt._filters.length=0,Zt.set({}),Zt._currentState=o,Zt._originalState=t,Zt._targetState=e,Zt._easing=r,te)te[a].doesApply(Zt)&&Zt._filters.push(te[a]);Zt._applyFilter("tweenCreated"),Zt._applyFilter("beforeTween");var l=gt(i,o,t,e,1,s,r);return Zt._applyFilter("afterTween"),l};function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function ne(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function se(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function oe(t,e){var i=e.get(t);if(!i)throw new TypeError("attempted to get private field on non-instance");return i.get?i.get.call(t):i.value}var re=new WeakMap,ae=function(){function t(){ne(this,t),re.set(this,{writable:!0,value:[]});for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];i.forEach(this.add.bind(this))}var e;return(e=[{key:"add",value:function(t){return oe(this,re).push(t),t}},{key:"remove",value:function(t){var e=oe(this,re).indexOf(t);return~e&&oe(this,re).splice(e,1),t}},{key:"empty",value:function(){return this.tweenables.map(this.remove.bind(this))}},{key:"isPlaying",value:function(){return oe(this,re).some(function(t){return t.isPlaying()})}},{key:"play",value:function(){return oe(this,re).forEach(function(t){return t.tween()}),this}},{key:"pause",value:function(){return oe(this,re).forEach(function(t){return t.pause()}),this}},{key:"resume",value:function(){return this.playingTweenables.forEach(function(t){return t.resume()}),this}},{key:"stop",value:function(t){return oe(this,re).forEach(function(e){return e.stop(t)}),this}},{key:"tweenables",get:function(){return function(t){if(Array.isArray(t))return ie(t)}(t=oe(this,re))||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ie(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ie(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var t}},{key:"playingTweenables",get:function(){return oe(this,re).filter(function(t){return!t.hasEnded()})}},{key:"promises",get:function(){return oe(this,re).map(function(t){return t.then()})}}])&&se(t.prototype,e),t}();Mt.filters.token=s}},e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={exports:{}};return t[n](s,s.exports,i),s.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},"object"==typeof n&&"object"==typeof i?i.exports=o():"function"==typeof e&&e.amd?e("shifty",[],o):"object"==typeof n?n.shifty=o():s.shifty=o()},{}],3:[function(t,e,i){var n=t("./shape"),s=t("./utils"),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};o.prototype=new n,o.prototype.constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return s.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":8,"./utils":10}],4:[function(t,e,i){var n=t("./shape"),s=t("./utils"),o=function(t,e){this._pathTemplate=e.vertical?"M {center},100 L {center},0":"M 0,{center} L 100,{center}",n.apply(this,arguments)};o.prototype=new n,o.prototype.constructor=o,o.prototype._initializeSvg=function(t,e){var i=e.vertical?"0 0 "+e.strokeWidth+" 100":"0 0 100 "+e.strokeWidth;t.setAttribute("viewBox",i),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return s.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":8,"./utils":10}],5:[function(t,e,i){e.exports={Line:t("./line"),Circle:t("./circle"),SemiCircle:t("./semicircle"),Square:t("./square"),Path:t("./path"),Shape:t("./shape"),utils:t("./utils")}},{"./circle":3,"./line":4,"./path":6,"./semicircle":7,"./shape":8,"./square":9,"./utils":10}],6:[function(t,e,i){var n=t("shifty"),s=t("./utils"),o=n.Tweenable,r={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=s.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=s.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(s.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},s.isFunction(e)&&(i=e,e={});var n=s.extend({},e),r=s.extend({},this._opts);e=s.extend(r,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),d=this;this._tweenable=new o,this._tweenable.tween({from:s.extend({offset:c},l.from),to:s.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){d.path.style.strokeDashoffset=t.offset;var i=e.shape||d;e.step(t,i,e.attachment)}}).then(function(t){s.isFunction(i)&&i()}).catch(function(t){throw console.error("Error in tweening:",t),t})},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(!0),this._tweenable=null)},a.prototype._easing=function(t){return r.hasOwnProperty(t)?r[t]:t},e.exports=a},{"./utils":10,shifty:2}],7:[function(t,e,i){var n=t("./shape"),s=t("./circle"),o=t("./utils"),r=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};r.prototype=new n,r.prototype.constructor=r,r.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},r.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},r.prototype._pathString=s.prototype._pathString,r.prototype._trailString=s.prototype._trailString,e.exports=r},{"./circle":3,"./shape":8,"./utils":10}],8:[function(t,e,i){var n=t("./path"),s=t("./utils"),o="Object is destroyed",r=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=s.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),s.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),s.isObject(i)&&s.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,r=this._createSvgView(this._opts);if(!(o=s.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(r.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&s.setStyles(r.svg,this._opts.svgStyle),this.svg=r.svg,this.path=r.path,this.trail=r.trail,this.text=null;var a=s.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(r.path,a),s.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};r.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},r.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},r.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},r.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},r.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},r.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},r.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},r.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),s.isObject(t)?(s.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},r.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},r.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},r.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},r.prototype._createTrail=function(t){var e=this._trailString(t),i=s.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},r.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},r.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),s.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},r.prototype._initializeTextContainer=function(t,e,i){},r.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},r.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},r.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);s.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},e.exports=r},{"./path":6,"./utils":10}],9:[function(t,e,i){var n=t("./shape"),s=t("./utils"),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};o.prototype=new n,o.prototype.constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return s.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return s.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},e.exports=o},{"./shape":8,"./utils":10}],10:[function(t,e,i){var n=t("lodash.merge"),s="Webkit Moz O ms".split(" "),o=.001;function r(t,e){var i=t;for(var n in e)if(e.hasOwnProperty(n)){var s=e[n],o=new RegExp("\\{"+n+"\\}","g");i=i.replace(o,s)}return i}function a(t,e,i){for(var n=t.style,o=0;o<s.length;++o)n[s[o]+c(e)]=i;n[e]=i}function l(t,e){p(e,function(e,i){null!=e&&(f(e)&&!0===e.prefix?a(t,i,e.value):t.style[i]=e)})}function c(t){return t.charAt(0).toUpperCase()+t.slice(1)}function h(t){return"string"==typeof t||t instanceof String}function d(t){return"function"==typeof t}function u(t){return"[object Array]"===Object.prototype.toString.call(t)}function f(t){return!u(t)&&"object"==typeof t&&!!t}function p(t,e){for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)}function g(t,e){return Math.abs(t-e)<o}function m(t){for(;t.firstChild;)t.removeChild(t.firstChild)}e.exports={extend:n,render:r,setStyle:a,setStyles:l,capitalize:c,isString:h,isFunction:d,isObject:f,forEachObject:p,floatEquals:g,removeChildren:m}},{"lodash.merge":1}]},{},[5])(5)},544(){!function(){const t=function(){const t=jQuery("#field-video_player").val(),e=jQuery("#field-video_controls").prop("checked"),i=jQuery('#field-video_autoplay_mode option[value="off"]');"cld"!==t||e?i.prop("disabled",!1):(i.prop("disabled",!0),i.prop("selected")&&i.next().prop("selected",!0))};t(),jQuery(document).on("change","#field-video_player",t),jQuery(document).on("change","#field-video_controls",t),jQuery(document).ready(function(t){t.isFunction(t.fn.wpColorPicker)&&t(".regular-color").wpColorPicker(),t(document).on("tabs.init",function(){const e=t(".settings-tab-trigger"),i=t(".settings-tab-section");t(this).on("click",".settings-tab-trigger",function(n){const s=t(this),o=t(s.attr("href"));n.preventDefault(),e.removeClass("active"),i.removeClass("active"),s.addClass("active"),o.addClass("active"),t(document).trigger("settings.tabbed",s)}),t(".cld-field").not('[data-condition="false"]').each(function(){const e=t(this),i=e.data("condition");for(const n in i){let s=t("#field-"+n);const o=i[n],r=e.closest("tr");s.length||(s=t(`[id^=field-${n}-]`));let a=!1;s.on("change init",function(t,e=!1){if(a&&e)return;let i=this.value===o||this.checked;if(Array.isArray(o)&&2===o.length)switch(o[1]){case"neq":i=this.value!==o[0];break;case"gt":i=this.value>o[0];break;case"lt":i=this.value<o[0]}i?r.show():r.hide(),a=!0}),s.trigger("init",!0)}}),t("#field-cloudinary_url").on("input change",function(){const e=t(this),i=e.val();new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d)*[:]{1}[^:@]*[@]{1}[^@]*$/g).test(i)?(e.addClass("settings-valid-field"),e.removeClass("settings-invalid-field")):(e.removeClass("settings-valid-field"),e.addClass("settings-invalid-field"))}).trigger("change"),t('[name="cloudinary_sync_media[auto_sync]"]').change(function(){"on"===t(this).val()&&t("#auto-sync-alert-btn").click()})}),t(".render-trigger[data-event]").each(function(){const e=t(this),i=e.data("event");e.trigger(i,this)})})}(window,jQuery)},712(){const t=document.querySelector(".cloudinary-collapsible__toggle");t&&t.addEventListener("click",function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",s="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(s)):(i.classList.remove(s),i.classList.add(n))})}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";i(336),i(712);var t=i(544),e=i.n(t);const n={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"sailing_boat",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter(t=>t).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let s=null;const o=t.split("/"),r=[];for(let t=0;t<o.length;t++){const s=o[t].split(",");let a;a=!0===i?[]:{};for(let t=0;t<s.length;t++){const o=s[t].trim().split("_");if(o.length<=1||void 0===n[o[0]])continue;const r=o.shift(),l=o.join("_");if(!0===i){if("f"===r||"q"===r)for(const t in this.elements[e])r+"_"===this.elements[e][t].substr(0,2)&&this.elements[e].splice(t,1);a.push(s[t])}else a[n[r]]=l.trim()}let l=0;l=!0===i?a.length:Object.keys(a).length,l&&(!0===i&&(a=a.join(",")),r.push(a))}return r.length&&(s=!0===i?r.join("/").trim():r),s},_reset(){for(const t of this.fields)t.value=null;for(const t in this.button)this._build(t),this._refresh(null,t)},_input(t){if(void 0!==t.dataset.context&&t.dataset.context.length){const e=t.dataset.context;this._setLoading(e),this._build(e)}},_init(){if("undefined"!=typeof CLD_GLOBAL_TRANSFORMATIONS){const t=this;document.addEventListener("DOMContentLoaded",function(){for(const e in t.button)t.button[e]&&t.button[e].addEventListener("click",function(i){t._refresh(i,e)});for(const e of t.fields)e.addEventListener("input",function(){t._input(this)}),e.addEventListener("change",function(){t._input(this)});for(const e in CLD_GLOBAL_TRANSFORMATIONS)t._build(e),t._refresh(null,e)}),jQuery(document).ajaxComplete(function(e,i,n){-1!==n.data.indexOf("action=add-tag")&&-1===i.responseText.indexOf("wp_error")&&t._reset()})}}};n._init();var s,o,r,a;s={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},o=["(","?"],r={")":["("],":":["?","?:"]},a=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var l={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function c(t){var e=function(t){for(var e,i,n,l,c=[],h=[];e=t.match(a);){for(i=e[0],(n=t.substr(0,e.index).trim())&&c.push(n);l=h.pop();){if(r[i]){if(r[i][0]===l){i=r[i][1]||i;break}}else if(o.indexOf(l)>=0||s[l]<s[i]){h.push(l);break}c.push(l)}r[i]||h.push(i),t=t.substr(e.index+i.length)}return(t=t.trim())&&c.push(t),c.concat(h.reverse())}(t);return function(t){return function(t,e){var i,n,s,o,r,a,c=[];for(i=0;i<t.length;i++){if(r=t[i],o=l[r]){for(n=o.length,s=Array(n);n--;)s[n]=c.pop();try{a=o.apply(null,s)}catch(t){return t}}else a=e.hasOwnProperty(r)?e[r]:+r;c.push(a)}return c[0]}(e,t)}}var h={contextDelimiter:"",onMissingKey:null};function d(t,e){var i;for(i in this.data=t,this.pluralForms={},this.options={},h)this.options[i]=void 0!==e&&i in e?e[i]:h[i]}d.prototype.getPluralForm=function(t,e){var i,n,s,o=this.pluralForms[t];return o||("function"!=typeof(s=(i=this.data[t][""])["Plural-Forms"]||i["plural-forms"]||i.plural_forms)&&(n=function(t){var e,i,n;for(e=t.split(";"),i=0;i<e.length;i++)if(0===(n=e[i].trim()).indexOf("plural="))return n.substr(7)}(i["Plural-Forms"]||i["plural-forms"]||i.plural_forms),s=function(t){var e=c(t);return function(t){return+e({n:t})}}(n)),o=this.pluralForms[t]=s),o(e)},d.prototype.dcnpgettext=function(t,e,i,n,s){var o,r,a;return o=void 0===s?0:this.getPluralForm(t,s),r=i,e&&(r=e+this.options.contextDelimiter+i),(a=this.data[t][r])&&a[o]?a[o]:(this.options.onMissingKey&&this.options.onMissingKey(i,t),0===o?i:n)};var u={plural_forms:t=>1===t?0:1},f=/^i18n\.(n?gettext|has_translation)(_|$)/;var p=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var g=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var m=function(t,e){return function(i,n,s,o=10){const r=t[e];if(!g(i))return;if(!p(n))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof o)return void console.error("If specified, the hook priority must be a number.");const a={callback:s,priority:o,namespace:n};if(r[i]){const t=r[i].handlers;let e;for(e=t.length;e>0&&!(o>=t[e-1].priority);e--);e===t.length?t[e]=a:t.splice(e,0,a),r.__current.forEach(t=>{t.name===i&&t.currentIndex>=e&&t.currentIndex++})}else r[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,s,o)}};var b=function(t,e,i=!1){return function(n,s){const o=t[e];if(!g(n))return;if(!i&&!p(s))return;if(!o[n])return 0;let r=0;if(i)r=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else{const t=o[n].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===s&&(t.splice(e,1),r++,o.__current.forEach(t=>{t.name===n&&t.currentIndex>=e&&t.currentIndex--}))}return"hookRemoved"!==n&&t.doAction("hookRemoved",n,s),r}};var v=function(t,e){return function(i,n){const s=t[e];return void 0!==n?i in s&&s[i].handlers.some(t=>t.namespace===n):i in s}};var y=function(t,e,i,n){return function(s,...o){const r=t[e];r[s]||(r[s]={handlers:[],runs:0}),r[s].runs++;const a=r[s].handlers;if(!a||!a.length)return i?o[0]:void 0;const l={name:s,currentIndex:0};return(n?async function(){try{r.__current.add(l);let t=i?o[0]:void 0;for(;l.currentIndex<a.length;){const e=a[l.currentIndex];t=await e.callback.apply(null,o),i&&(o[0]=t),l.currentIndex++}return i?t:void 0}finally{r.__current.delete(l)}}:function(){try{r.__current.add(l);let t=i?o[0]:void 0;for(;l.currentIndex<a.length;){t=a[l.currentIndex].callback.apply(null,o),i&&(o[0]=t),l.currentIndex++}return i?t:void 0}finally{r.__current.delete(l)}})()}};var x=function(t,e){return function(){const i=t[e],n=Array.from(i.__current);return n.at(-1)?.name??null}};var _=function(t,e){return function(i){const n=t[e];return void 0===i?n.__current.size>0:Array.from(n.__current).some(t=>t.name===i)}};var w=function(t,e){return function(i){const n=t[e];if(g(i))return n[i]&&n[i].runs?n[i].runs:0}},k=class{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=m(this,"actions"),this.addFilter=m(this,"filters"),this.removeAction=b(this,"actions"),this.removeFilter=b(this,"filters"),this.hasAction=v(this,"actions"),this.hasFilter=v(this,"filters"),this.removeAllActions=b(this,"actions",!0),this.removeAllFilters=b(this,"filters",!0),this.doAction=y(this,"actions",!1,!1),this.doActionAsync=y(this,"actions",!1,!0),this.applyFilters=y(this,"filters",!0,!1),this.applyFiltersAsync=y(this,"filters",!0,!0),this.currentAction=x(this,"actions"),this.currentFilter=x(this,"filters"),this.doingAction=_(this,"actions"),this.doingFilter=_(this,"filters"),this.didAction=w(this,"actions"),this.didFilter=w(this,"filters")}};var S=function(){return new k}(),{addAction:M,addFilter:O,removeAction:E,removeFilter:A,hasAction:T,hasFilter:C,removeAllActions:L,removeAllFilters:P,doAction:D,doActionAsync:I,applyFilters:R,applyFiltersAsync:j,currentAction:F,currentFilter:z,doingAction:B,doingFilter:N,didAction:W,didFilter:V,actions:H,filters:$}=S,U=((t,e,i)=>{const n=new d({}),s=new Set,o=()=>{s.forEach(t=>t())},r=(t,e="default")=>{n.data[e]={...n.data[e],...t},n.data[e][""]={...u,...n.data[e]?.[""]},delete n.pluralForms[e]},a=(t,e)=>{r(t,e),o()},l=(t="default",e,i,s,o)=>(n.data[t]||r(void 0,t),n.dcnpgettext(t,e,i,s,o)),c=t=>t||"default",h=(t,e,n)=>{let s=l(n,e,t);return i?(s=i.applyFilters("i18n.gettext_with_context",s,t,e,n),i.applyFilters("i18n.gettext_with_context_"+c(n),s,t,e,n)):s};if(t&&a(t,e),i){const t=t=>{f.test(t)&&o()};i.addAction("hookAdded","core/i18n",t),i.addAction("hookRemoved","core/i18n",t)}return{getLocaleData:(t="default")=>n.data[t],setLocaleData:a,addLocaleData:(t,e="default")=>{n.data[e]={...n.data[e],...t,"":{...u,...n.data[e]?.[""],...t?.[""]}},delete n.pluralForms[e],o()},resetLocaleData:(t,e)=>{n.data={},n.pluralForms={},a(t,e)},subscribe:t=>(s.add(t),()=>s.delete(t)),__:(t,e)=>{let n=l(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+c(e),n,t,e)):n},_x:h,_n:(t,e,n,s)=>{let o=l(s,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,s),i.applyFilters("i18n.ngettext_"+c(s),o,t,e,n,s)):o},_nx:(t,e,n,s,o)=>{let r=l(o,s,t,e,n);return i?(r=i.applyFilters("i18n.ngettext_with_context",r,t,e,n,s,o),i.applyFilters("i18n.ngettext_with_context_"+c(o),r,t,e,n,s,o)):r},isRTL:()=>"rtl"===h("ltr","text direction"),hasTranslation:(t,e,s)=>{const o=e?e+""+t:t;let r=!!n.data?.[s??"default"]?.[o];return i&&(r=i.applyFilters("i18n.has_translation",r,t,e,s),r=i.applyFilters("i18n.has_translation_"+c(s),r,t,e,s)),r}}})(void 0,void 0,S),q=(U.getLocaleData.bind(U),U.setLocaleData.bind(U),U.resetLocaleData.bind(U),U.subscribe.bind(U),U.__.bind(U));U._x.bind(U),U._n.bind(U),U._nx.bind(U),U.isRTL.bind(U),U.hasTranslation.bind(U);var Y=function(t){const e=(t,i)=>{const{headers:n={}}=t;for(const s in n)if("x-wp-nonce"===s.toLowerCase()&&n[s]===e.nonce)return i(t);return i({...t,headers:{...n,"X-WP-Nonce":e.nonce}})};return e.nonce=t,e},X=(t,e)=>{let i,n,s=t.path;return"string"==typeof t.namespace&&"string"==typeof t.endpoint&&(i=t.namespace.replace(/^\/|\/$/g,""),n=t.endpoint.replace(/^\//,""),s=n?i+"/"+n:i),delete t.namespace,delete t.endpoint,e({...t,path:s})},G=t=>(e,i)=>X(e,e=>{let n,s=e.url,o=e.path;return"string"==typeof o&&(n=t,-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(o=o.replace("?","&")),s=n+o),i({...e,url:s})});function J(t){const e=t.split("?"),i=e[1],n=e[0];return i?n+"?"+i.split("&").map(t=>t.split("=")).map(t=>t.map(decodeURIComponent)).sort((t,e)=>t[0].localeCompare(e[0])).map(t=>t.map(encodeURIComponent)).map(t=>t.join("=")).join("&"):n}function K(t){try{return decodeURIComponent(t)}catch{return t}}function Q(t){return(function(t){let e;try{e=new URL(t,"http://example.com").search.substring(1)}catch{}if(e)return e}(t)||"").replace(/\+/g,"%20").split("&").reduce((t,e)=>{const[i,n=""]=e.split("=").filter(Boolean).map(K);if(i){!function(t,e,i){const n=e.length,s=n-1;for(let o=0;o<n;o++){let n=e[o];!n&&Array.isArray(t)&&(n=t.length.toString()),n=["__proto__","constructor","prototype"].includes(n)?n.toUpperCase():n;const r=!isNaN(Number(e[o+1]));t[n]=o===s?i:t[n]||(r?[]:{}),Array.isArray(t[n])&&!r&&(t[n]={...t[n]}),t=t[n]}}(t,i.replace(/\]/g,"").split("["),n)}return t},Object.create(null))}function Z(t){let e="";const i=Object.entries(t);let n;for(;n=i.shift();){let[t,s]=n;if(Array.isArray(s)||s&&s.constructor===Object){const e=Object.entries(s).reverse();for(const[n,s]of e)i.unshift([`${t}[${n}]`,s])}else void 0!==s&&(null===s&&(s=""),e+="&"+[t,String(s)].map(encodeURIComponent).join("="))}return e.substr(1)}function tt(t="",e){if(!e||!Object.keys(e).length)return t;const i=function(t){const e=/^\S+?(#[^\s\?]*)/.exec(t);if(e)return e[1]}(t)||"";let n=t.replace(i,"");const s=t.indexOf("?");return-1!==s&&(e=Object.assign(Q(t),e),n=n.substr(0,s)),n+"?"+Z(e)+i}function et(t,e){if(e)return Promise.resolve(t.body);try{return Promise.resolve(new window.Response(JSON.stringify(t.body),{status:200,statusText:"OK",headers:t.headers}))}catch{return Object.entries(t.headers).forEach(([e,i])=>{"link"===e.toLowerCase()&&(t.headers[e]=i.replace(/<([^>]+)>/,(t,e)=>`<${encodeURI(e)}>`))}),Promise.resolve(e?t.body:new window.Response(JSON.stringify(t.body),{status:200,statusText:"OK",headers:t.headers}))}}var it=function(t){const e=Object.fromEntries(Object.entries(t).map(([t,e])=>[J(t),e]));return(t,i)=>{const{parse:n=!0}=t;let s=t.path;if(!s&&t.url){const{rest_route:e,...i}=Q(t.url);"string"==typeof e&&(s=tt(e,i))}if("string"!=typeof s)return i(t);const o=t.method||"GET",r=J(s);if("GET"===o&&e[r]){const t=e[r];return delete e[r],et(t,!!n)}if("OPTIONS"===o&&e[o]&&e[o][r]){const t=e[o][r];return delete e[o][r],et(t,!!n)}return i(t)}},nt=({path:t,url:e,...i},n)=>({...i,url:e&&tt(e,n),path:t&&tt(t,n)}),st=t=>t.json?t.json():Promise.reject(t),ot=t=>{const{next:e}=(t=>{if(!t)return{};const e=t.match(/<([^>]+)>; rel="next"/);return e?{next:e[1]}:{}})(t.headers.get("link"));return e},rt=async(t,e)=>{if(!1===t.parse)return e(t);if(!(t=>{const e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i})(t))return e(t);const i=await wt({...nt(t,{per_page:100}),parse:!1}),n=await st(i);if(!Array.isArray(n))return n;let s=ot(i);if(!s)return n;let o=[].concat(n);for(;s;){const e=await wt({...t,path:void 0,url:s,parse:!1}),i=await st(e);o=o.concat(i),s=ot(e)}return o},at=new Set(["PATCH","PUT","DELETE"]),lt="GET";function ct(t,e){return Q(t)[e]}function ht(t,e){return void 0!==ct(t,e)}async function dt(t){try{return await t.json()}catch{throw{code:"invalid_json",message:q("The response is not a valid JSON response.")}}}async function ut(t,e=!0){return e?204===t.status?null:await dt(t):t}async function ft(t,e=!0){if(!e)throw t;throw await dt(t)}var pt=(t,e)=>{if(!function(t){const e=!!t.method&&"POST"===t.method;return(!!t.path&&-1!==t.path.indexOf("/wp/v2/media")||!!t.url&&-1!==t.url.indexOf("/wp/v2/media"))&&e}(t))return e(t);let i=0;const n=t=>(i++,e({path:`/wp/v2/media/${t}/post-process`,method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(()=>i<5?n(t):(e({path:`/wp/v2/media/${t}?force=true`,method:"DELETE"}),Promise.reject())));return e({...t,parse:!1}).catch(e=>{if(!(e instanceof globalThis.Response))return Promise.reject(e);const i=e.headers.get("x-wp-upload-attachment-id");return e.status>=500&&e.status<600&&i?n(i).catch(()=>!1!==t.parse?Promise.reject({code:"post_process",message:q("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)):ft(e,t.parse)}).then(e=>ut(e,t.parse))};function gt(t,...e){const i=t.replace(/^[^#]*/,""),n=(t=t.replace(/#.*/,"")).indexOf("?");if(-1===n)return t+i;const s=Q(t),o=t.substr(0,n);e.forEach(t=>delete s[t]);const r=Z(s);return(r?o+"?"+r:o)+i}var mt=t=>(e,i)=>{if("string"==typeof e.url){const i=ct(e.url,"wp_theme_preview");void 0===i?e.url=tt(e.url,{wp_theme_preview:t}):""===i&&(e.url=gt(e.url,"wp_theme_preview"))}if("string"==typeof e.path){const i=ct(e.path,"wp_theme_preview");void 0===i?e.path=tt(e.path,{wp_theme_preview:t}):""===i&&(e.path=gt(e.path,"wp_theme_preview"))}return i(e)},bt={Accept:"application/json, */*;q=0.1"},vt={credentials:"include"},yt=[(t,e)=>("string"!=typeof t.url||ht(t.url,"_locale")||(t.url=tt(t.url,{_locale:"user"})),"string"!=typeof t.path||ht(t.path,"_locale")||(t.path=tt(t.path,{_locale:"user"})),e(t)),X,(t,e)=>{const{method:i=lt}=t;return at.has(i.toUpperCase())&&(t={...t,headers:{...t.headers,"X-HTTP-Method-Override":i,"Content-Type":"application/json"},method:"POST"}),e(t)},rt];var xt=t=>{const{url:e,path:i,data:n,parse:s=!0,...o}=t;let{body:r,headers:a}=t;a={...bt,...a},n&&(r=JSON.stringify(n),a["Content-Type"]="application/json");return globalThis.fetch(e||i||window.location.href,{...vt,...o,body:r,headers:a}).then(t=>t.ok?ut(t,s):ft(t,s),t=>{if(t&&"AbortError"===t.name)throw t;if(!globalThis.navigator.onLine)throw{code:"offline_error",message:q("Unable to connect. Please check your Internet connection.")};throw{code:"fetch_error",message:q("Could not get a valid response from the server.")}})};var _t=t=>yt.reduceRight((t,e)=>i=>e(i,t),xt)(t).catch(e=>"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):globalThis.fetch(_t.nonceEndpoint).then(t=>t.ok?t.text():Promise.reject(e)).then(e=>(_t.nonceMiddleware.nonce=e,_t(t))));_t.use=function(t){yt.unshift(t)},_t.setFetchHandler=function(t){xt=t},_t.createNonceMiddleware=Y,_t.createPreloadingMiddleware=it,_t.createRootURLMiddleware=G,_t.fetchAllMiddleware=rt,_t.mediaUploadMiddleware=pt,_t.createThemePreviewMiddleware=mt;var wt=_t;const kt={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(wt.use(wt.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const s=[];for(let o=0;o<n.assets.length;o++){const r=n.assets[o];wp.ajax.post("cloudinary-down-sync",{nonce:CLDN.nonce,asset:r}).done(function(n){e.style.marginRight="220px",i.style.display="block";const o=t.makeProgress(n),r="download-"+n.public_id;s[r]=o,i.appendChild(o),setTimeout(()=>{o.style.opacity=1},250),wt({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then(t=>{const n=s[r];delete s[r],n.removeChild(n.firstChild),setTimeout(()=>{n.style.opacity=0,setTimeout(()=>{n.parentNode.removeChild(n),Object.keys(s).length||(e.style.marginRight="0px",i.style.display="none")},1e3)},500)})})}}}),window.addEventListener("resize",function(){t._resize()}),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};window.addEventListener("load",()=>kt._init());const St={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach(e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout(function(){t._dismiss(e)},5)})})}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout(function(){t.remove()},400),0<i&&wp.ajax.send({url:CLDIS.url,data:{token:e,duration:i,_wpnonce:CLDIS.nonce}})}};window.addEventListener("load",St._init());function Mt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ot(t){return t instanceof Mt(t).Element||t instanceof Element}function Et(t){return t instanceof Mt(t).HTMLElement||t instanceof HTMLElement}function At(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Mt(t).ShadowRoot||t instanceof ShadowRoot)}var Tt=Math.max,Ct=Math.min,Lt=Math.round;function Pt(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Dt(){return!/^((?!chrome|android).)*safari/i.test(Pt())}function It(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&Et(t)&&(s=t.offsetWidth>0&&Lt(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Lt(n.height)/t.offsetHeight||1);var r=(Ot(t)?Mt(t):window).visualViewport,a=!Dt()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function Rt(t){var e=Mt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function jt(t){return t?(t.nodeName||"").toLowerCase():null}function Ft(t){return((Ot(t)?t.ownerDocument:t.document)||window.document).documentElement}function zt(t){return It(Ft(t)).left+Rt(t).scrollLeft}function Bt(t){return Mt(t).getComputedStyle(t)}function Nt(t){var e=Bt(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Wt(t,e,i){void 0===i&&(i=!1);var n,s,o=Et(e),r=Et(e)&&function(t){var e=t.getBoundingClientRect(),i=Lt(e.width)/t.offsetWidth||1,n=Lt(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=Ft(e),l=It(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==jt(e)||Nt(a))&&(c=(n=e)!==Mt(n)&&Et(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:Rt(n)),Et(e)?((h=It(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=zt(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function Vt(t){var e=It(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Ht(t){return"html"===jt(t)?t:t.assignedSlot||t.parentNode||(At(t)?t.host:null)||Ft(t)}function $t(t){return["html","body","#document"].indexOf(jt(t))>=0?t.ownerDocument.body:Et(t)&&Nt(t)?t:$t(Ht(t))}function Ut(t,e){var i;void 0===e&&(e=[]);var n=$t(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Mt(n),r=s?[o].concat(o.visualViewport||[],Nt(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Ut(Ht(r)))}function qt(t){return["table","td","th"].indexOf(jt(t))>=0}function Yt(t){return Et(t)&&"fixed"!==Bt(t).position?t.offsetParent:null}function Xt(t){for(var e=Mt(t),i=Yt(t);i&&qt(i)&&"static"===Bt(i).position;)i=Yt(i);return i&&("html"===jt(i)||"body"===jt(i)&&"static"===Bt(i).position)?e:i||function(t){var e=/firefox/i.test(Pt());if(/Trident/i.test(Pt())&&Et(t)&&"fixed"===Bt(t).position)return null;var i=Ht(t);for(At(i)&&(i=i.host);Et(i)&&["html","body"].indexOf(jt(i))<0;){var n=Bt(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var Gt="top",Jt="bottom",Kt="right",Qt="left",Zt="auto",te=[Gt,Jt,Kt,Qt],ee="start",ie="end",ne="viewport",se="popper",oe=te.reduce(function(t,e){return t.concat([e+"-"+ee,e+"-"+ie])},[]),re=[].concat(te,[Zt]).reduce(function(t,e){return t.concat([e,e+"-"+ee,e+"-"+ie])},[]),ae=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function le(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}}),n.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||s(t)}),n}var ce={placement:"bottom",modifiers:[],strategy:"absolute"};function he(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function de(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?ce:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},ce,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:Ot(t)?Ut(t):t.contextElement?Ut(t.contextElement):[],popper:Ut(e)};var r,c,u=function(t){var e=le(t);return ae.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}((r=[].concat(n,a.options.modifiers),c=r.reduce(function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return a.orderedModifiers=u.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:h,options:n}),r=function(){};l.push(o||r)}}),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(he(e,i)){a.rects={reference:Wt(e,Xt(i),"fixed"===a.options.strategy),popper:Vt(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(t){h.forceUpdate(),t(a)})},function(){return r||(r=new Promise(function(t){Promise.resolve().then(function(){r=void 0,t(s())})})),r}),destroy:function(){d(),c=!0}};if(!he(t,e))return h;function d(){l.forEach(function(t){return t()}),l=[]}return h.setOptions(i).then(function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)}),h}}var ue={passive:!0};function fe(t){return t.split("-")[0]}function pe(t){return t.split("-")[1]}function ge(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function me(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?fe(s):null,r=s?pe(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Gt:e={x:a,y:i.y-n.height};break;case Jt:e={x:a,y:i.y+i.height};break;case Kt:e={x:i.x+i.width,y:l};break;case Qt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?ge(o):null;if(null!=c){var h="y"===c?"height":"width";switch(r){case ee:e[c]=e[c]-(i[h]/2-n[h]/2);break;case ie:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var be={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ve(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,g=void 0===p?0:p,m="function"==typeof h?h({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var b=r.hasOwnProperty("x"),v=r.hasOwnProperty("y"),y=Qt,x=Gt,_=window;if(c){var w=Xt(i),k="clientHeight",S="clientWidth";if(w===Mt(i)&&"static"!==Bt(w=Ft(i)).position&&"absolute"===a&&(k="scrollHeight",S="scrollWidth"),s===Gt||(s===Qt||s===Kt)&&o===ie)x=Jt,g-=(d&&w===_&&_.visualViewport?_.visualViewport.height:w[k])-n.height,g*=l?1:-1;if(s===Qt||(s===Gt||s===Jt)&&o===ie)y=Kt,f-=(d&&w===_&&_.visualViewport?_.visualViewport.width:w[S])-n.width,f*=l?1:-1}var M,O=Object.assign({position:a},c&&be),E=!0===h?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:Lt(i*s)/s||0,y:Lt(n*s)/s||0}}({x:f,y:g},Mt(i)):{x:f,y:g};return f=E.x,g=E.y,l?Object.assign({},O,((M={})[x]=v?"0":"",M[y]=b?"0":"",M.transform=(_.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",M)):Object.assign({},O,((e={})[x]=v?g+"px":"",e[y]=b?f+"px":"",e.transform="",e))}const ye={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];Et(s)&&jt(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});Et(n)&&jt(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};const xe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=re.reduce(function(t,i){return t[i]=function(t,e,i){var n=fe(t),s=[Qt,Gt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Qt,Kt].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t},{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}};var _e={left:"right",right:"left",bottom:"top",top:"bottom"};function we(t){return t.replace(/left|right|bottom|top/g,function(t){return _e[t]})}var ke={start:"end",end:"start"};function Se(t){return t.replace(/start|end/g,function(t){return ke[t]})}function Me(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&At(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Oe(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ee(t,e,i){return e===ne?Oe(function(t,e){var i=Mt(t),n=Ft(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Dt();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+zt(t),y:l}}(t,i)):Ot(e)?function(t,e){var i=It(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):Oe(function(t){var e,i=Ft(t),n=Rt(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Tt(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Tt(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+zt(t),l=-n.scrollTop;return"rtl"===Bt(s||i).direction&&(a+=Tt(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(Ft(t)))}function Ae(t,e,i,n){var s="clippingParents"===e?function(t){var e=Ut(Ht(t)),i=["absolute","fixed"].indexOf(Bt(t).position)>=0&&Et(t)?Xt(t):t;return Ot(i)?e.filter(function(t){return Ot(t)&&Me(t,i)&&"body"!==jt(t)}):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce(function(e,i){var s=Ee(t,i,n);return e.top=Tt(s.top,e.top),e.right=Ct(s.right,e.right),e.bottom=Ct(s.bottom,e.bottom),e.left=Tt(s.left,e.left),e},Ee(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Te(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Ce(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}function Le(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,h=void 0===c?ne:c,d=i.elementContext,u=void 0===d?se:d,f=i.altBoundary,p=void 0!==f&&f,g=i.padding,m=void 0===g?0:g,b=Te("number"!=typeof m?m:Ce(m,te)),v=u===se?"reference":se,y=t.rects.popper,x=t.elements[p?v:u],_=Ae(Ot(x)?x:x.contextElement||Ft(t.elements.popper),l,h,r),w=It(t.elements.reference),k=me({reference:w,element:y,strategy:"absolute",placement:s}),S=Oe(Object.assign({},y,k)),M=u===se?S:w,O={top:_.top-M.top+b.top,bottom:M.bottom-_.bottom+b.bottom,left:_.left-M.left+b.left,right:M.right-_.right+b.right},E=t.modifiersData.offset;if(u===se&&E){var A=E[s];Object.keys(O).forEach(function(t){var e=[Kt,Jt].indexOf(t)>=0?1:-1,i=[Gt,Jt].indexOf(t)>=0?"y":"x";O[t]+=A[i]*e})}return O}function Pe(t,e,i){return Tt(t,Ct(e,i))}const De={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,g=void 0===p?0:p,m=Le(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),b=fe(e.placement),v=pe(e.placement),y=!v,x=ge(b),_="x"===x?"y":"x",w=e.modifiersData.popperOffsets,k=e.rects.reference,S=e.rects.popper,M="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,O="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),E=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,A={x:0,y:0};if(w){if(o){var T,C="y"===x?Gt:Qt,L="y"===x?Jt:Kt,P="y"===x?"height":"width",D=w[x],I=D+m[C],R=D-m[L],j=f?-S[P]/2:0,F=v===ee?k[P]:S[P],z=v===ee?-S[P]:-k[P],B=e.elements.arrow,N=f&&B?Vt(B):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=W[C],H=W[L],$=Pe(0,k[P],N[P]),U=y?k[P]/2-j-$-V-O.mainAxis:F-$-V-O.mainAxis,q=y?-k[P]/2+j+$+H+O.mainAxis:z+$+H+O.mainAxis,Y=e.elements.arrow&&Xt(e.elements.arrow),X=Y?"y"===x?Y.clientTop||0:Y.clientLeft||0:0,G=null!=(T=null==E?void 0:E[x])?T:0,J=D+q-G,K=Pe(f?Ct(I,D+U-G-X):I,D,f?Tt(R,J):R);w[x]=K,A[x]=K-D}if(a){var Q,Z="x"===x?Gt:Qt,tt="x"===x?Jt:Kt,et=w[_],it="y"===_?"height":"width",nt=et+m[Z],st=et-m[tt],ot=-1!==[Gt,Qt].indexOf(b),rt=null!=(Q=null==E?void 0:E[_])?Q:0,at=ot?nt:et-k[it]-S[it]-rt+O.altAxis,lt=ot?et+k[it]+S[it]-rt-O.altAxis:st,ct=f&&ot?function(t,e,i){var n=Pe(t,e,i);return n>i?i:n}(at,et,lt):Pe(f?at:nt,et,f?lt:st);w[_]=ct,A[_]=ct-et}e.modifiersData[n]=A}},requiresIfExists:["offset"]};const Ie={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=fe(i.placement),l=ge(a),c=[Qt,Kt].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return Te("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ce(t,te))}(s.padding,i),d=Vt(o),u="y"===l?Gt:Qt,f="y"===l?Jt:Kt,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=Xt(o),b=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,v=p/2-g/2,y=h[u],x=b-d[c]-h[f],_=b/2-d[c]/2+v,w=Pe(y,_,x),k=l;i.modifiersData[n]=((e={})[k]=w,e.centerOffset=w-_,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Me(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Re(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function je(t){return[Gt,Kt,Jt,Qt].some(function(e){return t[e]>=0})}var Fe=de({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Mt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",i.update,ue)}),a&&l.addEventListener("resize",i.update,ue),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",i.update,ue)}),a&&l.removeEventListener("resize",i.update,ue)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=me({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:fe(e.placement),variation:pe(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,ve(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,ve(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},ye,xe,{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=fe(m),v=l||(b===m||!p?[we(m)]:function(t){if(fe(t)===Zt)return[];var e=we(t);return[Se(t),e,Se(e)]}(m)),y=[m].concat(v).reduce(function(t,i){return t.concat(fe(i)===Zt?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?re:l,h=pe(n),d=h?a?oe:oe.filter(function(t){return pe(t)===h}):te,u=d.filter(function(t){return c.indexOf(t)>=0});0===u.length&&(u=d);var f=u.reduce(function(e,i){return e[i]=Le(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[fe(i)],e},{});return Object.keys(f).sort(function(t,e){return f[t]-f[e]})}(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)},[]),x=e.rects.reference,_=e.rects.popper,w=new Map,k=!0,S=y[0],M=0;M<y.length;M++){var O=y[M],E=fe(O),A=pe(O)===ee,T=[Gt,Jt].indexOf(E)>=0,C=T?"width":"height",L=Le(e,{placement:O,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),P=T?A?Kt:Qt:A?Jt:Gt;x[C]>_[C]&&(P=we(P));var D=we(P),I=[];if(o&&I.push(L[E]<=0),a&&I.push(L[P]<=0,L[D]<=0),I.every(function(t){return t})){S=O,k=!1;break}w.set(O,I)}if(k)for(var R=function(t){var e=y.find(function(e){var i=w.get(e);if(i)return i.slice(0,t).every(function(t){return t})});if(e)return S=e,"break"},j=p?3:1;j>0;j--){if("break"===R(j))break}e.placement!==S&&(e.modifiersData[n]._skip=!0,e.placement=S,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},De,Ie,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Le(e,{elementContext:"reference"}),a=Le(e,{altBoundary:!0}),l=Re(r,n),c=Re(a,s,o),h=je(l),d=je(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}}]}),ze="tippy-content",Be="tippy-backdrop",Ne="tippy-arrow",We="tippy-svg-arrow",Ve={passive:!0,capture:!0},He=function(){return document.body};function $e(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function Ue(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function qe(t,e){return"function"==typeof t?t.apply(void 0,e):t}function Ye(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout(function(){t(n)},e)};var i}function Xe(t){return[].concat(t)}function Ge(t,e){-1===t.indexOf(e)&&t.push(e)}function Je(t){return t.split("-")[0]}function Ke(t){return[].slice.call(t)}function Qe(t){return Object.keys(t).reduce(function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e},{})}function Ze(){return document.createElement("div")}function ti(t){return["Element","Fragment"].some(function(e){return Ue(t,e)})}function ei(t){return Ue(t,"MouseEvent")}function ii(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function ni(t){return ti(t)?[t]:function(t){return Ue(t,"NodeList")}(t)?Ke(t):Array.isArray(t)?t:Ke(document.querySelectorAll(t))}function si(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function oi(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function ri(t){var e,i=Xe(t)[0];return null!=i&&null!=(e=i.ownerDocument)&&e.body?i.ownerDocument:document}function ai(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(e){t[n](e,i)})}function li(t,e){for(var i=e;i;){var n;if(t.contains(i))return!0;i=null==i.getRootNode||null==(n=i.getRootNode())?void 0:n.host}return!1}var ci={isTouch:!1},hi=0;function di(){ci.isTouch||(ci.isTouch=!0,window.performance&&document.addEventListener("mousemove",ui))}function ui(){var t=performance.now();t-hi<20&&(ci.isTouch=!1,document.removeEventListener("mousemove",ui)),hi=t}function fi(){var t=document.activeElement;if(ii(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var pi=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var gi={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},mi=Object.assign({appendTo:He,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},gi,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),bi=Object.keys(mi);function vi(t){var e=(t.plugins||[]).reduce(function(e,i){var n,s=i.name,o=i.defaultValue;s&&(e[s]=void 0!==t[s]?t[s]:null!=(n=mi[s])?n:o);return e},{});return Object.assign({},t,e)}function yi(t,e){var i=Object.assign({},e,{content:qe(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(vi(Object.assign({},mi,{plugins:e}))):bi).reduce(function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e},{})}(t,e.plugins));return i.aria=Object.assign({},mi.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function xi(t,e){t.innerHTML=e}function _i(t){var e=Ze();return!0===t?e.className=Ne:(e.className=We,ti(t)?e.appendChild(t):xi(e,t)),e}function wi(t,e){ti(e.content)?(xi(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?xi(t,e.content):t.textContent=e.content)}function ki(t){var e=t.firstElementChild,i=Ke(e.children);return{box:e,content:i.find(function(t){return t.classList.contains(ze)}),arrow:i.find(function(t){return t.classList.contains(Ne)||t.classList.contains(We)}),backdrop:i.find(function(t){return t.classList.contains(Be)})}}function Si(t){var e=Ze(),i=Ze();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Ze();function s(i,n){var s=ki(e),o=s.box,r=s.content,a=s.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||wi(r,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(_i(n.arrow))):o.appendChild(_i(n.arrow)):a&&o.removeChild(a)}return n.className=ze,n.setAttribute("data-state","hidden"),wi(n,t.props),e.appendChild(i),i.appendChild(n),s(t.props,t.props),{popper:e,onUpdate:s}}Si.$$tippy=!0;var Mi=1,Oi=[],Ei=[];function Ai(t,e){var i,n,s,o,r,a,l,c,h=yi(t,Object.assign({},mi,vi(Qe(e)))),d=!1,u=!1,f=!1,p=!1,g=[],m=Ye(Y,h.interactiveDebounce),b=Mi++,v=(c=h.plugins).filter(function(t,e){return c.indexOf(t)===e}),y={id:b,reference:t,popper:Ze(),popperInstance:null,props:h,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(s)},setProps:function(e){0;if(y.state.isDestroyed)return;D("onBeforeUpdate",[y,e]),U();var i=y.props,n=yi(t,Object.assign({},i,Qe(e),{ignoreAttributes:!0}));y.props=n,$(),i.interactiveDebounce!==n.interactiveDebounce&&(j(),m=Ye(Y,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?Xe(i.triggerTarget).forEach(function(t){t.removeAttribute("aria-expanded")}):n.triggerTarget&&t.removeAttribute("aria-expanded");R(),P(),w&&w(i,n);y.popperInstance&&(K(),Z().forEach(function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}));D("onAfterUpdate",[y,e])},setContent:function(t){y.setProps({content:t})},show:function(){0;var t=y.state.isVisible,e=y.state.isDestroyed,i=!y.state.isEnabled,n=ci.isTouch&&!y.props.touch,s=$e(y.props.duration,0,mi.duration);if(t||e||i||n)return;if(A().hasAttribute("disabled"))return;if(D("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,E()&&(_.style.visibility="visible");P(),N(),y.state.isMounted||(_.style.transition="none");if(E()){var o=C();si([o.box,o.content],0)}a=function(){var t;if(y.state.isVisible&&!p){if(p=!0,_.offsetHeight,_.style.transition=y.props.moveTransition,E()&&y.props.animation){var e=C(),i=e.box,n=e.content;si([i,n],s),oi([i,n],"visible")}I(),R(),Ge(Ei,y),null==(t=y.popperInstance)||t.forceUpdate(),D("onMount",[y]),y.props.animation&&E()&&function(t,e){V(t,e)}(s,function(){y.state.isShown=!0,D("onShown",[y])})}},function(){var t,e=y.props.appendTo,i=A();t=y.props.interactive&&e===He||"parent"===e?i.parentNode:qe(e,[i]);t.contains(_)||t.appendChild(_);y.state.isMounted=!0,K(),!1}()},hide:function(){0;var t=!y.state.isVisible,e=y.state.isDestroyed,i=!y.state.isEnabled,n=$e(y.props.duration,1,mi.duration);if(t||e||i)return;if(D("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,p=!1,d=!1,E()&&(_.style.visibility="hidden");if(j(),W(),P(!0),E()){var s=C(),o=s.box,r=s.content;y.props.animation&&(si([o,r],n),oi([o,r],"hidden"))}I(),R(),y.props.animation?E()&&function(t,e){V(t,function(){!y.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&e()})}(n,y.unmount):y.unmount()},hideWithInteractivity:function(t){0;T().addEventListener("mousemove",m),Ge(Oi,m),m(t)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){0;y.state.isVisible&&y.hide();if(!y.state.isMounted)return;Q(),Z().forEach(function(t){t._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_);Ei=Ei.filter(function(t){return t!==y}),y.state.isMounted=!1,D("onHidden",[y])},destroy:function(){0;if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),U(),delete t._tippy,y.state.isDestroyed=!0,D("onDestroy",[y])}};if(!h.render)return y;var x=h.render(y),_=x.popper,w=x.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+y.id,y.popper=_,t._tippy=y,_._tippy=y;var k=v.map(function(t){return t.fn(y)}),S=t.hasAttribute("aria-expanded");return $(),R(),P(),D("onCreate",[y]),h.showOnCreate&&tt(),_.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",m)}),y;function M(){var t=y.props.touch;return Array.isArray(t)?t:[t,0]}function O(){return"hold"===M()[0]}function E(){var t;return!(null==(t=y.props.render)||!t.$$tippy)}function A(){return l||t}function T(){var t=A().parentNode;return t?ri(t):document}function C(){return ki(_)}function L(t){return y.state.isMounted&&!y.state.isVisible||ci.isTouch||o&&"focus"===o.type?0:$e(y.props.delay,t?0:1,mi.delay)}function P(t){void 0===t&&(t=!1),_.style.pointerEvents=y.props.interactive&&!t?"":"none",_.style.zIndex=""+y.props.zIndex}function D(t,e,i){var n;(void 0===i&&(i=!0),k.forEach(function(i){i[t]&&i[t].apply(i,e)}),i)&&(n=y.props)[t].apply(n,e)}function I(){var e=y.props.aria;if(e.content){var i="aria-"+e.content,n=_.id;Xe(y.props.triggerTarget||t).forEach(function(t){var e=t.getAttribute(i);if(y.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var s=e&&e.replace(n,"").trim();s?t.setAttribute(i,s):t.removeAttribute(i)}})}}function R(){!S&&y.props.aria.expanded&&Xe(y.props.triggerTarget||t).forEach(function(t){y.props.interactive?t.setAttribute("aria-expanded",y.state.isVisible&&t===A()?"true":"false"):t.removeAttribute("aria-expanded")})}function j(){T().removeEventListener("mousemove",m),Oi=Oi.filter(function(t){return t!==m})}function F(e){if(!ci.isTouch||!f&&"mousedown"!==e.type){var i=e.composedPath&&e.composedPath()[0]||e.target;if(!y.props.interactive||!li(_,i)){if(Xe(y.props.triggerTarget||t).some(function(t){return li(t,i)})){if(ci.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[y,e]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),u=!0,setTimeout(function(){u=!1}),y.state.isMounted||W())}}}function z(){f=!0}function B(){f=!1}function N(){var t=T();t.addEventListener("mousedown",F,!0),t.addEventListener("touchend",F,Ve),t.addEventListener("touchstart",B,Ve),t.addEventListener("touchmove",z,Ve)}function W(){var t=T();t.removeEventListener("mousedown",F,!0),t.removeEventListener("touchend",F,Ve),t.removeEventListener("touchstart",B,Ve),t.removeEventListener("touchmove",z,Ve)}function V(t,e){var i=C().box;function n(t){t.target===i&&(ai(i,"remove",n),e())}if(0===t)return e();ai(i,"remove",r),ai(i,"add",n),r=n}function H(e,i,n){void 0===n&&(n=!1),Xe(y.props.triggerTarget||t).forEach(function(t){t.addEventListener(e,i,n),g.push({node:t,eventType:e,handler:i,options:n})})}function $(){var t;O()&&(H("touchstart",q,{passive:!0}),H("touchend",X,{passive:!0})),(t=y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach(function(t){if("manual"!==t)switch(H(t,q),t){case"mouseenter":H("mouseleave",X);break;case"focus":H(pi?"focusout":"blur",G);break;case"focusin":H("focusout",G)}})}function U(){g.forEach(function(t){var e=t.node,i=t.eventType,n=t.handler,s=t.options;e.removeEventListener(i,n,s)}),g=[]}function q(t){var e,i=!1;if(y.state.isEnabled&&!J(t)&&!u){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,R(),!y.state.isVisible&&ei(t)&&Oi.forEach(function(e){return e(t)}),"click"===t.type&&(y.props.trigger.indexOf("mouseenter")<0||d)&&!1!==y.props.hideOnClick&&y.state.isVisible?i=!0:tt(t),"click"===t.type&&(d=!i),i&&!n&&et(t)}}function Y(t){var e=t.target,i=A().contains(e)||_.contains(e);if("mousemove"!==t.type||!i){var n=Z().concat(_).map(function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:h}:null}).filter(Boolean);(function(t,e){var i=e.clientX,n=e.clientY;return t.every(function(t){var e=t.popperRect,s=t.popperState,o=t.props.interactiveBorder,r=Je(s.placement),a=s.modifiersData.offset;if(!a)return!0;var l="bottom"===r?a.top.y:0,c="top"===r?a.bottom.y:0,h="right"===r?a.left.x:0,d="left"===r?a.right.x:0,u=e.top-n+l>o,f=n-e.bottom-c>o,p=e.left-i+h>o,g=i-e.right-d>o;return u||f||p||g})})(n,t)&&(j(),et(t))}}function X(t){J(t)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(t):et(t))}function G(t){y.props.trigger.indexOf("focusin")<0&&t.target!==A()||y.props.interactive&&t.relatedTarget&&_.contains(t.relatedTarget)||et(t)}function J(t){return!!ci.isTouch&&O()!==t.type.indexOf("touch")>=0}function K(){Q();var e=y.props,i=e.popperOptions,n=e.placement,s=e.offset,o=e.getReferenceClientRect,r=e.moveTransition,l=E()?ki(_).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||A()}:t,h={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(E()){var i=C().box;["placement","reference-hidden","escaped"].forEach(function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)}),e.attributes.popper={}}}},d=[{name:"offset",options:{offset:s}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!r}},h];E()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==i?void 0:i.modifiers)||[]),y.popperInstance=Fe(c,_,Object.assign({},i,{placement:n,onFirstUpdate:a,modifiers:d}))}function Q(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Z(){return Ke(_.querySelectorAll("[data-tippy-root]"))}function tt(t){y.clearDelayTimeouts(),t&&D("onTrigger",[y,t]),N();var e=L(!0),n=M(),s=n[0],o=n[1];ci.isTouch&&"hold"===s&&o&&(e=o),e?i=setTimeout(function(){y.show()},e):y.show()}function et(t){if(y.clearDelayTimeouts(),D("onUntrigger",[y,t]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var e=L(!1);e?n=setTimeout(function(){y.state.isVisible&&y.hide()},e):s=requestAnimationFrame(function(){y.hide()})}}else W()}}function Ti(t,e){void 0===e&&(e={});var i=mi.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",di,Ve),window.addEventListener("blur",fi);var n=Object.assign({},e,{plugins:i}),s=ni(t).reduce(function(t,e){var i=e&&Ai(e,n);return i&&t.push(i),t},[]);return ti(t)?s[0]:s}Ti.defaultProps=mi,Ti.setDefaultProps=function(t){Object.keys(t).forEach(function(e){mi[e]=t[e]})},Ti.currentInput=ci;Object.assign({},ye,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});Ti.setDefaultProps({render:Si});const Ci=Ti;var Li=i(951),Pi=i.n(Li);const Di={controlled:null,bind(t){this.controlled=t,this.controlled.forEach(t=>{this._main(t)}),this._init()},_init(){this.controlled.forEach(t=>{this._checkUp(t)})},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map(e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i}),this._bindEvents(t),t.mains.forEach(t=>{this._bindEvents(t)})},_bindEvents(t){t.eventBound||(t.addEventListener("click",e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)}),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1<i&&t.elements.splice(i,1)},_checkDown(t){t.elements&&(t.classList.remove("partial"),t.elements.forEach(e=>{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))}),t.elements.forEach(e=>{this._checkDown(e),e.elements||this._checkUp(e,t)}))},_checkUp(t,e){t.mains&&[...t.mains].forEach(t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)})},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach(n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)});let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const s="off"!==n;t.checked===s&&t.value===n||(t.value=n,t.checked=s,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach(e=>{e.checked&&(t.filesize+=e.filesize)});let e=null;0<t.filesize&&(e=Pi()(t.filesize,{spacer:" "}).human("jedec")),t.sizespan.innerText=e}}},Ii=Di;var Ri=i(941),ji=i.n(Ri);function Fi(t){return t+.5|0}const zi=(t,e,i)=>Math.max(Math.min(t,i),e);function Bi(t){return zi(Fi(2.55*t),0,255)}function Ni(t){return zi(Fi(255*t),0,255)}function Wi(t){return zi(Fi(t/2.55)/100,0,1)}function Vi(t){return zi(Fi(100*t),0,100)}const Hi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},$i=[..."0123456789ABCDEF"],Ui=t=>$i[15&t],qi=t=>$i[(240&t)>>4]+$i[15&t],Yi=t=>(240&t)>>4==(15&t);function Xi(t){var e=(t=>Yi(t.r)&&Yi(t.g)&&Yi(t.b)&&Yi(t.a))(t)?Ui:qi;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Gi=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ji(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function Ki(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function Qi(t,e,i){const n=Ji(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function Zi(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),o=Math.min(e,i,n),r=(s+o)/2;let a,l,c;return s!==o&&(c=s-o,l=r>.5?c/(2-s-o):c/(s+o),a=function(t,e,i,n,s){return t===s?(e-i)/n+(e<i?6:0):e===s?(i-t)/n+2:(t-e)/n+4}(e,i,n,c,s),a=60*a+.5),[0|a,l||0,r]}function tn(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(Ni)}function en(t,e,i){return tn(Ji,t,e,i)}function nn(t){return(t%360+360)%360}function sn(t){const e=Gi.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?Bi(+e[5]):Ni(+e[5]));const s=nn(+e[2]),o=+e[3]/100,r=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return tn(Qi,t,e,i)}(s,o,r):"hsv"===e[1]?function(t,e,i){return tn(Ki,t,e,i)}(s,o,r):en(s,o,r),{r:i[0],g:i[1],b:i[2],a:n}}const on={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},rn={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let an;function ln(t){an||(an=function(){const t={},e=Object.keys(rn),i=Object.keys(on);let n,s,o,r,a;for(n=0;n<e.length;n++){for(r=a=e[n],s=0;s<i.length;s++)o=i[s],a=a.replace(o,on[o]);o=parseInt(rn[r],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),an.transparent=[0,0,0,0]);const e=an[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const cn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const hn=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,dn=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function un(t,e,i){if(t){let n=Zi(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=en(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function fn(t,e){return t?Object.assign(e||{},t):t}function pn(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Ni(t[3]))):(e=fn(t,{r:0,g:0,b:0,a:1})).a=Ni(e.a),e}function gn(t){return"r"===t.charAt(0)?function(t){const e=cn.exec(t);let i,n,s,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?Bi(t):zi(255*t,0,255)}return i=+e[1],n=+e[3],s=+e[5],i=255&(e[2]?Bi(i):zi(i,0,255)),n=255&(e[4]?Bi(n):zi(n,0,255)),s=255&(e[6]?Bi(s):zi(s,0,255)),{r:i,g:n,b:s,a:o}}}(t):sn(t)}class mn{constructor(t){if(t instanceof mn)return t;const e=typeof t;let i;var n,s,o;"object"===e?i=pn(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?s={r:255&17*Hi[n[1]],g:255&17*Hi[n[2]],b:255&17*Hi[n[3]],a:5===o?17*Hi[n[4]]:255}:7!==o&&9!==o||(s={r:Hi[n[1]]<<4|Hi[n[2]],g:Hi[n[3]]<<4|Hi[n[4]],b:Hi[n[5]]<<4|Hi[n[6]],a:9===o?Hi[n[7]]<<4|Hi[n[8]]:255})),i=s||ln(t)||gn(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=fn(this._rgb);return t&&(t.a=Wi(t.a)),t}set rgb(t){this._rgb=pn(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Wi(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?Xi(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=Zi(t),i=e[0],n=Vi(e[1]),s=Vi(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${Wi(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let s;const o=e===s?.5:e,r=2*o-1,a=i.a-n.a,l=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;s=1-l,i.r=255&l*i.r+s*n.r+.5,i.g=255&l*i.g+s*n.g+.5,i.b=255&l*i.b+s*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=dn(Wi(t.r)),s=dn(Wi(t.g)),o=dn(Wi(t.b));return{r:Ni(hn(n+i*(dn(Wi(e.r))-n))),g:Ni(hn(s+i*(dn(Wi(e.g))-s))),b:Ni(hn(o+i*(dn(Wi(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new mn(this.rgb)}alpha(t){return this._rgb.a=Ni(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Fi(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return un(this._rgb,2,t),this}darken(t){return un(this._rgb,2,-t),this}saturate(t){return un(this._rgb,1,t),this}desaturate(t){return un(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Zi(t);i[0]=nn(i[0]+e),i=en(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function bn(){}const vn=(()=>{let t=0;return()=>t++})();function yn(t){return null==t}function xn(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function _n(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function wn(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function kn(t,e){return wn(t)?t:e}function Sn(t,e){return void 0===t?e:t}const Mn=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function On(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function En(t,e,i,n){let s,o,r;if(xn(t))if(o=t.length,n)for(s=o-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;s<o;s++)e.call(i,t[s],s);else if(_n(t))for(r=Object.keys(t),o=r.length,s=0;s<o;s++)e.call(i,t[r[s]],r[s])}function An(t,e){let i,n,s,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(s=t[i],o=e[i],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Tn(t){if(xn(t))return t.map(Tn);if(_n(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let s=0;for(;s<n;++s)e[i[s]]=Tn(t[i[s]]);return e}return t}function Cn(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Ln(t,e,i,n){if(!Cn(t))return;const s=e[t],o=i[t];_n(s)&&_n(o)?Pn(s,o,n):e[t]=Tn(o)}function Pn(t,e,i){const n=xn(e)?e:[e],s=n.length;if(!_n(t))return t;const o=(i=i||{}).merger||Ln;let r;for(let e=0;e<s;++e){if(r=n[e],!_n(r))continue;const s=Object.keys(r);for(let e=0,n=s.length;e<n;++e)o(s[e],t,r,i)}return t}function Dn(t,e){return Pn(t,e,{merger:In})}function In(t,e,i){if(!Cn(t))return;const n=e[t],s=i[t];_n(n)&&_n(s)?Dn(n,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Tn(s))}const Rn={"":t=>t,x:t=>t.x,y:t=>t.y};function jn(t,e){const i=Rn[e]||(Rn[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function Fn(t){return t.charAt(0).toUpperCase()+t.slice(1)}const zn=t=>void 0!==t,Bn=t=>"function"==typeof t,Nn=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const Wn=Math.PI,Vn=2*Wn,Hn=Vn+Wn,$n=Number.POSITIVE_INFINITY,Un=Wn/180,qn=Wn/2,Yn=Wn/4,Xn=2*Wn/3,Gn=Math.log10,Jn=Math.sign;function Kn(t,e,i){return Math.abs(t-e)<i}function Qn(t){const e=Math.round(t);t=Kn(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Gn(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Zn(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function ts(t,e,i){let n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function es(t){return t*(Wn/180)}function is(t){return t*(180/Wn)}function ns(t){if(!wn(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function ss(t,e){const i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*Wn&&(o+=Vn),{angle:o,distance:s}}function os(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function rs(t,e){return(t-e+Hn)%Vn-Wn}function as(t){return(t%Vn+Vn)%Vn}function ls(t,e,i,n){const s=as(t),o=as(e),r=as(i),a=as(o-s),l=as(r-s),c=as(s-o),h=as(s-r);return s===o||s===r||n&&o===r||a>l&&c<h}function cs(t,e,i){return Math.max(e,Math.min(i,t))}function hs(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function ds(t,e,i){i=i||(i=>t[i]<e);let n,s=t.length-1,o=0;for(;s-o>1;)n=o+s>>1,i(n)?o=n:s=n;return{lo:o,hi:s}}const us=(t,e,i,n)=>ds(t,i,n?n=>{const s=t[n][e];return s<i||s===i&&t[n+1][e]===i}:n=>t[n][e]<i),fs=(t,e,i)=>ds(t,i,n=>t[n][e]>=i);const ps=["push","pop","shift","splice","unshift"];function gs(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(ps.forEach(e=>{delete t[e]}),delete t._chartjs)}function ms(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const bs="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function vs(t,e){let i=[],n=!1;return function(...s){i=s,n||(n=!0,bs.call(window,()=>{n=!1,t.apply(e,i)}))}}const ys=t=>"start"===t?"left":"end"===t?"right":"center",xs=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function _s(t,e,i){const n=e.length;let s=0,o=n;if(t._sorted){const{iScale:r,vScale:a,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,h=r.axis,{min:d,max:u,minDefined:f,maxDefined:p}=r.getUserBounds();if(f){if(s=Math.min(us(l,h,d).lo,i?n:us(e,h,r.getPixelForValue(d)).lo),c){const t=l.slice(0,s+1).reverse().findIndex(t=>!yn(t[a.axis]));s-=Math.max(0,t)}s=cs(s,0,n-1)}if(p){let t=Math.max(us(l,r.axis,u,!0).hi+1,i?0:us(e,h,r.getPixelForValue(u),!0).hi+1);if(c){const e=l.slice(t-1).findIndex(t=>!yn(t[a.axis]));t+=Math.max(0,e)}o=cs(t,s,n)-s}else o=n-s}return{start:s,count:o}}function ws(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),o}const ks=t=>0===t||1===t,Ss=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Vn/i),Ms=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*Vn/i)+1,Os={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*qn),easeOutSine:t=>Math.sin(t*qn),easeInOutSine:t=>-.5*(Math.cos(Wn*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>ks(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ks(t)?t:Ss(t,.075,.3),easeOutElastic:t=>ks(t)?t:Ms(t,.075,.3),easeInOutElastic(t){const e=.1125;return ks(t)?t:t<.5?.5*Ss(2*t,e,.45):.5+.5*Ms(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Os.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Os.easeInBounce(2*t):.5*Os.easeOutBounce(2*t-1)+.5};function Es(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function As(t){return Es(t)?t:new mn(t)}function Ts(t){return Es(t)?t:new mn(t).saturate(.5).darken(.1).hexString()}const Cs=["x","y","borderWidth","radius","tension"],Ls=["color","borderColor","backgroundColor"];const Ps=new Map;function Ds(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ps.get(i);return n||(n=new Intl.NumberFormat(t,e),Ps.set(i,n)),n}(e,i).format(t)}const Is={values:t=>xn(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const r=Gn(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Ds(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(Gn(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?Is.numeric.call(this,t,e,i):""}};var Rs={formatters:Is};const js=Object.create(null),Fs=Object.create(null);function zs(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function Bs(t,e,i){return"string"==typeof e?Pn(zs(t,e),i):Pn(zs(t,""),e)}class Ns{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Ts(e.backgroundColor),this.hoverBorderColor=(t,e)=>Ts(e.borderColor),this.hoverColor=(t,e)=>Ts(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Bs(this,t,e)}get(t){return zs(this,t)}describe(t,e){return Bs(Fs,t,e)}override(t,e){return Bs(js,t,e)}route(t,e,i,n){const s=zs(this,t),o=zs(this,i),r="_"+e;Object.defineProperties(s,{[r]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=o[n];return _n(t)?Object.assign({},e,t):Sn(t,e)},set(t){this[r]=t}}})}apply(t){t.forEach(t=>t(this))}}var Ws=new Ns({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Ls},numbers:{type:"number",properties:Cs}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Rs.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Vs(t,e,i,n,s){let o=e[s];return o||(o=e[s]=t.measureText(s).width,i.push(s)),o>n&&(n=o),n}function Hs(t,e,i,n){let s=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const a=i.length;let l,c,h,d,u;for(l=0;l<a;l++)if(d=i[l],null==d||xn(d)){if(xn(d))for(c=0,h=d.length;c<h;c++)u=d[c],null==u||xn(u)||(r=Vs(t,s,o,r,u))}else r=Vs(t,s,o,r,d);t.restore();const f=o.length/2;if(f>i.length){for(l=0;l<f;l++)delete s[o[l]];o.splice(0,f)}return r}function $s(t,e,i){const n=t.currentDevicePixelRatio,s=0!==i?Math.max(i/2,.5):0;return Math.round((e-s)*n)/n+s}function Us(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function qs(t,e,i,n){Ys(t,e,i,n,null)}function Ys(t,e,i,n,s){let o,r,a,l,c,h,d,u;const f=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*Un;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),f){default:s?t.ellipse(i,n,s/2,g,0,0,Vn):t.arc(i,n,g,0,Vn),t.closePath();break;case"triangle":h=s?s/2:g,t.moveTo(i+Math.sin(m)*h,n-Math.cos(m)*g),m+=Xn,t.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*g),m+=Xn,t.lineTo(i+Math.sin(m)*h,n-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,l=g-c,r=Math.cos(m+Yn)*l,d=Math.cos(m+Yn)*(s?s/2-c:l),a=Math.sin(m+Yn)*l,u=Math.sin(m+Yn)*(s?s/2-c:l),t.arc(i-d,n-a,c,m-Wn,m-qn),t.arc(i+u,n-r,c,m-qn,m),t.arc(i+d,n+a,c,m,m+qn),t.arc(i-u,n+r,c,m+qn,m+Wn),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=s?s/2:l,t.rect(i-h,n-l,2*h,2*l);break}m+=Yn;case"rectRot":d=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-a),t.lineTo(i+u,n-r),t.lineTo(i+d,n+a),t.lineTo(i-u,n+r),t.closePath();break;case"crossRot":m+=Yn;case"cross":d=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-a),t.lineTo(i+d,n+a),t.moveTo(i+u,n-r),t.lineTo(i-u,n+r);break;case"star":d=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-a),t.lineTo(i+d,n+a),t.moveTo(i+u,n-r),t.lineTo(i-u,n+r),m+=Yn,d=Math.cos(m)*(s?s/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(s?s/2:g),t.moveTo(i-d,n-a),t.lineTo(i+d,n+a),t.moveTo(i+u,n-r),t.lineTo(i-u,n+r);break;case"line":r=s?s/2:Math.cos(m)*g,a=Math.sin(m)*g,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(m)*(s?s/2:g),n+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Xs(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Gs(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Js(t){t.restore()}function Ks(t,e,i,n,s){if(!e)return t.lineTo(i.x,i.y);if("middle"===s){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===s!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Qs(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Zs(t,e,i,n,s){if(s.strikethrough||s.underline){const o=t.measureText(n),r=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,c=i+o.actualBoundingBoxDescent,h=s.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(r,h),t.lineTo(a,h),t.stroke()}}function to(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function eo(t,e,i,n,s,o={}){const r=xn(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),yn(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&to(t,o.backdrop),a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),yn(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(c,i,n,o.maxWidth)),t.fillText(c,i,n,o.maxWidth),Zs(t,i,n,c,o),n+=Number(s.lineHeight);t.restore()}function io(t,e){const{x:i,y:n,w:s,h:o,radius:r}=e;t.arc(i+r.topLeft,n+r.topLeft,r.topLeft,1.5*Wn,Wn,!0),t.lineTo(i,n+o-r.bottomLeft),t.arc(i+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,Wn,qn,!0),t.lineTo(i+s-r.bottomRight,n+o),t.arc(i+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,qn,0,!0),t.lineTo(i+s,n+r.topRight),t.arc(i+s-r.topRight,n+r.topRight,r.topRight,0,-qn,!0),t.lineTo(i+r.topLeft,n)}const no=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,so=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function oo(t,e){const i=(""+t).match(no);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const ro=t=>+t||0;function ao(t,e){const i={},n=_n(e),s=n?Object.keys(e):e,o=_n(t)?n?i=>Sn(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of s)i[t]=ro(o(t));return i}function lo(t){return ao(t,{top:"y",right:"x",bottom:"y",left:"x"})}function co(t){return ao(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ho(t){const e=lo(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function uo(t,e){t=t||{},e=e||Ws.font;let i=Sn(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=Sn(t.style,e.style);n&&!(""+n).match(so)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:Sn(t.family,e.family),lineHeight:oo(Sn(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:Sn(t.weight,e.weight),string:""};return s.string=function(t){return!t||yn(t.size)||yn(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function fo(t,e,i,n){let s,o,r,a=!0;for(s=0,o=t.length;s<o;++s)if(r=t[s],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),a=!1),void 0!==i&&xn(r)&&(r=r[i%r.length],a=!1),void 0!==r))return n&&!a&&(n.cacheable=!1),r}function po(t,e){return Object.assign(Object.create(t),e)}function go(t,e=[""],i,n,s=()=>t[0]){const o=i||t;void 0===n&&(n=Oo("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:n,_getTarget:s,override:i=>go([i,...t],e,o,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>xo(i,n,()=>function(t,e,i,n){let s;for(const o of e)if(s=Oo(vo(o,t),i),void 0!==s)return yo(t,s)?So(i,n,t,s):s}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Eo(t).includes(e),ownKeys:t=>Eo(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function mo(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:bo(t,n),setContext:e=>mo(t,e,i,n),override:s=>mo(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>xo(t,e,()=>function(t,e,i){const{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=t;let a=n[e];Bn(a)&&r.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,r||n);a.delete(t),yo(t,l)&&(l=So(s._scopes,s,t,l));return l}(e,a,t,i));xn(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=i;if(void 0!==o.index&&n(t))return e[o.index%e.length];if(_n(e[0])){const i=e,n=s._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=So(n,s,t,l);e.push(mo(i,o,r&&r[t],a))}}return e}(e,a,t,r.isIndexable));yo(e,a)&&(a=mo(a,s,o&&o[e],r));return a}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function bo(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:Bn(i)?i:()=>i,isIndexable:Bn(n)?n:()=>n}}const vo=(t,e)=>t?t+Fn(e):e,yo=(t,e)=>_n(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function xo(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const n=i();return t[e]=n,n}function _o(t,e,i){return Bn(t)?t(e,i):t}const wo=(t,e)=>!0===t?e:"string"==typeof t?jn(e,t):void 0;function ko(t,e,i,n,s){for(const o of e){const e=wo(i,o);if(e){t.add(e);const o=_o(e._fallback,i,s);if(void 0!==o&&o!==i&&o!==n)return o}else if(!1===e&&void 0!==n&&i!==n)return null}return!1}function So(t,e,i,n){const s=e._rootScopes,o=_o(e._fallback,i,n),r=[...t,...s],a=new Set;a.add(n);let l=Mo(a,r,i,o||i,n);return null!==l&&((void 0===o||o===i||(l=Mo(a,r,o,l,n),null!==l))&&go(Array.from(a),[""],s,o,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];if(xn(s)&&_n(i))return i;return s||{}}(e,i,n)))}function Mo(t,e,i,n,s){for(;i;)i=ko(t,e,i,n,s);return i}function Oo(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function Eo(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function Ao(t,e,i,n){const{iScale:s}=t,{key:o="r"}=this._parsing,r=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+i,h=e[c],r[a]={r:s.parse(jn(h,o),c)};return r}const To=Number.EPSILON||1e-14,Co=(t,e)=>e<t.length&&!t[e].skip&&t[e],Lo=t=>"x"===t?"y":"x";function Po(t,e,i,n){const s=t.skip?e:t,o=e,r=i.skip?e:i,a=os(o,s),l=os(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:o.x-d*(r.x-s.x),y:o.y-d*(r.y-s.y)},next:{x:o.x+u*(r.x-s.x),y:o.y+u*(r.y-s.y)}}}function Do(t,e="x"){const i=Lo(e),n=t.length,s=Array(n).fill(0),o=Array(n);let r,a,l,c=Co(t,0);for(r=0;r<n;++r)if(a=l,l=c,c=Co(t,r+1),l){if(c){const t=c[e]-l[e];s[r]=0!==t?(c[i]-l[i])/t:0}o[r]=a?c?Jn(s[r-1])!==Jn(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}!function(t,e,i){const n=t.length;let s,o,r,a,l,c=Co(t,0);for(let h=0;h<n-1;++h)l=c,c=Co(t,h+1),l&&c&&(Kn(e[h],0,To)?i[h]=i[h+1]=0:(s=i[h]/e[h],o=i[h+1]/e[h],a=Math.pow(s,2)+Math.pow(o,2),a<=9||(r=3/Math.sqrt(a),i[h]=s*r*e[h],i[h+1]=o*r*e[h])))}(t,s,o),function(t,e,i="x"){const n=Lo(i),s=t.length;let o,r,a,l=Co(t,0);for(let c=0;c<s;++c){if(r=a,a=l,l=Co(t,c+1),!a)continue;const s=a[i],h=a[n];r&&(o=(s-r[i])/3,a[`cp1${i}`]=s-o,a[`cp1${n}`]=h-o*e[c]),l&&(o=(l[i]-s)/3,a[`cp2${i}`]=s+o,a[`cp2${n}`]=h+o*e[c])}}(t,o,e)}function Io(t,e,i){return Math.max(Math.min(t,i),e)}function Ro(t,e,i,n,s){let o,r,a,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)Do(t,s);else{let i=n?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o)a=t[o],l=Po(i,a,t[Math.min(o+1,r-(n?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,s,o,r,a=Xs(t[0],e);for(i=0,n=t.length;i<n;++i)r=o,o=a,a=i<n-1&&Xs(t[i+1],e),o&&(s=t[i],r&&(s.cp1x=Io(s.cp1x,e.left,e.right),s.cp1y=Io(s.cp1y,e.top,e.bottom)),a&&(s.cp2x=Io(s.cp2x,e.left,e.right),s.cp2y=Io(s.cp2y,e.top,e.bottom)))}(t,i)}function jo(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Fo(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function zo(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const Bo=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const No=["top","right","bottom","left"];function Wo(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const o=No[s];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function Vo(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,s=Bo(i),o="border-box"===s.boxSizing,r=Wo(s,"padding"),a=Wo(s,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:s,offsetY:o}=n;let r,a,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,o,t.target))r=s,a=o;else{const t=e.getBoundingClientRect();r=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:r,y:a,box:l}}(t,i),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/p*i.height/n)}}const Ho=t=>Math.round(10*t)/10;function $o(t,e,i,n){const s=Bo(t),o=Wo(s,"margin"),r=zo(s.maxWidth,t,"clientWidth")||$n,a=zo(s.maxHeight,t,"clientHeight")||$n,l=function(t,e,i){let n,s;if(void 0===e||void 0===i){const o=t&&Fo(t);if(o){const t=o.getBoundingClientRect(),r=Bo(o),a=Wo(r,"border","width"),l=Wo(r,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=zo(r.maxWidth,o,"clientWidth"),s=zo(r.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||$n,maxHeight:s||$n}}(t,e,i);let{width:c,height:h}=l;if("content-box"===s.boxSizing){const t=Wo(s,"border","width"),e=Wo(s,"padding");c-=e.width+t.width,h-=e.height+t.height}c=Math.max(0,c-o.width),h=Math.max(0,n?c/n:h-o.height),c=Ho(Math.min(c,r,l.maxWidth)),h=Ho(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Ho(c/2));return(void 0!==e||void 0!==i)&&n&&l.height&&h>l.height&&(h=l.height,c=Ho(Math.floor(h*n))),{width:c,height:h}}function Uo(t,e,i){const n=e||1,s=Ho(t.height*n),o=Ho(t.width*n);t.height=Ho(t.height),t.width=Ho(t.width);const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||r.height!==s||r.width!==o)&&(t.currentDevicePixelRatio=n,r.height=s,r.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const qo=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};jo()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Yo(t,e){const i=function(t,e){return Bo(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Xo(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Go(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Jo(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},r=Xo(t,s,i),a=Xo(s,o,i),l=Xo(o,e,i),c=Xo(r,a,i),h=Xo(a,l,i);return Xo(c,h,i)}function Ko(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Qo(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Zo(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function tr(t){return"angle"===t?{between:ls,compare:rs,normalize:as}:{between:hs,compare:(t,e)=>t-e,normalize:t=>t}}function er({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}function ir(t,e,i){if(!i)return[t];const{property:n,start:s,end:o}=i,r=e.length,{compare:a,between:l,normalize:c}=tr(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:s,end:o}=i,{between:r,normalize:a}=tr(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&r(a(e[d%l][n]),s,o);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),p=[];let g,m,b,v=!1,y=null;const x=()=>v||l(s,b,g)&&0!==a(s,b),_=()=>!v||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=d;++t)m=e[t%r],m.skip||(g=c(m[n]),g!==b&&(v=l(g,s,o),null===y&&x()&&(y=0===a(g,s)?t:i),null!==y&&_()&&(p.push(er({start:y,end:t,loop:u,count:r,style:f})),y=null),i=t,b=g));return null!==y&&p.push(er({start:y,end:d,loop:u,count:r,style:f})),p}function nr(t,e){const i=[],n=t.segments;for(let s=0;s<n.length;s++){const o=ir(n[s],t.points,e);o.length&&i.push(...o)}return i}function sr(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),o=or(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=i.length,c=[];let h=o,d=e[0].start,u=d;function f(t,e,n,s){const o=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=o;for(;i[e%l].skip;)e+=o;t%l!==e%l&&(c.push({start:t%l,end:e%l,loop:n,style:s}),h=s,d=e%l)}}for(const t of e){d=a?d:t.start;let e,o=i[d%l];for(u=d+1;u<=t.end;u++){const a=i[u%l];e=or(n.setContext(po(s,{type:"segment",p0:o,p1:a,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),rr(e,h)&&f(d,u-1,t.loop,h),o=a,h=e}d<u-1&&f(d,u-1,t.loop,h)}return c}(t,e,i,n):e}function or(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function rr(t,e){if(!e)return!1;const i=[],n=function(t,e){return Es(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}function ar(t,e,i){return t.options.clip?t[i]:e[i]}function lr(t,e){const i=e._clip;if(i.disabled)return!1;const n=function(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:ar(i,e,"left"),right:ar(i,e,"right"),top:ar(n,e,"top"),bottom:ar(n,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:n.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:n.right+(!0===i.right?0:i.right),top:!1===i.top?0:n.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:n.bottom+(!0===i.bottom?0:i.bottom)}}class cr{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const s=e.listeners[n],o=e.duration;s.forEach(n=>n({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=bs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let o,r=s.length-1,a=!1;for(;r>=0;--r)o=s[r],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(s[r]=s[s.length-1],s.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var hr=new cr;const dr="transparent",ur={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=As(t||dr),s=n.valid&&As(e||dr);return s&&s.valid?s.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class fr{constructor(t,e,i,n){const s=e[i];n=fo([t.to,n,s,t.from]);const o=fo([t.from,s,n]);this._active=!0,this._fn=t.fn||ur[t.type||typeof o],this._easing=Os[t.easing]||Os.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=fo([t.to,e,n,t.from]),this._from=fo([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,o=this._loop,r=this._to;let a;if(this._active=s!==r&&(o||e<i),!this._active)return this._target[n]=r,void this._notify(!0);e<0?this._target[n]=s:(a=e/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(s,r,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class pr{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!_n(t))return;const e=Object.keys(Ws.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const s=t[n];if(!_n(s))return;const o={};for(const t of e)o[t]=s[t];(xn(s.properties)&&s.properties||[n]).forEach(t=>{t!==n&&i.has(t)||i.set(t,o)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const s=t[n[e]];s&&s.active()&&i.push(s.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),o=Object.keys(e),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=s[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,r);continue}h.cancel()}d&&d.duration?(s[l]=h=new fr(d,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(hr.add(this._chart,i),!0):void 0}}function gr(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:s,end:n?s:o}}function mr(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=n.length;s<o;++s)i.push(n[s].index);return i}function br(t,e,i,n={}){const s=t.keys,o="single"===n.mode;let r,a,l,c;if(null===e)return;let h=!1;for(r=0,a=s.length;r<a;++r){if(l=+s[r],l===i){if(h=!0,n.all)continue;break}c=t.values[l],wn(c)&&(o||0===e||Jn(e)===Jn(c))&&(e+=c)}return h||n.all?e:0}function vr(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function yr(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function xr(t,e,i,n){for(const s of e.getMatchingVisibleMetas(n).reverse()){const e=t[s.index];if(i&&e>0||!i&&e<0)return s.index}return null}function _r(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,c=r.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,r,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:o,[c]:d}=i;u=(i._stacks||(i._stacks={}))[c]=yr(s,h,o),u[a]=d,u._top=xr(u,r,!0,n.type),u._bottom=xr(u,r,!1,n.type);(u._visualValues||(u._visualValues={}))[a]=d}}function wr(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function kr(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const Sr=t=>"reset"===t||"none"===t,Mr=(t,e)=>e?t:Object.assign({},t);class Or{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=vr(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&kr(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=e.xAxisID=Sn(i.xAxisID,wr(t,"x")),o=e.yAxisID=Sn(i.yAxisID,wr(t,"y")),r=e.rAxisID=Sn(i.rAxisID,wr(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,s,o,r),c=e.vAxisID=n(a,o,s,r);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&gs(this._data,this),t._stacked&&kr(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(_n(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:n}=e,s="x"===i.axis?"x":"y",o="x"===n.axis?"x":"y",r=Object.keys(t),a=new Array(r.length);let l,c,h;for(l=0,c=r.length;l<c;++l)h=r[l],a[l]={[s]:h,[o]:t[h]};return a}(e,t)}else if(i!==e){if(i){gs(i,this);const t=this._cachedMeta;kr(t),t._parsed=[]}e&&Object.isExtensible(e)&&(s=this,(n=e)._chartjs?n._chartjs.listeners.push(s):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[s]}}),ps.forEach(t=>{const e="_onData"+Fn(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const s=i.apply(this,t);return n._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),s}})}))),this._syncList=[],this._data=e}var n,s}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=vr(e.vScale,e),e.stack!==i.stack&&(n=!0,kr(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&(_r(this,e._parsed),e._stacked=vr(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:s,_stacked:o}=i,r=s.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=xn(n[t])?this.parseArrayData(i,n,t,e):_n(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const s=()=>null===l[r]||d&&l[r]<d[r];for(a=0;a<e;++a)i._parsed[a+t]=l=c[a],h&&(s()&&(h=!1),d=l);i._sorted=h}o&&_r(this,c)}parsePrimitiveData(t,e,i,n){const{iScale:s,vScale:o}=t,r=s.axis,a=o.axis,l=s.getLabels(),c=s===o,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[r]:c||s.parse(l[f],f),[a]:o.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:s,yScale:o}=t,r=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+i,h=e[c],r[a]={x:s.parse(h[0],c),y:o.parse(h[1],c)};return r}parseObjectData(t,e,i,n){const{xScale:s,yScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:s.parse(jn(u,r),d),y:o.parse(jn(u,a),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,s=this._cachedMeta,o=e[t.axis];return br({keys:mr(n,!0),values:e._stacks[t.axis]._visualValues},o,s.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const s=i[e.axis];let o=null===s?NaN:s;const r=n&&i._stacks[e.axis];n&&r&&(n.values=r,o=br(n,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,s=i._sorted&&t===i.iScale,o=n.length,r=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:mr(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(r);let d,u;function f(){u=n[d];const e=u[r.axis];return!wn(u[t.axis])||c>e||h<e}for(d=0;d<o&&(f()||(this.updateRangeFromParsed(l,t,u,a),!s));++d);if(s)for(d=o-1;d>=0;--d)if(!f()){this.updateRangeFromParsed(l,t,u,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,s,o;for(n=0,s=e.length;n<s;++n)o=e[n][t.axis],wn(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:n?""+n.getLabelForValue(s[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,s;return _n(t)?(e=t.top,i=t.right,n=t.bottom,s=t.left):e=i=n=s=t,{top:e,right:i,bottom:n,left:s,disabled:!1===t}}(Sn(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=gr(t,i),s=gr(e,i);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],s=e.chartArea,o=[],r=this._drawStart||0,a=this._drawCount||n.length-r,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,s,r,a),c=r;c<r+a;++c){const e=n[c];e.hidden||(e.active&&l?o.push(e):e.draw(t,s))}for(c=0;c<o.length;++c)o[c].draw(t,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return po(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=n.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return po(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=n,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n="active"===e,s=this._cachedDataOpts,o=t+"-"+e,r=s[o],a=this.enableOptionSharing&&zn(i);if(r)return Mr(r,a);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),h=n?[`${t}Hover`,"hover",t,""]:[t,""],d=l.getOptionScopes(this.getDataset(),c),u=Object.keys(Ws.elements[t]),f=l.resolveNamedOptions(d,u,()=>this.getContext(i,n,e),h);return f.$shared&&(f.$shared=a,s[o]=Object.freeze(Mr(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,o=`animation-${e}`,r=s[o];if(r)return r;let a;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),s);a=n.createResolver(o,this.getContext(t,i,e))}const l=new pr(n,a&&a.animations);return a&&a._cacheable&&(s[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Sr(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(e,s)||s!==n;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:o}}updateElement(t,e,i,n){Sr(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Sr(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,s=e.length,o=Math.min(s,n);o&&this.parse(0,o),s>n?this._insertElements(n,s-n,t):s<n&&this._removeElements(s,n-s)}_insertElements(t,e,i=!0){const n=this._cachedMeta,s=n.data,o=t+e;let r;const a=t=>{for(t.length+=e,r=t.length-1;r>=o;r--)t[r]=t[r-e]};for(a(s),r=t;r<o;++r)s[r]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(t,e),i&&this.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&kr(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Er(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,s=i.length;e<s;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=ms(n.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let n,s,o,r,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(zn(r)&&(a=Math.min(a,Math.abs(o-r)||a)),r=o)};for(n=0,s=i.length;n<s;++n)o=e.getPixelForValue(i[n]),l();for(r=void 0,n=0,s=e.ticks.length;n<s;++n)o=e.getPixelForTick(n),l();return a}function Ar(t,e,i,n){return xn(t)?function(t,e,i,n){const s=i.parse(t[0],n),o=i.parse(t[1],n),r=Math.min(s,o),a=Math.max(s,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:s,end:o,min:r,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Tr(t,e,i,n){const s=t.iScale,o=t.vScale,r=s.getLabels(),a=s===o,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=e[c],d={},d[s.axis]=a||s.parse(r[c],c),l.push(Ar(u,d,o,c));return l}function Cr(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function Lr(t,e,i,n){let s=e.borderSkipped;const o={};if(!s)return void(t.borderSkipped=o);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:a,reverse:l,top:c,bottom:h}=function(t){let e,i,n,s,o;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(s="end",o="start"):(s="start",o="end"),{start:i,end:n,reverse:e,top:s,bottom:o}}(t);"middle"===s&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?s=c:(i._bottom||0)===n?s=h:(o[Pr(h,r,a,l)]=!0,s=c)),o[Pr(s,r,a,l)]=!0,t.borderSkipped=o}function Pr(t,e,i,n){var s,o,r;return n?(r=i,t=Dr(t=(s=t)===(o=e)?r:s===r?o:s,i,e)):t=Dr(t,e,i),t}function Dr(t,e,i){return"start"===t?e:"end"===t?i:t}function Ir(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class Rr extends Or{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:n,color:s,useBorderRadius:o,borderRadius:r}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((e,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(a),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:n,pointStyle:i,borderRadius:o&&(r||l.borderRadius),index:a}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let s,o,r=t=>+i[t];if(_n(i[t])){const{key:t="value"}=this._parsing;r=e=>+jn(i[e],t)}for(s=t,o=t+e;s<o;++s)n._parsed[s]=r(s)}}_getRotation(){return es(this.options.rotation-90)}_getCircumference(){return es(this.options.circumference)}_getRotationExtents(){let t=Vn,e=-Vn;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,s=n._getRotation(),o=n._getCircumference();t=Math.min(t,s),e=Math.max(e,s+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,s=n.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-o)/2,0),a=Math.min((l=this.options.cutout,c=r,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const h=this._getRingWeight(this.index),{circumference:d,rotation:u}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:m}=function(t,e,i){let n=1,s=1,o=0,r=0;if(e<Vn){const a=t,l=a+e,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>ls(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>ls(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,d),m=f(qn,h,u),b=p(Wn,c,d),v=p(Wn+qn,h,u);n=(g-b)/2,s=(m-v)/2,o=-(g+b)/2,r=-(m+v)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}(u,d,a),b=(i.width-o)/f,v=(i.height-o)/p,y=Math.max(Math.min(b,v)/2,0),x=Mn(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,s=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*s/Vn)}updateElements(t,e,i,n){const s="reset"===n,o=this.chart,r=o.chartArea,a=o.options.animation,l=(r.left+r.right)/2,c=(r.top+r.bottom)/2,h=s&&a.animateScale,d=h?0:this.innerRadius,u=h?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,n);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,s);for(g=e;g<e+i;++g){const e=this._circumference(g,s),i=t[g],o={x:l+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:u,innerRadius:d};p&&(o.options=f||this.resolveDataElementOptions(g,i.active?"active":n)),m+=e,this.updateElement(i,g,o,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const s=t._parsed[i];null===s||isNaN(s)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(s))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?Vn*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=Ds(e._parsed[t],i.options.locale);return{label:n[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,s,o,r,a;if(!t)for(n=0,s=i.data.datasets.length;n<s;++n)if(i.isDatasetVisible(n)){o=i.getDatasetMeta(n),t=o.data,r=o.controller;break}if(!t)return 0;for(n=0,s=t.length;n<s;++n)a=r.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(Sn(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class jr extends Or{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map((e,s)=>{const o=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:n,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=Ds(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:s}}parseObjectData(t,e,i,n){return Ao.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(n/2,0),o=(s-Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const s="reset"===n,o=this.chart,r=o.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,c=a.yCenter,h=a.getIndexAngle(0)-.5*Wn;let d,u=h;const f=360/this.countVisibleElements();for(d=0;d<e;++d)u+=this._computeAngle(d,n,f);for(d=e;d<e+i;d++){const e=t[d];let i=u,p=u+this._computeAngle(d,n,f),g=o.getDataVisibility(d)?a.getDistanceFromCenterForValue(this.getParsed(d).r):0;u=p,s&&(r.animateScale&&(g=0),r.animateRotate&&(i=p=h));const m={x:l,y:c,innerRadius:0,outerRadius:g,startAngle:i,endAngle:p,options:this.resolveDataElementOptions(d,e.active?"active":n)};this.updateElement(e,d,m,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?es(this.resolveDataElementOptions(t,e).angle||i):0}}var Fr=Object.freeze({__proto__:null,BarController:class extends Or{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,n){return Tr(t,e,i,n)}parseArrayData(t,e,i,n){return Tr(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:s,vScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l="x"===s.axis?r:a,c="x"===o.axis?r:a,h=[];let d,u,f,p;for(d=i,u=i+n;d<u;++d)p=e[d],f={},f[s.axis]=s.parse(jn(p,l),d),h.push(Ar(jn(p,c),f,o,d));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const s=i._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,s=this.getParsed(t),o=s._custom,r=Cr(o)?"["+o.start+", "+o.end+"]":""+n.getLabelForValue(s[n.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const s="reset"===n,{index:o,_cachedMeta:{vScale:r}}=this,a=r.getBasePixel(),l=r.isHorizontal(),c=this._getRuler(),{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n);for(let u=e;u<e+i;u++){const e=this.getParsed(u),i=s||yn(e[r.axis])?{base:a,head:a}:this._calculateBarValuePixels(u),f=this._calculateBarIndexPixels(u,c),p=(e._stacks||{})[r.axis],g={horizontal:l,base:i.base,enableBorderRadius:!p||Cr(e._custom)||o===p._top||o===p._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};d&&(g.options=h||this.resolveDataElementOptions(u,t[u].active?"active":n));const m=g.options||t[u].options;Lr(g,m,p,o),Ir(g,m,c.ratio),this.updateElement(t[u],u,g,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),s=i.options.stacked,o=[],r=this._cachedMeta.controller.getParsed(e),a=r&&r[i.axis],l=t=>{const e=t._parsed.find(t=>t[i.axis]===a),n=e&&e[t.vScale.axis];if(yn(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!l(i))&&((!1===s||-1===o.indexOf(i.stack)||void 0===s&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[Sn("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const n=this._getStacks(t,i),s=void 0!==e?n.indexOf(e):-1;return-1===s?n.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let s,o;for(s=0,o=e.data.length;s<o;++s)n.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const r=t.barThickness;return{min:r||Er(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:s,minBarLength:o}}=this,r=s||0,a=this.getParsed(t),l=a._custom,c=Cr(l);let h,d,u=a[e.axis],f=0,p=i?this.applyStack(e,a,i):u;p!==u&&(f=p-u,p=u),c&&(u=l.barStart,p=l.barEnd-l.barStart,0!==u&&Jn(u)!==Jn(l.barEnd)&&(f=0),f+=u);const g=yn(s)||c?f:s;let m=e.getPixelForValue(g);if(h=this.chart.getDataVisibility(t)?e.getPixelForValue(f+p):m,d=h-m,Math.abs(d)<o){d=function(t,e,i){return 0!==t?Jn(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(d,e,r)*o,u===r&&(m-=d/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),l=Math.min(t,s),f=Math.max(t,s);m=Math.max(Math.min(m,f),l),h=m+d,i&&!c&&(a._stacks[e.axis]._visualValues[n]=e.getValueForPixel(h)-e.getValueForPixel(m))}if(m===e.getPixelForValue(r)){const t=Jn(d)*e.getLineWidthForValue(r)/2;m+=t,d-=t}return{size:d,base:m,head:h,center:h+d/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,s=n.skipNull,o=Sn(n.maxBarThickness,1/0);let r,a;const l=this._getAxisCount();if(e.grouped){const i=s?this._getStackCount(t):e.stackCount,c="flex"===n.barThickness?function(t,e,i,n){const s=e.pixels,o=s[t];let r=t>0?s[t-1]:null,a=t<s.length-1?s[t+1]:null;const l=i.categoryPercentage;null===r&&(r=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,n,i*l):function(t,e,i,n){const s=i.barThickness;let o,r;return yn(s)?(o=e.min*i.categoryPercentage,r=i.barPercentage):(o=s*n,r=1),{chunk:o/n,ratio:r,start:e.pixels[t]-o/2}}(t,e,n,i*l),h="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,d=this._getAxis().indexOf(Sn(h,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+d;r=c.start+c.chunk*u+c.chunk/2,a=Math.min(o,c.chunk*c.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),a=Math.min(o,e.min*e.ratio);return{base:r-a/2,head:r+a/2,center:r,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let s=0;for(;s<n;++s)null===this.getParsed(s)[e.axis]||i[s].hidden||i[s].draw(this._ctx)}},BubbleController:class extends Or{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const s=super.parsePrimitiveData(t,e,i,n);for(let t=0;t<s.length;t++)s[t]._custom=this.resolveDataElementOptions(t+i).radius;return s}parseArrayData(t,e,i,n){const s=super.parseArrayData(t,e,i,n);for(let t=0;t<s.length;t++){const n=e[i+t];s[t]._custom=Sn(n[2],this.resolveDataElementOptions(t+i).radius)}return s}parseObjectData(t,e,i,n){const s=super.parseObjectData(t,e,i,n);for(let t=0;t<s.length;t++){const n=e[i+t];s[t]._custom=Sn(n&&n.r&&+n.r,this.resolveDataElementOptions(t+i).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,o=this.getParsed(t),r=n.getLabelForValue(o.x),a=s.getLabelForValue(o.y),l=o._custom;return{label:i[t]||"",value:"("+r+", "+a+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,n),c=o.axis,h=r.axis;for(let d=e;d<e+i;d++){const e=t[d],i=!s&&this.getParsed(d),u={},f=u[c]=s?o.getPixelForDecimal(.5):o.getPixelForValue(i[c]),p=u[h]=s?r.getBasePixel():r.getPixelForValue(i[h]);u.skip=isNaN(f)||isNaN(p),l&&(u.options=a||this.resolveDataElementOptions(d,e.active?"active":n),s&&(u.options.radius=0)),this.updateElement(e,d,u,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const s=n.radius;return"active"!==e&&(n.radius=0),n.radius+=Sn(i&&i._custom,s),n}},DoughnutController:Rr,LineController:class extends Or{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:s}=e,o=this.chart._animationsDisabled;let{start:r,count:a}=_s(e,n,o);this._drawStart=r,this._drawCount=a,ws(e)&&(r=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,r,a,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(e,n),d=o.axis,u=r.axis,{spanGaps:f,segment:p}=this.options,g=Zn(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||s||"none"===n,b=e+i,v=t.length;let y=e>0&&this.getParsed(e-1);for(let i=0;i<v;++i){const f=t[i],v=m?f:{};if(i<e||i>=b){v.skip=!0;continue}const x=this.getParsed(i),_=yn(x[u]),w=v[d]=o.getPixelForValue(x[d],i),k=v[u]=s||_?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,x,a):x[u],i);v.skip=isNaN(w)||isNaN(k)||_,v.stop=i>0&&Math.abs(x[d]-y[d])>g,p&&(v.parsed=x,v.raw=l.data[i]),h&&(v.options=c||this.resolveDataElementOptions(i,f.active?"active":n)),m||this.updateElement(f,i,v,n),y=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends Rr{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:jr,RadarController:class extends Or{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return Ao.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],s=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:s.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const s=this._cachedMeta.rScale,o="reset"===n;for(let r=e;r<e+i;r++){const e=t[r],i=this.resolveDataElementOptions(r,e.active?"active":n),a=s.getPointPositionForValue(r,this.getParsed(r).r),l=o?s.xCenter:a.x,c=o?s.yCenter:a.y,h={x:l,y:c,angle:a.angle,skip:isNaN(l)||isNaN(c),options:i};this.updateElement(e,r,h,n)}}},ScatterController:class extends Or{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,o=this.getParsed(t),r=n.getLabelForValue(o.x),a=s.getLabelForValue(o.y);return{label:i[t]||"",value:"("+r+", "+a+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:s,count:o}=_s(e,i,n);if(this._drawStart=s,this._drawCount=o,ws(e)&&(s=0,o=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:o}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=i;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment,this.updateElement(s,void 0,{animated:!n,options:r},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,s,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),d=this.includeOptions(n,h),u=o.axis,f=r.axis,{spanGaps:p,segment:g}=this.options,m=Zn(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||"none"===n;let v=e>0&&this.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=this.getParsed(c),p=b?e:{},y=yn(i[f]),x=p[u]=o.getPixelForValue(i[u],c),_=p[f]=s||y?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,i,a):i[f],c);p.skip=isNaN(x)||isNaN(_)||y,p.stop=c>0&&Math.abs(i[u]-v[u])>m,g&&(p.parsed=i,p.raw=l.data[c]),d&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),v=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const s=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,s,o)/2}}});function zr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Br{static override(t){Object.assign(Br.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return zr()}parse(){return zr()}format(){return zr()}add(){return zr()}diff(){return zr()}startOf(){return zr()}endOf(){return zr()}}var Nr=Br;function Wr(t,e,i,n){const{controller:s,data:o,_sorted:r}=t,a=s._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&"r"!==e&&r&&o.length){const r=a._reversePixels?fs:us;if(!n){const n=r(o,e,i);if(l){const{vScale:e}=s._cachedMeta,{_parsed:i}=t,o=i.slice(0,n.lo+1).reverse().findIndex(t=>!yn(t[e.axis]));n.lo-=Math.max(0,o);const r=i.slice(n.hi).findIndex(t=>!yn(t[e.axis]));n.hi+=Math.max(0,r)}return n}if(s._sharedOptions){const t=o[0],n="function"==typeof t.getRange&&t.getRange(e);if(n){const t=r(o,e,i-n),s=r(o,e,i+n);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function Vr(t,e,i,n,s){const o=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=o.length;t<i;++t){const{index:i,data:a}=o[t],{lo:l,hi:c}=Wr(o[t],e,r,s);for(let t=l;t<=c;++t){const e=a[t];e.skip||n(e,i,t)}}}function Hr(t,e,i,n,s){const o=[];if(!s&&!t.isPointInArea(e))return o;return Vr(t,i,e,function(i,r,a){(s||Xs(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&o.push({element:i,datasetIndex:r,index:a})},!0),o}function $r(t,e,i,n,s,o){let r=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const s=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}(i);let l=Number.POSITIVE_INFINITY;return Vr(t,i,e,function(i,c,h){const d=i.inRange(e.x,e.y,s);if(n&&!d)return;const u=i.getCenterPoint(s);if(!(!!o||t.isPointInArea(u))&&!d)return;const f=a(e,u);f<l?(r=[{element:i,datasetIndex:c,index:h}],l=f):f===l&&r.push({element:i,datasetIndex:c,index:h})}),r}function Ur(t,e,i,n,s,o){return o||t.isPointInArea(e)?"r"!==i||n?$r(t,e,i,n,s,o):function(t,e,i,n){let s=[];return Vr(t,i,e,function(t,i,o){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],n),{angle:l}=ss(t,{x:e.x,y:e.y});ls(l,r,a)&&s.push({element:t,datasetIndex:i,index:o})}),s}(t,e,i,s):[]}function qr(t,e,i,n,s){const o=[],r="x"===i?"inXRange":"inYRange";let a=!1;return Vr(t,i,e,(t,n,l)=>{t[r]&&t[r](e[i],s)&&(o.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,s))}),n&&!a?[]:o}var Yr={evaluateInteractionItems:Vr,modes:{index(t,e,i,n){const s=Vo(e,t),o=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?Hr(t,s,o,n,r):Ur(t,s,o,!1,n,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,n){const s=Vo(e,t),o=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?Hr(t,s,o,n,r):Ur(t,s,o,!1,n,r);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>Hr(t,Vo(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const s=Vo(e,t),o=i.axis||"xy",r=i.includeInvisible||!1;return Ur(t,s,o,i.intersect,n,r)},x:(t,e,i,n)=>qr(t,Vo(e,t),"x",i.intersect,n),y:(t,e,i,n)=>qr(t,Vo(e,t),"y",i.intersect,n)}};const Xr=["left","top","right","bottom"];function Gr(t,e){return t.filter(t=>t.pos===e)}function Jr(t,e){return t.filter(t=>-1===Xr.indexOf(t.pos)&&t.box.axis===e)}function Kr(t,e){return t.sort((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight})}function Qr(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!Xr.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let o,r,a;for(o=0,r=t.length;o<r;++o){a=t[o];const{fullSize:r}=a.box,l=i[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*n:r&&e.availableWidth,a.height=s):(a.width=n,a.height=c?c*s:r&&e.availableHeight)}return i}function Zr(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function ta(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function ea(t,e,i,n){const{pos:s,box:o}=i,r=t.maxPadding;if(!_n(s)){i.size&&(t[s]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[s]+=i.size}o.getPadding&&ta(r,o.getPadding());const a=Math.max(0,e.outerWidth-Zr(r,t,"left","right")),l=Math.max(0,e.outerHeight-Zr(r,t,"top","bottom")),c=a!==t.w,h=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function ia(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}return n(t?["left","right"]:["top","bottom"])}function na(t,e,i,n){const s=[];let o,r,a,l,c,h;for(o=0,r=t.length,c=0;o<r;++o){a=t[o],l=a.box,l.update(a.width||e.w,a.height||e.h,ia(a.horizontal,e));const{same:r,other:d}=ea(e,i,a,n);c|=r&&s.length,h=h||d,l.fullSize||s.push(a)}return c&&na(s,e,i,n)||h}function sa(t,e,i,n,s){t.top=i,t.left=e,t.right=e+n,t.bottom=i+s,t.width=n,t.height=s}function oa(t,e,i,n){const s=i.padding;let{x:o,y:r}=e;for(const a of t){const t=a.box,l=n[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/l.weight||1;if(a.horizontal){const n=e.w*c,o=l.size||t.height;zn(l.start)&&(r=l.start),t.fullSize?sa(t,s.left,r,i.outerWidth-s.right-s.left,o):sa(t,e.left+l.placed,r,n,o),l.start=r,l.placed+=n,r=t.bottom}else{const n=e.h*c,r=l.size||t.width;zn(l.start)&&(o=l.start),t.fullSize?sa(t,o,s.top,r,i.outerHeight-s.bottom-s.top):sa(t,o,e.top+l.placed,r,n),l.start=o,l.placed+=n,o=t.right}}e.x=o,e.y=r}var ra={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const s=ho(t.options.layout.padding),o=Math.max(e-s.width,0),r=Math.max(i-s.height,0),a=function(t){const e=function(t){const e=[];let i,n,s,o,r,a;for(i=0,n=(t||[]).length;i<n;++i)s=t[i],({position:o,options:{stack:r,stackWeight:a=1}}=s),e.push({index:i,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return e}(t),i=Kr(e.filter(t=>t.box.fullSize),!0),n=Kr(Gr(e,"left"),!0),s=Kr(Gr(e,"right")),o=Kr(Gr(e,"top"),!0),r=Kr(Gr(e,"bottom")),a=Jr(e,"x"),l=Jr(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:Gr(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;En(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},s);ta(u,ho(n));const f=Object.assign({maxPadding:u,w:o,h:r,x:s.left,y:s.top},s),p=Qr(l.concat(c),d);na(a.fullSize,f,d,p),na(l,f,d,p),na(c,f,d,p)&&na(l,f,d,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),oa(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,oa(a.rightAndBottom,f,d,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},En(a.chartArea,e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class aa{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class la extends aa{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const ca="$chartjs",ha={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},da=t=>null===t||""===t;const ua=!!qo&&{passive:!0};function fa(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,ua)}function pa(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function ga(t,e,i){const n=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||pa(i.addedNodes,n),e=e&&!pa(i.removedNodes,n);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}function ma(t,e,i){const n=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||pa(i.removedNodes,n),e=e&&!pa(i.addedNodes,n);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}const ba=new Map;let va=0;function ya(){const t=window.devicePixelRatio;t!==va&&(va=t,ba.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function xa(t,e,i){const n=t.canvas,s=n&&Fo(n);if(!s)return;const o=vs((t,e)=>{const n=s.clientWidth;i(t,e),n<s.clientWidth&&i()},window),r=new ResizeObserver(t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)});return r.observe(s),function(t,e){ba.size||window.addEventListener("resize",ya),ba.set(t,e)}(t,o),r}function _a(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){ba.delete(t),ba.size||window.removeEventListener("resize",ya)}(t)}function wa(t,e,i){const n=t.canvas,s=vs(e=>{null!==t.ctx&&i(function(t,e){const i=ha[t.type]||t.type,{x:n,y:s}=Vo(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==s?s:null}}(e,t))},t);return function(t,e,i){t&&t.addEventListener(e,i,ua)}(n,e,s),s}class ka extends aa{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");if(t[ca]={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",da(s)){const e=Yo(t,"width");void 0!==e&&(t.width=e)}if(da(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Yo(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[ca])return!1;const i=e[ca].initial;["height","width"].forEach(t=>{const n=i[t];yn(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e[ca],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:ga,detach:ma,resize:xa}[e]||wa;n[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:_a,detach:_a,resize:_a}[e]||fa)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return $o(t,e,i,n)}isAttached(t){const e=t&&Fo(t);return!(!e||!e.isConnected)}}class Sa{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Zn(this.x)&&Zn(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}function Ma(t,e){const i=t.options.ticks,n=function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),s=t._maxLength/i;return Math.floor(Math.min(n,s))}(t),s=Math.min(i.maxTicksLimit||n,n),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>s)return function(t,e,i,n){let s,o=0,r=i[0];for(n=Math.ceil(n),s=0;s<t.length;s++)s===r&&(e.push(t[s]),o++,r=i[o*n])}(e,c,o,r/s),c;const h=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),s=e.length/i;if(!n)return Math.max(s,1);const o=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n===0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}(n);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>s)return e}return Math.max(s,1)}(o,e,s);if(r>0){let t,i;const n=r>1?Math.round((l-a)/(r-1)):null;for(Oa(e,c,h,yn(n)?0:a-n,a),t=0,i=r-1;t<i;t++)Oa(e,c,h,o[t],o[t+1]);return Oa(e,c,h,l,yn(n)?e.length:l+n),c}return Oa(e,c,h),c}function Oa(t,e,i,n,s){const o=Sn(n,0),r=Math.min(Sn(s,t.length),t.length);let a,l,c,h=0;for(i=Math.ceil(i),s&&(a=s-n,i=a/Math.floor(a/i)),c=o;c<0;)h++,c=Math.round(o+h*i);for(l=Math.max(o,0);l<r;l++)l===c&&(e.push(t[l]),h++,c=Math.round(o+h*i))}const Ea=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Aa=(t,e)=>Math.min(e||t,t);function Ta(t,e){const i=[],n=t.length/e,s=t.length;let o=0;for(;o<s;o+=n)i.push(t[Math.floor(o)]);return i}function Ca(t,e,i){const n=t.ticks.length,s=Math.min(e,n-1),o=t._startPixel,r=t._endPixel,a=1e-6;let l,c=t.getPixelForTick(s);if(!(i&&(l=1===n?Math.max(c-o,r-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(s-1))/2,c+=s<e?l:-l,c<o-a||c>r+a)))return c}function La(t){return t.drawTicks?t.tickLength:0}function Pa(t,e){if(!t.display)return 0;const i=uo(t.font,e),n=ho(t.padding);return(xn(t.text)?t.text.length:1)*i.lineHeight+n.height}function Da(t,e,i){let n=ys(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class Ia extends Sa{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=kn(t,Number.POSITIVE_INFINITY),e=kn(e,Number.NEGATIVE_INFINITY),i=kn(i,Number.POSITIVE_INFINITY),n=kn(n,Number.NEGATIVE_INFINITY),{min:kn(t,i),max:kn(e,n),minDefined:wn(t),maxDefined:wn(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:s,maxDefined:o}=this.getUserBounds();if(s&&o)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;a<l;++a)e=r[a].controller.getMinMax(this,t),s||(i=Math.min(i,e.min)),o||(n=Math.max(n,e.max));return i=o&&i>n?n:i,n=s&&i>n?i:n,{min:kn(i,kn(n,i)),max:kn(n,kn(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){On(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:s,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:s}=t,o=Mn(e,(s-n)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(n,-Math.abs(o)),max:r(s,o)}}(this,s,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?Ta(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=Ma(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){On(this.options.afterUpdate,[this])}beforeSetDimensions(){On(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){On(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),On(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){On(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,s;for(i=0,n=t.length;i<n;i++)s=t[i],s.label=On(e.callback,[s.value,i,t],this)}afterTickToLabelConversion(){On(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){On(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Aa(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,s=e.maxRotation;let o,r,a,l=n;if(!this._isVisible()||!e.display||n>=s||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,d=c.highest.height,u=cs(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),h+6>o&&(o=u/(i-(t.offset?.5:1)),r=this.maxHeight-La(t.grid)-e.padding-Pa(t.title,this.chart.options.font),a=Math.sqrt(h*h+d*d),l=is(Math.min(Math.asin(cs((c.highest.height+6)/o,-1,1)),Math.asin(cs(r/a,-1,1))-Math.asin(cs(d/a,-1,1)))),l=Math.max(n,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){On(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){On(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:s}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const o=Pa(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=La(s)+o):(t.height=this.maxHeight,t.width=La(s)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:s,highest:o}=this._getLabelSizes(),a=2*i.padding,l=es(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(r){const e=i.mirror?0:h*s.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*s.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:o},position:r}=this.options,a=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;a?l?(h=n*t.width,d=i*e.height):(h=i*t.height,d=n*e.width):"start"===s?d=e.width:"end"===s?h=t.width:"inner"!==s&&(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-r+o)*this.width/(this.width-r),0),this.paddingRight=Math.max((d-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){On(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)yn(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Ta(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:n,_longestTextCache:s}=this,o=[],r=[],a=Math.floor(e/Aa(e,i));let l,c,h,d,u,f,p,g,m,b,v,y=0,x=0;for(l=0;l<e;l+=a){if(d=t[l].label,u=this._resolveTickFontOptions(l),n.font=f=u.string,p=s[f]=s[f]||{data:{},gc:[]},g=u.lineHeight,m=b=0,yn(d)||xn(d)){if(xn(d))for(c=0,h=d.length;c<h;++c)v=d[c],yn(v)||xn(v)||(m=Vs(n,p.data,p.gc,m,v),b+=g)}else m=Vs(n,p.data,p.gc,m,d),b=g;o.push(m),r.push(b),y=Math.max(m,y),x=Math.max(b,x)}!function(t,e){En(t,t=>{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s<n;++s)delete t.data[i[s]];i.splice(0,n)}})}(s,e);const _=o.indexOf(y),w=r.indexOf(x),k=t=>({width:o[t]||0,height:r[t]||0});return{first:k(0),last:k(e-1),widest:k(_),highest:k(w),widths:o,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return cs(this._alignToPixels?$s(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return po(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=po(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=es(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,r=s?s.widest.width+o:0,a=s?s.highest.height+o:0;return this.isHorizontal()?a*i>r*n?r/i:a/n:a*n<r*i?a/i:r/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:s,position:o,border:r}=n,a=s.offset,l=this.isHorizontal(),c=this.ticks.length+(a?1:0),h=La(s),d=[],u=r.setContext(this.getContext()),f=u.display?u.width:0,p=f/2,g=function(t){return $s(i,t,f)};let m,b,v,y,x,_,w,k,S,M,O,E;if("top"===o)m=g(this.bottom),_=this.bottom-h,k=m-p,M=g(t.top)+p,E=t.bottom;else if("bottom"===o)m=g(this.top),M=t.top,E=g(t.bottom)-p,_=m+p,k=this.top+h;else if("left"===o)m=g(this.right),x=this.right-h,w=m-p,S=g(t.left)+p,O=t.right;else if("right"===o)m=g(this.left),S=t.left,O=g(t.right)-p,x=m+p,w=this.left+h;else if("x"===e){if("center"===o)m=g((t.top+t.bottom)/2+.5);else if(_n(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}M=t.top,E=t.bottom,_=m+p,k=_+h}else if("y"===e){if("center"===o)m=g((t.left+t.right)/2);else if(_n(o)){const t=Object.keys(o)[0],e=o[t];m=g(this.chart.scales[t].getPixelForValue(e))}x=m-p,w=x-h,S=t.left,O=t.right}const A=Sn(n.ticks.maxTicksLimit,c),T=Math.max(1,Math.ceil(c/A));for(b=0;b<c;b+=T){const t=this.getContext(b),e=s.setContext(t),n=r.setContext(t),o=e.lineWidth,c=e.color,h=n.dash||[],u=n.dashOffset,f=e.tickWidth,p=e.tickColor,g=e.tickBorderDash||[],m=e.tickBorderDashOffset;v=Ca(this,b,a),void 0!==v&&(y=$s(i,v,o),l?x=w=S=O=y:_=k=M=E=y,d.push({tx1:x,ty1:_,tx2:w,ty2:k,x1:S,y1:M,x2:O,y2:E,width:o,color:c,borderDash:h,borderDashOffset:u,tickWidth:f,tickColor:p,tickBorderDash:g,tickBorderDashOffset:m}))}return this._ticksLength=c,this._borderValue=m,d}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:s}=i,o=this.isHorizontal(),r=this.ticks,{align:a,crossAlign:l,padding:c,mirror:h}=s,d=La(i.grid),u=d+c,f=h?-c:u,p=-es(this.labelRotation),g=[];let m,b,v,y,x,_,w,k,S,M,O,E,A="middle";if("top"===n)_=this.bottom-f,w=this._getXAxisLabelAlignment();else if("bottom"===n)_=this.top+f,w=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,x=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(d);w=t.textAlign,x=t.x}else if("x"===e){if("center"===n)_=(t.top+t.bottom)/2+u;else if(_n(n)){const t=Object.keys(n)[0],e=n[t];_=this.chart.scales[t].getPixelForValue(e)+u}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)x=(t.left+t.right)/2-u;else if(_n(n)){const t=Object.keys(n)[0],e=n[t];x=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(d).textAlign}"y"===e&&("start"===a?A="top":"end"===a&&(A="bottom"));const T=this._getLabelSizes();for(m=0,b=r.length;m<b;++m){v=r[m],y=v.label;const t=s.setContext(this.getContext(m));k=this.getPixelForTick(m)+s.labelOffset,S=this._resolveTickFontOptions(m),M=S.lineHeight,O=xn(y)?y.length:1;const e=O/2,i=t.color,a=t.textStrokeColor,c=t.textStrokeWidth;let d,u=w;if(o?(x=k,"inner"===w&&(u=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),E="top"===n?"near"===l||0!==p?-O*M+M/2:"center"===l?-T.highest.height/2-e*M+M:-T.highest.height+M/2:"near"===l||0!==p?M/2:"center"===l?T.highest.height/2-e*M:T.highest.height-O*M,h&&(E*=-1),0===p||t.showLabelBackdrop||(x+=M/2*Math.sin(p))):(_=k,E=(1-O)*M/2),t.showLabelBackdrop){const e=ho(t.backdropPadding),i=T.heights[m],n=T.widths[m];let s=E-e.top,o=0-e.left;switch(A){case"middle":s-=i/2;break;case"bottom":s-=i}switch(w){case"center":o-=n/2;break;case"right":o-=n;break;case"inner":m===b-1?o-=n:m>0&&(o-=n/2)}d={left:o,top:s,width:n+e.width,height:i+e.height,color:t.backdropColor}}g.push({label:y,font:S,textOffset:E,options:{rotation:p,color:i,strokeColor:a,strokeWidth:c,textAlign:u,textBaseline:A,translation:[x,_],backdrop:d}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-es(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:s}}=this.options,o=t+s,r=this._getLabelSizes().widest.width;let a,l;return"left"===e?n?(l=this.right+s,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l+=r)):(l=this.right-o,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l=this.left)):"right"===e?n?(l=this.left+s,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l-=r)):(l=this.left+o,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:s,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,s,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(e=>e.value===t);if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const r=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,o=n.length;s<o;++s){const t=n[s];e.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:n}}=this,s=i.setContext(this.getContext()),o=i.display?s.width:0;if(!o)return;const r=n.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,c,h,d;this.isHorizontal()?(l=$s(t,this.left,o)-o/2,c=$s(t,this.right,r)+r/2,h=d=a):(h=$s(t,this.top,o)-o/2,d=$s(t,this.bottom,r)+r/2,l=c=a),e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.beginPath(),e.moveTo(l,h),e.lineTo(c,d),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&Gs(e,i);const n=this.getLabelItems(t);for(const t of n){const i=t.options,n=t.font;eo(e,t.label,0,t.textOffset,n,i)}i&&Js(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=uo(i.font),o=ho(i.padding),r=i.align;let a=s.lineHeight/2;"bottom"===e||"center"===e||_n(e)?(a+=o.bottom,xn(i.text)&&(a+=s.lineHeight*(i.text.length-1))):a+=o.top;const{titleX:l,titleY:c,maxWidth:h,rotation:d}=function(t,e,i,n){const{top:s,left:o,bottom:r,right:a,chart:l}=t,{chartArea:c,scales:h}=l;let d,u,f,p=0;const g=r-s,m=a-o;if(t.isHorizontal()){if(u=xs(n,o,a),_n(i)){const t=Object.keys(i)[0],n=i[t];f=h[t].getPixelForValue(n)+g-e}else f="center"===i?(c.bottom+c.top)/2+g-e:Ea(t,i,e);d=a-o}else{if(_n(i)){const t=Object.keys(i)[0],n=i[t];u=h[t].getPixelForValue(n)-m+e}else u="center"===i?(c.left+c.right)/2-m+e:Ea(t,i,e);f=xs(n,r,s),p="left"===i?-qn:qn}return{titleX:u,titleY:f,maxWidth:d,rotation:p}}(this,a,e,r);eo(t,i.text,0,0,s,{color:i.color,maxWidth:h,rotation:d,textAlign:Da(r,e,n),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=Sn(t.grid&&t.grid.z,-1),n=Sn(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Ia.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,o;for(s=0,o=e.length;s<o;++s){const o=e[s];o[i]!==this.id||t&&o.type!==t||n.push(o)}return n}_resolveTickFontOptions(t){return uo(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ra{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in n||(n[s]=t,function(t,e,i){const n=Pn(Object.create(null),[i?Ws.get(i):{},Ws.get(e),t.defaults]);Ws.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(i=>{const n=i.split("."),s=n.pop(),o=[t].concat(n).join("."),r=e[i].split("."),a=r.pop(),l=r.join(".");Ws.route(o,s,l,a)})}(e,t.defaultRoutes);t.descriptors&&Ws.describe(e,t.descriptors)}(t,o,i),this.override&&Ws.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Ws[n]&&(delete Ws[n][i],this.override&&delete js[i])}}class ja{constructor(){this.controllers=new Ra(Or,"datasets",!0),this.elements=new Ra(Sa,"elements"),this.plugins=new Ra(Object,"plugins"),this.scales=new Ra(Ia,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):En(e,e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){const n=Fn(t);On(i["before"+n],[],i),e[t](i),On(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var Fa=new ja;class za{constructor(){this._init=void 0}notify(t,e,i,n){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const s=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(s,t,e,i);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,e,i,n){n=n||{};for(const s of t){const t=s.plugin;if(!1===On(t[i],[e,n,s.options],t)&&n.cancelable)return!1}return!0}invalidate(){yn(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=Sn(i.options&&i.options.plugins,{}),s=function(t){const e={},i=[],n=Object.keys(Fa.plugins.items);for(let t=0;t<n.length;t++)i.push(Fa.getPlugin(n[t]));const s=t.plugins||[];for(let t=0;t<s.length;t++){const n=s[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,s){const o=[],r=t.getContext();for(const a of e){const e=a.id,l=Ba(n[e],s);null!==l&&o.push({plugin:a,options:Na(t.config,{plugin:a,local:i[e]},l,r)})}return o}(t,s,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Ba(t,e){return e||!1!==t?!0===t?{}:t:null}function Na(t,{plugin:e,local:i},n,s){const o=t.pluginScopeKeys(e),r=t.getOptionScopes(n,o);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Wa(t,e){const i=Ws.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Va(t){if("x"===t||"y"===t||"r"===t)return t}function Ha(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function $a(t,...e){if(Va(t))return t;for(const i of e){const e=i.axis||Ha(i.position)||t.length>1&&Va(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Ua(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function qa(t,e){const i=js[t.type]||{scales:{}},n=e.scales||{},s=Wa(t.type,e),o=Object.create(null);return Object.keys(n).forEach(e=>{const r=n[e];if(!_n(r))return console.error(`Invalid scale configuration for scale: ${e}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const a=$a(e,r,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(i.length)return Ua(t,"x",i[0])||Ua(t,"y",i[0])}return{}}(e,t),Ws.scales[r.type]),l=function(t,e){return t===e?"_index_":"_value_"}(a,s),c=i.scales||{};o[e]=Dn(Object.create(null),[{axis:a},r,c[a],c[l]])}),t.data.datasets.forEach(i=>{const s=i.type||t.type,r=i.indexAxis||Wa(s,e),a=(js[s]||{}).scales||{};Object.keys(a).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),s=i[e+"AxisID"]||e;o[s]=o[s]||Object.create(null),Dn(o[s],[{axis:e},n[s],a[t]])})}),Object.keys(o).forEach(t=>{const e=o[t];Dn(e,[Ws.scales[e.type],Ws.scale])}),o}function Ya(t){const e=t.options||(t.options={});e.plugins=Sn(e.plugins,{}),e.scales=qa(t,e)}function Xa(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Ga=new Map,Ja=new Set;function Ka(t,e){let i=Ga.get(t);return i||(i=e(),Ga.set(t,i),Ja.add(i)),i}const Qa=(t,e,i)=>{const n=jn(e,i);void 0!==n&&t.add(n)};class Za{constructor(t){this._config=function(t){return(t=t||{}).data=Xa(t.data),Ya(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Xa(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Ya(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ka(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ka(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ka(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return Ka(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:s}=this,o=this._cachedScopes(t,i),r=o.get(e);if(r)return r;const a=new Set;e.forEach(e=>{t&&(a.add(t),e.forEach(e=>Qa(a,t,e))),e.forEach(t=>Qa(a,n,t)),e.forEach(t=>Qa(a,js[s]||{},t)),e.forEach(t=>Qa(a,Ws,t)),e.forEach(t=>Qa(a,Fs,t))});const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),Ja.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,js[e]||{},Ws.datasets[e]||{},{type:e},Ws,Fs]}resolveNamedOptions(t,e,i,n=[""]){const s={$shared:!0},{resolver:o,subPrefixes:r}=tl(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=bo(t);for(const s of e){const e=i(s),o=n(s),r=(o||e)&&t[s];if(e&&(Bn(r)||el(r))||o&&xn(r))return!0}return!1}(o,e)){s.$shared=!1;a=mo(o,i=Bn(i)?i():i,this.createResolver(t,i,r))}for(const t of e)s[t]=a[t];return s}createResolver(t,e,i=[""],n){const{resolver:s}=tl(this._resolverCache,t,i);return _n(e)?mo(s,e,void 0,n):s}}function tl(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const s=i.join();let o=n.get(s);if(!o){o={resolver:go(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(s,o)}return o}const el=t=>_n(t)&&Object.getOwnPropertyNames(t).some(e=>Bn(t[e]));const il=["top","bottom","left","right","chartArea"];function nl(t,e){return"top"===t||"bottom"===t||-1===il.indexOf(t)&&"x"===e}function sl(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function ol(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),On(i&&i.onComplete,[t],e)}function rl(t){const e=t.chart,i=e.options.animation;On(i&&i.onProgress,[t],e)}function al(t){return jo()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ll={},cl=t=>{const e=al(t);return Object.values(ll).filter(t=>t.canvas===e).pop()};function hl(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const o=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=o)}}}class dl{static defaults=Ws;static instances=ll;static overrides=js;static registry=Fa;static version="4.5.1";static getChart=cl;static register(...t){Fa.add(...t),ul()}static unregister(...t){Fa.remove(...t),ul()}constructor(t,e){const i=this.config=new Za(e),n=al(t),s=cl(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!jo()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?la:ka}(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,o.aspectRatio),a=r&&r.canvas,l=a&&a.height,c=a&&a.width;this.id=vn(),this.ctx=r,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new za,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}(t=>this.update(t),o.resizeDelay||0),this._dataChanges=[],ll[this.id]=this,r&&a?(hr.listen(this,"complete",ol),hr.listen(this,"progress",rl),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:s}=this;return yn(t)?e&&s?s:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Fa}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Uo(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Us(this.canvas,this.ctx),this}stop(){return hr.stop(this),this}resize(t,e){hr.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,s),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Uo(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),On(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){En(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let s=[];e&&(s=s.concat(Object.keys(e).map(t=>{const i=e[t],n=$a(t,i),s="r"===n,o="x"===n;return{options:i,dposition:s?"chartArea":o?"bottom":"left",dtype:s?"radialLinear":o?"category":"linear"}}))),En(s,e=>{const s=e.options,o=s.id,r=$a(o,s),a=Sn(s.type,e.dtype);void 0!==s.position&&nl(s.position,r)===nl(e.dposition)||(s.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(Fa.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(s,t)}),En(n,(t,e)=>{t||delete i[e]}),En(i,t=>{ra.configure(this,t,t.options),ra.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(sl("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let s=this.getDatasetMeta(i);const o=n.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=o,s.indexAxis=n.indexAxis||Wa(o,this.options),s.order=n.order||0,s.index=i,s.label=""+n.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const e=Fa.getController(o),{datasetElementType:n,dataElementType:r}=Ws.datasets[o];Object.assign(e,{dataElementType:Fa.getElement(r),datasetElementType:n&&Fa.getElement(n)}),s.controller=new e(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){En(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===s.indexOf(e);e.buildOrUpdateElements(i),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),n||En(s,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(sl("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){En(this.scales,t=>{ra.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Nn(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e){hl(t,n,"_removeElements"===i?-s:s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;t<e;t++)if(!Nn(n,i(t)))return;return Array.from(n).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ra.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],En(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Bn(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(hr.has(this)?this.attached&&!hr.running(this)&&hr.start(this):(this.draw(),ol({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,s;for(n=0,s=e.length;n<s;++n){const s=e[n];t&&!s.visible||i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},n=lr(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(n&&Gs(e,n),t.controller.draw(),n&&Js(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return Xs(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const s=Yr.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=po(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,n);zn(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(s,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),hr.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Us(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete ll[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};En(this.options.events,t=>i(t,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():o()}unbindEvents(){En(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},En(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,o,r,a;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),r=0,a=t.length;r<a;++r){o=t[r];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[n+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!An(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),o=s(e,t),r=i?t:s(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:s}=this,o=e,r=this._getActiveElements(t,n,i,o),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,On(s.onHover,[t,r,this],this),a&&On(s.onClick,[t,r,this],this));const c=!An(r,n);return(c||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}function ul(){return En(dl.instances,t=>t._plugins.invalidate())}function fl(t,e,i,n){const s=ao(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,r=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return cs(t,0,Math.min(o,e))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:cs(s.innerStart,0,r),innerEnd:cs(s.innerEnd,0,r)}}function pl(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function gl(t,e,i,n,s,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=e,d=Math.max(e.outerRadius+n+i-c,0),u=h>0?h+n+i+c:0;let f=0;const p=s-l;if(n){const t=((h>0?h-n:0)+(d>0?d-n:0))/2;f=(p-(0!==t?p*t/(t+n):p))/2}const g=(p-Math.max(.001,p*d-i/Wn)/d)/2,m=l+g+f,b=s-g-f,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:_}=fl(e,u,d,b-m),w=d-v,k=d-y,S=m+v/w,M=b-y/k,O=u+x,E=u+_,A=m+x/O,T=b-_/E;if(t.beginPath(),o){const e=(S+M)/2;if(t.arc(r,a,d,S,e),t.arc(r,a,d,e,M),y>0){const e=pl(k,M,r,a);t.arc(e.x,e.y,y,M,b+qn)}const i=pl(E,b,r,a);if(t.lineTo(i.x,i.y),_>0){const e=pl(E,T,r,a);t.arc(e.x,e.y,_,b+qn,T+Math.PI)}const n=(b-_/u+(m+x/u))/2;if(t.arc(r,a,u,b-_/u,n,!0),t.arc(r,a,u,n,m+x/u,!0),x>0){const e=pl(O,A,r,a);t.arc(e.x,e.y,x,A+Math.PI,m-qn)}const s=pl(w,m,r,a);if(t.lineTo(s.x,s.y),v>0){const e=pl(w,S,r,a);t.arc(e.x,e.y,v,m-qn,S)}}else{t.moveTo(r,a);const e=Math.cos(S)*d+r,i=Math.sin(S)*d+a;t.lineTo(e,i);const n=Math.cos(M)*d+r,s=Math.sin(M)*d+a;t.lineTo(n,s)}t.closePath()}function ml(t,e,i,n,s){const{fullCircles:o,startAngle:r,circumference:a,options:l}=e,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:f}=l,p="inner"===l.borderAlign;if(!c)return;t.setLineDash(d||[]),t.lineDashOffset=u,p?(t.lineWidth=2*c,t.lineJoin=h||"round"):(t.lineWidth=c,t.lineJoin=h||"bevel");let g=e.endAngle;if(o){gl(t,e,i,n,g,s);for(let e=0;e<o;++e)t.stroke();isNaN(a)||(g=r+(a%Vn||Vn))}p&&function(t,e,i){const{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=e;let c=s/a;t.beginPath(),t.arc(o,r,a,n-c,i+c),l>s?(c=s/l,t.arc(o,r,l,i+c,n-c,!0)):t.arc(o,r,s,i+qn,n-qn),t.closePath(),t.clip()}(t,e,g),l.selfJoin&&g-r>=Wn&&0===f&&"miter"!==h&&function(t,e,i){const{startAngle:n,x:s,y:o,outerRadius:r,innerRadius:a,options:l}=e,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/r,as(n-i));if(t.beginPath(),t.arc(s,o,r-c/2,n+d/2,i-d/2),a>0){const e=Math.min(c/a,as(n-i));t.arc(s,o,a+c/2,i-e/2,n+e/2,!0)}else{const e=Math.min(c/2,r*as(n-i));if("round"===h)t.arc(s,o,e,i-Wn/2,n+Wn/2,!0);else if("bevel"===h){const r=2*e*e,a=-r*Math.cos(i+Wn/2)+s,l=-r*Math.sin(i+Wn/2)+o,c=r*Math.cos(n+Wn/2)+s,h=r*Math.sin(n+Wn/2)+o;t.lineTo(a,l),t.lineTo(c,h)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,g),o||(gl(t,e,i,n,g,s),t.stroke())}function bl(t,e,i=e){t.lineCap=Sn(i.borderCapStyle,e.borderCapStyle),t.setLineDash(Sn(i.borderDash,e.borderDash)),t.lineDashOffset=Sn(i.borderDashOffset,e.borderDashOffset),t.lineJoin=Sn(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Sn(i.borderWidth,e.borderWidth),t.strokeStyle=Sn(i.borderColor,e.borderColor)}function vl(t,e,i){t.lineTo(i.x,i.y)}function yl(t,e,i={}){const n=t.length,{start:s=0,end:o=n-1}=i,{start:r,end:a}=e,l=Math.max(s,r),c=Math.min(o,a),h=s<r&&o<r||s>a&&o>a;return{count:n,start:l,loop:e.loop,ilen:c<l&&!h?n+c-l:c-l}}function xl(t,e,i,n){const{points:s,options:o}=e,{count:r,start:a,loop:l,ilen:c}=yl(s,i,n),h=function(t){return t.stepped?Ks:t.tension||"monotone"===t.cubicInterpolationMode?Qs:vl}(o);let d,u,f,{move:p=!0,reverse:g}=n||{};for(d=0;d<=c;++d)u=s[(a+(g?c-d:d))%r],u.skip||(p?(t.moveTo(u.x,u.y),p=!1):h(t,f,u,g,o.stepped),f=u);return l&&(u=s[(a+(g?c:0))%r],h(t,f,u,g,o.stepped)),!!l}function _l(t,e,i,n){const s=e.points,{count:o,start:r,ilen:a}=yl(s,i,n),{move:l=!0,reverse:c}=n||{};let h,d,u,f,p,g,m=0,b=0;const v=t=>(r+(c?a-t:t))%o,y=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(d=s[v(0)],t.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=s[v(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>p&&(p=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),u=n,b=0,f=p=i),g=i}y()}function wl(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?_l:xl}const kl="function"==typeof Path2D;function Sl(t,e,i,n){kl&&!e.options.segment?function(t,e,i,n){let s=e._path;s||(s=e._path=new Path2D,e.path(s,i,n)&&s.closePath()),bl(t,e.options),t.stroke(s)}(t,e,i,n):function(t,e,i,n){const{segments:s,options:o}=e,r=wl(e);for(const a of s)bl(t,o,a.style),t.beginPath(),r(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Ml extends Sa{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ro(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const o=!!t._loop,{start:r,end:a}=function(t,e,i,n){let s=0,o=e-1;if(i&&!n)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,i&&(o+=s);o>s&&t[o%e].skip;)o--;return o%=e,{start:s,end:o}}(i,s,o,n);return sr(t,!0===n?[{start:r,end:a,loop:o}]:function(t,e,i,n){const s=t.length,o=[];let r,a=e,l=t[e];for(r=e+1;r<=i;++r){const i=t[r%s];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%s,end:(r-1)%s,loop:n}),e=a=i.stop?r:null):(a=r,l.skip&&(e=r)),l=i}return null!==a&&o.push({start:e%s,end:a%s,loop:n}),o}(i,r,a<r?a+s:a,!!t._fullLoop&&0===r&&a===s-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],s=this.points,o=nr(this,{property:e,start:n,end:n});if(!o.length)return;const r=[],a=function(t){return t.stepped?Go:t.tension||"monotone"===t.cubicInterpolationMode?Jo:Xo}(i);let l,c;for(l=0,c=o.length;l<c;++l){const{start:c,end:h}=o[l],d=s[c],u=s[h];if(d===u){r.push(d);continue}const f=a(d,u,Math.abs((n-d[e])/(u[e]-d[e])),i.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return wl(this)(t,this,e,i)}path(t,e,i){const n=this.segments,s=wl(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const r of n)o&=s(t,this,r,{start:e,end:e+i-1});return!!o}draw(t,e,i,n){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),Sl(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ol(t,e,i,n){const s=t.options,{[i]:o}=t.getProps([i],n);return Math.abs(e-o)<s.radius+s.hitRadius}function El(t,e){const{x:i,y:n,base:s,width:o,height:r}=t.getProps(["x","y","base","width","height"],e);let a,l,c,h,d;return t.horizontal?(d=r/2,a=Math.min(i,s),l=Math.max(i,s),c=n-d,h=n+d):(d=o/2,a=i-d,l=i+d,c=Math.min(n,s),h=Math.max(n,s)),{left:a,top:c,right:l,bottom:h}}function Al(t,e,i,n){return t?0:cs(e,i,n)}function Tl(t){const e=El(t),i=e.right-e.left,n=e.bottom-e.top,s=function(t,e,i){const n=t.options.borderWidth,s=t.borderSkipped,o=lo(n);return{t:Al(s.top,o.top,0,i),r:Al(s.right,o.right,0,e),b:Al(s.bottom,o.bottom,0,i),l:Al(s.left,o.left,0,e)}}(t,i/2,n/2),o=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,o=co(s),r=Math.min(e,i),a=t.borderSkipped,l=n||_n(s);return{topLeft:Al(!l||a.top||a.left,o.topLeft,0,r),topRight:Al(!l||a.top||a.right,o.topRight,0,r),bottomLeft:Al(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Al(!l||a.bottom||a.right,o.bottomRight,0,r)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:i-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Cl(t,e,i,n){const s=null===e,o=null===i,r=t&&!(s&&o)&&El(t,n);return r&&(s||hs(e,r.left,r.right))&&(o||hs(i,r.top,r.bottom))}function Ll(t,e){t.rect(e.x,e.y,e.w,e.h)}function Pl(t,e,i={}){const n=t.x!==i.x?-e:0,s=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,r=(t.y+t.h!==i.y+i.h?e:0)-s;return{x:t.x+n,y:t.y+s,w:t.w+o,h:t.h+r,radius:t.radius}}var Dl=Object.freeze({__proto__:null,ArcElement:class extends Sa{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:s,distance:o}=ss(n,{x:t,y:e}),{startAngle:r,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,u=Sn(h,a-r),f=ls(s,r,a)&&r!==a,p=u>=Vn||f,g=hs(o,l+d,c+d);return p&&g}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:s,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:a,spacing:l}=this.options,c=(n+s)/2,h=(o+r+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/4,s=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Vn?Math.floor(i/Vn):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*n,Math.sin(r)*n);const a=n*(1-Math.sin(Math.min(Wn,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,n,s){const{fullCircles:o,startAngle:r,circumference:a}=e;let l=e.endAngle;if(o){gl(t,e,i,n,l,s);for(let e=0;e<o;++e)t.fill();isNaN(a)||(l=r+(a%Vn||Vn))}gl(t,e,i,n,l,s),t.fill()}(t,this,a,s,o),ml(t,this,a,s,o),t.restore()}},BarElement:class extends Sa{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:s,outer:o}=Tl(this),r=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?io:Ll;var a;t.save(),o.w===s.w&&o.h===s.h||(t.beginPath(),r(t,Pl(o,e,s)),t.clip(),r(t,Pl(s,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,Pl(s,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Cl(this,t,e,i)}inXRange(t,e){return Cl(this,t,null,e)}inYRange(t,e){return Cl(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+n)/2:e,y:s?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},LineElement:Ml,PointElement:class extends Sa{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-o,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ol(this,t,"x",e)}inYRange(t,e){return Ol(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Xs(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,qs(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}});const Il=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Rl=Il.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function jl(t){return Il[t%Il.length]}function Fl(t){return Rl[t%Rl.length]}function zl(t){let e=0;return(i,n)=>{const s=t.getDatasetMeta(n).controller;s instanceof Rr?e=function(t,e){return t.backgroundColor=t.data.map(()=>jl(e++)),e}(i,e):s instanceof jr?e=function(t,e){return t.backgroundColor=t.data.map(()=>Fl(e++)),e}(i,e):s&&(e=function(t,e){return t.borderColor=jl(e),t.backgroundColor=Fl(e),++e}(i,e))}}function Bl(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Nl={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:n},options:s}=t.config,{elements:o}=s,r=Bl(n)||(a=s)&&(a.borderColor||a.backgroundColor)||o&&Bl(o)||"rgba(0,0,0,0.1)"!==Ws.borderColor||"rgba(0,0,0,0.1)"!==Ws.backgroundColor;var a;if(!i.forceOverride&&r)return;const l=zl(t);n.forEach(l)}};function Wl(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Vl(t){t.data.datasets.forEach(t=>{Wl(t)})}var Hl={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Vl(t);const n=t.width;t.data.datasets.forEach((e,s)=>{const{_data:o,indexAxis:r}=e,a=t.getDatasetMeta(s),l=o||e.data;if("y"===fo([r,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:d}=function(t,e){const i=e.length;let n,s=0;const{iScale:o}=t,{min:r,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(s=cs(us(e,o.axis,r).lo,0,i-1)),n=c?cs(us(e,o.axis,a).hi+1,s,i)-s:i-s,{start:s,count:n}}(a,l);if(d<=(i.threshold||4*n))return void Wl(e);let u;switch(yn(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,n,s){const o=s.samples||n;if(o>=i)return t.slice(e,e+i);const r=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,d,u,f,p,g=e;for(r[l++]=t[g],h=0;h<o-2;h++){let n,s=0,o=0;const c=Math.floor((h+1)*a)+1+e,m=Math.min(Math.floor((h+2)*a)+1,i)+e,b=m-c;for(n=c;n<m;n++)s+=t[n].x,o+=t[n].y;s/=b,o/=b;const v=Math.floor(h*a)+1+e,y=Math.min(Math.floor((h+1)*a)+1,i)+e,{x,y:_}=t[g];for(u=f=-1,n=v;n<y;n++)f=.5*Math.abs((x-s)*(t[n].y-_)-(x-t[n].x)*(o-_)),f>u&&(u=f,d=t[n],p=n);r[l++]=d,g=p}return r[l++]=t[c],r}(l,h,d,n,i);break;case"min-max":u=function(t,e,i,n){let s,o,r,a,l,c,h,d,u,f,p=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(s=e;s<e+i;++s){o=t[s],r=(o.x-v)/y*n,a=o.y;const e=0|r;if(e===l)a<u?(u=a,c=s):a>f&&(f=a,h=s),p=(g*p+o.x)/++g;else{const i=s-1;if(!yn(c)&&!yn(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==d&&e!==i&&m.push({...t[e],x:p}),n!==d&&n!==i&&m.push({...t[n],x:p})}s>0&&i!==d&&m.push(t[i]),m.push(o),l=e,g=0,u=f=a,c=h=d=s}}return m}(l,h,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u})},destroy(t){Vl(t)}};function $l(t,e,i,n){if(n)return;let s=e[t],o=i[t];return"angle"===t&&(s=as(s),o=as(o)),{property:t,start:s,end:o}}function Ul(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ql(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Yl(t,e){let i=[],n=!1;return xn(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},s=e.points,o=[];return e.segments.forEach(({start:t,end:e})=>{e=Ul(t,e,s);const r=s[t],a=s[e];null!==n?(o.push({x:r.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:r.y}),o.push({x:i,y:a.y}))}),o}(t,e),i.length?new Ml({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Xl(t){return t&&!1!==t.fill}function Gl(t,e,i){let n=t[e].fill;const s=[e];let o;if(!i)return n;for(;!1!==n&&-1===s.indexOf(n);){if(!wn(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;s.push(n),n=o.fill}return!1}function Jl(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=Sn(i&&i.target,i);void 0===n&&(n=!!e.backgroundColor);if(!1===n||null===n)return!1;if(!0===n)return"origin";return n}(t);if(_n(n))return!isNaN(n.value)&&n;let s=parseFloat(n);return wn(s)&&Math.floor(s)===s?function(t,e,i,n){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=n)return!1;return i}(n[0],e,s,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Kl(t,e,i){const n=[];for(let s=0;s<i.length;s++){const o=i[s],{first:r,last:a,point:l}=Ql(o,e,"x");if(!(!l||r&&a))if(r)n.unshift(l);else if(t.push(l),!a)break}t.push(...n)}function Ql(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const s=n[i],o=t.segments,r=t.points;let a=!1,l=!1;for(let t=0;t<o.length;t++){const e=o[t],n=r[e.start][i],c=r[e.end][i];if(hs(s,n,c)){a=s===n,l=s===c;break}}return{first:a,last:l,point:n}}class Zl{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:s,radius:o}=this;return e=e||{start:0,end:Vn},t.arc(n,s,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,s=t.angle;return{x:e+Math.cos(s)*n,y:i+Math.sin(s)*n,angle:s}}}function tc(t){const{chart:e,fill:i,line:n}=t;if(wn(i))return function(t,e){const i=t.getDatasetMeta(e),n=i&&t.isDatasetVisible(e);return n?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,s=[],o=n.segments,r=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t<n.length;t++){const s=n[t];if(s.index===e)break;s.hidden||i.unshift(s.dataset)}return i}(e,i);a.push(Yl({x:null,y:e.bottom},n));for(let t=0;t<o.length;t++){const e=o[t];for(let t=e.start;t<=e.end;t++)Kl(s,r[t],a)}return new Ml({points:s,options:{}})}(t);if("shape"===i)return!0;const s=function(t){const e=t.scale||{};if(e.getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,n=e.options,s=e.getLabels().length,o=n.reverse?e.max:e.min,r=function(t,e,i){let n;return n="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:_n(t)?t.value:e.getBaseValue(),n}(i,e,o),a=[];if(n.grid.circular){const t=e.getPointPositionForValue(0,o);return new Zl({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<s;++t)a.push(e.getPointPositionForValue(t,r));return a}(t);return function(t){const{scale:e={},fill:i}=t,n=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:_n(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(wn(n)){const t=e.isHorizontal();return{x:t?n:null,y:t?null:n}}return null}(t)}(t);return s instanceof Zl?s:Yl(s,n)}function ec(t,e,i){const n=tc(e),{chart:s,index:o,line:r,scale:a,axis:l}=e,c=r.options,h=c.fill,d=c.backgroundColor,{above:u=d,below:f=d}=h||{},p=s.getDatasetMeta(o),g=lr(s,p);n&&r.points.length&&(Gs(t,i),function(t,e){const{line:i,target:n,above:s,below:o,area:r,scale:a,clip:l}=e,c=i._loop?"angle":e.axis;t.save();let h=o;o!==s&&("x"===c?(ic(t,n,r.top),sc(t,{line:i,target:n,color:s,scale:a,property:c,clip:l}),t.restore(),t.save(),ic(t,n,r.bottom)):"y"===c&&(nc(t,n,r.left),sc(t,{line:i,target:n,color:o,scale:a,property:c,clip:l}),t.restore(),t.save(),nc(t,n,r.right),h=s));sc(t,{line:i,target:n,color:h,scale:a,property:c,clip:l}),t.restore()}(t,{line:r,target:n,above:u,below:f,area:i,scale:a,axis:l,clip:g}),Js(t))}function ic(t,e,i){const{segments:n,points:s}=e;let o=!0,r=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,c=s[n],h=s[Ul(n,l,s)];o?(t.moveTo(c.x,c.y),o=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function nc(t,e,i){const{segments:n,points:s}=e;let o=!0,r=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,c=s[n],h=s[Ul(n,l,s)];o?(t.moveTo(c.x,c.y),o=!1):(t.lineTo(i,c.y),t.lineTo(c.x,c.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(i,h.y)}t.lineTo(i,e.first().y),t.closePath(),t.clip()}function sc(t,e){const{line:i,target:n,property:s,color:o,scale:r,clip:a}=e,l=function(t,e,i){const n=t.segments,s=t.points,o=e.points,r=[];for(const t of n){let{start:n,end:a}=t;a=Ul(n,a,s);const l=$l(i,s[n],s[a],t.loop);if(!e.segments){r.push({source:t,target:l,start:s[n],end:s[a]});continue}const c=nr(e,l);for(const e of c){const n=$l(i,o[e.start],o[e.end],e.loop),a=ir(t,s,n);for(const t of a)r.push({source:t,target:e,start:{[i]:ql(l,n,"start",Math.max)},end:{[i]:ql(l,n,"end",Math.min)}})}}return r}(i,n,s);for(const{source:e,target:c,start:h,end:d}of l){const{style:{backgroundColor:l=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=l,oc(t,r,a,u&&$l(s,h,d)),t.beginPath();const f=!!i.pathSegment(t,e);let p;if(u){f?t.closePath():rc(t,n,d,s);const e=!!n.pathSegment(t,c,{move:f,reverse:!0});p=f&&e,p||rc(t,n,h,s)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function oc(t,e,i,n){const s=e.chart.chartArea,{property:o,start:r,end:a}=n||{};if("x"===o||"y"===o){let e,n,l,c;"x"===o?(e=r,n=s.top,l=a,c=s.bottom):(e=s.left,n=r,l=s.right,c=a),t.beginPath(),i&&(e=Math.max(e,i.left),l=Math.min(l,i.right),n=Math.max(n,i.top),c=Math.min(c,i.bottom)),t.rect(e,n,l-e,c-n),t.clip()}}function rc(t,e,i,n){const s=e.interpolate(i,n);s&&t.lineTo(s.x,s.y)}var ac={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,s=[];let o,r,a,l;for(r=0;r<n;++r)o=t.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof Ml&&(l={visible:t.isDatasetVisible(r),index:r,fill:Jl(a,r,n),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,s.push(l);for(r=0;r<n;++r)l=s[r],l&&!1!==l.fill&&(l.fill=Gl(s,r,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,s=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&i.fill&&ec(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;Xl(i)&&ec(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;Xl(n)&&"beforeDatasetDraw"===i.drawTime&&ec(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const lc=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class cc extends Sa{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=On(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,i)=>t.sort(e,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=uo(i.font),s=n.size,o=this._computeTitleHeight(),{boxWidth:r,itemHeight:a}=lc(i,s);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,s,r,a)+10):(c=this.maxHeight,l=this._fitCols(o,n,r,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:s,maxWidth:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+r;let h=t;s.textAlign="left",s.textBaseline="middle";let d=-1,u=-c;return this.legendItems.forEach((t,f)=>{const p=i+e/2+s.measureText(t.text).width;(0===f||l[l.length-1]+p+2*r>o)&&(h+=c,l[l.length-(f>0?0:1)]=0,u+=c,d++),a[f]={left:0,top:u,row:d,width:p,height:n},l[l.length-1]+=p+r}),h}_fitCols(t,e,i,n){const{ctx:s,maxHeight:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=r,d=0,u=0,f=0,p=0;return this.legendItems.forEach((t,o)=>{const{itemWidth:g,itemHeight:m}=function(t,e,i,n,s){const o=function(t,e,i,n){let s=t.text;s&&"string"!=typeof s&&(s=s.reduce((t,e)=>t.length>e.length?t:e));return e+i.size/2+n.measureText(s).width}(n,t,e,i),r=function(t,e,i){let n=t;"string"!=typeof e.text&&(n=hc(e,i));return n}(s,n,e.lineHeight);return{itemWidth:o,itemHeight:r}}(i,e,s,t,n);o>0&&u+m+2*r>c&&(h+=d+r,l.push({width:d,height:u}),f+=d+r,p++,d=u=0),a[o]={left:f,top:u,col:p,width:g,height:m},d=Math.max(d,g),u+=m+r}),h+=d,l.push({width:d,height:u}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:s}}=this,o=Ko(s,this.left,this.width);if(this.isHorizontal()){let s=0,r=xs(i,this.left+n,this.right-this.lineWidths[s]);for(const a of e)s!==a.row&&(s=a.row,r=xs(i,this.left+n,this.right-this.lineWidths[s])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(r),a.width),r+=a.width+n}else{let s=0,r=xs(i,this.top+t+n,this.bottom-this.columnSizes[s].height);for(const a of e)a.col!==s&&(s=a.col,r=xs(i,this.top+t+n,this.bottom-this.columnSizes[s].height)),a.top=r,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),r+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Gs(t,this),this._draw(),Js(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:s,labels:o}=t,r=Ws.color,a=Ko(t.rtl,this.left,this.width),l=uo(o.font),{padding:c}=o,h=l.size,d=h/2;let u;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:p,itemHeight:g}=lc(o,h),m=this.isHorizontal(),b=this._computeTitleHeight();u=m?{x:xs(s,this.left+c,this.right-i[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:xs(s,this.top+b+c,this.bottom-e[0].height),line:0},Qo(this.ctx,t.textDirection);const v=g+c;this.legendItems.forEach((y,x)=>{n.strokeStyle=y.fontColor,n.fillStyle=y.fontColor;const _=n.measureText(y.text).width,w=a.textAlign(y.textAlign||(y.textAlign=o.textAlign)),k=f+d+_;let S=u.x,M=u.y;a.setWidth(this.width),m?x>0&&S+k+c>this.right&&(M=u.y+=v,u.line++,S=u.x=xs(s,this.left+c,this.right-i[u.line])):x>0&&M+v>this.bottom&&(S=u.x=S+e[u.line].width+c,u.line++,M=u.y=xs(s,this.top+b+c,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;n.save();const s=Sn(i.lineWidth,1);if(n.fillStyle=Sn(i.fillStyle,r),n.lineCap=Sn(i.lineCap,"butt"),n.lineDashOffset=Sn(i.lineDashOffset,0),n.lineJoin=Sn(i.lineJoin,"miter"),n.lineWidth=s,n.strokeStyle=Sn(i.strokeStyle,r),n.setLineDash(Sn(i.lineDash,[])),o.usePointStyle){const r={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:s},l=a.xPlus(t,f/2);Ys(n,r,l,e+d,o.pointStyleWidth&&f)}else{const o=e+Math.max((h-p)/2,0),r=a.leftForLtr(t,f),l=co(i.borderRadius);n.beginPath(),Object.values(l).some(t=>0!==t)?io(n,{x:r,y:o,w:f,h:p,radius:l}):n.rect(r,o,f,p),n.fill(),0!==s&&n.stroke()}n.restore()}(a.x(S),M,y),S=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(w,S+f+d,m?S+k:this.right,t.rtl),function(t,e,i){eo(n,i.text,t,e+g/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(S),M,y),m)u.x+=k+c;else if("string"!=typeof y.text){const t=l.lineHeight;u.y+=hc(y,t)+c}else u.y+=v}),Zo(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=uo(e.font),n=ho(e.padding);if(!e.display)return;const s=Ko(t.rtl,this.left,this.width),o=this.ctx,r=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),c=this.top+l,h=xs(t.align,h,this.right-d);else{const e=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);c=l+xs(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=xs(r,h,h+d);o.textAlign=s.textAlign(ys(r)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,eo(o,e.text,u,c,i)}_computeTitleHeight(){const t=this.options.title,e=uo(t.font),i=ho(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,s;if(hs(t,this.left,this.right)&&hs(e,this.top,this.bottom))for(s=this.legendHitBoxes,i=0;i<s.length;++i)if(n=s[i],hs(t,n.left,n.left+n.width)&&hs(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const o=this._hoveredItem,r=(s=i,null!==(n=o)&&null!==s&&n.datasetIndex===s.datasetIndex&&n.index===s.index);o&&!r&&On(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!r&&On(e.onHover,[t,i,this],this)}else i&&On(e.onClick,[t,i,this],this);var n,s}}function hc(t,e){return e*(t.text?t.text.length:0)}var dc={id:"legend",_element:cc,start(t,e,i){const n=t.legend=new cc({ctx:t.ctx,options:i,chart:t});ra.configure(t,n,i),ra.addBox(t,n)},stop(t){ra.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;ra.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,s=i.chart;s.isDatasetVisible(n)?(s.hide(n),e.hidden=!0):(s.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const l=t.controller.getStyle(i?0:void 0),c=ho(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:n||l.pointStyle,rotation:l.rotation,textAlign:s||l.textAlign,borderRadius:r&&(a||l.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class uc extends Sa{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=xn(i.text)?i.text.length:1;this._padding=ho(i.padding);const s=n*uo(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:o}=this,r=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=xs(r,i,s),c=e+t,a=s-i):("left"===o.position?(l=i+t,c=xs(r,n,e),h=-.5*Wn):(l=s-t,c=xs(r,e,n),h=.5*Wn),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=uo(e.font),n=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:r,rotation:a}=this._drawArgs(n);eo(t,e.text,0,0,i,{color:e.color,maxWidth:r,rotation:a,textAlign:ys(e.align),textBaseline:"middle",translation:[s,o]})}}var fc={id:"title",_element:uc,start(t,e,i){!function(t,e){const i=new uc({ctx:t.ctx,options:e,chart:t});ra.configure(t,i,e),ra.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;ra.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;ra.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const pc=new WeakMap;var gc={id:"subtitle",start(t,e,i){const n=new uc({ctx:t.ctx,options:i,chart:t});ra.configure(t,n,i),ra.addBox(t,n),pc.set(t,n)},stop(t){ra.removeBox(t,pc.get(t)),pc.delete(t)},beforeUpdate(t,e,i){const n=pc.get(t);ra.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const mc={average(t){if(!t.length)return!1;let e,i,n=new Set,s=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n.add(t.x),s+=t.y,++o}}if(0===o||0===n.size)return!1;return{x:[...n].reduce((t,e)=>t+e)/n.size,y:s/o}},nearest(t,e){if(!t.length)return!1;let i,n,s,o=e.x,r=e.y,a=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=os(e,n.getCenterPoint());t<a&&(a=t,s=n)}}if(s){const t=s.tooltipPosition();o=t.x,r=t.y}return{x:o,y:r}}};function bc(t,e){return e&&(xn(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function vc(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function yc(t,e){const{element:i,datasetIndex:n,index:s}=e,o=t.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:t,label:r,parsed:o.getParsed(s),raw:t.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function xc(t,e){const i=t.chart.ctx,{body:n,footer:s,title:o}=t,{boxWidth:r,boxHeight:a}=e,l=uo(e.bodyFont),c=uo(e.titleFont),h=uo(e.footerFont),d=o.length,u=s.length,f=n.length,p=ho(e.padding);let g=p.height,m=0,b=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}u&&(g+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,En(t.title,y),i.font=l.string,En(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?r+2+e.boxPadding:0,En(n,t=>{En(t.before,y),En(t.lines,y),En(t.after,y)}),v=0,i.font=h.string,En(t.footer,y),i.restore(),m+=p.width,{width:m,height:g}}function _c(t,e,i,n){const{x:s,width:o}=i,{width:r,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=r-o/2&&(c="right"),function(t,e,i,n){const{x:s,width:o}=n,r=i.caretSize+i.caretPadding;return"left"===t&&s+o+r>e.width||"right"===t&&s-o-r<0||void 0}(c,t,e,i)&&(c="center"),c}function wc(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||_c(t,e,i,n),yAlign:n}}function kc(t,e,i,n){const{caretSize:s,caretPadding:o,cornerRadius:r}=t,{xAlign:a,yAlign:l}=i,c=s+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=co(r);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:s}=t;return"top"===e?n+=i:n-="bottom"===e?s+i:s/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,u)+s:"right"===a&&(p+=Math.max(d,f)+s),{x:cs(p,0,n.width-e.width),y:cs(g,0,n.height-e.height)}}function Sc(t,e,i){const n=ho(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Mc(t){return bc([],vc(t))}function Oc(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Ec={beforeTitle:bn,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:bn,beforeBody:bn,beforeLabel:bn,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return yn(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:bn,afterBody:bn,beforeFooter:bn,footer:bn,afterFooter:bn};function Ac(t,e,i,n){const s=t[e].call(i,n);return void 0===s?Ec[e].call(i,n):s}class Tc extends Sa{static positioners=mc;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,s=new pr(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,po(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=Ac(i,"beforeTitle",this,t),s=Ac(i,"title",this,t),o=Ac(i,"afterTitle",this,t);let r=[];return r=bc(r,vc(n)),r=bc(r,vc(s)),r=bc(r,vc(o)),r}getBeforeBody(t,e){return Mc(Ac(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return En(t,t=>{const e={before:[],lines:[],after:[]},s=Oc(i,t);bc(e.before,vc(Ac(s,"beforeLabel",this,t))),bc(e.lines,Ac(s,"label",this,t)),bc(e.after,vc(Ac(s,"afterLabel",this,t))),n.push(e)}),n}getAfterBody(t,e){return Mc(Ac(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=Ac(i,"beforeFooter",this,t),s=Ac(i,"footer",this,t),o=Ac(i,"afterFooter",this,t);let r=[];return r=bc(r,vc(n)),r=bc(r,vc(s)),r=bc(r,vc(o)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],s=[],o=[];let r,a,l=[];for(r=0,a=e.length;r<a;++r)l.push(yc(this.chart,e[r]));return t.filter&&(l=l.filter((e,n,s)=>t.filter(e,n,s,i))),t.itemSort&&(l=l.sort((e,n)=>t.itemSort(e,n,i))),En(l,e=>{const i=Oc(t.callbacks,e);n.push(Ac(i,"labelColor",this,e)),s.push(Ac(i,"labelPointStyle",this,e)),o.push(Ac(i,"labelTextColor",this,e))}),this.labelColors=n,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let s,o=[];if(n.length){const t=mc[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=xc(this,i),r=Object.assign({},t,e),a=wc(this.chart,i,r),l=kc(i,r,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const s=this.getCaretPosition(t,i,n);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:s}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=co(r),{x:d,y:u}=t,{width:f,height:p}=e;let g,m,b,v,y,x;return"center"===s?(y=u+p/2,"left"===n?(g=d,m=g-o,v=y+o,x=y-o):(g=d+f,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?d+Math.max(a,c)+o:"right"===n?d+f-Math.max(l,h)-o:this.caretX,"top"===s?(v=u,y=v-o,g=m-o,b=m+o):(v=u+p,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,s=n.length;let o,r,a;if(s){const l=Ko(i.rtl,this.x,this.width);for(t.x=Sc(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=uo(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a<s;++a)e.fillText(n[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r,a+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,s){const o=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:a,boxWidth:l}=s,c=uo(s.bodyFont),h=Sc(this,"left",s),d=n.x(h),u=a<c.lineHeight?(c.lineHeight-a)/2:0,f=e.y+u;if(s.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(d,l)+l/2,c=f+a/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,qs(t,e,i,c),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,qs(t,e,i,c)}else{t.lineWidth=_n(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=n.leftForLtr(d,l),i=n.leftForLtr(n.xPlus(d,1),l-2),r=co(o.borderRadius);Object.values(r).some(t=>0!==t)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,io(t,{x:e,y:f,w:l,h:a,radius:r}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),io(t,{x:i,y:f+1,w:l-2,h:a-2,radius:r}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,f,l,a),t.strokeRect(e,f,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,f+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:s,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=uo(i.bodyFont);let d=h.lineHeight,u=0;const f=Ko(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+s},g=f.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=Sc(this,g,i),e.fillStyle=i.bodyColor,En(this.beforeBody,p),u=r&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,En(m.before,p),v=m.lines,r&&v.length&&(this._drawColorBox(e,t,y,f,i),d=Math.max(h.lineHeight,a)),x=0,w=v.length;x<w;++x)p(v[x]),d=h.lineHeight;En(m.after,p)}u=0,d=h.lineHeight,En(this.afterBody,p),t.y-=s}drawFooter(t,e,i){const n=this.footer,s=n.length;let o,r;if(s){const a=Ko(i.rtl,this.x,this.width);for(t.x=Sc(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",o=uo(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,r=0;r<s;++r)e.fillText(n[r],a.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:s,yAlign:o}=this,{x:r,y:a}=t,{width:l,height:c}=i,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=co(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+h,a),"top"===o&&this.drawCaret(t,e,i,n),e.lineTo(r+l-d,a),e.quadraticCurveTo(r+l,a,r+l,a+d),"center"===o&&"right"===s&&this.drawCaret(t,e,i,n),e.lineTo(r+l,a+c-f),e.quadraticCurveTo(r+l,a+c,r+l-f,a+c),"bottom"===o&&this.drawCaret(t,e,i,n),e.lineTo(r+u,a+c),e.quadraticCurveTo(r,a+c,r,a+c-u),"center"===o&&"left"===s&&this.drawCaret(t,e,i,n),e.lineTo(r,a+h),e.quadraticCurveTo(r,a,r+h,a),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,s=i&&i.y;if(n||s){const i=mc[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=xc(this,t),r=Object.assign({},i,this._size),a=wc(e,t,r),l=kc(t,r,a,e);n._to===l.x&&s._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=ho(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,n,e),Qo(t,e.textDirection),s.y+=o.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),Zo(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),s=!An(i,n),o=this._positionChanged(n,e);(s||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,s=this._active||[],o=this._getActiveElements(t,s,e,i),r=this._positionChanged(o,t),a=e||!An(o,s)||r;return a&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const s=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const o=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:n,options:s}=this,o=mc[s.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}var Cc={id:"tooltip",_element:Tc,positioners:mc,afterInit(t,e,i){i&&(t.tooltip=new Tc({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Ec},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Lc=Object.freeze({__proto__:null,Colors:Nl,Decimation:Hl,Filler:ac,Legend:dc,SubTitle:gc,Title:fc,Tooltip:Cc});function Pc(t,e,i,n){const s=t.indexOf(e);if(-1===s)return((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n);return s!==t.lastIndexOf(e)?i:s}function Dc(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function Ic(t,e){const i=[],{bounds:n,step:s,min:o,max:r,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=s||1,f=c-1,{min:p,max:g}=e,m=!yn(o),b=!yn(r),v=!yn(l),y=(g-p)/(h+1);let x,_,w,k,S=Qn((g-p)/f/u)*u;if(S<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/S)-Math.floor(p/S),k>f&&(S=Qn(k*S/f/u)*u),yn(a)||(x=Math.pow(10,a),S=Math.ceil(S*x)/x),"ticks"===n?(_=Math.floor(p/S)*S,w=Math.ceil(g/S)*S):(_=p,w=g),m&&b&&s&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-o)/s,S/1e3)?(k=Math.round(Math.min((r-o)/S,c)),S=(r-o)/k,_=o,w=r):v?(_=m?o:_,w=b?r:w,k=l-1,S=(w-_)/k):(k=(w-_)/S,k=Kn(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const M=Math.max(ns(S),ns(_));x=Math.pow(10,yn(a)?M:a),_=Math.round(_*x)/x,w=Math.round(w*x)/x;let O=0;for(m&&(d&&_!==o?(i.push({value:o}),_<o&&O++,Kn(Math.round((_+O*S)*x)/x,o,Rc(o,y,t))&&O++):_<o&&O++);O<k;++O){const t=Math.round((_+O*S)*x)/x;if(b&&t>r)break;i.push({value:t})}return b&&d&&w!==r?i.length&&Kn(i[i.length-1].value,r,Rc(r,y,t))?i[i.length-1].value=r:i.push({value:r}):b&&w!==r||i.push({value:w}),i}function Rc(t,e,{horizontal:i,minRotation:n}){const s=es(n),o=(i?Math.sin(s):Math.cos(s))||.001,r=.75*e*(""+t).length;return Math.min(e/o,r)}class jc extends Ia{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return yn(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:s}=this;const o=t=>n=e?n:t,r=t=>s=i?s:t;if(t){const t=Jn(n),e=Jn(s);t<0&&e<0?r(0):t>0&&e>0&&o(0)}if(n===s){let e=0===s?1:Math.abs(.05*s);r(s+e),t||o(n-e)}this.min=n,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Ic({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&ts(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Ds(t,this.chart.options.locale,this.options.ticks.format)}}class Fc extends jc{static id="linear";static defaults={ticks:{callback:Rs.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=wn(t)?t:0,this.max=wn(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=es(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const zc=t=>Math.floor(Gn(t)),Bc=(t,e)=>Math.pow(10,zc(t)+e);function Nc(t){return 1===t/Math.pow(10,zc(t))}function Wc(t,e,i){const n=Math.pow(10,i),s=Math.floor(t/n);return Math.ceil(e/n)-s}function Vc(t,{min:e,max:i}){e=kn(t.min,e);const n=[],s=zc(e);let o=function(t,e){let i=zc(e-t);for(;Wc(t,e,i)>10;)i++;for(;Wc(t,e,i)<10;)i--;return Math.min(i,zc(t))}(e,i),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,c=Math.round((e-l)*r)/r,h=Math.floor((e-l)/a/10)*a*10;let d=Math.floor((c-h)/Math.pow(10,o)),u=kn(t.min,Math.round((l+h+d*Math.pow(10,o))*r)/r);for(;u<i;)n.push({value:u,major:Nc(u),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(o++,d=2,r=o>=0?1:r),u=Math.round((l+h+d*Math.pow(10,o))*r)/r;const f=kn(t.max,u);return n.push({value:f,major:Nc(f),significand:d}),n}class Hc extends Ia{static id="logarithmic";static defaults={ticks:{callback:Rs.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=jc.prototype.parse.apply(this,[t,e]);if(0!==i)return wn(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=wn(t)?Math.max(0,t):null,this.max=wn(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!wn(this._userMin)&&(this.min=t===Bc(this.min,0)?Bc(this.min,-1):Bc(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const s=e=>i=t?i:e,o=t=>n=e?n:t;i===n&&(i<=0?(s(1),o(10)):(s(Bc(i,-1)),o(Bc(n,1)))),i<=0&&s(Bc(n,-1)),n<=0&&o(Bc(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=Vc({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&ts(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Ds(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Gn(t),this._valueRange=Gn(this.max)-Gn(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Gn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function $c(t){const e=t.ticks;if(e.display&&t.display){const t=ho(e.backdropPadding);return Sn(e.font&&e.font.size,Ws.font.size)+t.height}return 0}function Uc(t,e,i){return i=xn(i)?i:[i],{w:Hs(t,e.string,i),h:i.length*e.lineHeight}}function qc(t,e,i,n,s){return t===n||t===s?{start:e-i/2,end:e+i/2}:t<n||t>s?{start:e-i,end:e}:{start:e,end:e+i}}function Yc(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],s=[],o=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?Wn/o:0;for(let l=0;l<o;l++){const o=r.setContext(t.getPointLabelContext(l));s[l]=o.padding;const c=t.getPointPosition(l,t.drawingArea+s[l],a),h=uo(o.font),d=Uc(t.ctx,h,t._pointLabels[l]);n[l]=d;const u=as(t.getIndexAngle(l)+a),f=Math.round(is(u));Xc(i,e,u,qc(f,c.x,d.w,0,180),qc(f,c.y,d.h,90,270))}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const n=[],s=t._pointLabels.length,o=t.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:$c(o)/2,additionalAngle:r?Wn/s:0};let c;for(let o=0;o<s;o++){l.padding=i[o],l.size=e[o];const s=Gc(t,o,l);n.push(s),"auto"===a&&(s.visible=Jc(s,c),s.visible&&(c=s))}return n}(t,n,s)}function Xc(t,e,i,n,s){const o=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/o,t.l=Math.min(t.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),s.start<e.t?(l=(e.t-s.start)/r,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function Gc(t,e,i){const n=t.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=i,l=t.getPointPosition(e,n+s+r,o),c=Math.round(is(as(l.angle+qn))),h=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,a.h,c),d=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(c),u=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,a.w,d);return{visible:!0,x:l.x,y:h,textAlign:d,left:u,top:h,right:u+a.w,bottom:h+a.h}}function Jc(t,e){if(!e)return!0;const{left:i,top:n,right:s,bottom:o}=t;return!(Xs({x:i,y:n},e)||Xs({x:i,y:o},e)||Xs({x:s,y:n},e)||Xs({x:s,y:o},e))}function Kc(t,e,i){const{left:n,top:s,right:o,bottom:r}=i,{backdropColor:a}=e;if(!yn(a)){const i=co(e.borderRadius),l=ho(e.backdropPadding);t.fillStyle=a;const c=n-l.left,h=s-l.top,d=o-n+l.width,u=r-s+l.height;Object.values(i).some(t=>0!==t)?(t.beginPath(),io(t,{x:c,y:h,w:d,h:u,radius:i}),t.fill()):t.fillRect(c,h,d,u)}}function Qc(t,e,i,n){const{ctx:s}=t;if(i)s.arc(t.xCenter,t.yCenter,e,0,Vn);else{let i=t.getPointPosition(0,e);s.moveTo(i.x,i.y);for(let o=1;o<n;o++)i=t.getPointPosition(o,e),s.lineTo(i.x,i.y)}}class Zc extends jc{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Rs.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=ho($c(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=wn(t)&&!isNaN(t)?t:0,this.max=wn(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/$c(this.options))}generateTickLabels(t){jc.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{const i=On(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?Yc(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){return as(t*(Vn/(this._pointLabels.length||1))+es(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(yn(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(yn(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return po(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-qn+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:s}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Qc(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n,border:s}=e,o=this._pointLabels.length;let r,a,l;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let s=e-1;s>=0;s--){const e=t._pointLabelItems[s];if(!e.visible)continue;const o=n.setContext(t.getPointLabelContext(s));Kc(i,o,e);const r=uo(o.font),{x:a,y:l,textAlign:c}=e;eo(i,t._pointLabels[s],a,l+r.lineHeight/2,r,{color:o.color,textAlign:c,textBaseline:"middle"})}}(this,o),n.display&&this.ticks.forEach((t,e)=>{if(0!==e||0===e&&this.min<0){a=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),r=n.setContext(i),l=s.setContext(i);!function(t,e,i,n,s){const o=t.ctx,r=e.circular,{color:a,lineWidth:l}=e;!r&&!n||!a||!l||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),Qc(t,i,r,n),o.closePath(),o.stroke(),o.restore())}(this,r,a,o,l)}}),i.display){for(t.save(),r=o-1;r>=0;r--){const n=i.setContext(this.getPointLabelContext(r)),{color:s,lineWidth:o}=n;o&&s&&(t.lineWidth=o,t.strokeStyle=s,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,a=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(r,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((n,r)=>{if(0===r&&this.min>=0&&!e.reverse)return;const a=i.setContext(this.getContext(r)),l=uo(a.font);if(s=this.getDistanceFromCenterForValue(this.ticks[r].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=ho(a.backdropPadding);t.fillRect(-o/2-e.left,-s-l.size/2-e.top,o+e.width,l.size+e.height)}eo(t,n.label,0,-s,l,{color:a.color,strokeColor:a.textStrokeColor,strokeWidth:a.textStrokeWidth})}),t.restore()}drawTitle(){}}const th={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},eh=Object.keys(th);function ih(t,e){return t-e}function nh(t,e){if(yn(e))return null;const i=t._adapter,{parser:n,round:s,isoWeekday:o}=t._parseOpts;let r=e;return"function"==typeof n&&(r=n(r)),wn(r)||(r="string"==typeof n?i.parse(r,n):i.parse(r)),null===r?null:(s&&(r="week"!==s||!Zn(o)&&!0!==o?i.startOf(r,s):i.startOf(r,"isoWeek",o)),+r)}function sh(t,e,i,n){const s=eh.length;for(let o=eh.indexOf(t);o<s-1;++o){const t=th[eh[o]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(s*t.size))<=n)return eh[o]}return eh[s-1]}function oh(t,e,i){if(i){if(i.length){const{lo:n,hi:s}=ds(i,e);t[i[n]>=e?i[n]:i[s]]=!0}}else t[e]=!0}function rh(t,e,i){const n=[],s={},o=e.length;let r,a;for(r=0;r<o;++r)a=e[r],s[a]=r,n.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,n){const s=t._adapter,o=+s.startOf(e[0].value,n),r=e[e.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=i[a],l>=0&&(e[l].major=!0);return e}(t,n,s,i):n}class ah extends Ia{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),n=this._adapter=new Nr(t.adapters.date);n.init(e),Dn(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:nh(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:s,minDefined:o,maxDefined:r}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}o&&r||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=wn(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),s=wn(s)&&!isNaN(s)?s:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,s-1),this.max=Math.max(n+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const s=this.min,o=function(t,e,i){let n=0,s=t.length;for(;n<s&&t[n]<e;)n++;for(;s>n&&t[s-1]>i;)s--;return n>0||s<t.length?t.slice(n,s):t}(n,s,this.max);return this._unit=e.unit||(i.autoSkip?sh(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(t,e,i,n,s){for(let o=eh.length-1;o>=eh.indexOf(i);o--){const i=eh[o];if(th[i].common&&t._adapter.diff(s,n,i)>=e-1)return i}return eh[i?eh.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=eh.indexOf(t)+1,i=eh.length;e<i;++e)if(th[eh[e]].common)return eh[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&o.reverse(),rh(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e,i,n=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),s=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=cs(n,0,o),s=cs(s,0,o),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,s=n.time,o=s.unit||sh(s.minUnit,e,i,this._getLabelCapacity(e)),r=Sn(n.ticks.stepSize,1),a="week"===o&&s.isoWeekday,l=Zn(a)||!0===a,c={};let h,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",a)),u=+t.startOf(u,l?"day":o),t.diff(i,e,o)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=u,d=0;h<i;h=+t.add(h,r,o),d++)oh(c,h,f);return h!==i&&"ticks"!==n.bounds&&1!==d||oh(c,h,f),Object.keys(c).sort(ih).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,n=this._unit,s=e||i[n];return this._adapter.format(t,s)}_tickFormatFunction(t,e,i,n){const s=this.options,o=s.ticks.callback;if(o)return On(o,[t,e,i],this);const r=s.time.displayFormats,a=this._unit,l=this._majorUnit,c=a&&r[a],h=l&&r[l],d=i[e],u=l&&h&&d&&d.major;return this._adapter.format(t,n||(u?h:c))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=es(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(n),o=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:i*s+r*o,h:i*o+r*s}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,s=this._tickFormatFunction(t,0,rh(this,[t],this._majorUnit),n),o=this._getLabelSize(s),r=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return r>0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(nh(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ms(t.sort(ih))}}function lh(t,e,i){let n,s,o,r,a=0,l=t.length-1;i?(e>=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=us(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:s,time:r}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=us(t,"time",e)),({time:n,pos:o}=t[a]),({time:s,pos:r}=t[l]));const c=s-n;return c?o+(r-o)*(e-n)/c:o}var ch=Object.freeze({__proto__:null,CategoryScale:class extends Ia{static id="category";static defaults={ticks:{callback:Dc}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(yn(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:cs(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Pc(i,t,Sn(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){return Dc.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:Fc,LogarithmicScale:Hc,RadialLinearScale:Zc,TimeScale:ah,TimeSeriesScale:class extends ah{static id="timeseries";static defaults=ah.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=lh(e,this.min),this._tableRange=lh(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],s=[];let o,r,a,l,c;for(o=0,r=t.length;o<r;++o)l=t[o],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,r=n.length;o<r;++o)c=n[o+1],a=n[o-1],l=n[o],Math.round((c+a)/2)!==l&&s.push({time:l,pos:o/(r-1)});return s}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort((t,e)=>t-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(lh(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return lh(this._table,i*this._tableRange+this._minPos,!0)}}});const hh=[Fr,Dl,Lc,ch];dl.register(...hh);const dh=dl;var uh=i(998),fh=i.n(uh);const ph={data:{},nonce:"",context:null,init(t){this.context=t;const e=t.querySelectorAll("[data-progress]"),i=t.querySelectorAll("[data-chart]");[...e].forEach(t=>{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t),this.nonce||(this.nonce=t.dataset?.nonce)});for(const t in this.data)this.getValues(t);[...i].forEach(t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new dh(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>fh()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})})},line(t){new(ji().Line)(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new(ji().Circle)(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const s=Math.floor(100*n.value());i.setText(n,parseFloat(s),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),wt({path:t,method:"GET",headers:{"X-WP-Nonce":this.nonce}}).then(e=>{this.data[t].items.forEach(i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout(()=>{this.getValues(t)},1e4))});for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach(i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))}),n.forEach(i=>{i.innerText=e[t],i.classList.contains("cld-toggle")&&(e[t]?i.classList.remove("hidden"):i.classList.add("hidden"))})}})},setText(t,e,i){if(!t)return;const n=document.createElement("span"),s=document.createElement("h2"),o=document.createTextNode(i);s.innerText=e+"%",n.appendChild(s),n.appendChild(o),t.setText(n)}},gh=ph,mh={key:"_cld_pending_state",data:null,pending:null,changed:!1,previous:{},init(){this.data=cldData.stateData?cldData.stateData:{};let t=localStorage.getItem(this.key);t&&(t=JSON.parse(t),this.data={...this.data,...t},this.sendStates()),this.previous=JSON.stringify(this.data)},_update(){this.pending&&(clearTimeout(this.pending),localStorage.removeItem(this.key)),this.previous!==JSON.stringify(this.data)&&(this.pending=setTimeout(()=>this.sendStates(),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then(t=>t.json()).then(t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))})}},bh={init(t){[...t.querySelectorAll("[data-remove]")].forEach(t=>{t.addEventListener("click",e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)})})}},vh={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach(t=>this.bind(t))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",e=>{t.focus()}),t.addEventListener("focus",e=>{t.innerText=null}),t.addEventListener("blur",e=>{3<t.innerText.length&&this.captureTag(t,t.innerText),t.innerText=t.dataset.placeholder}),t.addEventListener("keydown",i=>{if("Tab"===i.key)3<t.innerText.length&&(i.preventDefault(),this.captureTag(t,t.innerText));else if("Escape"===i.key)t.blur();else if("Backspace"===i.key&&0===t.innerText.length){const i=t.boundDisplay.lastChild.previousSibling;i&&(i.parentNode.removeChild(i),this.values[e].pop(),this.updateInput(e))}}),t.addEventListener("keypress",e=>{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3<t.innerText.length&&this.captureTag(t,t.innerText))}),n.forEach(t=>{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",e=>{e.stopPropagation(),this.deleteTag(t)})})},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout(()=>{e.parentNode.removeChild(e)},500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout(()=>{t.classList.remove("pulse")},1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",()=>this.deleteTag(n)),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout(()=>{i.classList.remove("pulse")},500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}},yh=vh,xh={suffixInputs:null,init(t){this.suffixInputs=t.querySelectorAll("[data-suffix]"),[...this.suffixInputs].forEach(t=>this.bindInput(t))},bindInput(t){const e=document.getElementById(t.dataset.suffix),i=e.dataset.template.split("@value");this.setSuffix(e,i,t.value),t.addEventListener("change",()=>this.setSuffix(e,i,t.value)),t.addEventListener("input",()=>this.setSuffix(e,i,t.value))},setSuffix(t,e,i){t.innerHTML="",t.classList.add("hidden"),-1===["none","off",""].indexOf(i)&&t.classList.remove("hidden");const n=document.createTextNode(e.join(i));t.appendChild(n)}},_h={wrappers:null,frame:null,error:'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="rgba(0,0,0,0.1)"/><text x="50%" y="50%" fill="red" text-anchor="middle" dominant-baseline="middle">%26%23x26A0%3B︎</text></svg>',init(t){this.wrappers=t.querySelectorAll(".cld-size-items"),this.wrappers.forEach(t=>{const e=t.querySelectorAll(".cld-size-selector-item");e.forEach(i=>{i.addEventListener("click",()=>{e.forEach(t=>{delete t.dataset.selected}),i.dataset.selected=!0,this.switchSizeContent(t,i.dataset.size)})});const i=t.querySelector(".cld-size-selector-item[data-selected]");i&&this.switchSizeContent(t,i.dataset.size)})},switchSizeContent(t,e){t.querySelectorAll(".cld-size-content").forEach(t=>{t.style.display="none"});const i=t.querySelector(`.cld-size-content[data-size="${e}"]`);i&&(i.style.display="block",this.buildImages(t,i))},buildImages(t,e){const i=t.dataset.base,n=e.querySelector(".regular-text"),s=e.querySelector(".disable-toggle");if(!n||!s)return;const o=e.querySelectorAll("img"),r=n.value.length?n.value.replace(" ",""):n.placeholder;if(o.forEach(t=>{const e=t.dataset.size,o=t.dataset.file;s.checked?(n.disabled=!0,t.src=`${i}/${e}/${o}`):(n.disabled=!1,t.src=`${i}/${e},${r}/${o}`),t.bound||(t.addEventListener("error",()=>{t.src=this.error}),t.bound=!0)}),!n.bound){let i=null;n.addEventListener("input",()=>{i&&clearTimeout(i),i=setTimeout(()=>{this.buildImages(t,e)},1e3)}),n.bound=!0}s.bound||(s.addEventListener("change",()=>{this.buildImages(t,e)}),s.bound=!0);const a=e.querySelector(".clear-crop-input");a&&!a.bound&&(a.addEventListener("click",()=>{n.value="",this.buildImages(t,e)}),a.bound=!0)}},wh={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),s=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),r=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};mh.init(),Ii.bind(r),l.forEach(t=>this._autoSuffix(t)),o.forEach(t=>this._trigger(t)),i.forEach(t=>this._toggle(t)),e.forEach(t=>this._bind(t)),n.forEach(t=>this._alias(t)),a.forEach(t=>this._files(t,h)),Ci(s,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach(t=>{t.dispatchEvent(new Event("input"))}),c.forEach(t=>{t.addEventListener("click",e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())})}),gh.init(t),bh.init(t),yh.init(t),xh.init(t),_h.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map(t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t);t.addEventListener("change",()=>{const e=t.value.replace(" ",""),s=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();s&&(-1===n.indexOf(o)?t.value=s+i:t.value=s+o)}),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout(()=>{this._compileParent(i)},10)}))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",function(e){t.dispatchEvent(new Event("input"))}),t.addEventListener("input",function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)})},_alias(t){t.addEventListener("click",function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))})},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=mh.get(t.id);t.addEventListener("click",function(n){n.stopPropagation();const s=i.classList.contains("open")?"closed":"open";e.toggle(i,t,s)}),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const s=t.condition[e];"boolean"==typeof s&&(n=this.bindings[e].checked),s!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),mh.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach(function(t){t.dataset.disabled=!1})},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach(function(t){t.dataset.disabled=!0})}},kh=document.querySelectorAll(".cld-settings,.cld-meta-box");kh.length&&kh.forEach(t=>{t&&window.addEventListener("load",wh._init(t))});const Sh={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,updateConnection:document.getElementById("update-connection"),cancelUpdateConnection:document.getElementById("cancel-update-connection"),config:{},didSave:!1,init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),wt.use(wt.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");this.updateConnection.addEventListener("click",()=>{this.lockNext(),e.parentNode.classList.remove("hidden"),this.cancelUpdateConnection.classList.remove("hidden"),this.updateConnection.classList.add("hidden")}),this.cancelUpdateConnection.addEventListener("click",()=>{this.unlockNext(),e.parentNode.classList.add("hidden"),this.cancelUpdateConnection.classList.add("hidden"),this.updateConnection.classList.remove("hidden"),this.config.cldString=!0,e.value="",this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")}),[...t].forEach(t=>{t.addEventListener("click",()=>{this.navigate(t.dataset.navigate)})}),this.lock.addEventListener("click",()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach(t=>{t.disabled=t.disabled?"":"disabled"})}),e.addEventListener("input",t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout(()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")},500))}),this.config.cldString&&(e.parentNode.classList.add("hidden"),this.updateConnection.classList.remove("hidden")),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",t=>{this.hashChange()})},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0<t&&5>t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",()=>{this.setConfig("mediaLibrary",t.checked)});const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",()=>{this.setConfig("nonMedia",e.checked)});const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",()=>{this.setConfig("advanced",i.checked)})},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach(t=>{this.hide(this.content[t])})},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach(e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")})},incompleteTab(t){Object.keys(this.tabs).forEach(t=>{this.tabs[t].classList.remove("complete","active")})},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey)&&!this.didSave)return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString?this.showSuccess():(this.lockNext(),setTimeout(()=>{document.getElementById("connect.cloudinary_url").focus()},0)),this.updateConnection.classList.contains("hidden")&&this.lockNext();break;case 3:if(!this.config.cldString)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back)}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){wt({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then(e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))})},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=q("Setting up Cloudinary","cloudinary"),this.didSave=!0,wt({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then(t=>{this.next.innerText=q("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}).fail(t=>{this.didSave=!1})}};window.addEventListener("load",()=>Sh.init());const Mh={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach(t=>{t.classList.remove("selected")}),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",()=>Mh._init());const Oh={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;wt.use(wt.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach(t=>{t.addEventListener("change",e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout(()=>{this.toggleExtension(t),t.debounce=null},1e3)})})},toggleExtension(t){const e=t.dataset.extension,i=t.checked;wt({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then(e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach(t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach(i=>{i.innerText=e[t]})}),this.pageReloader.style.display="block"})},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",()=>Oh.init());const Eh={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach(t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))})},filterActive:t=>t.filter(t=>t.classList.contains("is-active")).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",()=>Eh.init());window.$=window.jQuery;e()})()})(); 2 //# sourceMappingURL=cloudinary.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/deactivate.asset.php
r3201782 r3518458 1 <?php return array('dependencies' => array(), 'version' => ' 9b53a10d854ad5c7f5db');1 <?php return array('dependencies' => array(), 'version' => '41ae783fa52f94bc2630'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/deactivate.js
r3201782 r3518458 1 !function(){"use strict";const t={modal:document.getElementById("cloudinary-deactivation"),modalBody:document.getElementById("modal-body"),modalFooter:document.getElementById("modal-footer"),modalUninstall:document.getElementById("modal-uninstall"),modalClose:document.querySelectorAll('button[data-action="cancel"], button[data-action="close"]'),pluginListLinks:document.querySelectorAll(".cld-deactivate-link, .cld-deactivate"),triggers:document.getElementsByClassName("cld-deactivate"),options:document.querySelectorAll('.cloudinary-deactivation .reasons input[type="radio"]'),report:document.getElementById("cld-report"),contact:document.getElementById("cld-contact"),submitButton:document.querySelectorAll('.cloudinary-deactivation button[data-action="submit"]'),contactButton:document.querySelectorAll('.cloudinary-deactivation button[data-action="contact"]'),deactivateButton:document.querySelectorAll('.cloudinary-deactivation button[data-action="deactivate"]'),emailField:document.getElementById("email"),reason:"",more:null,deactivationUrl:"",email:"",isCloudinaryOnly:!1,addEvents(){const t=this;if([...t.modalClose].forEach((e=>{e.addEventListener("click",(e=>{t.closeModal()}))})),window.addEventListener("keyup",(e=>{"visible"===t.modal.style.visibility&&"Escape"===e.key&&(t.modal.style.visibility="hidden",t.modal.style.opacity="0")})),t.modal.addEventListener("click",(e=>{e.stopPropagation(),e.target===t.modal&&t.closeModal()})),[...t.pluginListLinks].forEach((e=>{e.addEventListener("click",(function(e){e.preventDefault(),t.deactivationUrl=e.target.getAttribute("href"),t.openModal()}))})),[...t.contactButton].forEach((e=>{e.addEventListener("click",(function(){t.emailField&&(t.email=t.emailField.value),t.submit()}))})),[...t.deactivateButton].forEach((e=>{e.addEventListener("click",(function(){window.location.href=t.deactivationUrl}))})),[...t.options].forEach((e=>{e.addEventListener("change",(function(e){t.reason=e.target.value,t.more=e.target.parentNode.querySelector("textarea")}))})),t.contact&&t.report.addEventListener("change",(function(){t.report.checked?t.contact.parentNode.removeAttribute("style"):t.contact.parentNode.style.display="none"})),[...t.submitButton].forEach((e=>{e.addEventListener("click",(function(){const e=document.querySelector('.cloudinary-deactivation .data input[name="option"]:checked');let o="";e&&(o=e.value),"uninstall"===o&&(t.modalBody.style.display="none",t.modalFooter.style.display="none",t.modalUninstall.style.display="block"),t.submit(o)}))})),this.isCloudinaryOnly){const t=document.getElementById("cld-bypass-cloudinary-only");t.addEventListener("change",function(e){this.modal.dataset.cloudinaryOnly=!t.checked}.bind(this))}},closeModal(){document.body.style.removeProperty("overflow"),this.modal.style.visibility="hidden",this.modal.style.opacity="0"},openModal(){document.body.style.overflow="hidden",this.modal.style.visibility="visible",this.modal.style.opacity="1"},submit(t=""){wp.ajax.send({url:CLD_Deactivate.endpoint,data:{reason:this.reason,more:this.more?.value,report:this.report?.checked,contact:this.contact?.checked,email:this.email,dataHandling:t},beforeSend(t){t.setRequestHeader("X-WP-Nonce",CLD_Deactivate.nonce)}}).always((function(){window.location.reload()}))},init(){this.isCloudinaryOnly=!!this.modal.dataset.cloudinaryOnly,this.addEvents()}};t.init()}(); 1 (()=>{"use strict";const t={modal:document.getElementById("cloudinary-deactivation"),modalBody:document.getElementById("modal-body"),modalFooter:document.getElementById("modal-footer"),modalUninstall:document.getElementById("modal-uninstall"),modalClose:document.querySelectorAll('button[data-action="cancel"], button[data-action="close"]'),pluginListLinks:document.querySelectorAll(".cld-deactivate-link, .cld-deactivate"),triggers:document.getElementsByClassName("cld-deactivate"),options:document.querySelectorAll('.cloudinary-deactivation .reasons input[type="radio"]'),report:document.getElementById("cld-report"),contact:document.getElementById("cld-contact"),submitButton:document.querySelectorAll('.cloudinary-deactivation button[data-action="submit"]'),contactButton:document.querySelectorAll('.cloudinary-deactivation button[data-action="contact"]'),deactivateButton:document.querySelectorAll('.cloudinary-deactivation button[data-action="deactivate"]'),emailField:document.getElementById("email"),reason:"",more:null,deactivationUrl:"",email:"",isCloudinaryOnly:!1,addEvents(){const t=this;if([...t.modalClose].forEach(e=>{e.addEventListener("click",e=>{t.closeModal()})}),window.addEventListener("keyup",e=>{"visible"===t.modal.style.visibility&&"Escape"===e.key&&(t.modal.style.visibility="hidden",t.modal.style.opacity="0")}),t.modal.addEventListener("click",e=>{e.stopPropagation(),e.target===t.modal&&t.closeModal()}),[...t.pluginListLinks].forEach(e=>{e.addEventListener("click",function(e){e.preventDefault(),t.deactivationUrl=e.target.getAttribute("href"),t.openModal()})}),[...t.contactButton].forEach(e=>{e.addEventListener("click",function(){t.emailField&&(t.email=t.emailField.value),t.submit()})}),[...t.deactivateButton].forEach(e=>{e.addEventListener("click",function(){window.location.href=t.deactivationUrl})}),[...t.options].forEach(e=>{e.addEventListener("change",function(e){t.reason=e.target.value,t.more=e.target.parentNode.querySelector("textarea")})}),t.contact&&t.report.addEventListener("change",function(){t.report.checked?t.contact.parentNode.removeAttribute("style"):t.contact.parentNode.style.display="none"}),[...t.submitButton].forEach(e=>{e.addEventListener("click",function(){const e=document.querySelector('.cloudinary-deactivation .data input[name="option"]:checked');let o="";e&&(o=e.value),"uninstall"===o&&(t.modalBody.style.display="none",t.modalFooter.style.display="none",t.modalUninstall.style.display="block"),t.submit(o)})}),this.isCloudinaryOnly){const t=document.getElementById("cld-bypass-cloudinary-only");t.addEventListener("change",function(e){this.modal.dataset.cloudinaryOnly=!t.checked}.bind(this))}},closeModal(){document.body.style.removeProperty("overflow"),this.modal.style.visibility="hidden",this.modal.style.opacity="0"},openModal(){document.body.style.overflow="hidden",this.modal.style.visibility="visible",this.modal.style.opacity="1"},submit(t=""){wp.ajax.send({url:CLD_Deactivate.endpoint,data:{reason:this.reason,more:this.more?.value,report:this.report?.checked,contact:this.contact?.checked,email:this.email,dataHandling:t},beforeSend(t){t.setRequestHeader("X-WP-Nonce",CLD_Deactivate.nonce)}}).always(function(){window.location.reload()})},init(){this.isCloudinaryOnly=!!this.modal.dataset.cloudinaryOnly,this.addEvents()}};t.init()})(); 2 //# sourceMappingURL=deactivate.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/front-overlay.js
r3439415 r3518458 1 !function(){var e={604:function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return function(e,t){var n,r,a,s,c,u,p,f,l,d=1,h=e.length,m="";for(r=0;r<h;r++)if("string"==typeof e[r])m+=e[r];else if("object"==typeof e[r]){if((s=e[r]).keys)for(n=t[d],a=0;a<s.keys.length;a++){if(null==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[a],s.keys[a-1]));n=n[s.keys[a]]}else n=s.param_no?t[s.param_no]:t[d++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&n instanceof Function&&(n=n()),i.numeric_arg.test(s.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(i.number.test(s.type)&&(f=n>=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?m+=n:(!i.number.test(s.type)||f&&!s.sign?l="":(l=f?"+":"-",n=n.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(l+n).length,c=s.width&&p>0?u.repeat(p):"",m+=s.align?l+n+c:"0"===u?l+c+n:c+l+n)}return m}(function(e){if(s[e])return s[e];var t,n=e,r=[],o=0;for(;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var a=[],c=t[2],u=[];if(null===(u=i.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(u[1]);""!==(c=c.substring(u[0].length));)if(null!==(u=i.key_access.exec(c)))a.push(u[1]);else{if(null===(u=i.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(u[1])}t[2]=a}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return s[e]=r}(e),arguments)}function a(e,t){return o.apply(null,[e].concat(t||[]))}var s=Object.create(null);"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=a,void 0===(r=function(){return{sprintf:o,vsprintf:a}}.call(t,n,t,e))||(e.exports=r))}()},616:function(e){e.exports=function(e,t){var n,r,i=0;function o(){var o,a,s=n,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a<c;a++)if(s.args[a]!==arguments[a]){s=s.next;continue e}return s!==n&&(s===r&&(r=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=n,s.prev=null,n.prev=s,n=s),s.val}s=s.next}for(o=new Array(c),a=0;a<c;a++)o[a]=arguments[a];return s={args:o,val:e.apply(null,o)},n?(n.prev=s,s.next=n):r=s,i===t.maxSize?(r=r.prev).next=null:i++,n=s,s.val}return t=t||{},o.clear=function(){n=null,r=null,i=0},o}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e,t,r,i,o=n(616),a=n.n(o);n(604),a()(console.error);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}e={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},t=["(","?"],r={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var u={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function p(n){var o=function(n){for(var o,a,s,c,u=[],p=[];o=n.match(i);){for(a=o[0],(s=n.substr(0,o.index).trim())&&u.push(s);c=p.pop();){if(r[a]){if(r[a][0]===c){a=r[a][1]||a;break}}else if(t.indexOf(c)>=0||e[c]<e[a]){p.push(c);break}u.push(c)}r[a]||p.push(a),n=n.substr(o.index+a.length)}return(n=n.trim())&&u.push(n),u.concat(p.reverse())}(n);return function(e){return function(e,t){var n,r,i,o,a,s,c=[];for(n=0;n<e.length;n++){if(a=e[n],o=u[a]){for(r=o.length,i=Array(r);r--;)i[r]=c.pop();try{s=o.apply(null,i)}catch(e){return e}}else s=t.hasOwnProperty(a)?t[a]:+a;c.push(s)}return c[0]}(o,e)}}var f={contextDelimiter:"",onMissingKey:null};function l(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},f)this.options[n]=void 0!==t&&n in t?t[n]:f[n]}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){var r,i,o;r=e,i=t,o=n[t],(i=c(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}l.prototype.getPluralForm=function(e,t){var n,r,i,o=this.pluralForms[e];return o||("function"!=typeof(i=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=function(e){var t=p(e);return function(e){return+t({n:e})}}(r)),o=this.pluralForms[e]=i),o(t)},l.prototype.dcnpgettext=function(e,t,n,r,i){var o,a,s;return o=void 0===i?0:this.getPluralForm(e,i),a=n,t&&(a=t+this.options.contextDelimiter+n),(s=this.data[e][a])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===o?n:r)};var m={"":{plural_forms:function(e){return 1===e?0:1}}},v=/^i18n\.(n?gettext|has_translation)(_|$)/;var g=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var y=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var b=function(e,t){return function(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,a=e[t];if(y(n)&&g(r))if("function"==typeof i)if("number"==typeof o){var s={callback:i,priority:o,namespace:r};if(a[n]){var c,u=a[n].handlers;for(c=u.length;c>0&&!(o>=u[c-1].priority);c--);c===u.length?u[c]=s:u.splice(c,0,s),a.__current.forEach((function(e){e.name===n&&e.currentIndex>=c&&e.currentIndex++}))}else a[n]={handlers:[s],runs:0};"hookAdded"!==n&&e.doAction("hookAdded",n,r,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var x=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r,i){var o=e[t];if(y(r)&&(n||g(i))){if(!o[r])return 0;var a=0;if(n)a=o[r].handlers.length,o[r]={runs:o[r].runs,handlers:[]};else for(var s=o[r].handlers,c=function(e){s[e].namespace===i&&(s.splice(e,1),a++,o.__current.forEach((function(t){t.name===r&&t.currentIndex>=e&&t.currentIndex--})))},u=s.length-1;u>=0;u--)c(u);return"hookRemoved"!==r&&e.doAction("hookRemoved",r,i),a}}};var w=function(e,t){return function(n,r){var i=e[t];return void 0!==r?n in i&&i[n].handlers.some((function(e){return e.namespace===r})):n in i}};var O=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(r){var i=e[t];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;var o=i[r].handlers;for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];if(!o||!o.length)return n?s[0]:void 0;var u={name:r,currentIndex:0};for(i.__current.push(u);u.currentIndex<o.length;){var p=o[u.currentIndex].callback.apply(null,s);n&&(s[0]=p),u.currentIndex++}return i.__current.pop(),n?s[0]:void 0}};var E=function(e,t){return function(){var n,r,i=e[t];return null!==(n=null===(r=i.__current[i.__current.length-1])||void 0===r?void 0:r.name)&&void 0!==n?n:null}};var A=function(e,t){return function(n){var r=e[t];return void 0===n?void 0!==r.__current[0]:!!r.__current[0]&&n===r.__current[0].name}};var T=function(e,t){return function(n){var r=e[t];if(y(n))return r[n]&&r[n].runs?r[n].runs:0}},_=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=b(this,"actions"),this.addFilter=b(this,"filters"),this.removeAction=x(this,"actions"),this.removeFilter=x(this,"filters"),this.hasAction=w(this,"actions"),this.hasFilter=w(this,"filters"),this.removeAllActions=x(this,"actions",!0),this.removeAllFilters=x(this,"filters",!0),this.doAction=O(this,"actions"),this.applyFilters=O(this,"filters",!0),this.currentAction=E(this,"actions"),this.currentFilter=E(this,"filters"),this.doingAction=A(this,"actions"),this.doingFilter=A(this,"filters"),this.didAction=T(this,"actions"),this.didFilter=T(this,"filters")};var k=function(){return new _}(),j=(k.addAction,k.addFilter,k.removeAction,k.removeFilter,k.hasAction,k.hasFilter,k.removeAllActions,k.removeAllFilters,k.doAction,k.applyFilters,k.currentAction,k.currentFilter,k.doingAction,k.doingFilter,k.didAction,k.didFilter,k.actions,k.filters,function(e,t,n){var r=new l({}),i=new Set,o=function(){i.forEach((function(e){return e()}))},a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";r.data[t]=h(h(h({},m),r.data[t]),e),r.data[t][""]=h(h({},m[""]),r.data[t][""])},s=function(e,t){a(e,t),o()},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return r.data[e]||a(void 0,e),r.dcnpgettext(e,t,n,i,o)},u=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},p=function(e,t,r){var i=c(r,t,e);return n?(i=n.applyFilters("i18n.gettext_with_context",i,e,t,r),n.applyFilters("i18n.gettext_with_context_"+u(r),i,e,t,r)):i};if(e&&s(e,t),n){var f=function(e){v.test(e)&&o()};n.addAction("hookAdded","core/i18n",f),n.addAction("hookRemoved","core/i18n",f)}return{getLocaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r.data[e]},setLocaleData:s,resetLocaleData:function(e,t){r.data={},r.pluralForms={},s(e,t)},subscribe:function(e){return i.add(e),function(){return i.delete(e)}},__:function(e,t){var r=c(t,void 0,e);return n?(r=n.applyFilters("i18n.gettext",r,e,t),n.applyFilters("i18n.gettext_"+u(t),r,e,t)):r},_x:p,_n:function(e,t,r,i){var o=c(i,void 0,e,t,r);return n?(o=n.applyFilters("i18n.ngettext",o,e,t,r,i),n.applyFilters("i18n.ngettext_"+u(i),o,e,t,r,i)):o},_nx:function(e,t,r,i,o){var a=c(o,i,e,t,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,e,t,r,i,o),n.applyFilters("i18n.ngettext_with_context_"+u(o),a,e,t,r,i,o)):a},isRTL:function(){return"rtl"===p("ltr","text direction")},hasTranslation:function(e,t,i){var o,a,s=t?t+""+e:e,c=!(null===(o=r.data)||void 0===o||null===(a=o[null!=i?i:"default"])||void 0===a||!a[s]);return n&&(c=n.applyFilters("i18n.has_translation",c,e,t,i),c=n.applyFilters("i18n.has_translation_"+u(i),c,e,t,i)),c}}}(void 0,void 0,k)),L=(j.getLocaleData.bind(j),j.setLocaleData.bind(j),j.resetLocaleData.bind(j),j.subscribe.bind(j),j.__.bind(j));j._x.bind(j),j._n.bind(j),j._nx.bind(j),j.isRTL.bind(j),j.hasTranslation.bind(j);function D(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function C(e){return e instanceof D(e).Element||e instanceof Element}function S(e){return e instanceof D(e).HTMLElement||e instanceof HTMLElement}function F(e){return"undefined"!=typeof ShadowRoot&&(e instanceof D(e).ShadowRoot||e instanceof ShadowRoot)}var P=Math.max,I=Math.min,M=Math.round;function R(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function H(){return!/^((?!chrome|android).)*safari/i.test(R())}function V(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&S(e)&&(i=e.offsetWidth>0&&M(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&M(r.height)/e.offsetHeight||1);var a=(C(e)?D(e):window).visualViewport,s=!H()&&n,c=(r.left+(s&&a?a.offsetLeft:0))/i,u=(r.top+(s&&a?a.offsetTop:0))/o,p=r.width/i,f=r.height/o;return{width:p,height:f,top:u,right:c+p,bottom:u+f,left:c,x:c,y:u}}function W(e){var t=D(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function N(e){return e?(e.nodeName||"").toLowerCase():null}function B(e){return((C(e)?e.ownerDocument:e.document)||window.document).documentElement}function z(e){return V(B(e)).left+W(e).scrollLeft}function q(e){return D(e).getComputedStyle(e)}function U(e){var t=q(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function $(e,t,n){void 0===n&&(n=!1);var r,i,o=S(t),a=S(t)&&function(e){var t=e.getBoundingClientRect(),n=M(t.width)/e.offsetWidth||1,r=M(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=B(t),c=V(e,a,n),u={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(o||!o&&!n)&&(("body"!==N(t)||U(s))&&(u=(r=t)!==D(r)&&S(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:W(r)),S(t)?((p=V(t,!0)).x+=t.clientLeft,p.y+=t.clientTop):s&&(p.x=z(s))),{x:c.left+u.scrollLeft-p.x,y:c.top+u.scrollTop-p.y,width:c.width,height:c.height}}function X(e){var t=V(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Z(e){return"html"===N(e)?e:e.assignedSlot||e.parentNode||(F(e)?e.host:null)||B(e)}function K(e){return["html","body","#document"].indexOf(N(e))>=0?e.ownerDocument.body:S(e)&&U(e)?e:K(Z(e))}function Y(e,t){var n;void 0===t&&(t=[]);var r=K(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=D(r),a=i?[o].concat(o.visualViewport||[],U(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(Y(Z(a)))}function J(e){return["table","td","th"].indexOf(N(e))>=0}function G(e){return S(e)&&"fixed"!==q(e).position?e.offsetParent:null}function Q(e){for(var t=D(e),n=G(e);n&&J(n)&&"static"===q(n).position;)n=G(n);return n&&("html"===N(n)||"body"===N(n)&&"static"===q(n).position)?t:n||function(e){var t=/firefox/i.test(R());if(/Trident/i.test(R())&&S(e)&&"fixed"===q(e).position)return null;var n=Z(e);for(F(n)&&(n=n.host);S(n)&&["html","body"].indexOf(N(n))<0;){var r=q(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var ee="top",te="bottom",ne="right",re="left",ie="auto",oe=[ee,te,ne,re],ae="start",se="end",ce="viewport",ue="popper",pe=oe.reduce((function(e,t){return e.concat([t+"-"+ae,t+"-"+se])}),[]),fe=[].concat(oe,[ie]).reduce((function(e,t){return e.concat([t,t+"-"+ae,t+"-"+se])}),[]),le=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function de(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var he={placement:"bottom",modifiers:[],strategy:"absolute"};function me(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ve(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,i=t.defaultOptions,o=void 0===i?he:i;return function(e,t,n){void 0===n&&(n=o);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},he,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,p={state:s,setOptions:function(n){var i="function"==typeof n?n(s.options):n;f(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:C(e)?Y(e):e.contextElement?Y(e.contextElement):[],popper:Y(t)};var a=function(e){var t=de(e);return le.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=a.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var o=i({state:s,name:t,instance:p,options:r}),a=function(){};c.push(o||a)}})),p.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(me(t,n)){s.rects={reference:$(t,Q(n),"fixed"===s.options.strategy),popper:X(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var i=s.orderedModifiers[r],o=i.fn,a=i.options,c=void 0===a?{}:a,f=i.name;"function"==typeof o&&(s=o({state:s,options:c,name:f,instance:p})||s)}else s.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){p.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(i())}))}))),a}),destroy:function(){f(),u=!0}};if(!me(e,t))return p;function f(){c.forEach((function(e){return e()})),c=[]}return p.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),p}}var ge={passive:!0};function ye(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function xe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function we(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?ye(i):null,a=i?be(i):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(o){case ee:t={x:s,y:n.y-r.height};break;case te:t={x:s,y:n.y+n.height};break;case ne:t={x:n.x+n.width,y:c};break;case re:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var u=o?xe(o):null;if(null!=u){var p="y"===u?"height":"width";switch(a){case ae:t[u]=t[u]-(n[p]/2-r[p]/2);break;case se:t[u]=t[u]+(n[p]/2-r[p]/2)}}return t}var Oe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ee(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,p=e.roundOffsets,f=e.isFixed,l=a.x,d=void 0===l?0:l,h=a.y,m=void 0===h?0:h,v="function"==typeof p?p({x:d,y:m}):{x:d,y:m};d=v.x,m=v.y;var g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=re,x=ee,w=window;if(u){var O=Q(n),E="clientHeight",A="clientWidth";if(O===D(n)&&"static"!==q(O=B(n)).position&&"absolute"===s&&(E="scrollHeight",A="scrollWidth"),i===ee||(i===re||i===ne)&&o===se)x=te,m-=(f&&O===w&&w.visualViewport?w.visualViewport.height:O[E])-r.height,m*=c?1:-1;if(i===re||(i===ee||i===te)&&o===se)b=ne,d-=(f&&O===w&&w.visualViewport?w.visualViewport.width:O[A])-r.width,d*=c?1:-1}var T,_=Object.assign({position:s},u&&Oe),k=!0===p?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:M(t*r)/r||0,y:M(n*r)/r||0}}({x:d,y:m}):{x:d,y:m};return d=k.x,m=k.y,c?Object.assign({},_,((T={})[x]=y?"0":"",T[b]=g?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+d+"px, "+m+"px)":"translate3d("+d+"px, "+m+"px, 0)",T)):Object.assign({},_,((t={})[x]=y?m+"px":"",t[b]=g?d+"px":"",t.transform="",t))}var Ae={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];S(i)&&N(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});S(r)&&N(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var Te={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=fe.reduce((function(e,n){return e[n]=function(e,t,n){var r=ye(e),i=[re,ee].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[re,ne].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],c=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},_e={left:"right",right:"left",bottom:"top",top:"bottom"};function ke(e){return e.replace(/left|right|bottom|top/g,(function(e){return _e[e]}))}var je={start:"end",end:"start"};function Le(e){return e.replace(/start|end/g,(function(e){return je[e]}))}function De(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&F(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ce(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Se(e,t,n){return t===ce?Ce(function(e,t){var n=D(e),r=B(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var u=H();(u||!u&&"fixed"===t)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+z(e),y:c}}(e,n)):C(t)?function(e,t){var n=V(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Ce(function(e){var t,n=B(e),r=W(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=P(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=P(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+z(e),c=-r.scrollTop;return"rtl"===q(i||n).direction&&(s+=P(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}(B(e)))}function Fe(e,t,n,r){var i="clippingParents"===t?function(e){var t=Y(Z(e)),n=["absolute","fixed"].indexOf(q(e).position)>=0&&S(e)?Q(e):e;return C(n)?t.filter((function(e){return C(e)&&De(e,n)&&"body"!==N(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce((function(t,n){var i=Se(e,n,r);return t.top=P(i.top,t.top),t.right=I(i.right,t.right),t.bottom=I(i.bottom,t.bottom),t.left=P(i.left,t.left),t}),Se(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Pe(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Ie(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Me(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,c=void 0===s?"clippingParents":s,u=n.rootBoundary,p=void 0===u?ce:u,f=n.elementContext,l=void 0===f?ue:f,d=n.altBoundary,h=void 0!==d&&d,m=n.padding,v=void 0===m?0:m,g=Pe("number"!=typeof v?v:Ie(v,oe)),y=l===ue?"reference":ue,b=e.rects.popper,x=e.elements[h?y:l],w=Fe(C(x)?x:x.contextElement||B(e.elements.popper),c,p,a),O=V(e.elements.reference),E=we({reference:O,element:b,strategy:"absolute",placement:i}),A=Ce(Object.assign({},b,E)),T=l===ue?A:O,_={top:w.top-T.top+g.top,bottom:T.bottom-w.bottom+g.bottom,left:w.left-T.left+g.left,right:T.right-w.right+g.right},k=e.modifiersData.offset;if(l===ue&&k){var j=k[i];Object.keys(_).forEach((function(e){var t=[ne,te].indexOf(e)>=0?1:-1,n=[ee,te].indexOf(e)>=0?"y":"x";_[e]+=j[n]*t}))}return _}function Re(e,t,n){return P(e,I(t,n))}var He={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.padding,l=n.tether,d=void 0===l||l,h=n.tetherOffset,m=void 0===h?0:h,v=Me(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:p}),g=ye(t.placement),y=be(t.placement),b=!y,x=xe(g),w="x"===x?"y":"x",O=t.modifiersData.popperOffsets,E=t.rects.reference,A=t.rects.popper,T="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,_="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(O){if(o){var L,D="y"===x?ee:re,C="y"===x?te:ne,S="y"===x?"height":"width",F=O[x],M=F+v[D],R=F-v[C],H=d?-A[S]/2:0,V=y===ae?E[S]:A[S],W=y===ae?-A[S]:-E[S],N=t.elements.arrow,B=d&&N?X(N):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},q=z[D],U=z[C],$=Re(0,E[S],B[S]),Z=b?E[S]/2-H-$-q-_.mainAxis:V-$-q-_.mainAxis,K=b?-E[S]/2+H+$+U+_.mainAxis:W+$+U+_.mainAxis,Y=t.elements.arrow&&Q(t.elements.arrow),J=Y?"y"===x?Y.clientTop||0:Y.clientLeft||0:0,G=null!=(L=null==k?void 0:k[x])?L:0,ie=F+K-G,oe=Re(d?I(M,F+Z-G-J):M,F,d?P(R,ie):R);O[x]=oe,j[x]=oe-F}if(s){var se,ce="x"===x?ee:re,ue="x"===x?te:ne,pe=O[w],fe="y"===w?"height":"width",le=pe+v[ce],de=pe-v[ue],he=-1!==[ee,re].indexOf(g),me=null!=(se=null==k?void 0:k[w])?se:0,ve=he?le:pe-E[fe]-A[fe]-me+_.altAxis,ge=he?pe+E[fe]+A[fe]-me-_.altAxis:de,we=d&&he?function(e,t,n){var r=Re(e,t,n);return r>n?n:r}(ve,pe,ge):Re(d?ve:le,pe,d?ge:de);O[w]=we,j[w]=we-pe}t.modifiersData[r]=j}},requiresIfExists:["offset"]};var Ve={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ye(n.placement),c=xe(s),u=[re,ne].indexOf(s)>=0?"height":"width";if(o&&a){var p=function(e,t){return Pe("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ie(e,oe))}(i.padding,n),f=X(o),l="y"===c?ee:re,d="y"===c?te:ne,h=n.rects.reference[u]+n.rects.reference[c]-a[c]-n.rects.popper[u],m=a[c]-n.rects.reference[c],v=Q(o),g=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,y=h/2-m/2,b=p[l],x=g-f[u]-p[d],w=g/2-f[u]/2+y,O=Re(b,w,x),E=c;n.modifiersData[r]=((t={})[E]=O,t.centerOffset=O-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&De(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function We(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ne(e){return[ee,ne,te,re].some((function(t){return e[t]>=0}))}var Be=ve({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,c=D(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,ge)})),s&&c.addEventListener("resize",n.update,ge),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,ge)})),s&&c.removeEventListener("resize",n.update,ge)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=we({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,c=void 0===s||s,u={placement:ye(t.placement),variation:be(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ee(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ee(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Ae,Te,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,u=n.padding,p=n.boundary,f=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,g=ye(v),y=c||(g===v||!h?[ke(v)]:function(e){if(ye(e)===ie)return[];var t=ke(e);return[Le(e),t,Le(t)]}(v)),b=[v].concat(y).reduce((function(e,n){return e.concat(ye(n)===ie?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?fe:c,p=be(r),f=p?s?pe:pe.filter((function(e){return be(e)===p})):oe,l=f.filter((function(e){return u.indexOf(e)>=0}));0===l.length&&(l=f);var d=l.reduce((function(t,n){return t[n]=Me(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[ye(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:p,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,O=new Map,E=!0,A=b[0],T=0;T<b.length;T++){var _=b[T],k=ye(_),j=be(_)===ae,L=[ee,te].indexOf(k)>=0,D=L?"width":"height",C=Me(t,{placement:_,boundary:p,rootBoundary:f,altBoundary:l,padding:u}),S=L?j?ne:re:j?te:ee;x[D]>w[D]&&(S=ke(S));var F=ke(S),P=[];if(o&&P.push(C[k]<=0),s&&P.push(C[S]<=0,C[F]<=0),P.every((function(e){return e}))){A=_,E=!1;break}O.set(_,P)}if(E)for(var I=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return A=t,"break"},M=h?3:1;M>0;M--){if("break"===I(M))break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},He,Ve,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Me(t,{elementContext:"reference"}),s=Me(t,{altBoundary:!0}),c=We(a,r),u=We(s,i,o),p=Ne(c),f=Ne(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:p,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}]}),ze="tippy-content",qe="tippy-backdrop",Ue="tippy-arrow",$e="tippy-svg-arrow",Xe={passive:!0,capture:!0},Ze=function(){return document.body};function Ke(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function Ye(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Je(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Ge(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Qe(e){return[].concat(e)}function et(e,t){-1===e.indexOf(t)&&e.push(t)}function tt(e){return e.split("-")[0]}function nt(e){return[].slice.call(e)}function rt(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function it(){return document.createElement("div")}function ot(e){return["Element","Fragment"].some((function(t){return Ye(e,t)}))}function at(e){return Ye(e,"MouseEvent")}function st(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function ct(e){return ot(e)?[e]:function(e){return Ye(e,"NodeList")}(e)?nt(e):Array.isArray(e)?e:nt(document.querySelectorAll(e))}function ut(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function pt(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function ft(e){var t,n=Qe(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function lt(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function dt(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var ht={isTouch:!1},mt=0;function vt(){ht.isTouch||(ht.isTouch=!0,window.performance&&document.addEventListener("mousemove",gt))}function gt(){var e=performance.now();e-mt<20&&(ht.isTouch=!1,document.removeEventListener("mousemove",gt)),mt=e}function yt(){var e=document.activeElement;if(st(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var bt=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var xt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},wt=Object.assign({appendTo:Ze,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},xt,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Ot=Object.keys(wt);function Et(e){var t=(e.plugins||[]).reduce((function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=wt[i])?r:o);return t}),{});return Object.assign({},e,t)}function At(e,t){var n=Object.assign({},t,{content:Je(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Et(Object.assign({},wt,{plugins:t}))):Ot).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},wt.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Tt(e,t){e.innerHTML=t}function _t(e){var t=it();return!0===e?t.className=Ue:(t.className=$e,ot(e)?t.appendChild(e):Tt(t,e)),t}function kt(e,t){ot(t.content)?(Tt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Tt(e,t.content):e.textContent=t.content)}function jt(e){var t=e.firstElementChild,n=nt(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ze)})),arrow:n.find((function(e){return e.classList.contains(Ue)||e.classList.contains($e)})),backdrop:n.find((function(e){return e.classList.contains(qe)}))}}function Lt(e){var t=it(),n=it();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=it();function i(n,r){var i=jt(t),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||kt(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(_t(r.arrow))):o.appendChild(_t(r.arrow)):s&&o.removeChild(s)}return r.className=ze,r.setAttribute("data-state","hidden"),kt(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}Lt.$$tippy=!0;var Dt=1,Ct=[],St=[];function Ft(e,t){var n,r,i,o,a,s,c,u,p=At(e,Object.assign({},wt,Et(rt(t)))),f=!1,l=!1,d=!1,h=!1,m=[],v=Ge(X,p.interactiveDebounce),g=Dt++,y=(u=p.plugins).filter((function(e,t){return u.indexOf(e)===t})),b={id:g,reference:e,popper:it(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){0;if(b.state.isDestroyed)return;F("onBeforeUpdate",[b,t]),U();var n=b.props,r=At(e,Object.assign({},n,rt(t),{ignoreAttributes:!0}));b.props=r,q(),n.interactiveDebounce!==r.interactiveDebounce&&(M(),v=Ge(X,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Qe(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");I(),S(),O&&O(n,r);b.popperInstance&&(J(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));F("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){0;var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=ht.isTouch&&!b.props.touch,i=Ke(b.props.duration,0,wt.duration);if(e||t||n||r)return;if(j().hasAttribute("disabled"))return;if(F("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,k()&&(w.style.visibility="visible");S(),W(),b.state.isMounted||(w.style.transition="none");if(k()){var o=D();ut([o.box,o.content],0)}s=function(){var e;if(b.state.isVisible&&!h){if(h=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,k()&&b.props.animation){var t=D(),n=t.box,r=t.content;ut([n,r],i),pt([n,r],"visible")}P(),I(),et(St,b),null==(e=b.popperInstance)||e.forceUpdate(),F("onMount",[b]),b.props.animation&&k()&&function(e,t){B(e,t)}(i,(function(){b.state.isShown=!0,F("onShown",[b])}))}},function(){var e,t=b.props.appendTo,n=j();e=b.props.interactive&&t===Ze||"parent"===t?n.parentNode:Je(t,[n]);e.contains(w)||e.appendChild(w);b.state.isMounted=!0,J(),!1}()},hide:function(){0;var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Ke(b.props.duration,1,wt.duration);if(e||t||n)return;if(F("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,h=!1,f=!1,k()&&(w.style.visibility="hidden");if(M(),N(),S(!0),k()){var i=D(),o=i.box,a=i.content;b.props.animation&&(ut([o,a],r),pt([o,a],"hidden"))}P(),I(),b.props.animation?k()&&function(e,t){B(e,(function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&t()}))}(r,b.unmount):b.unmount()},hideWithInteractivity:function(e){0;L().addEventListener("mousemove",v),et(Ct,v),v(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;G(),Q().forEach((function(e){e._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);St=St.filter((function(e){return e!==b})),b.state.isMounted=!1,F("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),U(),delete e._tippy,b.state.isDestroyed=!0,F("onDestroy",[b])}};if(!p.render)return b;var x=p.render(b),w=x.popper,O=x.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,e._tippy=b,w._tippy=b;var E=y.map((function(e){return e.fn(b)})),A=e.hasAttribute("aria-expanded");return q(),I(),S(),F("onCreate",[b]),p.showOnCreate&&ee(),w.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&L().addEventListener("mousemove",v)})),b;function T(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function _(){return"hold"===T()[0]}function k(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function j(){return c||e}function L(){var e=j().parentNode;return e?ft(e):document}function D(){return jt(w)}function C(e){return b.state.isMounted&&!b.state.isVisible||ht.isTouch||o&&"focus"===o.type?0:Ke(b.props.delay,e?0:1,wt.delay)}function S(e){void 0===e&&(e=!1),w.style.pointerEvents=b.props.interactive&&!e?"":"none",w.style.zIndex=""+b.props.zIndex}function F(e,t,n){var r;(void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=b.props)[e].apply(r,t)}function P(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=w.id;Qe(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function I(){!A&&b.props.aria.expanded&&Qe(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===j()?"true":"false"):e.removeAttribute("aria-expanded")}))}function M(){L().removeEventListener("mousemove",v),Ct=Ct.filter((function(e){return e!==v}))}function R(t){if(!ht.isTouch||!d&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!dt(w,n)){if(Qe(b.props.triggerTarget||e).some((function(e){return dt(e,n)}))){if(ht.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),l=!0,setTimeout((function(){l=!1})),b.state.isMounted||N())}}}function H(){d=!0}function V(){d=!1}function W(){var e=L();e.addEventListener("mousedown",R,!0),e.addEventListener("touchend",R,Xe),e.addEventListener("touchstart",V,Xe),e.addEventListener("touchmove",H,Xe)}function N(){var e=L();e.removeEventListener("mousedown",R,!0),e.removeEventListener("touchend",R,Xe),e.removeEventListener("touchstart",V,Xe),e.removeEventListener("touchmove",H,Xe)}function B(e,t){var n=D().box;function r(e){e.target===n&&(lt(n,"remove",r),t())}if(0===e)return t();lt(n,"remove",a),lt(n,"add",r),a=r}function z(t,n,r){void 0===r&&(r=!1),Qe(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function q(){var e;_()&&(z("touchstart",$,{passive:!0}),z("touchend",Z,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(z(e,$),e){case"mouseenter":z("mouseleave",Z);break;case"focus":z(bt?"focusout":"blur",K);break;case"focusin":z("focusout",K)}}))}function U(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),m=[]}function $(e){var t,n=!1;if(b.state.isEnabled&&!Y(e)&&!l){var r="focus"===(null==(t=o)?void 0:t.type);o=e,c=e.currentTarget,I(),!b.state.isVisible&&at(e)&&Ct.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||f)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(f=!n),n&&!r&&te(e)}}function X(e){var t=e.target,n=j().contains(t)||w.contains(t);if("mousemove"!==e.type||!n){var r=Q().concat(w).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:p}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=tt(i.placement),s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,p="right"===a?s.left.x:0,f="left"===a?s.right.x:0,l=t.top-r+c>o,d=r-t.bottom-u>o,h=t.left-n+p>o,m=n-t.right-f>o;return l||d||h||m}))})(r,e)&&(M(),te(e))}}function Z(e){Y(e)||b.props.trigger.indexOf("click")>=0&&f||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function K(e){b.props.trigger.indexOf("focusin")<0&&e.target!==j()||b.props.interactive&&e.relatedTarget&&w.contains(e.relatedTarget)||te(e)}function Y(e){return!!ht.isTouch&&_()!==e.type.indexOf("touch")>=0}function J(){G();var t=b.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,c=k()?jt(w).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||j()}:e,p={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(k()){var n=D().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},f=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},p];k()&&c&&f.push({name:"arrow",options:{element:c,padding:3}}),f.push.apply(f,(null==n?void 0:n.modifiers)||[]),b.popperInstance=Be(u,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:f}))}function G(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return nt(w.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&F("onTrigger",[b,e]),W();var t=C(!0),r=T(),i=r[0],o=r[1];ht.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),F("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=C(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):i=requestAnimationFrame((function(){b.hide()}))}}else N()}}function Pt(e,t){void 0===t&&(t={});var n=wt.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",vt,Xe),window.addEventListener("blur",yt);var r=Object.assign({},t,{plugins:n}),i=ct(e).reduce((function(e,t){var n=t&&Ft(t,r);return n&&e.push(n),e}),[]);return ot(e)?i[0]:i}Pt.defaultProps=wt,Pt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){wt[t]=e[t]}))},Pt.currentInput=ht;Object.assign({},Ae,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});Pt.setDefaultProps({render:Lt});var It=Pt;const Mt={init(){[...document.images].forEach((e=>{const t=e.parentNode;"PICTURE"===t.tagName?(this.processPicture(e,t),e.addEventListener("load",this.load.bind(this,e,t))):this.wrapImage(e)}));const e=document.querySelectorAll(".cld-tag");this.tippy(e)},load(e,t){t.querySelectorAll(".overlay-tag").forEach((e=>e.remove())),this.processPicture(e,t),this.tippy(t.querySelectorAll(".cld-tag"))},processPicture(e,t){const n=t.querySelectorAll("source");n.length>0&&n.forEach((t=>{[t.src,t.srcset].some((t=>t.includes(e.currentSrc)))&&([...e.attributes].forEach((t=>{t.name.startsWith("data-")&&e.removeAttribute(t.name)})),Object.assign(e.dataset,{...t.dataset}))})),this.wrapImage(e)},wrapImage(e){e.dataset.publicId?this.cldTag(e):this.wpTag(e)},createTag(e){const t=document.createElement("span");return t.classList.add("overlay-tag"),e.parentNode.insertBefore(t,e),t},cldTag(e){const t=this.createTag(e);t.template=this.createTemplate(e),t.innerText=L("Cloudinary","cloudinary"),t.classList.add("cld-tag")},wpTag(e){const t=this.createTag(e);t.innerText=L("WordPress","cloudinary"),t.classList.add("wp-tag")},createTemplate(e){const t=document.createElement("div");t.classList.add("cld-tag-info"),t.appendChild(this.makeLine(L("Local size","cloudinary"),e.dataset.filesize)),t.appendChild(this.makeLine(L("Optimized size","cloudinary"),e.dataset.optsize)),t.appendChild(this.makeLine(L("Optimized format","cloudinary"),e.dataset.optformat)),e.dataset.percent&&t.appendChild(this.makeLine(L("Reduction","cloudinary"),e.dataset.percent+"%")),t.appendChild(this.makeLine(L("Transformations","cloudinary"),e.dataset.transformations)),e.dataset.transformationCrop&&t.appendChild(this.makeLine(L("Crop transformations","cloudinary"),e.dataset.transformationCrop));const n=document.createElement("a");return n.classList.add("edit-link"),n.href=e.dataset.permalink,n.innerText=L("Edit Effects","cloudinary"),t.appendChild(this.makeLine("","",n)),t},makeLine(e,t,n){const r=document.createElement("div"),i=document.createElement("span"),o=document.createElement("span");return i.innerText=e,i.classList.add("title"),o.innerText=t,n&&o.appendChild(n),r.appendChild(i),r.appendChild(o),r},tippy(e){It(e,{placement:"bottom-start",interactive:!0,appendTo:()=>document.body,aria:{content:"auto",expanded:"auto"},content:e=>e.template.innerHTML,allowHTML:!0})},debounce(e,t){let n=null;return(...r)=>{window.clearTimeout(n),n=window.setTimeout((()=>{e(...r)}),t)}}};window.addEventListener("load",(()=>Mt.init()))}()}(); 1 (()=>{"use strict";var t,e,n,r;t={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},e=["(","?"],n={")":["("],":":["?","?:"]},r=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var i={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,n){if(t)throw e;return n}};function o(o){var a=function(i){for(var o,a,s,c,u=[],p=[];o=i.match(r);){for(a=o[0],(s=i.substr(0,o.index).trim())&&u.push(s);c=p.pop();){if(n[a]){if(n[a][0]===c){a=n[a][1]||a;break}}else if(e.indexOf(c)>=0||t[c]<t[a]){p.push(c);break}u.push(c)}n[a]||p.push(a),i=i.substr(o.index+a.length)}return(i=i.trim())&&u.push(i),u.concat(p.reverse())}(o);return function(t){return function(t,e){var n,r,o,a,s,c,u=[];for(n=0;n<t.length;n++){if(s=t[n],a=i[s]){for(r=a.length,o=Array(r);r--;)o[r]=u.pop();try{c=a.apply(null,o)}catch(t){return t}}else c=e.hasOwnProperty(s)?e[s]:+s;u.push(c)}return u[0]}(a,t)}}var a={contextDelimiter:"",onMissingKey:null};function s(t,e){var n;for(n in this.data=t,this.pluralForms={},this.options={},a)this.options[n]=void 0!==e&&n in e?e[n]:a[n]}s.prototype.getPluralForm=function(t,e){var n,r,i,a=this.pluralForms[t];return a||("function"!=typeof(i=(n=this.data[t][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(t){var e,n,r;for(e=t.split(";"),n=0;n<e.length;n++)if(0===(r=e[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=function(t){var e=o(t);return function(t){return+e({n:t})}}(r)),a=this.pluralForms[t]=i),a(e)},s.prototype.dcnpgettext=function(t,e,n,r,i){var o,a,s;return o=void 0===i?0:this.getPluralForm(t,i),a=n,e&&(a=e+this.options.contextDelimiter+n),(s=this.data[t][a])&&s[o]?s[o]:(this.options.onMissingKey&&this.options.onMissingKey(n,t),0===o?n:r)};var c={plural_forms:t=>1===t?0:1},u=/^i18n\.(n?gettext|has_translation)(_|$)/;var p=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var f=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var l=function(t,e){return function(n,r,i,o=10){const a=t[e];if(!f(n))return;if(!p(r))return;if("function"!=typeof i)return void console.error("The hook callback must be a function.");if("number"!=typeof o)return void console.error("If specified, the hook priority must be a number.");const s={callback:i,priority:o,namespace:r};if(a[n]){const t=a[n].handlers;let e;for(e=t.length;e>0&&!(o>=t[e-1].priority);e--);e===t.length?t[e]=s:t.splice(e,0,s),a.__current.forEach(t=>{t.name===n&&t.currentIndex>=e&&t.currentIndex++})}else a[n]={handlers:[s],runs:0};"hookAdded"!==n&&t.doAction("hookAdded",n,r,i,o)}};var d=function(t,e,n=!1){return function(r,i){const o=t[e];if(!f(r))return;if(!n&&!p(i))return;if(!o[r])return 0;let a=0;if(n)a=o[r].handlers.length,o[r]={runs:o[r].runs,handlers:[]};else{const t=o[r].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===i&&(t.splice(e,1),a++,o.__current.forEach(t=>{t.name===r&&t.currentIndex>=e&&t.currentIndex--}))}return"hookRemoved"!==r&&t.doAction("hookRemoved",r,i),a}};var m=function(t,e){return function(n,r){const i=t[e];return void 0!==r?n in i&&i[n].handlers.some(t=>t.namespace===r):n in i}};var h=function(t,e,n,r){return function(i,...o){const a=t[e];a[i]||(a[i]={handlers:[],runs:0}),a[i].runs++;const s=a[i].handlers;if(!s||!s.length)return n?o[0]:void 0;const c={name:i,currentIndex:0};return(r?async function(){try{a.__current.add(c);let t=n?o[0]:void 0;for(;c.currentIndex<s.length;){const e=s[c.currentIndex];t=await e.callback.apply(null,o),n&&(o[0]=t),c.currentIndex++}return n?t:void 0}finally{a.__current.delete(c)}}:function(){try{a.__current.add(c);let t=n?o[0]:void 0;for(;c.currentIndex<s.length;){t=s[c.currentIndex].callback.apply(null,o),n&&(o[0]=t),c.currentIndex++}return n?t:void 0}finally{a.__current.delete(c)}})()}};var v=function(t,e){return function(){const n=t[e],r=Array.from(n.__current);return r.at(-1)?.name??null}};var g=function(t,e){return function(n){const r=t[e];return void 0===n?r.__current.size>0:Array.from(r.__current).some(t=>t.name===n)}};var y=function(t,e){return function(n){const r=t[e];if(f(n))return r[n]&&r[n].runs?r[n].runs:0}},b=class{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=l(this,"actions"),this.addFilter=l(this,"filters"),this.removeAction=d(this,"actions"),this.removeFilter=d(this,"filters"),this.hasAction=m(this,"actions"),this.hasFilter=m(this,"filters"),this.removeAllActions=d(this,"actions",!0),this.removeAllFilters=d(this,"filters",!0),this.doAction=h(this,"actions",!1,!1),this.doActionAsync=h(this,"actions",!1,!0),this.applyFilters=h(this,"filters",!0,!1),this.applyFiltersAsync=h(this,"filters",!0,!0),this.currentAction=v(this,"actions"),this.currentFilter=v(this,"filters"),this.doingAction=g(this,"actions"),this.doingFilter=g(this,"filters"),this.didAction=y(this,"actions"),this.didFilter=y(this,"filters")}};var x=function(){return new b}(),{addAction:w,addFilter:A,removeAction:O,removeFilter:E,hasAction:T,hasFilter:L,removeAllActions:_,removeAllFilters:k,doAction:D,doActionAsync:F,applyFilters:j,applyFiltersAsync:C,currentAction:M,currentFilter:I,doingAction:P,doingFilter:S,didAction:R,didFilter:H,actions:V,filters:W}=x,B=((t,e,n)=>{const r=new s({}),i=new Set,o=()=>{i.forEach(t=>t())},a=(t,e="default")=>{r.data[e]={...r.data[e],...t},r.data[e][""]={...c,...r.data[e]?.[""]},delete r.pluralForms[e]},p=(t,e)=>{a(t,e),o()},f=(t="default",e,n,i,o)=>(r.data[t]||a(void 0,t),r.dcnpgettext(t,e,n,i,o)),l=t=>t||"default",d=(t,e,r)=>{let i=f(r,e,t);return n?(i=n.applyFilters("i18n.gettext_with_context",i,t,e,r),n.applyFilters("i18n.gettext_with_context_"+l(r),i,t,e,r)):i};if(t&&p(t,e),n){const t=t=>{u.test(t)&&o()};n.addAction("hookAdded","core/i18n",t),n.addAction("hookRemoved","core/i18n",t)}return{getLocaleData:(t="default")=>r.data[t],setLocaleData:p,addLocaleData:(t,e="default")=>{r.data[e]={...r.data[e],...t,"":{...c,...r.data[e]?.[""],...t?.[""]}},delete r.pluralForms[e],o()},resetLocaleData:(t,e)=>{r.data={},r.pluralForms={},p(t,e)},subscribe:t=>(i.add(t),()=>i.delete(t)),__:(t,e)=>{let r=f(e,void 0,t);return n?(r=n.applyFilters("i18n.gettext",r,t,e),n.applyFilters("i18n.gettext_"+l(e),r,t,e)):r},_x:d,_n:(t,e,r,i)=>{let o=f(i,void 0,t,e,r);return n?(o=n.applyFilters("i18n.ngettext",o,t,e,r,i),n.applyFilters("i18n.ngettext_"+l(i),o,t,e,r,i)):o},_nx:(t,e,r,i,o)=>{let a=f(o,i,t,e,r);return n?(a=n.applyFilters("i18n.ngettext_with_context",a,t,e,r,i,o),n.applyFilters("i18n.ngettext_with_context_"+l(o),a,t,e,r,i,o)):a},isRTL:()=>"rtl"===d("ltr","text direction"),hasTranslation:(t,e,i)=>{const o=e?e+""+t:t;let a=!!r.data?.[i??"default"]?.[o];return n&&(a=n.applyFilters("i18n.has_translation",a,t,e,i),a=n.applyFilters("i18n.has_translation_"+l(i),a,t,e,i)),a}}})(void 0,void 0,x),N=(B.getLocaleData.bind(B),B.setLocaleData.bind(B),B.resetLocaleData.bind(B),B.subscribe.bind(B),B.__.bind(B));B._x.bind(B),B._n.bind(B),B._nx.bind(B),B.isRTL.bind(B),B.hasTranslation.bind(B);function q(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function z(t){return t instanceof q(t).Element||t instanceof Element}function U(t){return t instanceof q(t).HTMLElement||t instanceof HTMLElement}function $(t){return"undefined"!=typeof ShadowRoot&&(t instanceof q(t).ShadowRoot||t instanceof ShadowRoot)}var Z=Math.max,K=Math.min,X=Math.round;function Y(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function J(){return!/^((?!chrome|android).)*safari/i.test(Y())}function G(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&U(t)&&(i=t.offsetWidth>0&&X(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&X(r.height)/t.offsetHeight||1);var a=(z(t)?q(t):window).visualViewport,s=!J()&&n,c=(r.left+(s&&a?a.offsetLeft:0))/i,u=(r.top+(s&&a?a.offsetTop:0))/o,p=r.width/i,f=r.height/o;return{width:p,height:f,top:u,right:c+p,bottom:u+f,left:c,x:c,y:u}}function Q(t){var e=q(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function tt(t){return t?(t.nodeName||"").toLowerCase():null}function et(t){return((z(t)?t.ownerDocument:t.document)||window.document).documentElement}function nt(t){return G(et(t)).left+Q(t).scrollLeft}function rt(t){return q(t).getComputedStyle(t)}function it(t){var e=rt(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function ot(t,e,n){void 0===n&&(n=!1);var r,i,o=U(e),a=U(e)&&function(t){var e=t.getBoundingClientRect(),n=X(e.width)/t.offsetWidth||1,r=X(e.height)/t.offsetHeight||1;return 1!==n||1!==r}(e),s=et(e),c=G(t,a,n),u={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(o||!o&&!n)&&(("body"!==tt(e)||it(s))&&(u=(r=e)!==q(r)&&U(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:Q(r)),U(e)?((p=G(e,!0)).x+=e.clientLeft,p.y+=e.clientTop):s&&(p.x=nt(s))),{x:c.left+u.scrollLeft-p.x,y:c.top+u.scrollTop-p.y,width:c.width,height:c.height}}function at(t){var e=G(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function st(t){return"html"===tt(t)?t:t.assignedSlot||t.parentNode||($(t)?t.host:null)||et(t)}function ct(t){return["html","body","#document"].indexOf(tt(t))>=0?t.ownerDocument.body:U(t)&&it(t)?t:ct(st(t))}function ut(t,e){var n;void 0===e&&(e=[]);var r=ct(t),i=r===(null==(n=t.ownerDocument)?void 0:n.body),o=q(r),a=i?[o].concat(o.visualViewport||[],it(r)?r:[]):r,s=e.concat(a);return i?s:s.concat(ut(st(a)))}function pt(t){return["table","td","th"].indexOf(tt(t))>=0}function ft(t){return U(t)&&"fixed"!==rt(t).position?t.offsetParent:null}function lt(t){for(var e=q(t),n=ft(t);n&&pt(n)&&"static"===rt(n).position;)n=ft(n);return n&&("html"===tt(n)||"body"===tt(n)&&"static"===rt(n).position)?e:n||function(t){var e=/firefox/i.test(Y());if(/Trident/i.test(Y())&&U(t)&&"fixed"===rt(t).position)return null;var n=st(t);for($(n)&&(n=n.host);U(n)&&["html","body"].indexOf(tt(n))<0;){var r=rt(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||e&&"filter"===r.willChange||e&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(t)||e}var dt="top",mt="bottom",ht="right",vt="left",gt="auto",yt=[dt,mt,ht,vt],bt="start",xt="end",wt="viewport",At="popper",Ot=yt.reduce(function(t,e){return t.concat([e+"-"+bt,e+"-"+xt])},[]),Et=[].concat(yt,[gt]).reduce(function(t,e){return t.concat([e,e+"-"+bt,e+"-"+xt])},[]),Tt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Lt(t){var e=new Map,n=new Set,r=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var r=e.get(t);r&&i(r)}}),r.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||i(t)}),r}var _t={placement:"bottom",modifiers:[],strategy:"absolute"};function kt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function Dt(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,r=void 0===n?[]:n,i=e.defaultOptions,o=void 0===i?_t:i;return function(t,e,n){void 0===n&&(n=o);var i,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},_t,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],u=!1,p={state:s,setOptions:function(n){var i="function"==typeof n?n(s.options):n;f(),s.options=Object.assign({},o,s.options,i),s.scrollParents={reference:z(t)?ut(t):t.contextElement?ut(t.contextElement):[],popper:ut(e)};var a,u,l=function(t){var e=Lt(t);return Tt.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((a=[].concat(r,s.options.modifiers),u=a.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(u).map(function(t){return u[t]})));return s.orderedModifiers=l.filter(function(t){return t.enabled}),s.orderedModifiers.forEach(function(t){var e=t.name,n=t.options,r=void 0===n?{}:n,i=t.effect;if("function"==typeof i){var o=i({state:s,name:e,instance:p,options:r}),a=function(){};c.push(o||a)}}),p.update()},forceUpdate:function(){if(!u){var t=s.elements,e=t.reference,n=t.popper;if(kt(e,n)){s.rects={reference:ot(e,lt(n),"fixed"===s.options.strategy),popper:at(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(t){return s.modifiersData[t.name]=Object.assign({},t.data)});for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var i=s.orderedModifiers[r],o=i.fn,a=i.options,c=void 0===a?{}:a,f=i.name;"function"==typeof o&&(s=o({state:s,options:c,name:f,instance:p})||s)}else s.reset=!1,r=-1}}},update:(i=function(){return new Promise(function(t){p.forceUpdate(),t(s)})},function(){return a||(a=new Promise(function(t){Promise.resolve().then(function(){a=void 0,t(i())})})),a}),destroy:function(){f(),u=!0}};if(!kt(t,e))return p;function f(){c.forEach(function(t){return t()}),c=[]}return p.setOptions(n).then(function(t){!u&&n.onFirstUpdate&&n.onFirstUpdate(t)}),p}}var Ft={passive:!0};function jt(t){return t.split("-")[0]}function Ct(t){return t.split("-")[1]}function Mt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function It(t){var e,n=t.reference,r=t.element,i=t.placement,o=i?jt(i):null,a=i?Ct(i):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(o){case dt:e={x:s,y:n.y-r.height};break;case mt:e={x:s,y:n.y+n.height};break;case ht:e={x:n.x+n.width,y:c};break;case vt:e={x:n.x-r.width,y:c};break;default:e={x:n.x,y:n.y}}var u=o?Mt(o):null;if(null!=u){var p="y"===u?"height":"width";switch(a){case bt:e[u]=e[u]-(n[p]/2-r[p]/2);break;case xt:e[u]=e[u]+(n[p]/2-r[p]/2)}}return e}var Pt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function St(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,c=t.gpuAcceleration,u=t.adaptive,p=t.roundOffsets,f=t.isFixed,l=a.x,d=void 0===l?0:l,m=a.y,h=void 0===m?0:m,v="function"==typeof p?p({x:d,y:h}):{x:d,y:h};d=v.x,h=v.y;var g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=vt,x=dt,w=window;if(u){var A=lt(n),O="clientHeight",E="clientWidth";if(A===q(n)&&"static"!==rt(A=et(n)).position&&"absolute"===s&&(O="scrollHeight",E="scrollWidth"),i===dt||(i===vt||i===ht)&&o===xt)x=mt,h-=(f&&A===w&&w.visualViewport?w.visualViewport.height:A[O])-r.height,h*=c?1:-1;if(i===vt||(i===dt||i===mt)&&o===xt)b=ht,d-=(f&&A===w&&w.visualViewport?w.visualViewport.width:A[E])-r.width,d*=c?1:-1}var T,L=Object.assign({position:s},u&&Pt),_=!0===p?function(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:X(n*i)/i||0,y:X(r*i)/i||0}}({x:d,y:h},q(n)):{x:d,y:h};return d=_.x,h=_.y,c?Object.assign({},L,((T={})[x]=y?"0":"",T[b]=g?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+d+"px, "+h+"px)":"translate3d("+d+"px, "+h+"px, 0)",T)):Object.assign({},L,((e={})[x]=y?h+"px":"",e[b]=g?d+"px":"",e.transform="",e))}const Rt={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},i=e.elements[t];U(i)&&tt(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(t){var e=r[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var r=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});U(r)&&tt(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(t){r.removeAttribute(t)}))})}},requires:["computeStyles"]};const Ht={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=void 0===i?[0,0]:i,a=Et.reduce(function(t,n){return t[n]=function(t,e,n){var r=jt(t),i=[vt,dt].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[vt,ht].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,e.rects,o),t},{}),s=a[e.placement],c=s.x,u=s.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=a}};var Vt={left:"right",right:"left",bottom:"top",top:"bottom"};function Wt(t){return t.replace(/left|right|bottom|top/g,function(t){return Vt[t]})}var Bt={start:"end",end:"start"};function Nt(t){return t.replace(/start|end/g,function(t){return Bt[t]})}function qt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&$(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function zt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Ut(t,e,n){return e===wt?zt(function(t,e){var n=q(t),r=et(t),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var u=J();(u||!u&&"fixed"===e)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+nt(t),y:c}}(t,n)):z(e)?function(t,e){var n=G(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):zt(function(t){var e,n=et(t),r=Q(t),i=null==(e=t.ownerDocument)?void 0:e.body,o=Z(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Z(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+nt(t),c=-r.scrollTop;return"rtl"===rt(i||n).direction&&(s+=Z(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}(et(t)))}function $t(t,e,n,r){var i="clippingParents"===e?function(t){var e=ut(st(t)),n=["absolute","fixed"].indexOf(rt(t).position)>=0&&U(t)?lt(t):t;return z(n)?e.filter(function(t){return z(t)&&qt(t,n)&&"body"!==tt(t)}):[]}(t):[].concat(e),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(e,n){var i=Ut(t,n,r);return e.top=Z(i.top,e.top),e.right=K(i.right,e.right),e.bottom=K(i.bottom,e.bottom),e.left=Z(i.left,e.left),e},Ut(t,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Zt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Kt(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function Xt(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=void 0===r?t.placement:r,o=n.strategy,a=void 0===o?t.strategy:o,s=n.boundary,c=void 0===s?"clippingParents":s,u=n.rootBoundary,p=void 0===u?wt:u,f=n.elementContext,l=void 0===f?At:f,d=n.altBoundary,m=void 0!==d&&d,h=n.padding,v=void 0===h?0:h,g=Zt("number"!=typeof v?v:Kt(v,yt)),y=l===At?"reference":At,b=t.rects.popper,x=t.elements[m?y:l],w=$t(z(x)?x:x.contextElement||et(t.elements.popper),c,p,a),A=G(t.elements.reference),O=It({reference:A,element:b,strategy:"absolute",placement:i}),E=zt(Object.assign({},b,O)),T=l===At?E:A,L={top:w.top-T.top+g.top,bottom:T.bottom-w.bottom+g.bottom,left:w.left-T.left+g.left,right:T.right-w.right+g.right},_=t.modifiersData.offset;if(l===At&&_){var k=_[i];Object.keys(L).forEach(function(t){var e=[ht,mt].indexOf(t)>=0?1:-1,n=[dt,mt].indexOf(t)>=0?"y":"x";L[t]+=k[n]*e})}return L}function Yt(t,e,n){return Z(t,K(e,n))}const Jt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,u=n.rootBoundary,p=n.altBoundary,f=n.padding,l=n.tether,d=void 0===l||l,m=n.tetherOffset,h=void 0===m?0:m,v=Xt(e,{boundary:c,rootBoundary:u,padding:f,altBoundary:p}),g=jt(e.placement),y=Ct(e.placement),b=!y,x=Mt(g),w="x"===x?"y":"x",A=e.modifiersData.popperOffsets,O=e.rects.reference,E=e.rects.popper,T="function"==typeof h?h(Object.assign({},e.rects,{placement:e.placement})):h,L="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),_=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(A){if(o){var D,F="y"===x?dt:vt,j="y"===x?mt:ht,C="y"===x?"height":"width",M=A[x],I=M+v[F],P=M-v[j],S=d?-E[C]/2:0,R=y===bt?O[C]:E[C],H=y===bt?-E[C]:-O[C],V=e.elements.arrow,W=d&&V?at(V):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},N=B[F],q=B[j],z=Yt(0,O[C],W[C]),U=b?O[C]/2-S-z-N-L.mainAxis:R-z-N-L.mainAxis,$=b?-O[C]/2+S+z+q+L.mainAxis:H+z+q+L.mainAxis,X=e.elements.arrow&<(e.elements.arrow),Y=X?"y"===x?X.clientTop||0:X.clientLeft||0:0,J=null!=(D=null==_?void 0:_[x])?D:0,G=M+$-J,Q=Yt(d?K(I,M+U-J-Y):I,M,d?Z(P,G):P);A[x]=Q,k[x]=Q-M}if(s){var tt,et="x"===x?dt:vt,nt="x"===x?mt:ht,rt=A[w],it="y"===w?"height":"width",ot=rt+v[et],st=rt-v[nt],ct=-1!==[dt,vt].indexOf(g),ut=null!=(tt=null==_?void 0:_[w])?tt:0,pt=ct?ot:rt-O[it]-E[it]-ut+L.altAxis,ft=ct?rt+O[it]+E[it]-ut-L.altAxis:st,gt=d&&ct?function(t,e,n){var r=Yt(t,e,n);return r>n?n:r}(pt,rt,ft):Yt(d?pt:ot,rt,d?ft:st);A[w]=gt,k[w]=gt-rt}e.modifiersData[r]=k}},requiresIfExists:["offset"]};const Gt={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=jt(n.placement),c=Mt(s),u=[vt,ht].indexOf(s)>=0?"height":"width";if(o&&a){var p=function(t,e){return Zt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Kt(t,yt))}(i.padding,n),f=at(o),l="y"===c?dt:vt,d="y"===c?mt:ht,m=n.rects.reference[u]+n.rects.reference[c]-a[c]-n.rects.popper[u],h=a[c]-n.rects.reference[c],v=lt(o),g=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,y=m/2-h/2,b=p[l],x=g-f[u]-p[d],w=g/2-f[u]/2+y,A=Yt(b,w,x),O=c;n.modifiersData[r]=((e={})[O]=A,e.centerOffset=A-w,e)}},effect:function(t){var e=t.state,n=t.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=e.elements.popper.querySelector(r)))&&qt(e.elements.popper,r)&&(e.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function te(t){return[dt,ht,mt,vt].some(function(e){return t[e]>=0})}var ee=Dt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,c=q(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(t){t.addEventListener("scroll",n.update,Ft)}),s&&c.addEventListener("resize",n.update,Ft),function(){o&&u.forEach(function(t){t.removeEventListener("scroll",n.update,Ft)}),s&&c.removeEventListener("resize",n.update,Ft)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=It({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,c=void 0===s||s,u={placement:jt(e.placement),variation:Ct(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,St(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,St(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Rt,Ht,{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,u=n.padding,p=n.boundary,f=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,m=void 0===d||d,h=n.allowedAutoPlacements,v=e.options.placement,g=jt(v),y=c||(g===v||!m?[Wt(v)]:function(t){if(jt(t)===gt)return[];var e=Wt(t);return[Nt(t),e,Nt(e)]}(v)),b=[v].concat(y).reduce(function(t,n){return t.concat(jt(n)===gt?function(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?Et:c,p=Ct(r),f=p?s?Ot:Ot.filter(function(t){return Ct(t)===p}):yt,l=f.filter(function(t){return u.indexOf(t)>=0});0===l.length&&(l=f);var d=l.reduce(function(e,n){return e[n]=Xt(t,{placement:n,boundary:i,rootBoundary:o,padding:a})[jt(n)],e},{});return Object.keys(d).sort(function(t,e){return d[t]-d[e]})}(e,{placement:n,boundary:p,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:h}):n)},[]),x=e.rects.reference,w=e.rects.popper,A=new Map,O=!0,E=b[0],T=0;T<b.length;T++){var L=b[T],_=jt(L),k=Ct(L)===bt,D=[dt,mt].indexOf(_)>=0,F=D?"width":"height",j=Xt(e,{placement:L,boundary:p,rootBoundary:f,altBoundary:l,padding:u}),C=D?k?ht:vt:k?mt:dt;x[F]>w[F]&&(C=Wt(C));var M=Wt(C),I=[];if(o&&I.push(j[_]<=0),s&&I.push(j[C]<=0,j[M]<=0),I.every(function(t){return t})){E=L,O=!1;break}A.set(L,I)}if(O)for(var P=function(t){var e=b.find(function(e){var n=A.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return E=e,"break"},S=m?3:1;S>0;S--){if("break"===P(S))break}e.placement!==E&&(e.modifiersData[r]._skip=!0,e.placement=E,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Jt,Gt,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=Xt(e,{elementContext:"reference"}),s=Xt(e,{altBoundary:!0}),c=Qt(a,r),u=Qt(s,i,o),p=te(c),f=te(u);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:p,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}]}),ne="tippy-content",re="tippy-backdrop",ie="tippy-arrow",oe="tippy-svg-arrow",ae={passive:!0,capture:!0},se=function(){return document.body};function ce(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function ue(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function pe(t,e){return"function"==typeof t?t.apply(void 0,e):t}function fe(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)};var n}function le(t){return[].concat(t)}function de(t,e){-1===t.indexOf(e)&&t.push(e)}function me(t){return t.split("-")[0]}function he(t){return[].slice.call(t)}function ve(t){return Object.keys(t).reduce(function(e,n){return void 0!==t[n]&&(e[n]=t[n]),e},{})}function ge(){return document.createElement("div")}function ye(t){return["Element","Fragment"].some(function(e){return ue(t,e)})}function be(t){return ue(t,"MouseEvent")}function xe(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function we(t){return ye(t)?[t]:function(t){return ue(t,"NodeList")}(t)?he(t):Array.isArray(t)?t:he(document.querySelectorAll(t))}function Ae(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Oe(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function Ee(t){var e,n=le(t)[0];return null!=n&&null!=(e=n.ownerDocument)&&e.body?n.ownerDocument:document}function Te(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(e){t[r](e,n)})}function Le(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var _e={isTouch:!1},ke=0;function De(){_e.isTouch||(_e.isTouch=!0,window.performance&&document.addEventListener("mousemove",Fe))}function Fe(){var t=performance.now();t-ke<20&&(_e.isTouch=!1,document.removeEventListener("mousemove",Fe)),ke=t}function je(){var t=document.activeElement;if(xe(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var Ce=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Me={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ie=Object.assign({appendTo:se,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Me,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Pe=Object.keys(Ie);function Se(t){var e=(t.plugins||[]).reduce(function(e,n){var r,i=n.name,o=n.defaultValue;i&&(e[i]=void 0!==t[i]?t[i]:null!=(r=Ie[i])?r:o);return e},{});return Object.assign({},t,e)}function Re(t,e){var n=Object.assign({},e,{content:pe(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Se(Object.assign({},Ie,{plugins:e}))):Pe).reduce(function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e},{})}(t,e.plugins));return n.aria=Object.assign({},Ie.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function He(t,e){t.innerHTML=e}function Ve(t){var e=ge();return!0===t?e.className=ie:(e.className=oe,ye(t)?e.appendChild(t):He(e,t)),e}function We(t,e){ye(e.content)?(He(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?He(t,e.content):t.textContent=e.content)}function Be(t){var e=t.firstElementChild,n=he(e.children);return{box:e,content:n.find(function(t){return t.classList.contains(ne)}),arrow:n.find(function(t){return t.classList.contains(ie)||t.classList.contains(oe)}),backdrop:n.find(function(t){return t.classList.contains(re)})}}function Ne(t){var e=ge(),n=ge();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ge();function i(n,r){var i=Be(e),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||We(a,t.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(Ve(r.arrow))):o.appendChild(Ve(r.arrow)):s&&o.removeChild(s)}return r.className=ne,r.setAttribute("data-state","hidden"),We(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props),{popper:e,onUpdate:i}}Ne.$$tippy=!0;var qe=1,ze=[],Ue=[];function $e(t,e){var n,r,i,o,a,s,c,u,p=Re(t,Object.assign({},Ie,Se(ve(e)))),f=!1,l=!1,d=!1,m=!1,h=[],v=fe(Z,p.interactiveDebounce),g=qe++,y=(u=p.plugins).filter(function(t,e){return u.indexOf(t)===e}),b={id:g,reference:t,popper:ge(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(e){0;if(b.state.isDestroyed)return;M("onBeforeUpdate",[b,e]),U();var n=b.props,r=Re(t,Object.assign({},n,ve(e),{ignoreAttributes:!0}));b.props=r,z(),n.interactiveDebounce!==r.interactiveDebounce&&(S(),v=fe(Z,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?le(n.triggerTarget).forEach(function(t){t.removeAttribute("aria-expanded")}):r.triggerTarget&&t.removeAttribute("aria-expanded");P(),C(),A&&A(n,r);b.popperInstance&&(J(),Q().forEach(function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}));M("onAfterUpdate",[b,e])},setContent:function(t){b.setProps({content:t})},show:function(){0;var t=b.state.isVisible,e=b.state.isDestroyed,n=!b.state.isEnabled,r=_e.isTouch&&!b.props.touch,i=ce(b.props.duration,0,Ie.duration);if(t||e||n||r)return;if(k().hasAttribute("disabled"))return;if(M("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,_()&&(w.style.visibility="visible");C(),W(),b.state.isMounted||(w.style.transition="none");if(_()){var o=F();Ae([o.box,o.content],0)}s=function(){var t;if(b.state.isVisible&&!m){if(m=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,_()&&b.props.animation){var e=F(),n=e.box,r=e.content;Ae([n,r],i),Oe([n,r],"visible")}I(),P(),de(Ue,b),null==(t=b.popperInstance)||t.forceUpdate(),M("onMount",[b]),b.props.animation&&_()&&function(t,e){N(t,e)}(i,function(){b.state.isShown=!0,M("onShown",[b])})}},function(){var t,e=b.props.appendTo,n=k();t=b.props.interactive&&e===se||"parent"===e?n.parentNode:pe(e,[n]);t.contains(w)||t.appendChild(w);b.state.isMounted=!0,J(),!1}()},hide:function(){0;var t=!b.state.isVisible,e=b.state.isDestroyed,n=!b.state.isEnabled,r=ce(b.props.duration,1,Ie.duration);if(t||e||n)return;if(M("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,m=!1,f=!1,_()&&(w.style.visibility="hidden");if(S(),B(),C(!0),_()){var i=F(),o=i.box,a=i.content;b.props.animation&&(Ae([o,a],r),Oe([o,a],"hidden"))}I(),P(),b.props.animation?_()&&function(t,e){N(t,function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&e()})}(r,b.unmount):b.unmount()},hideWithInteractivity:function(t){0;D().addEventListener("mousemove",v),de(ze,v),v(t)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;G(),Q().forEach(function(t){t._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w);Ue=Ue.filter(function(t){return t!==b}),b.state.isMounted=!1,M("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),U(),delete t._tippy,b.state.isDestroyed=!0,M("onDestroy",[b])}};if(!p.render)return b;var x=p.render(b),w=x.popper,A=x.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,t._tippy=b,w._tippy=b;var O=y.map(function(t){return t.fn(b)}),E=t.hasAttribute("aria-expanded");return z(),P(),C(),M("onCreate",[b]),p.showOnCreate&&tt(),w.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&D().addEventListener("mousemove",v)}),b;function T(){var t=b.props.touch;return Array.isArray(t)?t:[t,0]}function L(){return"hold"===T()[0]}function _(){var t;return!(null==(t=b.props.render)||!t.$$tippy)}function k(){return c||t}function D(){var t=k().parentNode;return t?Ee(t):document}function F(){return Be(w)}function j(t){return b.state.isMounted&&!b.state.isVisible||_e.isTouch||o&&"focus"===o.type?0:ce(b.props.delay,t?0:1,Ie.delay)}function C(t){void 0===t&&(t=!1),w.style.pointerEvents=b.props.interactive&&!t?"":"none",w.style.zIndex=""+b.props.zIndex}function M(t,e,n){var r;(void 0===n&&(n=!0),O.forEach(function(n){n[t]&&n[t].apply(n,e)}),n)&&(r=b.props)[t].apply(r,e)}function I(){var e=b.props.aria;if(e.content){var n="aria-"+e.content,r=w.id;le(b.props.triggerTarget||t).forEach(function(t){var e=t.getAttribute(n);if(b.state.isVisible)t.setAttribute(n,e?e+" "+r:r);else{var i=e&&e.replace(r,"").trim();i?t.setAttribute(n,i):t.removeAttribute(n)}})}}function P(){!E&&b.props.aria.expanded&&le(b.props.triggerTarget||t).forEach(function(t){b.props.interactive?t.setAttribute("aria-expanded",b.state.isVisible&&t===k()?"true":"false"):t.removeAttribute("aria-expanded")})}function S(){D().removeEventListener("mousemove",v),ze=ze.filter(function(t){return t!==v})}function R(e){if(!_e.isTouch||!d&&"mousedown"!==e.type){var n=e.composedPath&&e.composedPath()[0]||e.target;if(!b.props.interactive||!Le(w,n)){if(le(b.props.triggerTarget||t).some(function(t){return Le(t,n)})){if(_e.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[b,e]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),l=!0,setTimeout(function(){l=!1}),b.state.isMounted||B())}}}function H(){d=!0}function V(){d=!1}function W(){var t=D();t.addEventListener("mousedown",R,!0),t.addEventListener("touchend",R,ae),t.addEventListener("touchstart",V,ae),t.addEventListener("touchmove",H,ae)}function B(){var t=D();t.removeEventListener("mousedown",R,!0),t.removeEventListener("touchend",R,ae),t.removeEventListener("touchstart",V,ae),t.removeEventListener("touchmove",H,ae)}function N(t,e){var n=F().box;function r(t){t.target===n&&(Te(n,"remove",r),e())}if(0===t)return e();Te(n,"remove",a),Te(n,"add",r),a=r}function q(e,n,r){void 0===r&&(r=!1),le(b.props.triggerTarget||t).forEach(function(t){t.addEventListener(e,n,r),h.push({node:t,eventType:e,handler:n,options:r})})}function z(){var t;L()&&(q("touchstart",$,{passive:!0}),q("touchend",K,{passive:!0})),(t=b.props.trigger,t.split(/\s+/).filter(Boolean)).forEach(function(t){if("manual"!==t)switch(q(t,$),t){case"mouseenter":q("mouseleave",K);break;case"focus":q(Ce?"focusout":"blur",X);break;case"focusin":q("focusout",X)}})}function U(){h.forEach(function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)}),h=[]}function $(t){var e,n=!1;if(b.state.isEnabled&&!Y(t)&&!l){var r="focus"===(null==(e=o)?void 0:e.type);o=t,c=t.currentTarget,P(),!b.state.isVisible&&be(t)&&ze.forEach(function(e){return e(t)}),"click"===t.type&&(b.props.trigger.indexOf("mouseenter")<0||f)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:tt(t),"click"===t.type&&(f=!n),n&&!r&&et(t)}}function Z(t){var e=t.target,n=k().contains(e)||w.contains(e);if("mousemove"!==t.type||!n){var r=Q().concat(w).map(function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:p}:null}).filter(Boolean);(function(t,e){var n=e.clientX,r=e.clientY;return t.every(function(t){var e=t.popperRect,i=t.popperState,o=t.props.interactiveBorder,a=me(i.placement),s=i.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,p="right"===a?s.left.x:0,f="left"===a?s.right.x:0,l=e.top-r+c>o,d=r-e.bottom-u>o,m=e.left-n+p>o,h=n-e.right-f>o;return l||d||m||h})})(r,t)&&(S(),et(t))}}function K(t){Y(t)||b.props.trigger.indexOf("click")>=0&&f||(b.props.interactive?b.hideWithInteractivity(t):et(t))}function X(t){b.props.trigger.indexOf("focusin")<0&&t.target!==k()||b.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||et(t)}function Y(t){return!!_e.isTouch&&L()!==t.type.indexOf("touch")>=0}function J(){G();var e=b.props,n=e.popperOptions,r=e.placement,i=e.offset,o=e.getReferenceClientRect,a=e.moveTransition,c=_()?Be(w).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||k()}:t,p={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(_()){var n=F().box;["placement","reference-hidden","escaped"].forEach(function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)}),e.attributes.popper={}}}},f=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},p];_()&&c&&f.push({name:"arrow",options:{element:c,padding:3}}),f.push.apply(f,(null==n?void 0:n.modifiers)||[]),b.popperInstance=ee(u,w,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:f}))}function G(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return he(w.querySelectorAll("[data-tippy-root]"))}function tt(t){b.clearDelayTimeouts(),t&&M("onTrigger",[b,t]),W();var e=j(!0),r=T(),i=r[0],o=r[1];_e.isTouch&&"hold"===i&&o&&(e=o),e?n=setTimeout(function(){b.show()},e):b.show()}function et(t){if(b.clearDelayTimeouts(),M("onUntrigger",[b,t]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&f)){var e=j(!1);e?r=setTimeout(function(){b.state.isVisible&&b.hide()},e):i=requestAnimationFrame(function(){b.hide()})}}else B()}}function Ze(t,e){void 0===e&&(e={});var n=Ie.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",De,ae),window.addEventListener("blur",je);var r=Object.assign({},e,{plugins:n}),i=we(t).reduce(function(t,e){var n=e&&$e(e,r);return n&&t.push(n),t},[]);return ye(t)?i[0]:i}Ze.defaultProps=Ie,Ze.setDefaultProps=function(t){Object.keys(t).forEach(function(e){Ie[e]=t[e]})},Ze.currentInput=_e;Object.assign({},Rt,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}});Ze.setDefaultProps({render:Ne});const Ke=Ze,Xe={init(){[...document.images].forEach(t=>{const e=t.parentNode;"PICTURE"===e.tagName?(this.processPicture(t,e),t.addEventListener("load",this.load.bind(this,t,e))):this.wrapImage(t)});const t=document.querySelectorAll(".cld-tag");this.tippy(t)},load(t,e){e.querySelectorAll(".overlay-tag").forEach(t=>t.remove()),this.processPicture(t,e),this.tippy(e.querySelectorAll(".cld-tag"))},processPicture(t,e){const n=e.querySelectorAll("source");n.length>0&&n.forEach(e=>{[e.src,e.srcset].some(e=>e.includes(t.currentSrc))&&([...t.attributes].forEach(e=>{e.name.startsWith("data-")&&t.removeAttribute(e.name)}),Object.assign(t.dataset,{...e.dataset}))}),this.wrapImage(t)},wrapImage(t){t.dataset.publicId?this.cldTag(t):this.wpTag(t)},createTag(t){const e=document.createElement("span");return e.classList.add("overlay-tag"),t.parentNode.insertBefore(e,t),e},cldTag(t){const e=this.createTag(t);e.template=this.createTemplate(t),e.innerText=N("Cloudinary","cloudinary"),e.classList.add("cld-tag")},wpTag(t){const e=this.createTag(t);e.innerText=N("WordPress","cloudinary"),e.classList.add("wp-tag")},createTemplate(t){const e=document.createElement("div");e.classList.add("cld-tag-info"),e.appendChild(this.makeLine(N("Local size","cloudinary"),t.dataset.filesize)),e.appendChild(this.makeLine(N("Optimized size","cloudinary"),t.dataset.optsize)),e.appendChild(this.makeLine(N("Optimized format","cloudinary"),t.dataset.optformat)),t.dataset.percent&&e.appendChild(this.makeLine(N("Reduction","cloudinary"),t.dataset.percent+"%")),e.appendChild(this.makeLine(N("Transformations","cloudinary"),t.dataset.transformations)),t.dataset.transformationCrop&&e.appendChild(this.makeLine(N("Crop transformations","cloudinary"),t.dataset.transformationCrop));const n=document.createElement("a");return n.classList.add("edit-link"),n.href=t.dataset.permalink,n.innerText=N("Edit Effects","cloudinary"),e.appendChild(this.makeLine("","",n)),e},makeLine(t,e,n){const r=document.createElement("div"),i=document.createElement("span"),o=document.createElement("span");return i.innerText=t,i.classList.add("title"),o.innerText=e,n&&o.appendChild(n),r.appendChild(i),r.appendChild(o),r},tippy(t){Ke(t,{placement:"bottom-start",interactive:!0,appendTo:()=>document.body,aria:{content:"auto",expanded:"auto"},content:t=>t.template.innerHTML,allowHTML:!0})},debounce(t,e){let n=null;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>{t(...r)},e)}}};window.addEventListener("load",()=>Xe.init())})(); 2 //# sourceMappingURL=front-overlay.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/gallery-block.asset.php
r3343538 r3518458 1 <?php return array('dependencies' => array(' react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'ea4c3028b39e34cf467e');1 <?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '98f4cd2c29395fad0b1e'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/gallery-block.js
r3343538 r3518458 1 !function(){var e={2:function(e,t,n){var r=n(2199),o=n(4664),i=n(5950);e.exports=function(e){return r(e,i,o)}},79:function(e,t,n){var r=n(3702),o=n(80),i=n(4739),a=n(8655),s=n(1175);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},80:function(e,t,n){var r=n(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},181:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},289:function(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},294:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},346:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},361:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},392:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},659:function(e,t,n){var r=n(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},695:function(e,t,n){var r=n(8096),o=n(2428),i=n(6449),a=n(3656),s=n(361),c=n(7167),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),p=!n&&!u&&a(e),d=!n&&!u&&!p&&c(e),f=n||u||p||d,h=f?r(e.length,String):[],v=h.length;for(var y in e)!t&&!l.call(e,y)||f&&("length"==y||p&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,v))||h.push(y);return h}},938:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945:function(e,t,n){var r=n(79),o=n(8223),i=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},1042:function(e,t,n){var r=n(6110)(Object,"create");e.exports=r},1175:function(e,t,n){var r=n(6025);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},1420:function(e,t,n){var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},1549:function(e,t,n){var r=n(2032),o=n(3862),i=n(6721),a=n(2749),s=n(5749);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},1780:function(e){"use strict";function t(e,t){var n,r;if("function"==typeof t)void 0!==(r=t(e))&&(e=r);else if(Array.isArray(t))for(n=0;n<t.length;n++)void 0!==(r=t[n](e))&&(e=r);return e}function n(e,t){return"-"===e[0]&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function r(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(e){return Object(e)===e}function i(e){return 0===Object.keys(e).length}var a=["__proto__","prototype","constructor"],s=function(e){return-1===a.indexOf(e)};function c(e,t){e.indexOf("[")>=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(s).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var l=Object.prototype.hasOwnProperty;function u(e,t,n,r){if(!(this instanceof u))return new u(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var p=new u(".",!1,!0,!0);function d(e){return function(){return p[e].apply(p,arguments)}}u.prototype._fill=function(e,n,r,a){var s=e.shift();if(e.length>0){if(n[s]=n[s]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!o(n[s])){if(!this.override){if(!o(r)||!i(r))throw new Error("Trying to redefine `"+s+"` which is a "+typeof n[s]);return}n[s]={}}this._fill(e,n[s],r,a)}else{if(!this.override&&o(n[s])&&!i(n[s])){if(!o(r)||!i(r))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}n[s]=t(r,a)}},u.prototype.object=function(e,n){var r=this;return Object.keys(e).forEach((function(o){var i=void 0===n?null:n[o],a=c(o,r.separator).join(r.separator);-1!==a.indexOf(r.separator)?(r._fill(a.split(r.separator),e,e[o],i),delete e[o]):e[o]=t(e[o],i)})),e},u.prototype.str=function(e,n,r,o){var i=c(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(i.split(this.separator),r,n,o):r[e]=t(n,o),r},u.prototype.pick=function(e,t,r,o){var i,a,s,l,u;for(a=c(e,this.separator),i=0;i<a.length;i++){if(l=n(a[i],t),!t||"object"!=typeof t||!(l in t))return;if(i===a.length-1)return r?(s=t[l],o&&Array.isArray(t)?t.splice(l,1):delete t[l],Array.isArray(t)&&(u=a.slice(0,-1).join("."),-1===this.cleanup.indexOf(u)&&this.cleanup.push(u)),s):t[l];t=t[l]}return r&&Array.isArray(t)&&(t=t.filter((function(e){return void 0!==e}))),t},u.prototype.delete=function(e,t){return this.remove(e,t,!0)},u.prototype.remove=function(e,t,n){var r;if(this.cleanup=[],Array.isArray(e)){for(r=0;r<e.length;r++)this.pick(e[r],t,!0,n);return n||this._cleanup(t),t}return this.pick(e,t,!0,n)},u.prototype._cleanup=function(e){var t,n,r,o;if(this.cleanup.length){for(n=0;n<this.cleanup.length;n++)t=(t=(o=(r=this.cleanup[n].split(".")).splice(0,-1).join("."))?this.pick(o,e):e)[r[0]].filter((function(e){return void 0!==e})),this.set(this.cleanup[n],t,e);this.cleanup=[]}},u.prototype.del=u.prototype.remove,u.prototype.move=function(e,n,r,o,i){return"function"==typeof o||Array.isArray(o)?this.set(n,t(this.pick(e,r,!0),o),r,i):(i=o,this.set(n,this.pick(e,r,!0),r,i)),r},u.prototype.transfer=function(e,n,r,o,i,a){return"function"==typeof i||Array.isArray(i)?this.set(n,t(this.pick(e,r,!0),i),o,a):(a=i,this.set(n,this.pick(e,r,!0),o,a)),o},u.prototype.copy=function(e,n,r,o,i,a){return"function"==typeof i||Array.isArray(i)?this.set(n,t(JSON.parse(JSON.stringify(this.pick(e,r,!1))),i),o,a):(a=i,this.set(n,this.pick(e,r,!1),o,a)),o},u.prototype.set=function(e,t,n,o){var i,a,s,u;if(void 0===t)return n;for(s=c(e,this.separator),i=0;i<s.length;i++){if(u=s[i],i===s.length-1)if(o&&r(t)&&r(n[u]))for(a in t)l.call(t,a)&&(n[u][a]=t[a]);else if(o&&Array.isArray(n[u])&&Array.isArray(t))for(var p=0;p<t.length;p++)n[s[i]].push(t[p]);else n[u]=t;else l.call(n,u)&&(r(n[u])||Array.isArray(n[u]))||(/^\d+$/.test(s[i+1])?n[u]=[]:n[u]={});n=n[u]}return n},u.prototype.transform=function(e,t,n){return t=t||{},n=n||{},Object.keys(e).forEach(function(r){this.set(e[r],this.pick(r,t),n)}.bind(this)),n},u.prototype.dot=function(e,t,n){t=t||{},n=n||[];var a=Array.isArray(e);return Object.keys(e).forEach(function(s){var c=a&&this.useBrackets?"["+s+"]":s;if(o(e[s])&&(r(e[s])&&!i(e[s])||Array.isArray(e[s])&&!this.keepArray&&0!==e[s].length)){if(a&&this.useBrackets){var l=n[n.length-1]||"";return this.dot(e[s],t,n.slice(0,-1).concat(l+c))}return this.dot(e[s],t,n.concat(c))}a&&this.useBrackets?t[n.join(this.separator).concat("["+s+"]")]=e[s]:t[n.concat(c).join(this.separator)]=e[s]}.bind(this)),t},u.pick=d("pick"),u.move=d("move"),u.transfer=d("transfer"),u.transform=d("transform"),u.copy=d("copy"),u.object=d("object"),u.str=d("str"),u.set=d("set"),u.delete=d("delete"),u.del=u.remove=d("remove"),u.dot=d("dot"),["override","overwrite"].forEach((function(e){Object.defineProperty(u,e,{get:function(){return p.override},set:function(e){p.override=!!e}})})),["useArray","keepArray","useBrackets"].forEach((function(e){Object.defineProperty(u,e,{get:function(){return p[e]},set:function(t){p[e]=t}})})),u._process=t,e.exports=u},1791:function(e,t,n){var r=n(6547),o=n(3360);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,c=t.length;++s<c;){var l=t[s],u=i?i(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),a?o(n,l,u):r(n,l,u)}return n}},1873:function(e,t,n){var r=n(9325).Symbol;e.exports=r},1882:function(e,t,n){var r=n(2552),o=n(3805);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:function(e,t,n){var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},2032:function(e,t,n){var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2199:function(e,t,n){var r=n(4528),o=n(6449);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},2271:function(e,t,n){var r=n(1791),o=n(4664);e.exports=function(e,t){return r(e,o(e),t)}},2428:function(e,t,n){var r=n(7534),o=n(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},2485:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},2552:function(e,t,n){var r=n(1873),o=n(659),i=n(9350),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},2651:function(e,t,n){var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},2749:function(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},2804:function(e,t,n){var r=n(6110)(n(9325),"Promise");e.exports=r},2903:function(e,t,n){var r=n(3805),o=n(5527),i=n(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},2949:function(e,t,n){var r=n(2651);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},3007:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},3040:function(e,t,n){var r=n(1549),o=n(79),i=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},3201:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},3243:function(e,t,n){var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3290:function(e,t,n){e=n.nmd(e);var r=n(9325),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},3345:function(e){e.exports=function(){return[]}},3349:function(e,t,n){var r=n(2199),o=n(6375),i=n(7241);e.exports=function(e){return r(e,i,o)}},3360:function(e,t,n){var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3605:function(e){e.exports=function(e){return this.__data__.get(e)}},3650:function(e,t,n){var r=n(4335)(Object.keys,Object);e.exports=r},3656:function(e,t,n){e=n.nmd(e);var r=n(9325),o=n(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},3661:function(e,t,n){var r=n(3040),o=n(7670),i=n(289),a=n(4509),s=n(2949);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},3702:function(e){e.exports=function(){this.__data__=[],this.size=0}},3729:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},3736:function(e,t,n){var r=n(1873),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},3805:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3838:function(e,t,n){var r=n(1791),o=n(7241);e.exports=function(e,t){return e&&r(t,o(t),e)}},3862:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},4218:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4335:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},4509:function(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},4528:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},4664:function(e,t,n){var r=n(9770),o=n(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},4733:function(e,t,n){var r=n(1791),o=n(5950);e.exports=function(e,t){return e&&r(t,o(t),e)}},4739:function(e,t,n){var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4840:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4894:function(e,t,n){var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4901:function(e,t,n){var r=n(2552),o=n(294),i=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},5083:function(e,t,n){var r=n(1882),o=n(7296),i=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,p=l.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?d:s).test(a(e))}},5288:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5481:function(e,t,n){var r=n(9325)["__core-js_shared__"];e.exports=r},5527:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5529:function(e,t,n){var r=n(9344),o=n(8879),i=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},5580:function(e,t,n){var r=n(6110)(n(9325),"DataView");e.exports=r},5749:function(e,t,n){var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5861:function(e,t,n){var r=n(5580),o=n(8223),i=n(2804),a=n(6545),s=n(8303),c=n(2552),l=n(7473),u="[object Map]",p="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",v=l(r),y=l(o),m=l(i),g=l(a),b=l(s),x=c;(r&&x(new r(new ArrayBuffer(1)))!=h||o&&x(new o)!=u||i&&x(i.resolve())!=p||a&&x(new a)!=d||s&&x(new s)!=f)&&(x=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case v:return h;case y:return u;case m:return p;case g:return d;case b:return f}return t}),e.exports=x},5950:function(e,t,n){var r=n(695),o=n(8984),i=n(4894);e.exports=function(e){return i(e)?r(e):o(e)}},6009:function(e,t,n){e=n.nmd(e);var r=n(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},6025:function(e,t,n){var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},6038:function(e,t,n){var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},6110:function(e,t,n){var r=n(5083),o=n(392);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},6169:function(e,t,n){var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},6189:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},6375:function(e,t,n){var r=n(4528),o=n(8879),i=n(4664),a=n(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},6449:function(e){var t=Array.isArray;e.exports=t},6545:function(e,t,n){var r=n(6110)(n(9325),"Set");e.exports=r},6547:function(e,t,n){var r=n(3360),o=n(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},6721:function(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},7167:function(e,t,n){var r=n(4901),o=n(7301),i=n(6009),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},7199:function(e,t,n){var r=n(9653),o=n(6169),i=n(3201),a=n(3736),s=n(1961);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},7217:function(e,t,n){var r=n(79),o=n(1420),i=n(938),a=n(3605),s=n(9817),c=n(945);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=i,l.prototype.get=a,l.prototype.has=s,l.prototype.set=c,e.exports=l},7241:function(e,t,n){var r=n(695),o=n(2903),i=n(4894);e.exports=function(e){return i(e)?r(e,!0):o(e)}},7296:function(e,t,n){var r,o=n(5481),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},7301:function(e){e.exports=function(e){return function(t){return e(t)}}},7473:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7534:function(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},7670:function(e,t,n){var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},7730:function(e,t,n){var r=n(9172),o=n(7301),i=n(6009),a=i&&i.isMap,s=a?o(a):r;e.exports=s},7828:function(e,t,n){var r=n(9325).Uint8Array;e.exports=r},8055:function(e,t,n){var r=n(9999);e.exports=function(e){return r(e,5)}},8096:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},8223:function(e,t,n){var r=n(6110)(n(9325),"Map");e.exports=r},8303:function(e,t,n){var r=n(6110)(n(9325),"WeakMap");e.exports=r},8440:function(e,t,n){var r=n(6038),o=n(7301),i=n(6009),a=i&&i.isSet,s=a?o(a):r;e.exports=s},8655:function(e,t,n){var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},8879:function(e,t,n){var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},8948:function(e,t,n){var r=n(1791),o=n(6375);e.exports=function(e,t){return r(e,o(e),t)}},8984:function(e,t,n){var r=n(5527),o=n(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9172:function(e,t,n){var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},9325:function(e,t,n){var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},9344:function(e,t,n){var r=n(3805),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},9350:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9653:function(e,t,n){var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},9770:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},9817:function(e){e.exports=function(e){return this.__data__.has(e)}},9935:function(e){e.exports=function(){return!1}},9999:function(e,t,n){var r=n(7217),o=n(3729),i=n(6547),a=n(4733),s=n(3838),c=n(3290),l=n(3007),u=n(2271),p=n(8948),d=n(2),f=n(3349),h=n(5861),v=n(6189),y=n(7199),m=n(5529),g=n(6449),b=n(3656),x=n(7730),_=n(3805),w=n(8440),j=n(5950),L=n(7241),O="[object Arguments]",P="[object Function]",A="[object Object]",k={};k[O]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[A]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[P]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,C,S,E,M){var T,B=1&n,D=2&n,R=4&n;if(C&&(T=E?C(t,S,E,M):C(t)),void 0!==T)return T;if(!_(t))return t;var Z=g(t);if(Z){if(T=v(t),!B)return l(t,T)}else{var N=h(t),F=N==P||"[object GeneratorFunction]"==N;if(b(t))return c(t,B);if(N==A||N==O||F&&!E){if(T=D||F?{}:m(t),!B)return D?p(t,s(T,t)):u(t,a(T,t))}else{if(!k[N])return E?t:{};T=y(t,N,B)}}M||(M=new r);var I=M.get(t);if(I)return I;M.set(t,T),w(t)?t.forEach((function(r){T.add(e(r,n,C,r,t,M))})):x(t)&&t.forEach((function(r,o){T.set(o,e(r,n,C,o,t,M))}));var W=Z?void 0:(R?D?f:d:D?L:j)(t);return o(W||t,(function(r,o){W&&(r=t[o=r]),i(T,o,e(r,n,C,o,t,M))})),T}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e=window.wp.i18n,t=window.wp.blocks,r=n(1780),o=n.n(r),i=window.wp.apiFetch,a=n.n(i),s=window.wp.components,c=(window.wp["components/buildStyle/style.css"],window.wp.element),l=window.wp.blockEditor,u=window.React,p=n.n(u),d=n(8055),f=n.n(d);function h(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function v(e){return e instanceof h(e).Element||e instanceof Element}function y(e){return e instanceof h(e).HTMLElement||e instanceof HTMLElement}function m(e){return"undefined"!=typeof ShadowRoot&&(e instanceof h(e).ShadowRoot||e instanceof ShadowRoot)}var g=Math.max,b=Math.min,x=Math.round;function _(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function w(){return!/^((?!chrome|android).)*safari/i.test(_())}function j(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&y(e)&&(o=e.offsetWidth>0&&x(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&x(r.height)/e.offsetHeight||1);var a=(v(e)?h(e):window).visualViewport,s=!w()&&n,c=(r.left+(s&&a?a.offsetLeft:0))/o,l=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,p=r.height/i;return{width:u,height:p,top:l,right:c+u,bottom:l+p,left:c,x:c,y:l}}function L(e){var t=h(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function O(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){return((v(e)?e.ownerDocument:e.document)||window.document).documentElement}function A(e){return j(P(e)).left+L(e).scrollLeft}function k(e){return h(e).getComputedStyle(e)}function C(e){var t=k(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function S(e,t,n){void 0===n&&(n=!1);var r,o,i=y(t),a=y(t)&&function(e){var t=e.getBoundingClientRect(),n=x(t.width)/e.offsetWidth||1,r=x(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=P(t),c=j(e,a,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!n)&&(("body"!==O(t)||C(s))&&(l=(r=t)!==h(r)&&y(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:L(r)),y(t)?((u=j(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=A(s))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function E(e){var t=j(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function M(e){return"html"===O(e)?e:e.assignedSlot||e.parentNode||(m(e)?e.host:null)||P(e)}function T(e){return["html","body","#document"].indexOf(O(e))>=0?e.ownerDocument.body:y(e)&&C(e)?e:T(M(e))}function B(e,t){var n;void 0===t&&(t=[]);var r=T(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=h(r),a=o?[i].concat(i.visualViewport||[],C(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(B(M(a)))}function D(e){return["table","td","th"].indexOf(O(e))>=0}function R(e){return y(e)&&"fixed"!==k(e).position?e.offsetParent:null}function Z(e){for(var t=h(e),n=R(e);n&&D(n)&&"static"===k(n).position;)n=R(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===k(n).position)?t:n||function(e){var t=/firefox/i.test(_());if(/Trident/i.test(_())&&y(e)&&"fixed"===k(e).position)return null;var n=M(e);for(m(n)&&(n=n.host);y(n)&&["html","body"].indexOf(O(n))<0;){var r=k(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var N="top",F="bottom",I="right",W="left",z="auto",V=[N,F,I,W],H="start",U="end",$="viewport",q="popper",G=V.reduce((function(e,t){return e.concat([t+"-"+H,t+"-"+U])}),[]),X=[].concat(V,[z]).reduce((function(e,t){return e.concat([t,t+"-"+H,t+"-"+U])}),[]),J=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Y(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function ee(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?K:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],l=!1,u={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;p(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:v(e)?B(e):e.contextElement?B(e.contextElement):[],popper:B(t)};var a=function(e){var t=Y(e);return J.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=a.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:u,options:r}),a=function(){};c.push(i||a)}})),u.update()},forceUpdate:function(){if(!l){var e=s.elements,t=e.reference,n=e.popper;if(Q(t,n)){s.rects={reference:S(t,Z(n),"fixed"===s.options.strategy),popper:E(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,c=void 0===a?{}:a,p=o.name;"function"==typeof i&&(s=i({state:s,options:c,name:p,instance:u})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){u.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){p(),l=!0}};if(!Q(e,t))return u;function p(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(n).then((function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var te={passive:!0};function ne(e){return e.split("-")[0]}function re(e){return e.split("-")[1]}function oe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ie(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?ne(o):null,a=o?re(o):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(i){case N:t={x:s,y:n.y-r.height};break;case F:t={x:s,y:n.y+n.height};break;case I:t={x:n.x+n.width,y:c};break;case W:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var l=i?oe(i):null;if(null!=l){var u="y"===l?"height":"width";switch(a){case H:t[l]=t[l]-(n[u]/2-r[u]/2);break;case U:t[l]=t[l]+(n[u]/2-r[u]/2)}}return t}var ae={top:"auto",right:"auto",bottom:"auto",left:"auto"};function se(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,p=e.isFixed,d=a.x,f=void 0===d?0:d,v=a.y,y=void 0===v?0:v,m="function"==typeof u?u({x:f,y:y}):{x:f,y:y};f=m.x,y=m.y;var g=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),_=W,w=N,j=window;if(l){var L=Z(n),O="clientHeight",A="clientWidth";if(L===h(n)&&"static"!==k(L=P(n)).position&&"absolute"===s&&(O="scrollHeight",A="scrollWidth"),o===N||(o===W||o===I)&&i===U)w=F,y-=(p&&L===j&&j.visualViewport?j.visualViewport.height:L[O])-r.height,y*=c?1:-1;if(o===W||(o===N||o===F)&&i===U)_=I,f-=(p&&L===j&&j.visualViewport?j.visualViewport.width:L[A])-r.width,f*=c?1:-1}var C,S=Object.assign({position:s},l&&ae),E=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:x(t*r)/r||0,y:x(n*r)/r||0}}({x:f,y:y}):{x:f,y:y};return f=E.x,y=E.y,c?Object.assign({},S,((C={})[w]=b?"0":"",C[_]=g?"0":"",C.transform=(j.devicePixelRatio||1)<=1?"translate("+f+"px, "+y+"px)":"translate3d("+f+"px, "+y+"px, 0)",C)):Object.assign({},S,((t={})[w]=b?y+"px":"",t[_]=g?f+"px":"",t.transform="",t))}var ce={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];y(o)&&O(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});y(r)&&O(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var le={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=X.reduce((function(e,n){return e[n]=function(e,t,n){var r=ne(e),o=[W,N].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[W,I].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=a}},ue={left:"right",right:"left",bottom:"top",top:"bottom"};function pe(e){return e.replace(/left|right|bottom|top/g,(function(e){return ue[e]}))}var de={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return de[e]}))}function he(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&m(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ve(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ye(e,t,n){return t===$?ve(function(e,t){var n=h(e),r=P(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;var l=w();(l||!l&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s+A(e),y:c}}(e,n)):v(t)?function(e,t){var n=j(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ve(function(e){var t,n=P(e),r=L(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=g(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=g(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+A(e),c=-r.scrollTop;return"rtl"===k(o||n).direction&&(s+=g(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}(P(e)))}function me(e,t,n,r){var o="clippingParents"===t?function(e){var t=B(M(e)),n=["absolute","fixed"].indexOf(k(e).position)>=0&&y(e)?Z(e):e;return v(n)?t.filter((function(e){return v(e)&&he(e,n)&&"body"!==O(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=ye(e,n,r);return t.top=g(o.top,t.top),t.right=b(o.right,t.right),t.bottom=b(o.bottom,t.bottom),t.left=g(o.left,t.left),t}),ye(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ge(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function be(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function xe(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,c=void 0===s?"clippingParents":s,l=n.rootBoundary,u=void 0===l?$:l,p=n.elementContext,d=void 0===p?q:p,f=n.altBoundary,h=void 0!==f&&f,y=n.padding,m=void 0===y?0:y,g=ge("number"!=typeof m?m:be(m,V)),b=d===q?"reference":q,x=e.rects.popper,_=e.elements[h?b:d],w=me(v(_)?_:_.contextElement||P(e.elements.popper),c,u,a),L=j(e.elements.reference),O=ie({reference:L,element:x,strategy:"absolute",placement:o}),A=ve(Object.assign({},x,O)),k=d===q?A:L,C={top:w.top-k.top+g.top,bottom:k.bottom-w.bottom+g.bottom,left:w.left-k.left+g.left,right:k.right-w.right+g.right},S=e.modifiersData.offset;if(d===q&&S){var E=S[o];Object.keys(C).forEach((function(e){var t=[I,F].indexOf(e)>=0?1:-1,n=[N,F].indexOf(e)>=0?"y":"x";C[e]+=E[n]*t}))}return C}function _e(e,t,n){return g(e,b(t,n))}var we={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,p=n.padding,d=n.tether,f=void 0===d||d,h=n.tetherOffset,v=void 0===h?0:h,y=xe(t,{boundary:c,rootBoundary:l,padding:p,altBoundary:u}),m=ne(t.placement),x=re(t.placement),_=!x,w=oe(m),j="x"===w?"y":"x",L=t.modifiersData.popperOffsets,O=t.rects.reference,P=t.rects.popper,A="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,k="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(L){if(i){var M,T="y"===w?N:W,B="y"===w?F:I,D="y"===w?"height":"width",R=L[w],z=R+y[T],V=R-y[B],U=f?-P[D]/2:0,$=x===H?O[D]:P[D],q=x===H?-P[D]:-O[D],G=t.elements.arrow,X=f&&G?E(G):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=J[T],K=J[B],Q=_e(0,O[D],X[D]),ee=_?O[D]/2-U-Q-Y-k.mainAxis:$-Q-Y-k.mainAxis,te=_?-O[D]/2+U+Q+K+k.mainAxis:q+Q+K+k.mainAxis,ie=t.elements.arrow&&Z(t.elements.arrow),ae=ie?"y"===w?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(M=null==C?void 0:C[w])?M:0,ce=R+te-se,le=_e(f?b(z,R+ee-se-ae):z,R,f?g(V,ce):V);L[w]=le,S[w]=le-R}if(s){var ue,pe="x"===w?N:W,de="x"===w?F:I,fe=L[j],he="y"===j?"height":"width",ve=fe+y[pe],ye=fe-y[de],me=-1!==[N,W].indexOf(m),ge=null!=(ue=null==C?void 0:C[j])?ue:0,be=me?ve:fe-O[he]-P[he]-ge+k.altAxis,we=me?fe+O[he]+P[he]-ge-k.altAxis:ye,je=f&&me?function(e,t,n){var r=_e(e,t,n);return r>n?n:r}(be,fe,we):_e(f?be:ve,fe,f?we:ye);L[j]=je,S[j]=je-fe}t.modifiersData[r]=S}},requiresIfExists:["offset"]};var je={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ne(n.placement),c=oe(s),l=[W,I].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return ge("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:be(e,V))}(o.padding,n),p=E(i),d="y"===c?N:W,f="y"===c?F:I,h=n.rects.reference[l]+n.rects.reference[c]-a[c]-n.rects.popper[l],v=a[c]-n.rects.reference[c],y=Z(i),m=y?"y"===c?y.clientHeight||0:y.clientWidth||0:0,g=h/2-v/2,b=u[d],x=m-p[l]-u[f],_=m/2-p[l]/2+g,w=_e(b,_,x),j=c;n.modifiersData[r]=((t={})[j]=w,t.centerOffset=w-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&he(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Le(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Oe(e){return[N,I,F,W].some((function(t){return e[t]>=0}))}var Pe=ee({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,c=h(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach((function(e){e.addEventListener("scroll",n.update,te)})),s&&c.addEventListener("resize",n.update,te),function(){i&&l.forEach((function(e){e.removeEventListener("scroll",n.update,te)})),s&&c.removeEventListener("resize",n.update,te)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ie({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,c=void 0===s||s,l={placement:ne(t.placement),variation:re(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,se(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,se(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},ce,le,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,l=n.padding,u=n.boundary,p=n.rootBoundary,d=n.altBoundary,f=n.flipVariations,h=void 0===f||f,v=n.allowedAutoPlacements,y=t.options.placement,m=ne(y),g=c||(m===y||!h?[pe(y)]:function(e){if(ne(e)===z)return[];var t=pe(e);return[fe(e),t,fe(t)]}(y)),b=[y].concat(g).reduce((function(e,n){return e.concat(ne(n)===z?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?X:c,u=re(r),p=u?s?G:G.filter((function(e){return re(e)===u})):V,d=p.filter((function(e){return l.indexOf(e)>=0}));0===d.length&&(d=p);var f=d.reduce((function(t,n){return t[n]=xe(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[ne(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:p,padding:l,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,_=t.rects.popper,w=new Map,j=!0,L=b[0],O=0;O<b.length;O++){var P=b[O],A=ne(P),k=re(P)===H,C=[N,F].indexOf(A)>=0,S=C?"width":"height",E=xe(t,{placement:P,boundary:u,rootBoundary:p,altBoundary:d,padding:l}),M=C?k?I:W:k?F:N;x[S]>_[S]&&(M=pe(M));var T=pe(M),B=[];if(i&&B.push(E[A]<=0),s&&B.push(E[M]<=0,E[T]<=0),B.every((function(e){return e}))){L=P,j=!1;break}w.set(P,B)}if(j)for(var D=function(e){var t=b.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return L=t,"break"},R=h?3:1;R>0;R--){if("break"===D(R))break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},we,je,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=xe(t,{elementContext:"reference"}),s=xe(t,{altBoundary:!0}),c=Le(a,r),l=Le(s,o,i),u=Oe(c),p=Oe(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}}]}),Ae="tippy-content",ke="tippy-backdrop",Ce="tippy-arrow",Se="tippy-svg-arrow",Ee={passive:!0,capture:!0},Me=function(){return document.body};function Te(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function Be(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function De(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Re(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Ze(e){return[].concat(e)}function Ne(e,t){-1===e.indexOf(t)&&e.push(t)}function Fe(e){return e.split("-")[0]}function Ie(e){return[].slice.call(e)}function We(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function ze(){return document.createElement("div")}function Ve(e){return["Element","Fragment"].some((function(t){return Be(e,t)}))}function He(e){return Be(e,"MouseEvent")}function Ue(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function $e(e){return Ve(e)?[e]:function(e){return Be(e,"NodeList")}(e)?Ie(e):Array.isArray(e)?e:Ie(document.querySelectorAll(e))}function qe(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Ge(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Xe(e){var t,n=Ze(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function Je(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function Ye(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Ke={isTouch:!1},Qe=0;function et(){Ke.isTouch||(Ke.isTouch=!0,window.performance&&document.addEventListener("mousemove",tt))}function tt(){var e=performance.now();e-Qe<20&&(Ke.isTouch=!1,document.removeEventListener("mousemove",tt)),Qe=e}function nt(){var e=document.activeElement;if(Ue(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var rt=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var ot={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},it=Object.assign({appendTo:Me,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ot,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),at=Object.keys(it);function st(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=it[o])?r:i);return t}),{});return Object.assign({},e,t)}function ct(e,t){var n=Object.assign({},t,{content:De(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(st(Object.assign({},it,{plugins:t}))):at).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},it.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function lt(e,t){e.innerHTML=t}function ut(e){var t=ze();return!0===e?t.className=Ce:(t.className=Se,Ve(e)?t.appendChild(e):lt(t,e)),t}function pt(e,t){Ve(t.content)?(lt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?lt(e,t.content):e.textContent=t.content)}function dt(e){var t=e.firstElementChild,n=Ie(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(Ae)})),arrow:n.find((function(e){return e.classList.contains(Ce)||e.classList.contains(Se)})),backdrop:n.find((function(e){return e.classList.contains(ke)}))}}function ft(e){var t=ze(),n=ze();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ze();function o(n,r){var o=dt(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||pt(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(ut(r.arrow))):i.appendChild(ut(r.arrow)):s&&i.removeChild(s)}return r.className=Ae,r.setAttribute("data-state","hidden"),pt(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}ft.$$tippy=!0;var ht=1,vt=[],yt=[];function mt(e,t){var n,r,o,i,a,s,c,l,u=ct(e,Object.assign({},it,st(We(t)))),p=!1,d=!1,f=!1,h=!1,v=[],y=Re(q,u.interactiveDebounce),m=ht++,g=(l=u.plugins).filter((function(e,t){return l.indexOf(e)===t})),b={id:m,reference:e,popper:ze(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){0;if(b.state.isDestroyed)return;T("onBeforeUpdate",[b,t]),U();var n=b.props,r=ct(e,Object.assign({},n,We(t),{ignoreAttributes:!0}));b.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(R(),y=Re(q,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Ze(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");D(),M(),w&&w(n,r);b.popperInstance&&(Y(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));T("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){0;var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Ke.isTouch&&!b.props.touch,o=Te(b.props.duration,0,it.duration);if(e||t||n||r)return;if(k().hasAttribute("disabled"))return;if(T("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,A()&&(_.style.visibility="visible");M(),I(),b.state.isMounted||(_.style.transition="none");if(A()){var i=S();qe([i.box,i.content],0)}s=function(){var e;if(b.state.isVisible&&!h){if(h=!0,_.offsetHeight,_.style.transition=b.props.moveTransition,A()&&b.props.animation){var t=S(),n=t.box,r=t.content;qe([n,r],o),Ge([n,r],"visible")}B(),D(),Ne(yt,b),null==(e=b.popperInstance)||e.forceUpdate(),T("onMount",[b]),b.props.animation&&A()&&function(e,t){z(e,t)}(o,(function(){b.state.isShown=!0,T("onShown",[b])}))}},function(){var e,t=b.props.appendTo,n=k();e=b.props.interactive&&t===Me||"parent"===t?n.parentNode:De(t,[n]);e.contains(_)||e.appendChild(_);b.state.isMounted=!0,Y(),!1}()},hide:function(){0;var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Te(b.props.duration,1,it.duration);if(e||t||n)return;if(T("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,h=!1,p=!1,A()&&(_.style.visibility="hidden");if(R(),W(),M(!0),A()){var o=S(),i=o.box,a=o.content;b.props.animation&&(qe([i,a],r),Ge([i,a],"hidden"))}B(),D(),b.props.animation?A()&&function(e,t){z(e,(function(){!b.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()}))}(r,b.unmount):b.unmount()},hideWithInteractivity:function(e){0;C().addEventListener("mousemove",y),Ne(vt,y),y(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;K(),Q().forEach((function(e){e._tippy.unmount()})),_.parentNode&&_.parentNode.removeChild(_);yt=yt.filter((function(e){return e!==b})),b.state.isMounted=!1,T("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),U(),delete e._tippy,b.state.isDestroyed=!0,T("onDestroy",[b])}};if(!u.render)return b;var x=u.render(b),_=x.popper,w=x.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+b.id,b.popper=_,e._tippy=b,_._tippy=b;var j=g.map((function(e){return e.fn(b)})),L=e.hasAttribute("aria-expanded");return H(),D(),M(),T("onCreate",[b]),u.showOnCreate&&ee(),_.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),_.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&C().addEventListener("mousemove",y)})),b;function O(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function P(){return"hold"===O()[0]}function A(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function k(){return c||e}function C(){var e=k().parentNode;return e?Xe(e):document}function S(){return dt(_)}function E(e){return b.state.isMounted&&!b.state.isVisible||Ke.isTouch||i&&"focus"===i.type?0:Te(b.props.delay,e?0:1,it.delay)}function M(e){void 0===e&&(e=!1),_.style.pointerEvents=b.props.interactive&&!e?"":"none",_.style.zIndex=""+b.props.zIndex}function T(e,t,n){var r;(void 0===n&&(n=!0),j.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=b.props)[e].apply(r,t)}function B(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=_.id;Ze(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function D(){!L&&b.props.aria.expanded&&Ze(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===k()?"true":"false"):e.removeAttribute("aria-expanded")}))}function R(){C().removeEventListener("mousemove",y),vt=vt.filter((function(e){return e!==y}))}function Z(t){if(!Ke.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!Ye(_,n)){if(Ze(b.props.triggerTarget||e).some((function(e){return Ye(e,n)}))){if(Ke.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else T("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout((function(){d=!1})),b.state.isMounted||W())}}}function N(){f=!0}function F(){f=!1}function I(){var e=C();e.addEventListener("mousedown",Z,!0),e.addEventListener("touchend",Z,Ee),e.addEventListener("touchstart",F,Ee),e.addEventListener("touchmove",N,Ee)}function W(){var e=C();e.removeEventListener("mousedown",Z,!0),e.removeEventListener("touchend",Z,Ee),e.removeEventListener("touchstart",F,Ee),e.removeEventListener("touchmove",N,Ee)}function z(e,t){var n=S().box;function r(e){e.target===n&&(Je(n,"remove",r),t())}if(0===e)return t();Je(n,"remove",a),Je(n,"add",r),a=r}function V(t,n,r){void 0===r&&(r=!1),Ze(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),v.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;P()&&(V("touchstart",$,{passive:!0}),V("touchend",G,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(V(e,$),e){case"mouseenter":V("mouseleave",G);break;case"focus":V(rt?"focusout":"blur",X);break;case"focusin":V("focusout",X)}}))}function U(){v.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),v=[]}function $(e){var t,n=!1;if(b.state.isEnabled&&!J(e)&&!d){var r="focus"===(null==(t=i)?void 0:t.type);i=e,c=e.currentTarget,D(),!b.state.isVisible&&He(e)&&vt.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||p)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(p=!n),n&&!r&&te(e)}}function q(e){var t=e.target,n=k().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var r=Q().concat(_).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=Fe(o.placement),s=o.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,p="left"===a?s.right.x:0,d=t.top-r+c>i,f=r-t.bottom-l>i,h=t.left-n+u>i,v=n-t.right-p>i;return d||f||h||v}))})(r,e)&&(R(),te(e))}}function G(e){J(e)||b.props.trigger.indexOf("click")>=0&&p||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function X(e){b.props.trigger.indexOf("focusin")<0&&e.target!==k()||b.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function J(e){return!!Ke.isTouch&&P()!==e.type.indexOf("touch")>=0}function Y(){K();var t=b.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=A()?dt(_).arrow:null,l=i?{getBoundingClientRect:i,contextElement:i.contextElement||k()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var n=S().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];A()&&c&&p.push({name:"arrow",options:{element:c,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),b.popperInstance=Pe(l,_,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:p}))}function K(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return Ie(_.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&T("onTrigger",[b,e]),I();var t=E(!0),r=O(),o=r[0],i=r[1];Ke.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),T("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=E(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else W()}}function gt(e,t){void 0===t&&(t={});var n=it.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",et,Ee),window.addEventListener("blur",nt);var r=Object.assign({},t,{plugins:n}),o=$e(e).reduce((function(e,t){var n=t&&mt(t,r);return n&&e.push(n),e}),[]);return Ve(e)?o[0]:o}gt.defaultProps=it,gt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){it[t]=e[t]}))},gt.currentInput=Ke;Object.assign({},ce,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});gt.setDefaultProps({render:ft});var bt=gt,xt=window.ReactDOM;function _t(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var wt="undefined"!=typeof window&&"undefined"!=typeof document;function jt(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function Lt(){return wt&&document.createElement("div")}function Ot(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!Ot(e[n],t[n]))return!1}return!0}return!1}function Pt(e){var t=[];return e.forEach((function(e){t.find((function(t){return Ot(e,t)}))||t.push(e)})),t}function At(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Pt([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var kt=wt?u.useLayoutEffect:u.useEffect;function Ct(e){var t=(0,u.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function St(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var Et={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||St(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&St(t,"remove",e.props.className)},onAfterUpdate:r}}};function Mt(e){return function(t){var n=t.children,r=t.content,o=t.visible,i=t.singleton,a=t.render,s=t.reference,c=t.disabled,l=void 0!==c&&c,d=t.ignoreAttributes,f=void 0===d||d,h=(t.__source,t.__self,_t(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),v=void 0!==o,y=void 0!==i,m=(0,u.useState)(!1),g=m[0],b=m[1],x=(0,u.useState)({}),_=x[0],w=x[1],j=(0,u.useState)(),L=j[0],O=j[1],P=Ct((function(){return{container:Lt(),renders:1}})),A=Object.assign({ignoreAttributes:f},h,{content:P.container});v&&(A.trigger="manual",A.hideOnClick=!1),y&&(l=!0);var k=A,C=A.plugins||[];a&&(k=Object.assign({},A,{plugins:y&&null!=i.data?[].concat(C,[{fn:function(){return{onTrigger:function(e,t){var n=i.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,O(n.content)}}}}]):C,render:function(){return{popper:P.container}}}));var S=[s].concat(n?[n.type]:[]);return kt((function(){var t=s;s&&s.hasOwnProperty("current")&&(t=s.current);var n=e(t||P.ref||Lt(),Object.assign({},k,{plugins:[Et].concat(A.plugins||[])}));return P.instance=n,l&&n.disable(),o&&n.show(),y&&i.hook({instance:n,content:r,props:k,setSingletonContent:O}),b(!0),function(){n.destroy(),null==i||i.cleanup(n)}}),S),kt((function(){var e;if(1!==P.renders){var t=P.instance;t.setProps(At(t.props,k)),null==(e=t.popperInstance)||e.forceUpdate(),l?t.disable():t.enable(),v&&(o?t.show():t.hide()),y&&i.hook({instance:t,content:r,props:k,setSingletonContent:O})}else P.renders++})),kt((function(){var e;if(a){var t=P.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;_.placement===n.placement&&_.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&_.escaped===(null==r?void 0:r.hasPopperEscaped)||w({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[_.placement,_.referenceHidden,_.escaped].concat(S)),p().createElement(p().Fragment,null,n?(0,u.cloneElement)(n,{ref:function(e){P.ref=e,jt(n.ref,e)}}):null,g&&(0,xt.createPortal)(a?a(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(_),L,P.instance):r,P.container))}}var Tt=function(e,t){return(0,u.forwardRef)((function(n,r){var o=n.children,i=_t(n,["children"]);return p().createElement(e,Object.assign({},t,i),o?(0,u.cloneElement)(o,{ref:function(e){jt(r,e),jt(o.ref,e)}}):null)}))},Bt=Tt(Mt(bt)),Dt=window.ReactJSXRuntime;const Rt=()=>(0,Dt.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Dt.jsx)("title",{children:"shape-round"}),(0,Dt.jsx)("desc",{children:"Created with Sketch."}),(0,Dt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Dt.jsx)("g",{id:"widgets/shape-round",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Dt.jsx)("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,5 C8.13400675,5 5,8.13400675 5,12 C5,15.8659932 8.13400675,19 12,19 C15.8659932,19 19,15.8659932 19,12 C19,8.13400675 15.8659932,5 12,5 Z",id:"Combined-Shape"})})})]}),Zt=()=>(0,Dt.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Dt.jsx)("title",{children:"ratio-square"}),(0,Dt.jsx)("desc",{children:"Created with Sketch."}),(0,Dt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Dt.jsx)("g",{id:"widgets/shape-square",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Dt.jsx)("path",{d:"M3,3 L3,21 L21,21 L21,3 L3,3 Z M5,5 L5,19 L19,19 L19,5 L5,5 Z",id:"shape"})})})]}),Nt=()=>(0,Dt.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Dt.jsx)("title",{children:"shape-radius"}),(0,Dt.jsx)("desc",{children:"Created with Sketch."}),(0,Dt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Dt.jsx)("g",{id:"widgets/shape-radius",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Dt.jsx)("path",{d:"M17,3 C19.209139,3 21,4.790861 21,7 L21,17 C21,19.209139 19.209139,21 17,21 L7,21 C4.790861,21 3,19.209139 3,17 L3,7 C3,4.790861 4.790861,3 7,3 L17,3 Z M17,5 L7,5 C5.9456382,5 5.08183488,5.81587779 5.00548574,6.85073766 L5,7 L5,17 C5,18.0543618 5.81587779,18.9181651 6.85073766,18.9945143 L7,19 L17,19 C18.0543618,19 18.9181651,18.1841222 18.9945143,17.1492623 L19,17 L19,7 C19,5.9456382 18.1841222,5.08183488 17.1492623,5.00548574 L17,5 Z",id:"Rectangle"})})})]}),Ft=()=>(0,Dt.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Dt.jsx)("title",{children:"shape-none"}),(0,Dt.jsx)("desc",{children:"Created with Sketch."}),(0,Dt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Dt.jsx)("g",{id:"widgets/shape-none",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Dt.jsx)("path",{d:"M5,19 L5,21 L3,21 L3,19 L5,19 Z M21,19 L21,21 L19,21 L19,19 L21,19 Z M13,19 L13,21 L11,21 L11,19 L13,19 Z M9,19 L9,21 L7,21 L7,19 L9,19 Z M17,19 L17,21 L15,21 L15,19 L17,19 Z M21,15 L21,17 L19,17 L19,15 L21,15 Z M21,11 L21,13 L19,13 L19,11 L21,11 Z M5,11 L5,13 L3,13 L3,11 L5,11 Z M21,7 L21,9 L19,9 L19,7 L21,7 Z M5,7 L5,9 L3,9 L3,7 L5,7 Z M13,3 L13,5 L11,5 L11,3 L13,3 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z M17,3 L17,5 L15,5 L15,3 L17,3 Z M21,3 L21,5 L19,5 L19,3 L21,3 Z M5,3 L5,5 L3,5 L3,3 L5,3 Z M3,15 L5,15 L5,17 L3,17 L3,15 Z",id:"Shape"})})})]}),It=[{value:{type:"expanded",columns:1},icon:()=>(0,Dt.jsxs)("svg",{width:"17px",height:"20px",viewBox:"0 0 17 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Dt.jsx)("title",{children:"layout-modern"}),(0,Dt.jsx)("desc",{children:"Created with Sketch."}),(0,Dt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Dt.jsx)("g",{id:"widgets/layout-modern",transform:"translate(-2.000000, -3.000000)",fill:"#000000",children:(0,Dt.jsx)("path",{d:"M2,10 L5,10 L5,7 L2,7 L2,10 Z M2,14 L5,14 L5,11 L2,11 L2,14 Z M2,6 L5,6 L5,3 L2,3 L2,6 Z M6,3 L6,17 L19,17 L19,3 L6,3 Z M8,5 L8,15 L17,15 L17,5 L8,5 Z M6,18 L6,23 L19,23 L19,18 L6,18 Z M8,20 L8,23 L17,23 L17,20 L8,20 Z",id:"shape"})})})]}),label:(0,e.__)("Expanded - 1 Column","cloudinary")},{value:{type:"expanded",columns:2},icon:()=>(0,Dt.jsxs)("svg",{width:"18px",height:"17px",viewBox:"0 0 18 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Dt.jsx)("title",{children:"layout-grid-2-column"}),(0,Dt.jsx)("desc",{children:"Created with Sketch."}),(0,Dt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Dt.jsx)("g",{id:"widgets/layout-gird-2-col",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Dt.jsx)("path",{d:"M11,12 L11,20 L3,20 L3,12 L11,12 Z M21,12 L21,20 L13,20 L13,12 L21,12 Z M9,14 L5,14 L5,18 L9,18 L9,14 Z M19,14 L15,14 L15,18 L19,18 L19,14 Z M11,3 L11,11 L3,11 L3,3 L11,3 Z M21,3 L21,11 L13,11 L13,3 L21,3 Z M9,5 L5,5 L5,9 L9,9 L9,5 Z M19,5 L15,5 L15,9 L19,9 L19,5 Z",id:"Shape"})})})]}),label:(0,e.__)("Expanded - 2 Column","cloudinary")},{value:{type:"expanded",columns:3},icon:()=>(0,Dt.jsxs)("svg",{width:"20px",height:"13px",viewBox:"0 0 20 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Dt.jsx)("title",{children:"layout-grid-3-column"}),(0,Dt.jsx)("desc",{children:"Created with Sketch."}),(0,Dt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Dt.jsx)("g",{id:"widgets/layout-gird-3-col",transform:"translate(-2.000000, -5.000000)",fill:"#000000",children:(0,Dt.jsx)("path",{d:"M8,12 L8,18 L2,18 L2,12 L8,12 Z M15,12 L15,18 L9,18 L9,12 L15,12 Z M22,12 L22,18 L16,18 L16,12 L22,12 Z M6,14 L4,14 L4,16 L6,16 L6,14 Z M13,14 L11,14 L11,16 L13,16 L13,14 Z M20,14 L18,14 L18,16 L20,16 L20,14 Z M8,5 L8,11 L2,11 L2,5 L8,5 Z M15,5 L15,11 L9,11 L9,5 L15,5 Z M22,5 L22,11 L16,11 L16,5 L22,5 Z M6,7 L4,7 L4,9 L6,9 L6,7 Z M13,7 L11,7 L11,9 L13,9 L13,7 Z M20,7 L18,7 L18,9 L20,9 L20,7 Z",id:"Combined-Shape"})})})]}),label:(0,e.__)("Expanded - 3 Column","cloudinary")},{value:{type:"classic",columns:1},icon:()=>(0,Dt.jsxs)("svg",{width:"17px",height:"14px",viewBox:"0 0 17 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Dt.jsx)("title",{children:"layout-classic"}),(0,Dt.jsx)("desc",{children:"Created with Sketch."}),(0,Dt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Dt.jsx)("g",{id:"widgets/layout-classic",transform:"translate(-3.000000, -5.000000)",fill:"#000000",children:(0,Dt.jsx)("path",{d:"M3,12 L6,12 L6,9 L3,9 L3,12 Z M3,16 L6,16 L6,13 L3,13 L3,16 Z M3,8 L6,8 L6,5 L3,5 L3,8 Z M7,5 L7,19 L20,19 L20,5 L7,5 Z M9,7 L9,17 L18,17 L18,7 L9,7 Z",id:"shape"})})})]}),label:(0,e.__)("Classic","cloudinary")}],Wt=["image"],zt=[{label:(0,e.__)("1:1","cloudinary"),value:"1:1"},{label:(0,e.__)("3:4","cloudinary"),value:"3:4"},{label:(0,e.__)("4:3","cloudinary"),value:"4:3"},{label:(0,e.__)("4:6","cloudinary"),value:"4:6"},{label:(0,e.__)("6:4","cloudinary"),value:"6:4"},{label:(0,e.__)("5:7","cloudinary"),value:"5:7"},{label:(0,e.__)("7:5","cloudinary"),value:"7:5"},{label:(0,e.__)("8:5","cloudinary"),value:"8:5"},{label:(0,e.__)("5:8","cloudinary"),value:"5:8"},{label:(0,e.__)("9:16","cloudinary"),value:"9:16"},{label:(0,e.__)("16:9","cloudinary"),value:"16:9"}],Vt=[{label:(0,e.__)("None","cloudinary"),value:"none"},{label:(0,e.__)("Fade","cloudinary"),value:"fade"},{label:(0,e.__)("Slide","cloudinary"),value:"slide"}],Ht=[{label:(0,e.__)("Always","cloudinary"),value:"always"},{label:(0,e.__)("None","cloudinary"),value:"none"},{label:(0,e.__)("MouseOver","cloudinary"),value:"mouseover"}],Ut=[{label:(0,e.__)("Inline","cloudinary"),value:"inline"},{label:(0,e.__)("Flyout","cloudinary"),value:"flyout"},{label:(0,e.__)("Popup","cloudinary"),value:"popup"}],$t=[{label:(0,e.__)("Top","cloudinary"),value:"top"},{label:(0,e.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,e.__)("Left","cloudinary"),value:"left"},{label:(0,e.__)("Right","cloudinary"),value:"right"}],qt=[{label:(0,e.__)("Click","cloudinary"),value:"click"},{label:(0,e.__)("Hover","cloudinary"),value:"hover"}],Gt=[{label:(0,e.__)("Left","cloudinary"),value:"left"},{label:(0,e.__)("Right","cloudinary"),value:"right"},{label:(0,e.__)("Top","cloudinary"),value:"top"},{label:(0,e.__)("Bottom","cloudinary"),value:"bottom"}],Xt=[{label:(0,e.__)("Thumbnails","cloudinary"),value:"thumbnails"},{label:(0,e.__)("Indicators","cloudinary"),value:"indicators"},{label:(0,e.__)("None","cloudinary"),value:"none"}],Jt=[{value:"round",icon:Rt,label:(0,e.__)("Round","cloudinary")},{value:"radius",icon:Nt,label:(0,e.__)("Radius","cloudinary")},{value:"none",icon:Ft,label:(0,e.__)("None","cloudinary")},{value:"square",icon:Zt,label:(0,e.__)("Square","cloudinary")},{value:"rectangle",icon:()=>(0,Dt.jsxs)("svg",{width:"14px",height:"20px",viewBox:"0 0 14 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Dt.jsx)("title",{children:"ratio-9-16"}),(0,Dt.jsx)("desc",{children:"Created with Sketch."}),(0,Dt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Dt.jsx)("g",{id:"ratio/9-16",transform:"translate(-5.000000, -2.000000)",fill:"#000000",children:(0,Dt.jsx)("path",{d:"M22,5.5 L22,18.5 L2,18.5 L2,5.5 L22,5.5 Z M20,7.5 L4,7.5 L4,16.5 L20,16.5 L20,7.5 Z",id:"Combined-Shape",transform:"translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) "})})})]}),label:(0,e.__)("Rectangle","cloudinary")}],Yt=[{value:"round",icon:Rt,label:(0,e.__)("Round","cloudinary")},{value:"radius",icon:Nt,label:(0,e.__)("Radius","cloudinary")},{value:"square",icon:Zt,label:(0,e.__)("Square","cloudinary")}],Kt=[{label:(0,e.__)("All","cloudinary"),value:"all"},{label:(0,e.__)("Border","cloudinary"),value:"border"},{label:(0,e.__)("Gradient","cloudinary"),value:"gradient"}],Qt=[{label:(0,e.__)("All","cloudinary"),value:"all"},{label:(0,e.__)("Top","cloudinary"),value:"top"},{label:(0,e.__)("Top-Bottom","cloudinary"),value:"top-bottom"},{label:(0,e.__)("Left-Right","cloudinary"),value:"left-right"},{label:(0,e.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,e.__)("Left","cloudinary"),value:"left"},{label:(0,e.__)("Right","cloudinary"),value:"right"}],en=[{value:"round",icon:Rt,label:(0,e.__)("Round","cloudinary")},{value:"radius",icon:Nt,label:(0,e.__)("Radius","cloudinary")},{value:"none",icon:Ft,label:(0,e.__)("None","cloudinary")},{value:"square",icon:Zt,label:(0,e.__)("Square","cloudinary")}],tn=[{label:(0,e.__)("Pad","cloudinary"),value:"pad"},{label:(0,e.__)("Fill","cloudinary"),value:"fill"}],nn=[{label:(0,e.__)("White padding","cloudinary"),value:"rgb:FFFFFF"},{label:(0,e.__)("Border color padding","cloudinary"),value:"auto"},{label:(0,e.__)("Predominant color padding","cloudinary"),value:"auto:predominant"},{label:(0,e.__)("Gradient fade padding","cloudinary"),value:"auto:predominant_gradient"}];var rn=n(2485),on=n.n(rn),an=({value:e,children:t,icon:n,onChange:r,current:o})=>{const i="object"==typeof e?JSON.stringify(e)===JSON.stringify(o):o===e;return(0,Dt.jsxs)("button",{type:"button",onClick:()=>r(e),className:on()("radio-select",{"radio-select--active":i}),children:[(0,Dt.jsx)(n,{}),(0,Dt.jsx)("div",{className:"radio-select__label",children:t})]})},sn=window.wp.data;const cn=e=>e<10?"0"+String(e):e.toString(16),ln=e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,cn).join("")},un=e=>{const t=/var\((.*)\)/g.exec(e);return t?getComputedStyle(document.documentElement).getPropertyValue(t[1]):e},pn=({children:e,value:t})=>(0,Dt.jsxs)("div",{className:"colorpalette-color-label",children:[(0,Dt.jsx)("span",{children:e}),(0,Dt.jsx)("span",{className:"component-color-indicator","aria-label":`Color: ${t}`,style:{background:t}})]}),dn=new(o())("_");var fn=({attributes:t,setAttributes:n,colors:r})=>{const o=f()(t),i=dn.object(o),[a,c]=(0,u.useState)(i.customSettings);t.transformation_crop||(t.transformation_crop="pad",t.transformation_background="rgb:FFFFFF"),"fill"===t.transformation_crop&&delete t.transformation_background;const p=(e,t)=>{const r={[t]:un(e)};n(r)};return(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(s.PanelBody,{title:(0,e.__)("Layout","cloudinary"),children:It.map((e=>(0,Dt.jsx)(an,{value:e.value,onChange:e=>{n({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:e.icon,current:{type:t.displayProps_mode,columns:t.displayProps_columns||1},children:e.label},`${e.value.type}-${e.value.columns}-layout`)))}),(0,Dt.jsxs)(s.PanelBody,{title:(0,e.__)("Color Palette","cloudinary"),initialOpen:!1,children:[(0,Dt.jsx)(pn,{value:t.themeProps_primary,children:(0,e.__)("Primary","cloudinary")}),(0,Dt.jsx)(l.ColorPalette,{value:t.themeProps_primary,colors:r,disableCustomColors:!1,onChange:e=>p(e,"themeProps_primary")}),(0,Dt.jsx)(pn,{value:t.themeProps_onPrimary,children:(0,e.__)("On Primary","cloudinary")}),(0,Dt.jsx)(l.ColorPalette,{value:t.themeProps_onPrimary,colors:r,disableCustomColors:!1,onChange:e=>p(e,"themeProps_onPrimary")}),(0,Dt.jsx)(pn,{value:t.themeProps_active,children:(0,e.__)("Active","cloudinary")}),(0,Dt.jsx)(l.ColorPalette,{value:t.themeProps_active,colors:r,disableCustomColors:!1,onChange:e=>p(e,"themeProps_active")})]}),"classic"===t.displayProps_mode&&(0,Dt.jsx)(s.PanelBody,{title:(0,e.__)("Fade Transition","cloudinary"),initialOpen:!1,children:(0,Dt.jsx)(s.SelectControl,{value:t.transition,options:Vt,onChange:e=>n({transition:e})})}),(0,Dt.jsxs)(s.PanelBody,{title:(0,e.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1,children:[(0,Dt.jsx)(s.SelectControl,{label:(0,e.__)("Aspect Ratio","cloudinary"),value:t.aspectRatio,options:zt,onChange:e=>n({aspectRatio:e})}),(0,Dt.jsxs)("p",{children:[(0,Dt.jsx)(Bt,{content:(0,Dt.jsx)("span",{children:(0,e.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary")}),theme:"cloudinary",arrow:!1,placement:"bottom-start",children:(0,Dt.jsxs)("div",{className:"cld-ui-title",children:[(0,e.__)("Resize/Crop Mode","cloudinary"),(0,Dt.jsx)("span",{className:"dashicons dashicons-info cld-tooltip"})]})}),(0,Dt.jsx)(s.ButtonGroup,{children:tn.map((e=>(0,Dt.jsx)(s.Button,{isDefault:!0,isPressed:e.value===t.transformation_crop,onClick:()=>n({transformation_crop:e.value,transformation_background:null}),children:e.label},e.value+"-look-and-feel")))})]}),"pad"===t.transformation_crop&&(0,Dt.jsx)(s.SelectControl,{label:(0,e.__)("Pad style","cloudinary"),value:t.transformation_background,options:nn,onChange:e=>{n({transformation_background:e})}}),(0,Dt.jsx)("p",{children:(0,e.__)("Navigation","cloudinary")}),(0,Dt.jsx)("p",{children:(0,Dt.jsx)(s.ButtonGroup,{children:Ht.map((e=>(0,Dt.jsx)(s.Button,{isDefault:!0,isPressed:e.value===t.navigation,onClick:()=>n({navigation:e.value}),children:e.label},e.value+"-navigation")))})}),(0,Dt.jsxs)("div",{style:{marginTop:"30px"},children:[(0,Dt.jsx)(s.ToggleControl,{label:(0,e.__)("Show Zoom","cloudinary"),checked:t.zoom,onChange:()=>n({zoom:!t.zoom})}),t.zoom&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)("p",{children:(0,e.__)("Zoom Type","cloudinary")}),(0,Dt.jsx)("p",{children:(0,Dt.jsx)(s.ButtonGroup,{children:Ut.map((e=>(0,Dt.jsx)(s.Button,{isDefault:!0,isPressed:e.value===t.zoomProps_type,onClick:()=>n({zoomProps_type:e.value}),children:e.label},e.value+"-zoom-type")))})}),"flyout"===t.zoomProps_type&&(0,Dt.jsx)(s.SelectControl,{label:(0,e.__)("Zoom Viewer Position","cloudinary"),value:t.zoomProps_viewerPosition,options:$t,onChange:e=>n({zoomProps_viewerPosition:e})}),"popup"!==t.zoomProps_type&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)("p",{children:(0,e.__)("Zoom Trigger","cloudinary")}),(0,Dt.jsx)("p",{children:(0,Dt.jsx)(s.ButtonGroup,{children:qt.map((e=>(0,Dt.jsx)(s.Button,{isDefault:!0,isPressed:e.value===t.zoomProps_trigger,onClick:()=>n({zoomProps_trigger:e.value}),children:e.label},e.value+"-zoom-trigger")))})})]})]})]})]}),(0,Dt.jsxs)(s.PanelBody,{title:(0,e.__)("Carousel Parameters","cloudinary"),initialOpen:!1,children:[(0,Dt.jsx)("p",{children:(0,e.__)("Carousel Location","cloudinary")}),(0,Dt.jsx)("p",{children:(0,Dt.jsx)(s.ButtonGroup,{children:Gt.map((e=>(0,Dt.jsx)(s.Button,{isDefault:!0,isPressed:e.value===t.carouselLocation,onClick:()=>n({carouselLocation:e.value}),children:e.label},e.value+"-carousel-location")))})}),(0,Dt.jsx)(s.RangeControl,{label:(0,e.__)("Carousel Offset","cloudinary"),value:t.carouselOffset,onChange:e=>n({carouselOffset:e}),min:0,max:100}),(0,Dt.jsx)("p",{children:(0,e.__)("Carousel Style","cloudinary")}),(0,Dt.jsx)("p",{children:(0,Dt.jsx)(s.ButtonGroup,{children:Xt.map((e=>(0,Dt.jsx)(s.Button,{isDefault:!0,isPressed:e.value===t.carouselStyle,onClick:()=>n({carouselStyle:e.value}),children:e.label},e.value+"-carousel-style")))})}),"thumbnails"===t.carouselStyle&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)(s.RangeControl,{label:(0,e.__)("Width","cloudinary"),value:t.thumbnailProps_width,onChange:e=>n({thumbnailProps_width:e}),min:5,max:300}),(0,Dt.jsx)(s.RangeControl,{label:(0,e.__)("Height","cloudinary"),value:t.thumbnailProps_height,onChange:e=>n({thumbnailProps_height:e}),min:5,max:300}),(0,Dt.jsx)("p",{children:(0,e.__)("Navigation Button Shape","cloudinary")}),Jt.map((e=>(0,Dt.jsx)(an,{value:e.value,onChange:e=>n({thumbnailProps_navigationShape:e}),icon:e.icon,current:t.thumbnailProps_navigationShape,children:e.label},e.value+"-navigation-button-shape"))),(0,Dt.jsx)("p",{children:(0,e.__)("Selected Style","cloudinary")}),(0,Dt.jsx)("p",{children:(0,Dt.jsx)(s.ButtonGroup,{children:Kt.map((e=>(0,Dt.jsx)(s.Button,{isDefault:!0,isPressed:e.value===t.thumbnailProps_selectedStyle,onClick:()=>n({thumbnailProps_selectedStyle:e.value}),children:e.label},e.value+"-selected-style")))})}),(0,Dt.jsx)(s.SelectControl,{label:(0,e.__)("Selected Border Position","cloudinary"),value:t.thumbnailProps_selectedBorderPosition,options:Qt,onChange:e=>n({thumbnailProps_selectedBorderPosition:e})}),(0,Dt.jsx)(s.RangeControl,{label:(0,e.__)("Selected Border Width","cloudinary"),value:t.thumbnailProps_selectedBorderWidth,onChange:e=>n({thumbnailProps_selectedBorderWidth:e}),min:0,max:10}),(0,Dt.jsx)("p",{children:(0,e.__)("Media Shape Icon","cloudinary")}),en.map((e=>(0,Dt.jsx)(an,{value:e.value,onChange:e=>n({thumbnailProps_mediaSymbolShape:e}),icon:e.icon,current:t.thumbnailProps_mediaSymbolShape,children:e.label},e.value+"-media")))]}),"indicators"===t.carouselStyle&&(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)("p",{children:(0,e.__)("Indicators Shape","cloudinary")}),Yt.map((e=>(0,Dt.jsx)(an,{value:e.value,onChange:e=>n({indicatorProps_shape:e}),icon:e.icon,current:t.indicatorProps_shape,children:e.label},e.value+"-indicator")))]})]}),(0,Dt.jsx)(s.PanelBody,{title:(0,e.__)("Additional Settings","cloudinary"),initialOpen:!1,children:(0,Dt.jsx)(s.TextareaControl,{label:(0,e.__)("Custom Settings","cloudinary"),help:(0,e.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:a,onChange:e=>{let t={};c(e);try{t=JSON.parse(e)}catch(e){}if("object"==typeof t){const e={...i};e.customSettings=t,n({...i,...e})}}})})]})};const hn=new(o())("_"),vn=(0,e.__)("Drag images, upload new ones or select files from your library.","cloudinary"),yn=(e,t)=>({...e,container:"."+t,zoom:!1});var mn=({setAttributes:t,attributes:n,className:r,isSelected:i})=>{const[u,p]=(0,c.useState)(null),[d,h]=(0,c.useState)(!1),v=(0,c.useMemo)((()=>{if(0!==n.selectedImages.length)return n;const e={},{container:t,...r}=hn.dot(CLD_GALLERY_CONFIG);return Object.keys(r).forEach((t=>{n[t]||(e[t]=r[t])})),{...n,...e}}),[n]),y=(0,c.useMemo)((()=>n.selectedImages.length?n.selectedImages.map((({attachmentId:e})=>({id:e}))):[]),[n]);(0,c.useEffect)((()=>{if(u&&((({status:e,message:t,options:n={}})=>{(0,sn.dispatch)("core/notices").createNotice(e,t,{isDismissible:!0,...n})})({status:"error",message:u}),p(null)),n.selectedImages.length){let e;const{customSettings:t,...r}=(e=>{const t=new(o())("_"),n=f()(e),{selectedImages:r,...i}=t.object(n,{});return i.mediaAssets=r,"classic"!==i?.displayProps?.mode?delete i.transition:delete i.displayProps.columns,"pad"!==i?.transformation_crop&&delete i.transformation_background,"pad"!==i?.transformation?.crop&&delete i.transformation.background,i?.themeProps?.primary&&(i.themeProps.primary=un(i?.themeProps?.primary)),i?.themeProps?.onPrimary&&(i.themeProps.onPrimary=un(i?.themeProps?.onPrimary)),i?.themeProps?.active&&(i.themeProps.active=un(i?.themeProps?.active)),i})(n);try{e=cloudinary.galleryWidget(yn({...r,...t},n.container))}catch{e=cloudinary.galleryWidget(yn(r,n.container))}return e.render(),h(!1),()=>e.destroy()}}),[u,n,t,r]);const m=!!n.selectedImages.length;return n.container||t({container:`${r}${ln(15)}`}),t(v),(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsxs)(Dt.Fragment,{children:[(0,Dt.jsx)("div",{className:n.container||r}),(0,Dt.jsx)("div",{className:"wp-block-cloudinary-gallery",children:(0,Dt.jsx)(l.MediaPlaceholder,{labels:{title:!m&&(0,e.__)("Cloudinary Gallery","cloudinary"),instructions:!m&&vn},icon:"format-gallery",disableMediaButtons:m&&!i,allowedTypes:Wt,addToGallery:m,isAppender:m,onSelect:n=>(async n=>{h(!0);try{const e=await a()({path:CLD_REST_ENDPOINT+"/image_data",method:"POST",data:{images:n}});t({selectedImages:e})}catch{h(!1),p((0,e.__)("Could not load selected images. Please try again.","cloudinary"))}})(n),value:y,multiple:!0,children:d&&(0,Dt.jsx)("div",{className:"loading-spinner-container",children:(0,Dt.jsx)(s.Spinner,{})})})})]}),(0,Dt.jsx)(l.InspectorControls,{children:(0,Dt.jsx)(fn,{attributes:n,setAttributes:t})})]})};var gn=({attributes:e})=>(0,Dt.jsx)("div",{className:e.container}),bn=JSON.parse('{"aspectRatio":{"type":"string"},"navigation":{"type":"string"},"zoom":{"type":"boolean"},"carouselLocation":{"type":"string"},"carouselOffset":{"type":"number"},"carouselStyle":{"type":"string"},"displayProps_mode":{"type":"string"},"displayProps_columns":{"type":"number"},"indicatorProps_shape":{"type":"string"},"themeProps_primary":{"type":"string"},"themeProps_onPrimary":{"type":"string"},"themeProps_active":{"type":"string"},"zoomProps_type":{"type":"string"},"zoomProps_viewerPosition":{"type":"string"},"zoomProps_trigger":{"type":"string"},"thumbnailProps_width":{"type":"number"},"thumbnailProps_height":{"type":"number"},"thumbnailProps_navigationShape":{"type":"string"},"thumbnailProps_selectedStyle":{"type":"string"},"thumbnailProps_selectedBorderPosition":{"type":"string"},"thumbnailProps_selectedBorderWidth":{"type":"number"},"thumbnailProps_mediaSymbolShape":{"type":"string"},"cloudName":{"type":"string"},"container":{"type":"string"},"selectedImages":{"type":"array","default":[]},"transformation_crop":{"type":"string","default":"pad"},"transformation_background":{"type":"string"},"customSettings":{"type":"string"}}');(0,t.registerBlockType)("cloudinary/gallery",{title:(0,e.__)("Cloudinary Gallery","cloudinary"),description:(0,e.__)("Add a gallery powered by the Cloudinary Gallery Widget to your post.","cloudinary"),category:"widgets",icon:"format-gallery",attributes:bn,edit:mn,save:gn})}()}(); 1 (()=>{var e={1780(e){"use strict";function t(e,t){var r,n;if("function"==typeof t)void 0!==(n=t(e))&&(e=n);else if(Array.isArray(t))for(r=0;r<t.length;r++)void 0!==(n=t[r](e))&&(e=n);return e}function r(e,t){return"-"===e[0]&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(e){return Object(e)===e}function a(e){return 0===Object.keys(e).length}var i=["__proto__","prototype","constructor"],s=function(e){return-1===i.indexOf(e)};function l(e,t){e.indexOf("[")>=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var r=e.split(t);if(r.filter(s).length!==r.length)throw Error("Refusing to update blacklisted property "+e);return r}var c=Object.prototype.hasOwnProperty;function u(e,t,r,n){if(!(this instanceof u))return new u(e,t,r,n);void 0===t&&(t=!1),void 0===r&&(r=!0),void 0===n&&(n=!0),this.separator=e||".",this.override=t,this.useArray=r,this.useBrackets=n,this.keepArray=!1,this.cleanup=[]}var p=new u(".",!1,!0,!0);function d(e){return function(){return p[e].apply(p,arguments)}}u.prototype._fill=function(e,r,n,i){var s=e.shift();if(e.length>0){if(r[s]=r[s]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!o(r[s])){if(!this.override){if(!o(n)||!a(n))throw new Error("Trying to redefine `"+s+"` which is a "+typeof r[s]);return}r[s]={}}this._fill(e,r[s],n,i)}else{if(!this.override&&o(r[s])&&!a(r[s])){if(!o(n)||!a(n))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}r[s]=t(n,i)}},u.prototype.object=function(e,r){var n=this;return Object.keys(e).forEach(function(o){var a=void 0===r?null:r[o],i=l(o,n.separator).join(n.separator);-1!==i.indexOf(n.separator)?(n._fill(i.split(n.separator),e,e[o],a),delete e[o]):e[o]=t(e[o],a)}),e},u.prototype.str=function(e,r,n,o){var a=l(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(a.split(this.separator),n,r,o):n[e]=t(r,o),n},u.prototype.pick=function(e,t,n,o){var a,i,s,c,u;for(i=l(e,this.separator),a=0;a<i.length;a++){if(c=r(i[a],t),!t||"object"!=typeof t||!(c in t))return;if(a===i.length-1)return n?(s=t[c],o&&Array.isArray(t)?t.splice(c,1):delete t[c],Array.isArray(t)&&(u=i.slice(0,-1).join("."),-1===this.cleanup.indexOf(u)&&this.cleanup.push(u)),s):t[c];t=t[c]}return n&&Array.isArray(t)&&(t=t.filter(function(e){return void 0!==e})),t},u.prototype.delete=function(e,t){return this.remove(e,t,!0)},u.prototype.remove=function(e,t,r){var n;if(this.cleanup=[],Array.isArray(e)){for(n=0;n<e.length;n++)this.pick(e[n],t,!0,r);return r||this._cleanup(t),t}return this.pick(e,t,!0,r)},u.prototype._cleanup=function(e){var t,r,n,o;if(this.cleanup.length){for(r=0;r<this.cleanup.length;r++)t=(t=(o=(n=this.cleanup[r].split(".")).splice(0,-1).join("."))?this.pick(o,e):e)[n[0]].filter(function(e){return void 0!==e}),this.set(this.cleanup[r],t,e);this.cleanup=[]}},u.prototype.del=u.prototype.remove,u.prototype.move=function(e,r,n,o,a){return"function"==typeof o||Array.isArray(o)?this.set(r,t(this.pick(e,n,!0),o),n,a):(a=o,this.set(r,this.pick(e,n,!0),n,a)),n},u.prototype.transfer=function(e,r,n,o,a,i){return"function"==typeof a||Array.isArray(a)?this.set(r,t(this.pick(e,n,!0),a),o,i):(i=a,this.set(r,this.pick(e,n,!0),o,i)),o},u.prototype.copy=function(e,r,n,o,a,i){return"function"==typeof a||Array.isArray(a)?this.set(r,t(JSON.parse(JSON.stringify(this.pick(e,n,!1))),a),o,i):(i=a,this.set(r,this.pick(e,n,!1),o,i)),o},u.prototype.set=function(e,t,r,o){var a,i,s,u;if(void 0===t)return r;for(s=l(e,this.separator),a=0;a<s.length;a++){if(u=s[a],a===s.length-1)if(o&&n(t)&&n(r[u]))for(i in t)c.call(t,i)&&(r[u][i]=t[i]);else if(o&&Array.isArray(r[u])&&Array.isArray(t))for(var p=0;p<t.length;p++)r[s[a]].push(t[p]);else r[u]=t;else c.call(r,u)&&(n(r[u])||Array.isArray(r[u]))||(/^\d+$/.test(s[a+1])?r[u]=[]:r[u]={});r=r[u]}return r},u.prototype.transform=function(e,t,r){return t=t||{},r=r||{},Object.keys(e).forEach(function(n){this.set(e[n],this.pick(n,t),r)}.bind(this)),r},u.prototype.dot=function(e,t,r){t=t||{},r=r||[];var i=Array.isArray(e);return Object.keys(e).forEach(function(s){var l=i&&this.useBrackets?"["+s+"]":s;if(o(e[s])&&(n(e[s])&&!a(e[s])||Array.isArray(e[s])&&!this.keepArray&&0!==e[s].length)){if(i&&this.useBrackets){var c=r[r.length-1]||"";return this.dot(e[s],t,r.slice(0,-1).concat(c+l))}return this.dot(e[s],t,r.concat(l))}i&&this.useBrackets?t[r.join(this.separator).concat("["+s+"]")]=e[s]:t[r.concat(l).join(this.separator)]=e[s]}.bind(this)),t},u.pick=d("pick"),u.move=d("move"),u.transfer=d("transfer"),u.transform=d("transform"),u.copy=d("copy"),u.object=d("object"),u.str=d("str"),u.set=d("set"),u.delete=d("delete"),u.del=u.remove=d("remove"),u.dot=d("dot"),["override","overwrite"].forEach(function(e){Object.defineProperty(u,e,{get:function(){return p.override},set:function(e){p.override=!!e}})}),["useArray","keepArray","useBrackets"].forEach(function(e){Object.defineProperty(u,e,{get:function(){return p[e]},set:function(t){p[e]=t}})}),u._process=t,e.exports=u},5580(e,t,r){var n=r(6110)(r(9325),"DataView");e.exports=n},1549(e,t,r){var n=r(2032),o=r(3862),a=r(6721),i=r(2749),s=r(5749);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},79(e,t,r){var n=r(3702),o=r(80),a=r(4739),i=r(8655),s=r(1175);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},8223(e,t,r){var n=r(6110)(r(9325),"Map");e.exports=n},3661(e,t,r){var n=r(3040),o=r(7670),a=r(289),i=r(4509),s=r(2949);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},2804(e,t,r){var n=r(6110)(r(9325),"Promise");e.exports=n},6545(e,t,r){var n=r(6110)(r(9325),"Set");e.exports=n},7217(e,t,r){var n=r(79),o=r(1420),a=r(938),i=r(3605),s=r(9817),l=r(945);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=s,c.prototype.set=l,e.exports=c},1873(e,t,r){var n=r(9325).Symbol;e.exports=n},7828(e,t,r){var n=r(9325).Uint8Array;e.exports=n},8303(e,t,r){var n=r(6110)(r(9325),"WeakMap");e.exports=n},3729(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},9770(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}},695(e,t,r){var n=r(8096),o=r(2428),a=r(6449),i=r(3656),s=r(361),l=r(7167),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=a(e),u=!r&&o(e),p=!r&&!u&&i(e),d=!r&&!u&&!p&&l(e),f=r||u||p||d,m=f?n(e.length,String):[],v=m.length;for(var h in e)!t&&!c.call(e,h)||f&&("length"==h||p&&("offset"==h||"parent"==h)||d&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||s(h,v))||m.push(h);return m}},4528(e){e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},6547(e,t,r){var n=r(3360),o=r(5288),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var i=e[t];a.call(e,t)&&o(i,r)&&(void 0!==r||t in e)||n(e,t,r)}},6025(e,t,r){var n=r(5288);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},4733(e,t,r){var n=r(1791),o=r(5950);e.exports=function(e,t){return e&&n(t,o(t),e)}},3838(e,t,r){var n=r(1791),o=r(7241);e.exports=function(e,t){return e&&n(t,o(t),e)}},3360(e,t,r){var n=r(3243);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},9999(e,t,r){var n=r(7217),o=r(3729),a=r(6547),i=r(4733),s=r(3838),l=r(3290),c=r(3007),u=r(2271),p=r(8948),d=r(2),f=r(3349),m=r(5861),v=r(6189),h=r(7199),y=r(5529),g=r(6449),b=r(3656),_=r(7730),x=r(3805),w=r(8440),L=r(5950),E=r(7241),O="[object Arguments]",j="[object Function]",A="[object Object]",k={};k[O]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[A]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[j]=k["[object WeakMap]"]=!1,e.exports=function e(t,r,P,S,C,M){var T,B=1&r,D=2&r,N=4&r;if(P&&(T=C?P(t,S,C,M):P(t)),void 0!==T)return T;if(!x(t))return t;var R=g(t);if(R){if(T=v(t),!B)return c(t,T)}else{var Z=m(t),z=Z==j||"[object GeneratorFunction]"==Z;if(b(t))return l(t,B);if(Z==A||Z==O||z&&!C){if(T=D||z?{}:y(t),!B)return D?p(t,s(T,t)):u(t,i(T,t))}else{if(!k[Z])return C?t:{};T=h(t,Z,B)}}M||(M=new n);var F=M.get(t);if(F)return F;M.set(t,T),w(t)?t.forEach(function(n){T.add(e(n,r,P,n,t,M))}):_(t)&&t.forEach(function(n,o){T.set(o,e(n,r,P,o,t,M))});var I=R?void 0:(N?D?f:d:D?E:L)(t);return o(I||t,function(n,o){I&&(n=t[o=n]),a(T,o,e(n,r,P,o,t,M))}),T}},9344(e,t,r){var n=r(3805),o=Object.create,a=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=a},2199(e,t,r){var n=r(4528),o=r(6449);e.exports=function(e,t,r){var a=t(e);return o(e)?a:n(a,r(e))}},2552(e,t,r){var n=r(1873),o=r(659),a=r(9350),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},7534(e,t,r){var n=r(2552),o=r(346);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},9172(e,t,r){var n=r(5861),o=r(346);e.exports=function(e){return o(e)&&"[object Map]"==n(e)}},5083(e,t,r){var n=r(1882),o=r(7296),a=r(3805),i=r(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,p=c.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(n(e)?d:s).test(i(e))}},6038(e,t,r){var n=r(5861),o=r(346);e.exports=function(e){return o(e)&&"[object Set]"==n(e)}},4901(e,t,r){var n=r(2552),o=r(294),a=r(346),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[n(e)]}},8984(e,t,r){var n=r(5527),o=r(3650),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))a.call(e,r)&&"constructor"!=r&&t.push(r);return t}},2903(e,t,r){var n=r(3805),o=r(5527),a=r(181),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return a(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&r.push(s);return r}},8096(e){e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},7301(e){e.exports=function(e){return function(t){return e(t)}}},9653(e,t,r){var n=r(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},3290(e,t,r){e=r.nmd(e);var n=r(9325),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},6169(e,t,r){var n=r(9653);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},3201(e){var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},3736(e,t,r){var n=r(1873),o=n?n.prototype:void 0,a=o?o.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},1961(e,t,r){var n=r(9653);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},3007(e){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},1791(e,t,r){var n=r(6547),o=r(3360);e.exports=function(e,t,r,a){var i=!r;r||(r={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=a?a(r[c],e[c],c,r,e):void 0;void 0===u&&(u=e[c]),i?o(r,c,u):n(r,c,u)}return r}},2271(e,t,r){var n=r(1791),o=r(4664);e.exports=function(e,t){return n(e,o(e),t)}},8948(e,t,r){var n=r(1791),o=r(6375);e.exports=function(e,t){return n(e,o(e),t)}},5481(e,t,r){var n=r(9325)["__core-js_shared__"];e.exports=n},3243(e,t,r){var n=r(6110),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},4840(e){var t="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;e.exports=t},2(e,t,r){var n=r(2199),o=r(4664),a=r(5950);e.exports=function(e){return n(e,a,o)}},3349(e,t,r){var n=r(2199),o=r(6375),a=r(7241);e.exports=function(e){return n(e,a,o)}},2651(e,t,r){var n=r(4218);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},6110(e,t,r){var n=r(5083),o=r(392);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},8879(e,t,r){var n=r(4335)(Object.getPrototypeOf,Object);e.exports=n},659(e,t,r){var n=r(1873),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=i.call(e);return n&&(t?e[s]=r:delete e[s]),o}},4664(e,t,r){var n=r(9770),o=r(3345),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(e){return null==e?[]:(e=Object(e),n(i(e),function(t){return a.call(e,t)}))}:o;e.exports=s},6375(e,t,r){var n=r(4528),o=r(8879),a=r(4664),i=r(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,a(e)),e=o(e);return t}:i;e.exports=s},5861(e,t,r){var n=r(5580),o=r(8223),a=r(2804),i=r(6545),s=r(8303),l=r(2552),c=r(7473),u="[object Map]",p="[object Promise]",d="[object Set]",f="[object WeakMap]",m="[object DataView]",v=c(n),h=c(o),y=c(a),g=c(i),b=c(s),_=l;(n&&_(new n(new ArrayBuffer(1)))!=m||o&&_(new o)!=u||a&&_(a.resolve())!=p||i&&_(new i)!=d||s&&_(new s)!=f)&&(_=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case v:return m;case h:return u;case y:return p;case g:return d;case b:return f}return t}),e.exports=_},392(e){e.exports=function(e,t){return null==e?void 0:e[t]}},2032(e,t,r){var n=r(1042);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},3862(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721(e,t,r){var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},2749(e,t,r){var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},5749(e,t,r){var n=r(1042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},6189(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},7199(e,t,r){var n=r(9653),o=r(6169),a=r(3201),i=r(3736),s=r(1961);e.exports=function(e,t,r){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,r);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return a(e);case"[object Symbol]":return i(e)}}},5529(e,t,r){var n=r(9344),o=r(8879),a=r(5527);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:n(o(e))}},361(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},4218(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296(e,t,r){var n,o=r(5481),a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!a&&a in e}},5527(e){var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},3702(e){e.exports=function(){this.__data__=[],this.size=0}},80(e,t,r){var n=r(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},4739(e,t,r){var n=r(6025);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},8655(e,t,r){var n=r(6025);e.exports=function(e){return n(this.__data__,e)>-1}},1175(e,t,r){var n=r(6025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},3040(e,t,r){var n=r(1549),o=r(79),a=r(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},7670(e,t,r){var n=r(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},289(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).get(e)}},4509(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).has(e)}},2949(e,t,r){var n=r(2651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},1042(e,t,r){var n=r(6110)(Object,"create");e.exports=n},3650(e,t,r){var n=r(4335)(Object.keys,Object);e.exports=n},181(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},6009(e,t,r){e=r.nmd(e);var n=r(4840),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o&&n.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s},9350(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335(e){e.exports=function(e,t){return function(r){return e(t(r))}}},9325(e,t,r){var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},1420(e,t,r){var n=r(79);e.exports=function(){this.__data__=new n,this.size=0}},938(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},3605(e){e.exports=function(e){return this.__data__.get(e)}},9817(e){e.exports=function(e){return this.__data__.has(e)}},945(e,t,r){var n=r(79),o=r(8223),a=r(3661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},7473(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8055(e,t,r){var n=r(9999);e.exports=function(e){return n(e,5)}},5288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},2428(e,t,r){var n=r(7534),o=r(346),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},6449(e){var t=Array.isArray;e.exports=t},4894(e,t,r){var n=r(1882),o=r(294);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},3656(e,t,r){e=r.nmd(e);var n=r(9325),o=r(9935),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,s=i&&i.exports===a?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},1882(e,t,r){var n=r(2552),o=r(3805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7730(e,t,r){var n=r(9172),o=r(7301),a=r(6009),i=a&&a.isMap,s=i?o(i):n;e.exports=s},3805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8440(e,t,r){var n=r(6038),o=r(7301),a=r(6009),i=a&&a.isSet,s=i?o(i):n;e.exports=s},7167(e,t,r){var n=r(4901),o=r(7301),a=r(6009),i=a&&a.isTypedArray,s=i?o(i):n;e.exports=s},5950(e,t,r){var n=r(695),o=r(8984),a=r(4894);e.exports=function(e){return a(e)?n(e):o(e)}},7241(e,t,r){var n=r(695),o=r(2903),a=r(4894);e.exports=function(e){return a(e)?n(e,!0):o(e)}},3345(e){e.exports=function(){return[]}},9935(e){e.exports=function(){return!1}},6087(e){"use strict";e.exports=window.wp.element},6942(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,a(r)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=i(t,r));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={id:n,loaded:!1,exports:{}};return e[n](a,a.exports,r),a.loaded=!0,a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks;var n=r(1780),o=r.n(n);const a=window.wp.apiFetch;var i=r.n(a);const s=window.wp.components;window.wp["components/buildStyle/style.css"];var l=r(6087);const c=window.wp.blockEditor;var u=r(8055),p=r.n(u),d=r(6087);const f=()=>d.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},d.createElement("title",null,"shape-round"),d.createElement("desc",null,"Created with Sketch."),d.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"widgets/shape-round",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},d.createElement("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,5 C8.13400675,5 5,8.13400675 5,12 C5,15.8659932 8.13400675,19 12,19 C15.8659932,19 19,15.8659932 19,12 C19,8.13400675 15.8659932,5 12,5 Z",id:"Combined-Shape"})))),m=()=>d.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},d.createElement("title",null,"ratio-square"),d.createElement("desc",null,"Created with Sketch."),d.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"widgets/shape-square",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},d.createElement("path",{d:"M3,3 L3,21 L21,21 L21,3 L3,3 Z M5,5 L5,19 L19,19 L19,5 L5,5 Z",id:"shape"})))),v=()=>d.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},d.createElement("title",null,"shape-radius"),d.createElement("desc",null,"Created with Sketch."),d.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"widgets/shape-radius",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},d.createElement("path",{d:"M17,3 C19.209139,3 21,4.790861 21,7 L21,17 C21,19.209139 19.209139,21 17,21 L7,21 C4.790861,21 3,19.209139 3,17 L3,7 C3,4.790861 4.790861,3 7,3 L17,3 Z M17,5 L7,5 C5.9456382,5 5.08183488,5.81587779 5.00548574,6.85073766 L5,7 L5,17 C5,18.0543618 5.81587779,18.9181651 6.85073766,18.9945143 L7,19 L17,19 C18.0543618,19 18.9181651,18.1841222 18.9945143,17.1492623 L19,17 L19,7 C19,5.9456382 18.1841222,5.08183488 17.1492623,5.00548574 L17,5 Z",id:"Rectangle"})))),h=()=>d.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},d.createElement("title",null,"shape-none"),d.createElement("desc",null,"Created with Sketch."),d.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"widgets/shape-none",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},d.createElement("path",{d:"M5,19 L5,21 L3,21 L3,19 L5,19 Z M21,19 L21,21 L19,21 L19,19 L21,19 Z M13,19 L13,21 L11,21 L11,19 L13,19 Z M9,19 L9,21 L7,21 L7,19 L9,19 Z M17,19 L17,21 L15,21 L15,19 L17,19 Z M21,15 L21,17 L19,17 L19,15 L21,15 Z M21,11 L21,13 L19,13 L19,11 L21,11 Z M5,11 L5,13 L3,13 L3,11 L5,11 Z M21,7 L21,9 L19,9 L19,7 L21,7 Z M5,7 L5,9 L3,9 L3,7 L5,7 Z M13,3 L13,5 L11,5 L11,3 L13,3 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z M17,3 L17,5 L15,5 L15,3 L17,3 Z M21,3 L21,5 L19,5 L19,3 L21,3 Z M5,3 L5,5 L3,5 L3,3 L5,3 Z M3,15 L5,15 L5,17 L3,17 L3,15 Z",id:"Shape"})))),y=[{value:{type:"expanded",columns:1},icon:()=>d.createElement("svg",{width:"17px",height:"20px",viewBox:"0 0 17 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},d.createElement("title",null,"layout-modern"),d.createElement("desc",null,"Created with Sketch."),d.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"widgets/layout-modern",transform:"translate(-2.000000, -3.000000)",fill:"#000000"},d.createElement("path",{d:"M2,10 L5,10 L5,7 L2,7 L2,10 Z M2,14 L5,14 L5,11 L2,11 L2,14 Z M2,6 L5,6 L5,3 L2,3 L2,6 Z M6,3 L6,17 L19,17 L19,3 L6,3 Z M8,5 L8,15 L17,15 L17,5 L8,5 Z M6,18 L6,23 L19,23 L19,18 L6,18 Z M8,20 L8,23 L17,23 L17,20 L8,20 Z",id:"shape"})))),label:(0,e.__)("Expanded - 1 Column","cloudinary")},{value:{type:"expanded",columns:2},icon:()=>d.createElement("svg",{width:"18px",height:"17px",viewBox:"0 0 18 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},d.createElement("title",null,"layout-grid-2-column"),d.createElement("desc",null,"Created with Sketch."),d.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"widgets/layout-gird-2-col",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},d.createElement("path",{d:"M11,12 L11,20 L3,20 L3,12 L11,12 Z M21,12 L21,20 L13,20 L13,12 L21,12 Z M9,14 L5,14 L5,18 L9,18 L9,14 Z M19,14 L15,14 L15,18 L19,18 L19,14 Z M11,3 L11,11 L3,11 L3,3 L11,3 Z M21,3 L21,11 L13,11 L13,3 L21,3 Z M9,5 L5,5 L5,9 L9,9 L9,5 Z M19,5 L15,5 L15,9 L19,9 L19,5 Z",id:"Shape"})))),label:(0,e.__)("Expanded - 2 Column","cloudinary")},{value:{type:"expanded",columns:3},icon:()=>d.createElement("svg",{width:"20px",height:"13px",viewBox:"0 0 20 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},d.createElement("title",null,"layout-grid-3-column"),d.createElement("desc",null,"Created with Sketch."),d.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"widgets/layout-gird-3-col",transform:"translate(-2.000000, -5.000000)",fill:"#000000"},d.createElement("path",{d:"M8,12 L8,18 L2,18 L2,12 L8,12 Z M15,12 L15,18 L9,18 L9,12 L15,12 Z M22,12 L22,18 L16,18 L16,12 L22,12 Z M6,14 L4,14 L4,16 L6,16 L6,14 Z M13,14 L11,14 L11,16 L13,16 L13,14 Z M20,14 L18,14 L18,16 L20,16 L20,14 Z M8,5 L8,11 L2,11 L2,5 L8,5 Z M15,5 L15,11 L9,11 L9,5 L15,5 Z M22,5 L22,11 L16,11 L16,5 L22,5 Z M6,7 L4,7 L4,9 L6,9 L6,7 Z M13,7 L11,7 L11,9 L13,9 L13,7 Z M20,7 L18,7 L18,9 L20,9 L20,7 Z",id:"Combined-Shape"})))),label:(0,e.__)("Expanded - 3 Column","cloudinary")},{value:{type:"classic",columns:1},icon:()=>d.createElement("svg",{width:"17px",height:"14px",viewBox:"0 0 17 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},d.createElement("title",null,"layout-classic"),d.createElement("desc",null,"Created with Sketch."),d.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"widgets/layout-classic",transform:"translate(-3.000000, -5.000000)",fill:"#000000"},d.createElement("path",{d:"M3,12 L6,12 L6,9 L3,9 L3,12 Z M3,16 L6,16 L6,13 L3,13 L3,16 Z M3,8 L6,8 L6,5 L3,5 L3,8 Z M7,5 L7,19 L20,19 L20,5 L7,5 Z M9,7 L9,17 L18,17 L18,7 L9,7 Z",id:"shape"})))),label:(0,e.__)("Classic","cloudinary")}],g=["image"],b=[{label:(0,e.__)("1:1","cloudinary"),value:"1:1"},{label:(0,e.__)("3:4","cloudinary"),value:"3:4"},{label:(0,e.__)("4:3","cloudinary"),value:"4:3"},{label:(0,e.__)("4:6","cloudinary"),value:"4:6"},{label:(0,e.__)("6:4","cloudinary"),value:"6:4"},{label:(0,e.__)("5:7","cloudinary"),value:"5:7"},{label:(0,e.__)("7:5","cloudinary"),value:"7:5"},{label:(0,e.__)("8:5","cloudinary"),value:"8:5"},{label:(0,e.__)("5:8","cloudinary"),value:"5:8"},{label:(0,e.__)("9:16","cloudinary"),value:"9:16"},{label:(0,e.__)("16:9","cloudinary"),value:"16:9"}],_=[{label:(0,e.__)("None","cloudinary"),value:"none"},{label:(0,e.__)("Fade","cloudinary"),value:"fade"},{label:(0,e.__)("Slide","cloudinary"),value:"slide"}],x=[{label:(0,e.__)("Always","cloudinary"),value:"always"},{label:(0,e.__)("None","cloudinary"),value:"none"},{label:(0,e.__)("MouseOver","cloudinary"),value:"mouseover"}],w=[{label:(0,e.__)("Inline","cloudinary"),value:"inline"},{label:(0,e.__)("Flyout","cloudinary"),value:"flyout"},{label:(0,e.__)("Popup","cloudinary"),value:"popup"}],L=[{label:(0,e.__)("Top","cloudinary"),value:"top"},{label:(0,e.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,e.__)("Left","cloudinary"),value:"left"},{label:(0,e.__)("Right","cloudinary"),value:"right"}],E=[{label:(0,e.__)("Click","cloudinary"),value:"click"},{label:(0,e.__)("Hover","cloudinary"),value:"hover"}],O=[{label:(0,e.__)("Left","cloudinary"),value:"left"},{label:(0,e.__)("Right","cloudinary"),value:"right"},{label:(0,e.__)("Top","cloudinary"),value:"top"},{label:(0,e.__)("Bottom","cloudinary"),value:"bottom"}],j=[{label:(0,e.__)("Thumbnails","cloudinary"),value:"thumbnails"},{label:(0,e.__)("Indicators","cloudinary"),value:"indicators"},{label:(0,e.__)("None","cloudinary"),value:"none"}],A=[{value:"round",icon:f,label:(0,e.__)("Round","cloudinary")},{value:"radius",icon:v,label:(0,e.__)("Radius","cloudinary")},{value:"none",icon:h,label:(0,e.__)("None","cloudinary")},{value:"square",icon:m,label:(0,e.__)("Square","cloudinary")},{value:"rectangle",icon:()=>d.createElement("svg",{width:"14px",height:"20px",viewBox:"0 0 14 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},d.createElement("title",null,"ratio-9-16"),d.createElement("desc",null,"Created with Sketch."),d.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},d.createElement("g",{id:"ratio/9-16",transform:"translate(-5.000000, -2.000000)",fill:"#000000"},d.createElement("path",{d:"M22,5.5 L22,18.5 L2,18.5 L2,5.5 L22,5.5 Z M20,7.5 L4,7.5 L4,16.5 L20,16.5 L20,7.5 Z",id:"Combined-Shape",transform:"translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) "})))),label:(0,e.__)("Rectangle","cloudinary")}],k=[{value:"round",icon:f,label:(0,e.__)("Round","cloudinary")},{value:"radius",icon:v,label:(0,e.__)("Radius","cloudinary")},{value:"square",icon:m,label:(0,e.__)("Square","cloudinary")}],P=[{label:(0,e.__)("All","cloudinary"),value:"all"},{label:(0,e.__)("Border","cloudinary"),value:"border"},{label:(0,e.__)("Gradient","cloudinary"),value:"gradient"}],S=[{label:(0,e.__)("All","cloudinary"),value:"all"},{label:(0,e.__)("Top","cloudinary"),value:"top"},{label:(0,e.__)("Top-Bottom","cloudinary"),value:"top-bottom"},{label:(0,e.__)("Left-Right","cloudinary"),value:"left-right"},{label:(0,e.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,e.__)("Left","cloudinary"),value:"left"},{label:(0,e.__)("Right","cloudinary"),value:"right"}],C=[{value:"round",icon:f,label:(0,e.__)("Round","cloudinary")},{value:"radius",icon:v,label:(0,e.__)("Radius","cloudinary")},{value:"none",icon:h,label:(0,e.__)("None","cloudinary")},{value:"square",icon:m,label:(0,e.__)("Square","cloudinary")}],M=[{label:(0,e.__)("Pad","cloudinary"),value:"pad"},{label:(0,e.__)("Fill","cloudinary"),value:"fill"}],T=[{label:(0,e.__)("White padding","cloudinary"),value:"rgb:FFFFFF"},{label:(0,e.__)("Border color padding","cloudinary"),value:"auto"},{label:(0,e.__)("Predominant color padding","cloudinary"),value:"auto:predominant"},{label:(0,e.__)("Gradient fade padding","cloudinary"),value:"auto:predominant_gradient"}];var B=r(6942),D=r.n(B),N=r(6087);const R=({value:e,children:t,icon:r,onChange:n,current:o})=>{const a="object"==typeof e?JSON.stringify(e)===JSON.stringify(o):o===e;return N.createElement("button",{type:"button",onClick:()=>n(e),className:D()("radio-select",{"radio-select--active":a})},N.createElement(r,null),N.createElement("div",{className:"radio-select__label"},t))},Z=window.wp.data,z=e=>e<10?"0"+String(e):e.toString(16),F=e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,z).join("")},I=e=>{const t=/var\((.*)\)/g.exec(e);return t?getComputedStyle(document.documentElement).getPropertyValue(t[1]):e};function W(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function H(e){return e instanceof W(e).Element||e instanceof Element}function V(e){return e instanceof W(e).HTMLElement||e instanceof HTMLElement}function U(e){return"undefined"!=typeof ShadowRoot&&(e instanceof W(e).ShadowRoot||e instanceof ShadowRoot)}var q=Math.max,$=Math.min,G=Math.round;function X(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function J(){return!/^((?!chrome|android).)*safari/i.test(X())}function Y(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&V(e)&&(o=e.offsetWidth>0&&G(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&G(n.height)/e.offsetHeight||1);var i=(H(e)?W(e):window).visualViewport,s=!J()&&r,l=(n.left+(s&&i?i.offsetLeft:0))/o,c=(n.top+(s&&i?i.offsetTop:0))/a,u=n.width/o,p=n.height/a;return{width:u,height:p,top:c,right:l+u,bottom:c+p,left:l,x:l,y:c}}function K(e){var t=W(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Q(e){return e?(e.nodeName||"").toLowerCase():null}function ee(e){return((H(e)?e.ownerDocument:e.document)||window.document).documentElement}function te(e){return Y(ee(e)).left+K(e).scrollLeft}function re(e){return W(e).getComputedStyle(e)}function ne(e){var t=re(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function oe(e,t,r){void 0===r&&(r=!1);var n,o,a=V(t),i=V(t)&&function(e){var t=e.getBoundingClientRect(),r=G(t.width)/e.offsetWidth||1,n=G(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),s=ee(t),l=Y(e,i,r),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!r)&&(("body"!==Q(t)||ne(s))&&(c=(n=t)!==W(n)&&V(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:K(n)),V(t)?((u=Y(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=te(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function ae(e){var t=Y(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function ie(e){return"html"===Q(e)?e:e.assignedSlot||e.parentNode||(U(e)?e.host:null)||ee(e)}function se(e){return["html","body","#document"].indexOf(Q(e))>=0?e.ownerDocument.body:V(e)&&ne(e)?e:se(ie(e))}function le(e,t){var r;void 0===t&&(t=[]);var n=se(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=W(n),i=o?[a].concat(a.visualViewport||[],ne(n)?n:[]):n,s=t.concat(i);return o?s:s.concat(le(ie(i)))}function ce(e){return["table","td","th"].indexOf(Q(e))>=0}function ue(e){return V(e)&&"fixed"!==re(e).position?e.offsetParent:null}function pe(e){for(var t=W(e),r=ue(e);r&&ce(r)&&"static"===re(r).position;)r=ue(r);return r&&("html"===Q(r)||"body"===Q(r)&&"static"===re(r).position)?t:r||function(e){var t=/firefox/i.test(X());if(/Trident/i.test(X())&&V(e)&&"fixed"===re(e).position)return null;var r=ie(e);for(U(r)&&(r=r.host);V(r)&&["html","body"].indexOf(Q(r))<0;){var n=re(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var de="top",fe="bottom",me="right",ve="left",he="auto",ye=[de,fe,me,ve],ge="start",be="end",_e="viewport",xe="popper",we=ye.reduce(function(e,t){return e.concat([t+"-"+ge,t+"-"+be])},[]),Le=[].concat(ye,[he]).reduce(function(e,t){return e.concat([t,t+"-"+ge,t+"-"+be])},[]),Ee=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Oe(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||o(e)}),n}var je={placement:"bottom",modifiers:[],strategy:"absolute"};function Ae(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function ke(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,a=void 0===o?je:o;return function(e,t,r){void 0===r&&(r=a);var o,i,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},je,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(r){var o="function"==typeof r?r(s.options):r;p(),s.options=Object.assign({},a,s.options,o),s.scrollParents={reference:H(e)?le(e):e.contextElement?le(e.contextElement):[],popper:le(t)};var i,c,d=function(e){var t=Oe(e);return Ee.reduce(function(e,r){return e.concat(t.filter(function(e){return e.phase===r}))},[])}((i=[].concat(n,s.options.modifiers),c=i.reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return s.orderedModifiers=d.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var a=o({state:s,name:t,instance:u,options:n}),i=function(){};l.push(a||i)}}),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,r=e.popper;if(Ae(t,r)){s.rects={reference:oe(t,pe(r),"fixed"===s.options.strategy),popper:ae(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var o=s.orderedModifiers[n],a=o.fn,i=o.options,l=void 0===i?{}:i,p=o.name;"function"==typeof a&&(s=a({state:s,options:l,name:p,instance:u})||s)}else s.reset=!1,n=-1}}},update:(o=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(o())})})),i}),destroy:function(){p(),c=!0}};if(!Ae(e,t))return u;function p(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(r).then(function(e){!c&&r.onFirstUpdate&&r.onFirstUpdate(e)}),u}}var Pe={passive:!0};function Se(e){return e.split("-")[0]}function Ce(e){return e.split("-")[1]}function Me(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Te(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?Se(o):null,i=o?Ce(o):null,s=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(a){case de:t={x:s,y:r.y-n.height};break;case fe:t={x:s,y:r.y+r.height};break;case me:t={x:r.x+r.width,y:l};break;case ve:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=a?Me(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case ge:t[c]=t[c]-(r[u]/2-n[u]/2);break;case be:t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var Be={top:"auto",right:"auto",bottom:"auto",left:"auto"};function De(e){var t,r=e.popper,n=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,p=e.isFixed,d=i.x,f=void 0===d?0:d,m=i.y,v=void 0===m?0:m,h="function"==typeof u?u({x:f,y:v}):{x:f,y:v};f=h.x,v=h.y;var y=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=ve,_=de,x=window;if(c){var w=pe(r),L="clientHeight",E="clientWidth";if(w===W(r)&&"static"!==re(w=ee(r)).position&&"absolute"===s&&(L="scrollHeight",E="scrollWidth"),o===de||(o===ve||o===me)&&a===be)_=fe,v-=(p&&w===x&&x.visualViewport?x.visualViewport.height:w[L])-n.height,v*=l?1:-1;if(o===ve||(o===de||o===fe)&&a===be)b=me,f-=(p&&w===x&&x.visualViewport?x.visualViewport.width:w[E])-n.width,f*=l?1:-1}var O,j=Object.assign({position:s},c&&Be),A=!0===u?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:G(r*o)/o||0,y:G(n*o)/o||0}}({x:f,y:v},W(r)):{x:f,y:v};return f=A.x,v=A.y,l?Object.assign({},j,((O={})[_]=g?"0":"",O[b]=y?"0":"",O.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",O)):Object.assign({},j,((t={})[_]=g?v+"px":"",t[b]=y?f+"px":"",t.transform="",t))}const Ne={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];V(o)&&Q(o)&&(Object.assign(o.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});V(n)&&Q(n)&&(Object.assign(n.style,a),Object.keys(o).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};const Re={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=Le.reduce(function(e,r){return e[r]=function(e,t,r){var n=Se(e),o=[ve,de].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[ve,me].indexOf(n)>=0?{x:s,y:i}:{x:i,y:s}}(r,t.rects,a),e},{}),s=i[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};var Ze={left:"right",right:"left",bottom:"top",top:"bottom"};function ze(e){return e.replace(/left|right|bottom|top/g,function(e){return Ze[e]})}var Fe={start:"end",end:"start"};function Ie(e){return e.replace(/start|end/g,function(e){return Fe[e]})}function We(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&U(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function He(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ve(e,t,r){return t===_e?He(function(e,t){var r=W(e),n=ee(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var c=J();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+te(e),y:l}}(e,r)):H(t)?function(e,t){var r=Y(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):He(function(e){var t,r=ee(e),n=K(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=q(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=q(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+te(e),l=-n.scrollTop;return"rtl"===re(o||r).direction&&(s+=q(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}(ee(e)))}function Ue(e,t,r,n){var o="clippingParents"===t?function(e){var t=le(ie(e)),r=["absolute","fixed"].indexOf(re(e).position)>=0&&V(e)?pe(e):e;return H(r)?t.filter(function(e){return H(e)&&We(e,r)&&"body"!==Q(e)}):[]}(e):[].concat(t),a=[].concat(o,[r]),i=a[0],s=a.reduce(function(t,r){var o=Ve(e,r,n);return t.top=q(o.top,t.top),t.right=$(o.right,t.right),t.bottom=$(o.bottom,t.bottom),t.left=q(o.left,t.left),t},Ve(e,i,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function qe(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function $e(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function Ge(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,a=r.strategy,i=void 0===a?e.strategy:a,s=r.boundary,l=void 0===s?"clippingParents":s,c=r.rootBoundary,u=void 0===c?_e:c,p=r.elementContext,d=void 0===p?xe:p,f=r.altBoundary,m=void 0!==f&&f,v=r.padding,h=void 0===v?0:v,y=qe("number"!=typeof h?h:$e(h,ye)),g=d===xe?"reference":xe,b=e.rects.popper,_=e.elements[m?g:d],x=Ue(H(_)?_:_.contextElement||ee(e.elements.popper),l,u,i),w=Y(e.elements.reference),L=Te({reference:w,element:b,strategy:"absolute",placement:o}),E=He(Object.assign({},b,L)),O=d===xe?E:w,j={top:x.top-O.top+y.top,bottom:O.bottom-x.bottom+y.bottom,left:x.left-O.left+y.left,right:O.right-x.right+y.right},A=e.modifiersData.offset;if(d===xe&&A){var k=A[o];Object.keys(j).forEach(function(e){var t=[me,fe].indexOf(e)>=0?1:-1,r=[de,fe].indexOf(e)>=0?"y":"x";j[e]+=k[r]*t})}return j}function Xe(e,t,r){return q(e,$(t,r))}const Je={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,s=void 0!==i&&i,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,p=r.padding,d=r.tether,f=void 0===d||d,m=r.tetherOffset,v=void 0===m?0:m,h=Ge(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:u}),y=Se(t.placement),g=Ce(t.placement),b=!g,_=Me(y),x="x"===_?"y":"x",w=t.modifiersData.popperOffsets,L=t.rects.reference,E=t.rects.popper,O="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,j="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(w){if(a){var P,S="y"===_?de:ve,C="y"===_?fe:me,M="y"===_?"height":"width",T=w[_],B=T+h[S],D=T-h[C],N=f?-E[M]/2:0,R=g===ge?L[M]:E[M],Z=g===ge?-E[M]:-L[M],z=t.elements.arrow,F=f&&z?ae(z):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=I[S],H=I[C],V=Xe(0,L[M],F[M]),U=b?L[M]/2-N-V-W-j.mainAxis:R-V-W-j.mainAxis,G=b?-L[M]/2+N+V+H+j.mainAxis:Z+V+H+j.mainAxis,X=t.elements.arrow&&pe(t.elements.arrow),J=X?"y"===_?X.clientTop||0:X.clientLeft||0:0,Y=null!=(P=null==A?void 0:A[_])?P:0,K=T+G-Y,Q=Xe(f?$(B,T+U-Y-J):B,T,f?q(D,K):D);w[_]=Q,k[_]=Q-T}if(s){var ee,te="x"===_?de:ve,re="x"===_?fe:me,ne=w[x],oe="y"===x?"height":"width",ie=ne+h[te],se=ne-h[re],le=-1!==[de,ve].indexOf(y),ce=null!=(ee=null==A?void 0:A[x])?ee:0,ue=le?ie:ne-L[oe]-E[oe]-ce+j.altAxis,he=le?ne+L[oe]+E[oe]-ce-j.altAxis:se,ye=f&&le?function(e,t,r){var n=Xe(e,t,r);return n>r?r:n}(ue,ne,he):Xe(f?ue:ie,ne,f?he:se);w[x]=ye,k[x]=ye-ne}t.modifiersData[n]=k}},requiresIfExists:["offset"]};const Ye={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,s=Se(r.placement),l=Me(s),c=[ve,me].indexOf(s)>=0?"height":"width";if(a&&i){var u=function(e,t){return qe("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:$e(e,ye))}(o.padding,r),p=ae(a),d="y"===l?de:ve,f="y"===l?fe:me,m=r.rects.reference[c]+r.rects.reference[l]-i[l]-r.rects.popper[c],v=i[l]-r.rects.reference[l],h=pe(a),y=h?"y"===l?h.clientHeight||0:h.clientWidth||0:0,g=m/2-v/2,b=u[d],_=y-p[c]-u[f],x=y/2-p[c]/2+g,w=Xe(b,x,_),L=l;r.modifiersData[n]=((t={})[L]=w,t.centerOffset=w-x,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&We(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ke(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Qe(e){return[de,me,fe,ve].some(function(t){return e[t]>=0})}var et=ke({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=void 0===o||o,i=n.resize,s=void 0===i||i,l=W(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",r.update,Pe)}),s&&l.addEventListener("resize",r.update,Pe),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",r.update,Pe)}),s&&l.removeEventListener("resize",r.update,Pe)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Te({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,s=r.roundOffsets,l=void 0===s||s,c={placement:Se(t.placement),variation:Ce(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,De(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,De(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Ne,Re,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,s=void 0===i||i,l=r.fallbackPlacements,c=r.padding,u=r.boundary,p=r.rootBoundary,d=r.altBoundary,f=r.flipVariations,m=void 0===f||f,v=r.allowedAutoPlacements,h=t.options.placement,y=Se(h),g=l||(y===h||!m?[ze(h)]:function(e){if(Se(e)===he)return[];var t=ze(e);return[Ie(e),t,Ie(t)]}(h)),b=[h].concat(g).reduce(function(e,r){return e.concat(Se(r)===he?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?Le:l,u=Ce(n),p=u?s?we:we.filter(function(e){return Ce(e)===u}):ye,d=p.filter(function(e){return c.indexOf(e)>=0});0===d.length&&(d=p);var f=d.reduce(function(t,r){return t[r]=Ge(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[Se(r)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}(t,{placement:r,boundary:u,rootBoundary:p,padding:c,flipVariations:m,allowedAutoPlacements:v}):r)},[]),_=t.rects.reference,x=t.rects.popper,w=new Map,L=!0,E=b[0],O=0;O<b.length;O++){var j=b[O],A=Se(j),k=Ce(j)===ge,P=[de,fe].indexOf(A)>=0,S=P?"width":"height",C=Ge(t,{placement:j,boundary:u,rootBoundary:p,altBoundary:d,padding:c}),M=P?k?me:ve:k?fe:de;_[S]>x[S]&&(M=ze(M));var T=ze(M),B=[];if(a&&B.push(C[A]<=0),s&&B.push(C[M]<=0,C[T]<=0),B.every(function(e){return e})){E=j,L=!1;break}w.set(j,B)}if(L)for(var D=function(e){var t=b.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},N=m?3:1;N>0;N--){if("break"===D(N))break}t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Je,Ye,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=Ge(t,{elementContext:"reference"}),s=Ge(t,{altBoundary:!0}),l=Ke(i,n),c=Ke(s,o,a),u=Qe(l),p=Qe(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}}]}),tt="tippy-content",rt="tippy-backdrop",nt="tippy-arrow",ot="tippy-svg-arrow",at={passive:!0,capture:!0},it=function(){return document.body};function st(e,t,r){if(Array.isArray(e)){var n=e[t];return null==n?Array.isArray(r)?r[t]:r:n}return e}function lt(e,t){var r={}.toString.call(e);return 0===r.indexOf("[object")&&r.indexOf(t+"]")>-1}function ct(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ut(e,t){return 0===t?e:function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)};var r}function pt(e){return[].concat(e)}function dt(e,t){-1===e.indexOf(t)&&e.push(t)}function ft(e){return e.split("-")[0]}function mt(e){return[].slice.call(e)}function vt(e){return Object.keys(e).reduce(function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t},{})}function ht(){return document.createElement("div")}function yt(e){return["Element","Fragment"].some(function(t){return lt(e,t)})}function gt(e){return lt(e,"MouseEvent")}function bt(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function _t(e){return yt(e)?[e]:function(e){return lt(e,"NodeList")}(e)?mt(e):Array.isArray(e)?e:mt(document.querySelectorAll(e))}function xt(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function wt(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Lt(e){var t,r=pt(e)[0];return null!=r&&null!=(t=r.ownerDocument)&&t.body?r.ownerDocument:document}function Et(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,r)})}function Ot(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=null==r.getRootNode||null==(n=r.getRootNode())?void 0:n.host}return!1}var jt={isTouch:!1},At=0;function kt(){jt.isTouch||(jt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Pt))}function Pt(){var e=performance.now();e-At<20&&(jt.isTouch=!1,document.removeEventListener("mousemove",Pt)),At=e}function St(){var e=document.activeElement;if(bt(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Ct=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Mt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Tt=Object.assign({appendTo:it,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Mt,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Bt=Object.keys(Tt);function Dt(e){var t=(e.plugins||[]).reduce(function(t,r){var n,o=r.name,a=r.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(n=Tt[o])?n:a);return t},{});return Object.assign({},e,t)}function Nt(e,t){var r=Object.assign({},t,{content:ct(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Dt(Object.assign({},Tt,{plugins:t}))):Bt).reduce(function(t,r){var n=(e.getAttribute("data-tippy-"+r)||"").trim();if(!n)return t;if("content"===r)t[r]=n;else try{t[r]=JSON.parse(n)}catch(e){t[r]=n}return t},{})}(e,t.plugins));return r.aria=Object.assign({},Tt.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?t.interactive:r.aria.expanded,content:"auto"===r.aria.content?t.interactive?null:"describedby":r.aria.content},r}function Rt(e,t){e.innerHTML=t}function Zt(e){var t=ht();return!0===e?t.className=nt:(t.className=ot,yt(e)?t.appendChild(e):Rt(t,e)),t}function zt(e,t){yt(t.content)?(Rt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Rt(e,t.content):e.textContent=t.content)}function Ft(e){var t=e.firstElementChild,r=mt(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(tt)}),arrow:r.find(function(e){return e.classList.contains(nt)||e.classList.contains(ot)}),backdrop:r.find(function(e){return e.classList.contains(rt)})}}function It(e){var t=ht(),r=ht();r.className="tippy-box",r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=ht();function o(r,n){var o=Ft(t),a=o.box,i=o.content,s=o.arrow;n.theme?a.setAttribute("data-theme",n.theme):a.removeAttribute("data-theme"),"string"==typeof n.animation?a.setAttribute("data-animation",n.animation):a.removeAttribute("data-animation"),n.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?a.setAttribute("role",n.role):a.removeAttribute("role"),r.content===n.content&&r.allowHTML===n.allowHTML||zt(i,e.props),n.arrow?s?r.arrow!==n.arrow&&(a.removeChild(s),a.appendChild(Zt(n.arrow))):a.appendChild(Zt(n.arrow)):s&&a.removeChild(s)}return n.className=tt,n.setAttribute("data-state","hidden"),zt(n,e.props),t.appendChild(r),r.appendChild(n),o(e.props,e.props),{popper:t,onUpdate:o}}It.$$tippy=!0;var Wt=1,Ht=[],Vt=[];function Ut(e,t){var r,n,o,a,i,s,l,c,u=Nt(e,Object.assign({},Tt,Dt(vt(t)))),p=!1,d=!1,f=!1,m=!1,v=[],h=ut($,u.interactiveDebounce),y=Wt++,g=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),b={id:y,reference:e,popper:ht(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(n),cancelAnimationFrame(o)},setProps:function(t){0;if(b.state.isDestroyed)return;T("onBeforeUpdate",[b,t]),U();var r=b.props,n=Nt(e,Object.assign({},r,vt(t),{ignoreAttributes:!0}));b.props=n,V(),r.interactiveDebounce!==n.interactiveDebounce&&(N(),h=ut($,n.interactiveDebounce));r.triggerTarget&&!n.triggerTarget?pt(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded");D(),M(),w&&w(r,n);b.popperInstance&&(Y(),Q().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));T("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){0;var e=b.state.isVisible,t=b.state.isDestroyed,r=!b.state.isEnabled,n=jt.isTouch&&!b.props.touch,o=st(b.props.duration,0,Tt.duration);if(e||t||r||n)return;if(k().hasAttribute("disabled"))return;if(T("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,A()&&(x.style.visibility="visible");M(),F(),b.state.isMounted||(x.style.transition="none");if(A()){var a=S();xt([a.box,a.content],0)}s=function(){var e;if(b.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=b.props.moveTransition,A()&&b.props.animation){var t=S(),r=t.box,n=t.content;xt([r,n],o),wt([r,n],"visible")}B(),D(),dt(Vt,b),null==(e=b.popperInstance)||e.forceUpdate(),T("onMount",[b]),b.props.animation&&A()&&function(e,t){W(e,t)}(o,function(){b.state.isShown=!0,T("onShown",[b])})}},function(){var e,t=b.props.appendTo,r=k();e=b.props.interactive&&t===it||"parent"===t?r.parentNode:ct(t,[r]);e.contains(x)||e.appendChild(x);b.state.isMounted=!0,Y(),!1}()},hide:function(){0;var e=!b.state.isVisible,t=b.state.isDestroyed,r=!b.state.isEnabled,n=st(b.props.duration,1,Tt.duration);if(e||t||r)return;if(T("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,m=!1,p=!1,A()&&(x.style.visibility="hidden");if(N(),I(),M(!0),A()){var o=S(),a=o.box,i=o.content;b.props.animation&&(xt([a,i],n),wt([a,i],"hidden"))}B(),D(),b.props.animation?A()&&function(e,t){W(e,function(){!b.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()})}(n,b.unmount):b.unmount()},hideWithInteractivity:function(e){0;P().addEventListener("mousemove",h),dt(Ht,h),h(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;K(),Q().forEach(function(e){e._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x);Vt=Vt.filter(function(e){return e!==b}),b.state.isMounted=!1,T("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),U(),delete e._tippy,b.state.isDestroyed=!0,T("onDestroy",[b])}};if(!u.render)return b;var _=u.render(b),x=_.popper,w=_.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+b.id,b.popper=x,e._tippy=b,x._tippy=b;var L=g.map(function(e){return e.fn(b)}),E=e.hasAttribute("aria-expanded");return V(),D(),M(),T("onCreate",[b]),u.showOnCreate&&ee(),x.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&P().addEventListener("mousemove",h)}),b;function O(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function j(){return"hold"===O()[0]}function A(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function k(){return l||e}function P(){var e=k().parentNode;return e?Lt(e):document}function S(){return Ft(x)}function C(e){return b.state.isMounted&&!b.state.isVisible||jt.isTouch||a&&"focus"===a.type?0:st(b.props.delay,e?0:1,Tt.delay)}function M(e){void 0===e&&(e=!1),x.style.pointerEvents=b.props.interactive&&!e?"":"none",x.style.zIndex=""+b.props.zIndex}function T(e,t,r){var n;(void 0===r&&(r=!0),L.forEach(function(r){r[e]&&r[e].apply(r,t)}),r)&&(n=b.props)[e].apply(n,t)}function B(){var t=b.props.aria;if(t.content){var r="aria-"+t.content,n=x.id;pt(b.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(r);if(b.state.isVisible)e.setAttribute(r,t?t+" "+n:n);else{var o=t&&t.replace(n,"").trim();o?e.setAttribute(r,o):e.removeAttribute(r)}})}}function D(){!E&&b.props.aria.expanded&&pt(b.props.triggerTarget||e).forEach(function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===k()?"true":"false"):e.removeAttribute("aria-expanded")})}function N(){P().removeEventListener("mousemove",h),Ht=Ht.filter(function(e){return e!==h})}function R(t){if(!jt.isTouch||!f&&"mousedown"!==t.type){var r=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!Ot(x,r)){if(pt(b.props.triggerTarget||e).some(function(e){return Ot(e,r)})){if(jt.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else T("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout(function(){d=!1}),b.state.isMounted||I())}}}function Z(){f=!0}function z(){f=!1}function F(){var e=P();e.addEventListener("mousedown",R,!0),e.addEventListener("touchend",R,at),e.addEventListener("touchstart",z,at),e.addEventListener("touchmove",Z,at)}function I(){var e=P();e.removeEventListener("mousedown",R,!0),e.removeEventListener("touchend",R,at),e.removeEventListener("touchstart",z,at),e.removeEventListener("touchmove",Z,at)}function W(e,t){var r=S().box;function n(e){e.target===r&&(Et(r,"remove",n),t())}if(0===e)return t();Et(r,"remove",i),Et(r,"add",n),i=n}function H(t,r,n){void 0===n&&(n=!1),pt(b.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,r,n),v.push({node:e,eventType:t,handler:r,options:n})})}function V(){var e;j()&&(H("touchstart",q,{passive:!0}),H("touchend",G,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(H(e,q),e){case"mouseenter":H("mouseleave",G);break;case"focus":H(Ct?"focusout":"blur",X);break;case"focusin":H("focusout",X)}})}function U(){v.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,o=e.options;t.removeEventListener(r,n,o)}),v=[]}function q(e){var t,r=!1;if(b.state.isEnabled&&!J(e)&&!d){var n="focus"===(null==(t=a)?void 0:t.type);a=e,l=e.currentTarget,D(),!b.state.isVisible&>(e)&&Ht.forEach(function(t){return t(e)}),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||p)&&!1!==b.props.hideOnClick&&b.state.isVisible?r=!0:ee(e),"click"===e.type&&(p=!r),r&&!n&&te(e)}}function $(e){var t=e.target,r=k().contains(t)||x.contains(t);if("mousemove"!==e.type||!r){var n=Q().concat(x).map(function(e){var t,r=null==(t=e._tippy.popperInstance)?void 0:t.state;return r?{popperRect:e.getBoundingClientRect(),popperState:r,props:u}:null}).filter(Boolean);(function(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,i=ft(o.placement),s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===i?s.top.y:0,c="top"===i?s.bottom.y:0,u="right"===i?s.left.x:0,p="left"===i?s.right.x:0,d=t.top-n+l>a,f=n-t.bottom-c>a,m=t.left-r+u>a,v=r-t.right-p>a;return d||f||m||v})})(n,e)&&(N(),te(e))}}function G(e){J(e)||b.props.trigger.indexOf("click")>=0&&p||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function X(e){b.props.trigger.indexOf("focusin")<0&&e.target!==k()||b.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||te(e)}function J(e){return!!jt.isTouch&&j()!==e.type.indexOf("touch")>=0}function Y(){K();var t=b.props,r=t.popperOptions,n=t.placement,o=t.offset,a=t.getReferenceClientRect,i=t.moveTransition,l=A()?Ft(x).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||k()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(A()){var r=S().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?r.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?r.setAttribute("data-"+e,""):r.removeAttribute("data-"+e)}),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},u];A()&&l&&p.push({name:"arrow",options:{element:l,padding:3}}),p.push.apply(p,(null==r?void 0:r.modifiers)||[]),b.popperInstance=et(c,x,Object.assign({},r,{placement:n,onFirstUpdate:s,modifiers:p}))}function K(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return mt(x.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&T("onTrigger",[b,e]),F();var t=C(!0),n=O(),o=n[0],a=n[1];jt.isTouch&&"hold"===o&&a&&(t=a),t?r=setTimeout(function(){b.show()},t):b.show()}function te(e){if(b.clearDelayTimeouts(),T("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=C(!1);t?n=setTimeout(function(){b.state.isVisible&&b.hide()},t):o=requestAnimationFrame(function(){b.hide()})}}else I()}}function qt(e,t){void 0===t&&(t={});var r=Tt.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",kt,at),window.addEventListener("blur",St);var n=Object.assign({},t,{plugins:r}),o=_t(e).reduce(function(e,t){var r=t&&Ut(t,n);return r&&e.push(r),e},[]);return yt(e)?o[0]:o}qt.defaultProps=Tt,qt.setDefaultProps=function(e){Object.keys(e).forEach(function(t){Tt[t]=e[t]})},qt.currentInput=jt;Object.assign({},Ne,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}});qt.setDefaultProps({render:It});const $t=qt;var Gt=r(6087);const Xt=({children:e,value:t})=>Gt.createElement("div",{className:"colorpalette-color-label"},Gt.createElement("span",null,e),Gt.createElement("span",{className:"component-color-indicator","aria-label":`Color: ${t}`,style:{background:t}})),Jt=new(o())("_"),Yt=({attributes:t,setAttributes:r,colors:n})=>{const o=p()(t),a=Jt.object(o),[i,u]=(0,l.useState)(a.customSettings);t.transformation_crop||(t.transformation_crop="pad",t.transformation_background="rgb:FFFFFF"),"fill"===t.transformation_crop&&delete t.transformation_background;const d=(e,t)=>{const n={[t]:I(e)};r(n)},f=(e=>{const[t,r]=(0,l.useState)(null),n=(0,l.useCallback)(e=>r(e),[]);return(0,l.useEffect)(()=>{if(!t)return;const r=$t(t,{content:e});return()=>{r?.destroy()}},[t,e]),n})((0,e.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary"));return Gt.createElement(Gt.Fragment,null,Gt.createElement(s.PanelBody,{title:(0,e.__)("Layout","cloudinary")},y.map(e=>Gt.createElement(R,{key:`${e.value.type}-${e.value.columns}-layout`,value:e.value,onChange:e=>{r({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:e.icon,current:{type:t.displayProps_mode,columns:t.displayProps_columns||1}},e.label))),Gt.createElement(s.PanelBody,{title:(0,e.__)("Color Palette","cloudinary"),initialOpen:!1},Gt.createElement(Xt,{value:t.themeProps_primary},(0,e.__)("Primary","cloudinary")),Gt.createElement(c.ColorPalette,{value:t.themeProps_primary,colors:n,disableCustomColors:!1,onChange:e=>d(e,"themeProps_primary")}),Gt.createElement(Xt,{value:t.themeProps_onPrimary},(0,e.__)("On Primary","cloudinary")),Gt.createElement(c.ColorPalette,{value:t.themeProps_onPrimary,colors:n,disableCustomColors:!1,onChange:e=>d(e,"themeProps_onPrimary")}),Gt.createElement(Xt,{value:t.themeProps_active},(0,e.__)("Active","cloudinary")),Gt.createElement(c.ColorPalette,{value:t.themeProps_active,colors:n,disableCustomColors:!1,onChange:e=>d(e,"themeProps_active")})),"classic"===t.displayProps_mode&&Gt.createElement(s.PanelBody,{title:(0,e.__)("Fade Transition","cloudinary"),initialOpen:!1},Gt.createElement(s.SelectControl,{value:t.transition,options:_,onChange:e=>r({transition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})),Gt.createElement(s.PanelBody,{title:(0,e.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1},Gt.createElement(s.SelectControl,{label:(0,e.__)("Aspect Ratio","cloudinary"),value:t.aspectRatio,options:b,onChange:e=>r({aspectRatio:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Gt.createElement("p",null,Gt.createElement("div",{className:"cld-ui-title"},(0,e.__)("Resize/Crop Mode","cloudinary"),Gt.createElement("span",{className:"dashicons dashicons-info cld-tooltip",ref:f})),Gt.createElement(s.ButtonGroup,null,M.map(e=>Gt.createElement(s.Button,{key:e.value+"-look-and-feel",variant:"secondary",isSecondary:!0,isPressed:e.value===t.transformation_crop,onClick:()=>r({transformation_crop:e.value,transformation_background:null})},e.label)))),"pad"===t.transformation_crop&&Gt.createElement(s.SelectControl,{label:(0,e.__)("Pad style","cloudinary"),value:t.transformation_background,options:T,onChange:e=>{r({transformation_background:e})},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Gt.createElement("p",null,(0,e.__)("Navigation","cloudinary")),Gt.createElement("p",null,Gt.createElement(s.ButtonGroup,null,x.map(e=>Gt.createElement(s.Button,{key:e.value+"-navigation",variant:"secondary",isSecondary:!0,isPressed:e.value===t.navigation,onClick:()=>r({navigation:e.value})},e.label)))),Gt.createElement("div",{style:{marginTop:"30px"}},Gt.createElement(s.ToggleControl,{label:(0,e.__)("Show Zoom","cloudinary"),checked:t.zoom,onChange:()=>r({zoom:!t.zoom}),__nextHasNoMarginBottom:!0}),t.zoom&&Gt.createElement(Gt.Fragment,null,Gt.createElement("p",null,(0,e.__)("Zoom Type","cloudinary")),Gt.createElement("p",null,Gt.createElement(s.ButtonGroup,null,w.map(e=>Gt.createElement(s.Button,{key:e.value+"-zoom-type",variant:"secondary",isSecondary:!0,isPressed:e.value===t.zoomProps_type,onClick:()=>r({zoomProps_type:e.value})},e.label)))),"flyout"===t.zoomProps_type&&Gt.createElement(s.SelectControl,{label:(0,e.__)("Zoom Viewer Position","cloudinary"),value:t.zoomProps_viewerPosition,options:L,onChange:e=>r({zoomProps_viewerPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"popup"!==t.zoomProps_type&&Gt.createElement(Gt.Fragment,null,Gt.createElement("p",null,(0,e.__)("Zoom Trigger","cloudinary")),Gt.createElement("p",null,Gt.createElement(s.ButtonGroup,null,E.map(e=>Gt.createElement(s.Button,{key:e.value+"-zoom-trigger",variant:"secondary",isSecondary:!0,isPressed:e.value===t.zoomProps_trigger,onClick:()=>r({zoomProps_trigger:e.value})},e.label)))))))),Gt.createElement(s.PanelBody,{title:(0,e.__)("Carousel Parameters","cloudinary"),initialOpen:!1},Gt.createElement("p",null,(0,e.__)("Carousel Location","cloudinary")),Gt.createElement("p",null,Gt.createElement(s.ButtonGroup,null,O.map(e=>Gt.createElement(s.Button,{key:e.value+"-carousel-location",variant:"secondary",isSecondary:!0,isPressed:e.value===t.carouselLocation,onClick:()=>r({carouselLocation:e.value})},e.label)))),Gt.createElement(s.RangeControl,{label:(0,e.__)("Carousel Offset","cloudinary"),value:t.carouselOffset,onChange:e=>r({carouselOffset:e}),min:0,max:100,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Gt.createElement("p",null,(0,e.__)("Carousel Style","cloudinary")),Gt.createElement("p",null,Gt.createElement(s.ButtonGroup,null,j.map(e=>Gt.createElement(s.Button,{key:e.value+"-carousel-style",variant:"secondary",isSecondary:!0,isPressed:e.value===t.carouselStyle,onClick:()=>r({carouselStyle:e.value})},e.label)))),"thumbnails"===t.carouselStyle&&Gt.createElement(Gt.Fragment,null,Gt.createElement(s.RangeControl,{label:(0,e.__)("Width","cloudinary"),value:t.thumbnailProps_width,onChange:e=>r({thumbnailProps_width:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Gt.createElement(s.RangeControl,{label:(0,e.__)("Height","cloudinary"),value:t.thumbnailProps_height,onChange:e=>r({thumbnailProps_height:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Gt.createElement("p",null,(0,e.__)("Navigation Button Shape","cloudinary")),A.map(e=>Gt.createElement(R,{key:e.value+"-navigation-button-shape",value:e.value,onChange:e=>r({thumbnailProps_navigationShape:e}),icon:e.icon,current:t.thumbnailProps_navigationShape},e.label)),Gt.createElement("p",null,(0,e.__)("Selected Style","cloudinary")),Gt.createElement("p",null,Gt.createElement(s.ButtonGroup,null,P.map(e=>Gt.createElement(s.Button,{key:e.value+"-selected-style",variant:"secondary",isSecondary:!0,isPressed:e.value===t.thumbnailProps_selectedStyle,onClick:()=>r({thumbnailProps_selectedStyle:e.value})},e.label)))),Gt.createElement(s.SelectControl,{label:(0,e.__)("Selected Border Position","cloudinary"),value:t.thumbnailProps_selectedBorderPosition,options:S,onChange:e=>r({thumbnailProps_selectedBorderPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Gt.createElement(s.RangeControl,{label:(0,e.__)("Selected Border Width","cloudinary"),value:t.thumbnailProps_selectedBorderWidth,onChange:e=>r({thumbnailProps_selectedBorderWidth:e}),min:0,max:10,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Gt.createElement("p",null,(0,e.__)("Media Shape Icon","cloudinary")),C.map(e=>Gt.createElement(R,{key:e.value+"-media",value:e.value,onChange:e=>r({thumbnailProps_mediaSymbolShape:e}),icon:e.icon,current:t.thumbnailProps_mediaSymbolShape},e.label))),"indicators"===t.carouselStyle&&Gt.createElement(Gt.Fragment,null,Gt.createElement("p",null,(0,e.__)("Indicators Shape","cloudinary")),k.map(e=>Gt.createElement(R,{key:e.value+"-indicator",value:e.value,onChange:e=>r({indicatorProps_shape:e}),icon:e.icon,current:t.indicatorProps_shape},e.label)))),Gt.createElement(s.PanelBody,{title:(0,e.__)("Additional Settings","cloudinary"),initialOpen:!1},Gt.createElement(s.TextareaControl,{label:(0,e.__)("Custom Settings","cloudinary"),help:(0,e.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:i,onChange:e=>{let t={};u(e);try{t=JSON.parse(e)}catch(e){}if("object"==typeof t){const e={...a};e.customSettings=t,r({...a,...e})}},__nextHasNoMarginBottom:!0})))};var Kt=r(6087);const Qt=new(o())("_"),er=(0,e.__)("Drag images, upload new ones or select files from your library.","cloudinary"),tr=(e,t)=>({...e,container:"."+t,zoom:!1}),rr=({setAttributes:t,attributes:r,className:n,isSelected:a})=>{const[u,d]=(0,l.useState)(null),[f,m]=(0,l.useState)(!1),v=(0,l.useMemo)(()=>{if(0!==r.selectedImages.length)return r;const e={},{container:t,...n}=Qt.dot(CLD_GALLERY_CONFIG);return Object.keys(n).forEach(t=>{r[t]||(e[t]=n[t])}),{...r,...e}},[r]),h=(0,l.useMemo)(()=>r.selectedImages.length?r.selectedImages.map(({attachmentId:e})=>({id:e})):[],[r]);(0,l.useEffect)(()=>{if(u&&((({status:e,message:t,options:r={}})=>{(0,Z.dispatch)("core/notices").createNotice(e,t,{isDismissible:!0,...r})})({status:"error",message:u}),d(null)),r.selectedImages.length){let e;const{customSettings:t,...n}=(e=>{const t=new(o())("_"),r=p()(e),{selectedImages:n,...a}=t.object(r,{});return a.mediaAssets=n,"classic"!==a?.displayProps?.mode?delete a.transition:delete a.displayProps.columns,"pad"!==a?.transformation_crop&&delete a.transformation_background,"pad"!==a?.transformation?.crop&&delete a.transformation.background,a?.themeProps?.primary&&(a.themeProps.primary=I(a?.themeProps?.primary)),a?.themeProps?.onPrimary&&(a.themeProps.onPrimary=I(a?.themeProps?.onPrimary)),a?.themeProps?.active&&(a.themeProps.active=I(a?.themeProps?.active)),a})(r);try{e=cloudinary.galleryWidget(tr({...n,...t},r.container))}catch{e=cloudinary.galleryWidget(tr(n,r.container))}return e.render(),m(!1),()=>e.destroy()}},[u,r,t,n]);const y=!!r.selectedImages.length;return r.container||t({container:`${n}${F(15)}`}),t(v),Kt.createElement(Kt.Fragment,null,Kt.createElement(Kt.Fragment,null,Kt.createElement("div",{className:r.container||n}),Kt.createElement("div",{className:"wp-block-cloudinary-gallery"},Kt.createElement(c.MediaPlaceholder,{labels:{title:!y&&(0,e.__)("Cloudinary Gallery","cloudinary"),instructions:!y&&er},icon:"format-gallery",disableMediaButtons:y&&!a,allowedTypes:g,addToGallery:y,isAppender:y,onSelect:r=>(async r=>{m(!0);try{const e=await i()({path:CLD_REST_ENDPOINT+"/image_data",method:"POST",data:{images:r}});t({selectedImages:e})}catch{m(!1),d((0,e.__)("Could not load selected images. Please try again.","cloudinary"))}})(r),value:h,multiple:!0},f&&Kt.createElement("div",{className:"loading-spinner-container"},Kt.createElement(s.Spinner,null))))),Kt.createElement(c.InspectorControls,null,Kt.createElement(Yt,{attributes:r,setAttributes:t})))};var nr=r(6087);const or=({attributes:e})=>nr.createElement("div",{className:e.container}),ar=JSON.parse('{"aspectRatio":{"type":"string"},"navigation":{"type":"string"},"zoom":{"type":"boolean"},"carouselLocation":{"type":"string"},"carouselOffset":{"type":"number"},"carouselStyle":{"type":"string"},"displayProps_mode":{"type":"string"},"displayProps_columns":{"type":"number"},"indicatorProps_shape":{"type":"string"},"themeProps_primary":{"type":"string"},"themeProps_onPrimary":{"type":"string"},"themeProps_active":{"type":"string"},"zoomProps_type":{"type":"string"},"zoomProps_viewerPosition":{"type":"string"},"zoomProps_trigger":{"type":"string"},"thumbnailProps_width":{"type":"number"},"thumbnailProps_height":{"type":"number"},"thumbnailProps_navigationShape":{"type":"string"},"thumbnailProps_selectedStyle":{"type":"string"},"thumbnailProps_selectedBorderPosition":{"type":"string"},"thumbnailProps_selectedBorderWidth":{"type":"number"},"thumbnailProps_mediaSymbolShape":{"type":"string"},"cloudName":{"type":"string"},"container":{"type":"string"},"selectedImages":{"type":"array","default":[]},"transformation_crop":{"type":"string","default":"pad"},"transformation_background":{"type":"string"},"customSettings":{"type":"string"}}');(0,t.registerBlockType)("cloudinary/gallery",{title:(0,e.__)("Cloudinary Gallery","cloudinary"),description:(0,e.__)("Add a gallery powered by the Cloudinary Gallery Widget to your post.","cloudinary"),category:"widgets",icon:"format-gallery",attributes:ar,edit:rr,save:or})})()})(); 2 //# sourceMappingURL=gallery-block.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/gallery-init.asset.php
r3201782 r3518458 1 <?php return array('dependencies' => array(), 'version' => ' 9059e1b247b2da07446d');1 <?php return array('dependencies' => array(), 'version' => '746e6463d7d00962313d'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/gallery-init.js
r3201782 r3518458 1 (()=>{const{galleryWidget:e}=cloudinary;window.addEventListener("load",(function(){document.querySelector(".woocommerce-page")&&CLD_GALLERY_CONFIG&&CLD_GALLERY_CONFIG?.mediaAssets?.length&&e(CLD_GALLERY_CONFIG).render()}))})(); 1 (()=>{const{galleryWidget:e}=cloudinary;window.addEventListener("load",function(){document.querySelector(".woocommerce-page")&&CLD_GALLERY_CONFIG&&CLD_GALLERY_CONFIG?.mediaAssets?.length&&e(CLD_GALLERY_CONFIG).render()})})(); 2 //# sourceMappingURL=gallery-init.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/gallery.asset.php
r3343538 r3518458 1 <?php return array('dependencies' => array(' react', 'react-dom', 'react-jsx-runtime', 'wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'e75fb83a26e8f73a40ea');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'ce273b9408344c97f28b'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/gallery.js
r3343538 r3518458 1 !function(){var e={2:function(e,t,n){var r=n(2199),o=n(4664),i=n(5950);e.exports=function(e){return r(e,i,o)}},79:function(e,t,n){var r=n(3702),o=n(80),i=n(4739),a=n(8655),s=n(1175);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},80:function(e,t,n){var r=n(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},181:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},289:function(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},294:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},346:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},361:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},392:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},659:function(e,t,n){var r=n(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},695:function(e,t,n){var r=n(8096),o=n(2428),i=n(6449),a=n(3656),s=n(361),c=n(7167),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),p=!n&&!l&&a(e),f=!n&&!l&&!p&&c(e),d=n||l||p||f,h=d?r(e.length,String):[],v=h.length;for(var y in e)!t&&!u.call(e,y)||d&&("length"==y||p&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,v))||h.push(y);return h}},938:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},945:function(e,t,n){var r=n(79),o=n(8223),i=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},1042:function(e,t,n){var r=n(6110)(Object,"create");e.exports=r},1175:function(e,t,n){var r=n(6025);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},1420:function(e,t,n){var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},1549:function(e,t,n){var r=n(2032),o=n(3862),i=n(6721),a=n(2749),s=n(5749);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},1780:function(e){"use strict";function t(e,t){var n,r;if("function"==typeof t)void 0!==(r=t(e))&&(e=r);else if(Array.isArray(t))for(n=0;n<t.length;n++)void 0!==(r=t[n](e))&&(e=r);return e}function n(e,t){return"-"===e[0]&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function r(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(e){return Object(e)===e}function i(e){return 0===Object.keys(e).length}var a=["__proto__","prototype","constructor"],s=function(e){return-1===a.indexOf(e)};function c(e,t){e.indexOf("[")>=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t);if(n.filter(s).length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var u=Object.prototype.hasOwnProperty;function l(e,t,n,r){if(!(this instanceof l))return new l(e,t,n,r);void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var p=new l(".",!1,!0,!0);function f(e){return function(){return p[e].apply(p,arguments)}}l.prototype._fill=function(e,n,r,a){var s=e.shift();if(e.length>0){if(n[s]=n[s]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!o(n[s])){if(!this.override){if(!o(r)||!i(r))throw new Error("Trying to redefine `"+s+"` which is a "+typeof n[s]);return}n[s]={}}this._fill(e,n[s],r,a)}else{if(!this.override&&o(n[s])&&!i(n[s])){if(!o(r)||!i(r))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}n[s]=t(r,a)}},l.prototype.object=function(e,n){var r=this;return Object.keys(e).forEach((function(o){var i=void 0===n?null:n[o],a=c(o,r.separator).join(r.separator);-1!==a.indexOf(r.separator)?(r._fill(a.split(r.separator),e,e[o],i),delete e[o]):e[o]=t(e[o],i)})),e},l.prototype.str=function(e,n,r,o){var i=c(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(i.split(this.separator),r,n,o):r[e]=t(n,o),r},l.prototype.pick=function(e,t,r,o){var i,a,s,u,l;for(a=c(e,this.separator),i=0;i<a.length;i++){if(u=n(a[i],t),!t||"object"!=typeof t||!(u in t))return;if(i===a.length-1)return r?(s=t[u],o&&Array.isArray(t)?t.splice(u,1):delete t[u],Array.isArray(t)&&(l=a.slice(0,-1).join("."),-1===this.cleanup.indexOf(l)&&this.cleanup.push(l)),s):t[u];t=t[u]}return r&&Array.isArray(t)&&(t=t.filter((function(e){return void 0!==e}))),t},l.prototype.delete=function(e,t){return this.remove(e,t,!0)},l.prototype.remove=function(e,t,n){var r;if(this.cleanup=[],Array.isArray(e)){for(r=0;r<e.length;r++)this.pick(e[r],t,!0,n);return n||this._cleanup(t),t}return this.pick(e,t,!0,n)},l.prototype._cleanup=function(e){var t,n,r,o;if(this.cleanup.length){for(n=0;n<this.cleanup.length;n++)t=(t=(o=(r=this.cleanup[n].split(".")).splice(0,-1).join("."))?this.pick(o,e):e)[r[0]].filter((function(e){return void 0!==e})),this.set(this.cleanup[n],t,e);this.cleanup=[]}},l.prototype.del=l.prototype.remove,l.prototype.move=function(e,n,r,o,i){return"function"==typeof o||Array.isArray(o)?this.set(n,t(this.pick(e,r,!0),o),r,i):(i=o,this.set(n,this.pick(e,r,!0),r,i)),r},l.prototype.transfer=function(e,n,r,o,i,a){return"function"==typeof i||Array.isArray(i)?this.set(n,t(this.pick(e,r,!0),i),o,a):(a=i,this.set(n,this.pick(e,r,!0),o,a)),o},l.prototype.copy=function(e,n,r,o,i,a){return"function"==typeof i||Array.isArray(i)?this.set(n,t(JSON.parse(JSON.stringify(this.pick(e,r,!1))),i),o,a):(a=i,this.set(n,this.pick(e,r,!1),o,a)),o},l.prototype.set=function(e,t,n,o){var i,a,s,l;if(void 0===t)return n;for(s=c(e,this.separator),i=0;i<s.length;i++){if(l=s[i],i===s.length-1)if(o&&r(t)&&r(n[l]))for(a in t)u.call(t,a)&&(n[l][a]=t[a]);else if(o&&Array.isArray(n[l])&&Array.isArray(t))for(var p=0;p<t.length;p++)n[s[i]].push(t[p]);else n[l]=t;else u.call(n,l)&&(r(n[l])||Array.isArray(n[l]))||(/^\d+$/.test(s[i+1])?n[l]=[]:n[l]={});n=n[l]}return n},l.prototype.transform=function(e,t,n){return t=t||{},n=n||{},Object.keys(e).forEach(function(r){this.set(e[r],this.pick(r,t),n)}.bind(this)),n},l.prototype.dot=function(e,t,n){t=t||{},n=n||[];var a=Array.isArray(e);return Object.keys(e).forEach(function(s){var c=a&&this.useBrackets?"["+s+"]":s;if(o(e[s])&&(r(e[s])&&!i(e[s])||Array.isArray(e[s])&&!this.keepArray&&0!==e[s].length)){if(a&&this.useBrackets){var u=n[n.length-1]||"";return this.dot(e[s],t,n.slice(0,-1).concat(u+c))}return this.dot(e[s],t,n.concat(c))}a&&this.useBrackets?t[n.join(this.separator).concat("["+s+"]")]=e[s]:t[n.concat(c).join(this.separator)]=e[s]}.bind(this)),t},l.pick=f("pick"),l.move=f("move"),l.transfer=f("transfer"),l.transform=f("transform"),l.copy=f("copy"),l.object=f("object"),l.str=f("str"),l.set=f("set"),l.delete=f("delete"),l.del=l.remove=f("remove"),l.dot=f("dot"),["override","overwrite"].forEach((function(e){Object.defineProperty(l,e,{get:function(){return p.override},set:function(e){p.override=!!e}})})),["useArray","keepArray","useBrackets"].forEach((function(e){Object.defineProperty(l,e,{get:function(){return p[e]},set:function(t){p[e]=t}})})),l._process=t,e.exports=l},1791:function(e,t,n){var r=n(6547),o=n(3360);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,c=t.length;++s<c;){var u=t[s],l=i?i(n[u],e[u],u,n,e):void 0;void 0===l&&(l=e[u]),a?o(n,u,l):r(n,u,l)}return n}},1873:function(e,t,n){var r=n(9325).Symbol;e.exports=r},1882:function(e,t,n){var r=n(2552),o=n(3805);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:function(e,t,n){var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},2032:function(e,t,n){var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},2199:function(e,t,n){var r=n(4528),o=n(6449);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},2271:function(e,t,n){var r=n(1791),o=n(4664);e.exports=function(e,t){return r(e,o(e),t)}},2428:function(e,t,n){var r=n(7534),o=n(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},2485:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},2552:function(e,t,n){var r=n(1873),o=n(659),i=n(9350),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},2651:function(e,t,n){var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},2749:function(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},2804:function(e,t,n){var r=n(6110)(n(9325),"Promise");e.exports=r},2903:function(e,t,n){var r=n(3805),o=n(5527),i=n(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},2949:function(e,t,n){var r=n(2651);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},3007:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},3040:function(e,t,n){var r=n(1549),o=n(79),i=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},3201:function(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},3243:function(e,t,n){var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3290:function(e,t,n){e=n.nmd(e);var r=n(9325),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},3345:function(e){e.exports=function(){return[]}},3349:function(e,t,n){var r=n(2199),o=n(6375),i=n(7241);e.exports=function(e){return r(e,i,o)}},3360:function(e,t,n){var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},3605:function(e){e.exports=function(e){return this.__data__.get(e)}},3650:function(e,t,n){var r=n(4335)(Object.keys,Object);e.exports=r},3656:function(e,t,n){e=n.nmd(e);var r=n(9325),o=n(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},3661:function(e,t,n){var r=n(3040),o=n(7670),i=n(289),a=n(4509),s=n(2949);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},3702:function(e){e.exports=function(){this.__data__=[],this.size=0}},3729:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},3736:function(e,t,n){var r=n(1873),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},3805:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3838:function(e,t,n){var r=n(1791),o=n(7241);e.exports=function(e,t){return e&&r(t,o(t),e)}},3862:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},4218:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},4335:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},4509:function(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},4528:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},4664:function(e,t,n){var r=n(9770),o=n(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},4733:function(e,t,n){var r=n(1791),o=n(5950);e.exports=function(e,t){return e&&r(t,o(t),e)}},4739:function(e,t,n){var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4840:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},4894:function(e,t,n){var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},4901:function(e,t,n){var r=n(2552),o=n(294),i=n(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},5083:function(e,t,n){var r=n(1882),o=n(7296),i=n(3805),a=n(7473),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,p=u.hasOwnProperty,f=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?f:s).test(a(e))}},5288:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},5481:function(e,t,n){var r=n(9325)["__core-js_shared__"];e.exports=r},5527:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},5529:function(e,t,n){var r=n(9344),o=n(8879),i=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},5580:function(e,t,n){var r=n(6110)(n(9325),"DataView");e.exports=r},5749:function(e,t,n){var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5861:function(e,t,n){var r=n(5580),o=n(8223),i=n(2804),a=n(6545),s=n(8303),c=n(2552),u=n(7473),l="[object Map]",p="[object Promise]",f="[object Set]",d="[object WeakMap]",h="[object DataView]",v=u(r),y=u(o),m=u(i),b=u(a),g=u(s),x=c;(r&&x(new r(new ArrayBuffer(1)))!=h||o&&x(new o)!=l||i&&x(i.resolve())!=p||a&&x(new a)!=f||s&&x(new s)!=d)&&(x=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case v:return h;case y:return l;case m:return p;case b:return f;case g:return d}return t}),e.exports=x},5950:function(e,t,n){var r=n(695),o=n(8984),i=n(4894);e.exports=function(e){return i(e)?r(e):o(e)}},6009:function(e,t,n){e=n.nmd(e);var r=n(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},6025:function(e,t,n){var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},6038:function(e,t,n){var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},6110:function(e,t,n){var r=n(5083),o=n(392);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},6169:function(e,t,n){var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},6189:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},6375:function(e,t,n){var r=n(4528),o=n(8879),i=n(4664),a=n(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},6449:function(e){var t=Array.isArray;e.exports=t},6545:function(e,t,n){var r=n(6110)(n(9325),"Set");e.exports=r},6547:function(e,t,n){var r=n(3360),o=n(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},6721:function(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},7167:function(e,t,n){var r=n(4901),o=n(7301),i=n(6009),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},7199:function(e,t,n){var r=n(9653),o=n(6169),i=n(3201),a=n(3736),s=n(1961);e.exports=function(e,t,n){var c=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},7217:function(e,t,n){var r=n(79),o=n(1420),i=n(938),a=n(3605),s=n(9817),c=n(945);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},7241:function(e,t,n){var r=n(695),o=n(2903),i=n(4894);e.exports=function(e){return i(e)?r(e,!0):o(e)}},7296:function(e,t,n){var r,o=n(5481),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},7301:function(e){e.exports=function(e){return function(t){return e(t)}}},7473:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7534:function(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},7670:function(e,t,n){var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},7730:function(e,t,n){var r=n(9172),o=n(7301),i=n(6009),a=i&&i.isMap,s=a?o(a):r;e.exports=s},7828:function(e,t,n){var r=n(9325).Uint8Array;e.exports=r},8055:function(e,t,n){var r=n(9999);e.exports=function(e){return r(e,5)}},8096:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},8223:function(e,t,n){var r=n(6110)(n(9325),"Map");e.exports=r},8303:function(e,t,n){var r=n(6110)(n(9325),"WeakMap");e.exports=r},8440:function(e,t,n){var r=n(6038),o=n(7301),i=n(6009),a=i&&i.isSet,s=a?o(a):r;e.exports=s},8655:function(e,t,n){var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},8879:function(e,t,n){var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},8948:function(e,t,n){var r=n(1791),o=n(6375);e.exports=function(e,t){return r(e,o(e),t)}},8984:function(e,t,n){var r=n(5527),o=n(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9172:function(e,t,n){var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},9325:function(e,t,n){var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},9344:function(e,t,n){var r=n(3805),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},9350:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9653:function(e,t,n){var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},9770:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},9817:function(e){e.exports=function(e){return this.__data__.has(e)}},9935:function(e){e.exports=function(){return!1}},9999:function(e,t,n){var r=n(7217),o=n(3729),i=n(6547),a=n(4733),s=n(3838),c=n(3290),u=n(3007),l=n(2271),p=n(8948),f=n(2),d=n(3349),h=n(5861),v=n(6189),y=n(7199),m=n(5529),b=n(6449),g=n(3656),x=n(7730),_=n(3805),w=n(8440),j=n(5950),L=n(7241),O="[object Arguments]",A="[object Function]",k="[object Object]",P={};P[O]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[k]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[A]=P["[object WeakMap]"]=!1,e.exports=function e(t,n,C,S,E,M){var T,B=1&n,D=2&n,R=4&n;if(C&&(T=E?C(t,S,E,M):C(t)),void 0!==T)return T;if(!_(t))return t;var N=b(t);if(N){if(T=v(t),!B)return u(t,T)}else{var Z=h(t),F=Z==A||"[object GeneratorFunction]"==Z;if(g(t))return c(t,B);if(Z==k||Z==O||F&&!E){if(T=D||F?{}:m(t),!B)return D?p(t,s(T,t)):l(t,a(T,t))}else{if(!P[Z])return E?t:{};T=y(t,Z,B)}}M||(M=new r);var W=M.get(t);if(W)return W;M.set(t,T),w(t)?t.forEach((function(r){T.add(e(r,n,C,r,t,M))})):x(t)&&t.forEach((function(r,o){T.set(o,e(r,n,C,o,t,M))}));var I=N?void 0:(R?D?d:f:D?L:j)(t);return o(I||t,(function(r,o){I&&(r=t[o=r]),i(T,o,e(r,n,C,o,t,M))})),T}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e=window.React,t=n.n(e),r=n(1780),o=n.n(r),i=window.wp.element,a=window.wp.i18n,s=n(8055),c=n.n(s);function u(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function l(e){return e instanceof u(e).Element||e instanceof Element}function p(e){return e instanceof u(e).HTMLElement||e instanceof HTMLElement}function f(e){return"undefined"!=typeof ShadowRoot&&(e instanceof u(e).ShadowRoot||e instanceof ShadowRoot)}var d=Math.max,h=Math.min,v=Math.round;function y(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function m(){return!/^((?!chrome|android).)*safari/i.test(y())}function b(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&p(e)&&(o=e.offsetWidth>0&&v(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&v(r.height)/e.offsetHeight||1);var a=(l(e)?u(e):window).visualViewport,s=!m()&&n,c=(r.left+(s&&a?a.offsetLeft:0))/o,f=(r.top+(s&&a?a.offsetTop:0))/i,d=r.width/o,h=r.height/i;return{width:d,height:h,top:f,right:c+d,bottom:f+h,left:c,x:c,y:f}}function g(e){var t=u(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function x(e){return e?(e.nodeName||"").toLowerCase():null}function _(e){return((l(e)?e.ownerDocument:e.document)||window.document).documentElement}function w(e){return b(_(e)).left+g(e).scrollLeft}function j(e){return u(e).getComputedStyle(e)}function L(e){var t=j(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function O(e,t,n){void 0===n&&(n=!1);var r,o,i=p(t),a=p(t)&&function(e){var t=e.getBoundingClientRect(),n=v(t.width)/e.offsetWidth||1,r=v(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=_(t),c=b(e,a,n),l={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!n)&&(("body"!==x(t)||L(s))&&(l=(r=t)!==u(r)&&p(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:g(r)),p(t)?((f=b(t,!0)).x+=t.clientLeft,f.y+=t.clientTop):s&&(f.x=w(s))),{x:c.left+l.scrollLeft-f.x,y:c.top+l.scrollTop-f.y,width:c.width,height:c.height}}function A(e){var t=b(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function k(e){return"html"===x(e)?e:e.assignedSlot||e.parentNode||(f(e)?e.host:null)||_(e)}function P(e){return["html","body","#document"].indexOf(x(e))>=0?e.ownerDocument.body:p(e)&&L(e)?e:P(k(e))}function C(e,t){var n;void 0===t&&(t=[]);var r=P(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=u(r),a=o?[i].concat(i.visualViewport||[],L(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(C(k(a)))}function S(e){return["table","td","th"].indexOf(x(e))>=0}function E(e){return p(e)&&"fixed"!==j(e).position?e.offsetParent:null}function M(e){for(var t=u(e),n=E(e);n&&S(n)&&"static"===j(n).position;)n=E(n);return n&&("html"===x(n)||"body"===x(n)&&"static"===j(n).position)?t:n||function(e){var t=/firefox/i.test(y());if(/Trident/i.test(y())&&p(e)&&"fixed"===j(e).position)return null;var n=k(e);for(f(n)&&(n=n.host);p(n)&&["html","body"].indexOf(x(n))<0;){var r=j(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var T="top",B="bottom",D="right",R="left",N="auto",Z=[T,B,D,R],F="start",W="end",I="viewport",z="popper",V=Z.reduce((function(e,t){return e.concat([t+"-"+F,t+"-"+W])}),[]),H=[].concat(Z,[N]).reduce((function(e,t){return e.concat([t,t+"-"+F,t+"-"+W])}),[]),U=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function $(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var q={placement:"bottom",modifiers:[],strategy:"absolute"};function G(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function X(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?q:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},q,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],u=!1,p={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;f(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:l(e)?C(e):e.contextElement?C(e.contextElement):[],popper:C(t)};var a=function(e){var t=$(e);return U.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=a.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:p,options:r}),a=function(){};c.push(i||a)}})),p.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(G(t,n)){s.rects={reference:O(t,M(n),"fixed"===s.options.strategy),popper:A(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,c=void 0===a?{}:a,l=o.name;"function"==typeof i&&(s=i({state:s,options:c,name:l,instance:p})||s)}else s.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){p.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){f(),u=!0}};if(!G(e,t))return p;function f(){c.forEach((function(e){return e()})),c=[]}return p.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),p}}var J={passive:!0};function Y(e){return e.split("-")[0]}function K(e){return e.split("-")[1]}function Q(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ee(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Y(o):null,a=o?K(o):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(i){case T:t={x:s,y:n.y-r.height};break;case B:t={x:s,y:n.y+n.height};break;case D:t={x:n.x+n.width,y:c};break;case R:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var u=i?Q(i):null;if(null!=u){var l="y"===u?"height":"width";switch(a){case F:t[u]=t[u]-(n[l]/2-r[l]/2);break;case W:t[u]=t[u]+(n[l]/2-r[l]/2)}}return t}var te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ne(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,p=e.roundOffsets,f=e.isFixed,d=a.x,h=void 0===d?0:d,y=a.y,m=void 0===y?0:y,b="function"==typeof p?p({x:h,y:m}):{x:h,y:m};h=b.x,m=b.y;var g=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),w=R,L=T,O=window;if(l){var A=M(n),k="clientHeight",P="clientWidth";if(A===u(n)&&"static"!==j(A=_(n)).position&&"absolute"===s&&(k="scrollHeight",P="scrollWidth"),o===T||(o===R||o===D)&&i===W)L=B,m-=(f&&A===O&&O.visualViewport?O.visualViewport.height:A[k])-r.height,m*=c?1:-1;if(o===R||(o===T||o===B)&&i===W)w=D,h-=(f&&A===O&&O.visualViewport?O.visualViewport.width:A[P])-r.width,h*=c?1:-1}var C,S=Object.assign({position:s},l&&te),E=!0===p?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:v(t*r)/r||0,y:v(n*r)/r||0}}({x:h,y:m}):{x:h,y:m};return h=E.x,m=E.y,c?Object.assign({},S,((C={})[L]=x?"0":"",C[w]=g?"0":"",C.transform=(O.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",C)):Object.assign({},S,((t={})[L]=x?m+"px":"",t[w]=g?h+"px":"",t.transform="",t))}var re={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];p(o)&&x(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});p(r)&&x(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var oe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=H.reduce((function(e,n){return e[n]=function(e,t,n){var r=Y(e),o=[R,T].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[R,D].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],c=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},ie={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ue(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&f(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function le(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pe(e,t,n){return t===I?le(function(e,t){var n=u(e),r=_(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;var l=m();(l||!l&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s+w(e),y:c}}(e,n)):l(t)?function(e,t){var n=b(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):le(function(e){var t,n=_(e),r=g(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=d(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=d(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+w(e),c=-r.scrollTop;return"rtl"===j(o||n).direction&&(s+=d(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}(_(e)))}function fe(e,t,n,r){var o="clippingParents"===t?function(e){var t=C(k(e)),n=["absolute","fixed"].indexOf(j(e).position)>=0&&p(e)?M(e):e;return l(n)?t.filter((function(e){return l(e)&&ue(e,n)&&"body"!==x(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=pe(e,n,r);return t.top=d(o.top,t.top),t.right=h(o.right,t.right),t.bottom=h(o.bottom,t.bottom),t.left=d(o.left,t.left),t}),pe(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function de(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function he(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ve(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,c=void 0===s?"clippingParents":s,u=n.rootBoundary,p=void 0===u?I:u,f=n.elementContext,d=void 0===f?z:f,h=n.altBoundary,v=void 0!==h&&h,y=n.padding,m=void 0===y?0:y,g=de("number"!=typeof m?m:he(m,Z)),x=d===z?"reference":z,w=e.rects.popper,j=e.elements[v?x:d],L=fe(l(j)?j:j.contextElement||_(e.elements.popper),c,p,a),O=b(e.elements.reference),A=ee({reference:O,element:w,strategy:"absolute",placement:o}),k=le(Object.assign({},w,A)),P=d===z?k:O,C={top:L.top-P.top+g.top,bottom:P.bottom-L.bottom+g.bottom,left:L.left-P.left+g.left,right:P.right-L.right+g.right},S=e.modifiersData.offset;if(d===z&&S){var E=S[o];Object.keys(C).forEach((function(e){var t=[D,B].indexOf(e)>=0?1:-1,n=[T,B].indexOf(e)>=0?"y":"x";C[e]+=E[n]*t}))}return C}function ye(e,t,n){return d(e,h(t,n))}var me={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,c=n.boundary,u=n.rootBoundary,l=n.altBoundary,p=n.padding,f=n.tether,v=void 0===f||f,y=n.tetherOffset,m=void 0===y?0:y,b=ve(t,{boundary:c,rootBoundary:u,padding:p,altBoundary:l}),g=Y(t.placement),x=K(t.placement),_=!x,w=Q(g),j="x"===w?"y":"x",L=t.modifiersData.popperOffsets,O=t.rects.reference,k=t.rects.popper,P="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,C="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(L){if(i){var N,Z="y"===w?T:R,W="y"===w?B:D,I="y"===w?"height":"width",z=L[w],V=z+b[Z],H=z-b[W],U=v?-k[I]/2:0,$=x===F?O[I]:k[I],q=x===F?-k[I]:-O[I],G=t.elements.arrow,X=v&&G?A(G):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=J[Z],te=J[W],ne=ye(0,O[I],X[I]),re=_?O[I]/2-U-ne-ee-C.mainAxis:$-ne-ee-C.mainAxis,oe=_?-O[I]/2+U+ne+te+C.mainAxis:q+ne+te+C.mainAxis,ie=t.elements.arrow&&M(t.elements.arrow),ae=ie?"y"===w?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(N=null==S?void 0:S[w])?N:0,ce=z+oe-se,ue=ye(v?h(V,z+re-se-ae):V,z,v?d(H,ce):H);L[w]=ue,E[w]=ue-z}if(s){var le,pe="x"===w?T:R,fe="x"===w?B:D,de=L[j],he="y"===j?"height":"width",me=de+b[pe],be=de-b[fe],ge=-1!==[T,R].indexOf(g),xe=null!=(le=null==S?void 0:S[j])?le:0,_e=ge?me:de-O[he]-k[he]-xe+C.altAxis,we=ge?de+O[he]+k[he]-xe-C.altAxis:be,je=v&&ge?function(e,t,n){var r=ye(e,t,n);return r>n?n:r}(_e,de,we):ye(v?_e:me,de,v?we:be);L[j]=je,E[j]=je-de}t.modifiersData[r]=E}},requiresIfExists:["offset"]};var be={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Y(n.placement),c=Q(s),u=[R,D].indexOf(s)>=0?"height":"width";if(i&&a){var l=function(e,t){return de("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:he(e,Z))}(o.padding,n),p=A(i),f="y"===c?T:R,d="y"===c?B:D,h=n.rects.reference[u]+n.rects.reference[c]-a[c]-n.rects.popper[u],v=a[c]-n.rects.reference[c],y=M(i),m=y?"y"===c?y.clientHeight||0:y.clientWidth||0:0,b=h/2-v/2,g=l[f],x=m-p[u]-l[d],_=m/2-p[u]/2+b,w=ye(g,_,x),j=c;n.modifiersData[r]=((t={})[j]=w,t.centerOffset=w-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ue(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ge(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xe(e){return[T,D,B,R].some((function(t){return e[t]>=0}))}var _e=X({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,c=u(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach((function(e){e.addEventListener("scroll",n.update,J)})),s&&c.addEventListener("resize",n.update,J),function(){i&&l.forEach((function(e){e.removeEventListener("scroll",n.update,J)})),s&&c.removeEventListener("resize",n.update,J)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ee({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,c=void 0===s||s,u={placement:Y(t.placement),variation:K(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ne(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ne(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},re,oe,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,u=n.padding,l=n.boundary,p=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,h=void 0===d||d,v=n.allowedAutoPlacements,y=t.options.placement,m=Y(y),b=c||(m===y||!h?[ae(y)]:function(e){if(Y(e)===N)return[];var t=ae(e);return[ce(e),t,ce(t)]}(y)),g=[y].concat(b).reduce((function(e,n){return e.concat(Y(n)===N?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?H:c,l=K(r),p=l?s?V:V.filter((function(e){return K(e)===l})):Z,f=p.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=p);var d=f.reduce((function(t,n){return t[n]=ve(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Y(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:l,rootBoundary:p,padding:u,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,_=t.rects.popper,w=new Map,j=!0,L=g[0],O=0;O<g.length;O++){var A=g[O],k=Y(A),P=K(A)===F,C=[T,B].indexOf(k)>=0,S=C?"width":"height",E=ve(t,{placement:A,boundary:l,rootBoundary:p,altBoundary:f,padding:u}),M=C?P?D:R:P?B:T;x[S]>_[S]&&(M=ae(M));var W=ae(M),I=[];if(i&&I.push(E[k]<=0),s&&I.push(E[M]<=0,E[W]<=0),I.every((function(e){return e}))){L=A,j=!1;break}w.set(A,I)}if(j)for(var z=function(e){var t=g.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return L=t,"break"},U=h?3:1;U>0;U--){if("break"===z(U))break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},me,be,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ve(t,{elementContext:"reference"}),s=ve(t,{altBoundary:!0}),c=ge(a,r),u=ge(s,o,i),l=xe(c),p=xe(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":p})}}]}),we="tippy-content",je="tippy-backdrop",Le="tippy-arrow",Oe="tippy-svg-arrow",Ae={passive:!0,capture:!0},ke=function(){return document.body};function Pe(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function Ce(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function Se(e,t){return"function"==typeof e?e.apply(void 0,t):e}function Ee(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Me(e){return[].concat(e)}function Te(e,t){-1===e.indexOf(t)&&e.push(t)}function Be(e){return e.split("-")[0]}function De(e){return[].slice.call(e)}function Re(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Ne(){return document.createElement("div")}function Ze(e){return["Element","Fragment"].some((function(t){return Ce(e,t)}))}function Fe(e){return Ce(e,"MouseEvent")}function We(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function Ie(e){return Ze(e)?[e]:function(e){return Ce(e,"NodeList")}(e)?De(e):Array.isArray(e)?e:De(document.querySelectorAll(e))}function ze(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Ve(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function He(e){var t,n=Me(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function Ue(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function $e(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var qe={isTouch:!1},Ge=0;function Xe(){qe.isTouch||(qe.isTouch=!0,window.performance&&document.addEventListener("mousemove",Je))}function Je(){var e=performance.now();e-Ge<20&&(qe.isTouch=!1,document.removeEventListener("mousemove",Je)),Ge=e}function Ye(){var e=document.activeElement;if(We(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Ke=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Qe={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},et=Object.assign({appendTo:ke,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Qe,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),tt=Object.keys(et);function nt(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=et[o])?r:i);return t}),{});return Object.assign({},e,t)}function rt(e,t){var n=Object.assign({},t,{content:Se(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(nt(Object.assign({},et,{plugins:t}))):tt).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},et.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function ot(e,t){e.innerHTML=t}function it(e){var t=Ne();return!0===e?t.className=Le:(t.className=Oe,Ze(e)?t.appendChild(e):ot(t,e)),t}function at(e,t){Ze(t.content)?(ot(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?ot(e,t.content):e.textContent=t.content)}function st(e){var t=e.firstElementChild,n=De(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(we)})),arrow:n.find((function(e){return e.classList.contains(Le)||e.classList.contains(Oe)})),backdrop:n.find((function(e){return e.classList.contains(je)}))}}function ct(e){var t=Ne(),n=Ne();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Ne();function o(n,r){var o=st(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||at(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(it(r.arrow))):i.appendChild(it(r.arrow)):s&&i.removeChild(s)}return r.className=we,r.setAttribute("data-state","hidden"),at(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}ct.$$tippy=!0;var ut=1,lt=[],pt=[];function ft(e,t){var n,r,o,i,a,s,c,u,l=rt(e,Object.assign({},et,nt(Re(t)))),p=!1,f=!1,d=!1,h=!1,v=[],y=Ee(q,l.interactiveDebounce),m=ut++,b=(u=l.plugins).filter((function(e,t){return u.indexOf(e)===t})),g={id:m,reference:e,popper:Ne(),popperInstance:null,props:l,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){0;if(g.state.isDestroyed)return;T("onBeforeUpdate",[g,t]),U();var n=g.props,r=rt(e,Object.assign({},n,Re(t),{ignoreAttributes:!0}));g.props=r,H(),n.interactiveDebounce!==r.interactiveDebounce&&(R(),y=Ee(q,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Me(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");D(),M(),w&&w(n,r);g.popperInstance&&(Y(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));T("onAfterUpdate",[g,t])},setContent:function(e){g.setProps({content:e})},show:function(){0;var e=g.state.isVisible,t=g.state.isDestroyed,n=!g.state.isEnabled,r=qe.isTouch&&!g.props.touch,o=Pe(g.props.duration,0,et.duration);if(e||t||n||r)return;if(P().hasAttribute("disabled"))return;if(T("onShow",[g],!1),!1===g.props.onShow(g))return;g.state.isVisible=!0,k()&&(_.style.visibility="visible");M(),W(),g.state.isMounted||(_.style.transition="none");if(k()){var i=S();ze([i.box,i.content],0)}s=function(){var e;if(g.state.isVisible&&!h){if(h=!0,_.offsetHeight,_.style.transition=g.props.moveTransition,k()&&g.props.animation){var t=S(),n=t.box,r=t.content;ze([n,r],o),Ve([n,r],"visible")}B(),D(),Te(pt,g),null==(e=g.popperInstance)||e.forceUpdate(),T("onMount",[g]),g.props.animation&&k()&&function(e,t){z(e,t)}(o,(function(){g.state.isShown=!0,T("onShown",[g])}))}},function(){var e,t=g.props.appendTo,n=P();e=g.props.interactive&&t===ke||"parent"===t?n.parentNode:Se(t,[n]);e.contains(_)||e.appendChild(_);g.state.isMounted=!0,Y(),!1}()},hide:function(){0;var e=!g.state.isVisible,t=g.state.isDestroyed,n=!g.state.isEnabled,r=Pe(g.props.duration,1,et.duration);if(e||t||n)return;if(T("onHide",[g],!1),!1===g.props.onHide(g))return;g.state.isVisible=!1,g.state.isShown=!1,h=!1,p=!1,k()&&(_.style.visibility="hidden");if(R(),I(),M(!0),k()){var o=S(),i=o.box,a=o.content;g.props.animation&&(ze([i,a],r),Ve([i,a],"hidden"))}B(),D(),g.props.animation?k()&&function(e,t){z(e,(function(){!g.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()}))}(r,g.unmount):g.unmount()},hideWithInteractivity:function(e){0;C().addEventListener("mousemove",y),Te(lt,y),y(e)},enable:function(){g.state.isEnabled=!0},disable:function(){g.hide(),g.state.isEnabled=!1},unmount:function(){0;g.state.isVisible&&g.hide();if(!g.state.isMounted)return;K(),Q().forEach((function(e){e._tippy.unmount()})),_.parentNode&&_.parentNode.removeChild(_);pt=pt.filter((function(e){return e!==g})),g.state.isMounted=!1,T("onHidden",[g])},destroy:function(){0;if(g.state.isDestroyed)return;g.clearDelayTimeouts(),g.unmount(),U(),delete e._tippy,g.state.isDestroyed=!0,T("onDestroy",[g])}};if(!l.render)return g;var x=l.render(g),_=x.popper,w=x.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+g.id,g.popper=_,e._tippy=g,_._tippy=g;var j=b.map((function(e){return e.fn(g)})),L=e.hasAttribute("aria-expanded");return H(),D(),M(),T("onCreate",[g]),l.showOnCreate&&ee(),_.addEventListener("mouseenter",(function(){g.props.interactive&&g.state.isVisible&&g.clearDelayTimeouts()})),_.addEventListener("mouseleave",(function(){g.props.interactive&&g.props.trigger.indexOf("mouseenter")>=0&&C().addEventListener("mousemove",y)})),g;function O(){var e=g.props.touch;return Array.isArray(e)?e:[e,0]}function A(){return"hold"===O()[0]}function k(){var e;return!(null==(e=g.props.render)||!e.$$tippy)}function P(){return c||e}function C(){var e=P().parentNode;return e?He(e):document}function S(){return st(_)}function E(e){return g.state.isMounted&&!g.state.isVisible||qe.isTouch||i&&"focus"===i.type?0:Pe(g.props.delay,e?0:1,et.delay)}function M(e){void 0===e&&(e=!1),_.style.pointerEvents=g.props.interactive&&!e?"":"none",_.style.zIndex=""+g.props.zIndex}function T(e,t,n){var r;(void 0===n&&(n=!0),j.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=g.props)[e].apply(r,t)}function B(){var t=g.props.aria;if(t.content){var n="aria-"+t.content,r=_.id;Me(g.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(g.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function D(){!L&&g.props.aria.expanded&&Me(g.props.triggerTarget||e).forEach((function(e){g.props.interactive?e.setAttribute("aria-expanded",g.state.isVisible&&e===P()?"true":"false"):e.removeAttribute("aria-expanded")}))}function R(){C().removeEventListener("mousemove",y),lt=lt.filter((function(e){return e!==y}))}function N(t){if(!qe.isTouch||!d&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!g.props.interactive||!$e(_,n)){if(Me(g.props.triggerTarget||e).some((function(e){return $e(e,n)}))){if(qe.isTouch)return;if(g.state.isVisible&&g.props.trigger.indexOf("click")>=0)return}else T("onClickOutside",[g,t]);!0===g.props.hideOnClick&&(g.clearDelayTimeouts(),g.hide(),f=!0,setTimeout((function(){f=!1})),g.state.isMounted||I())}}}function Z(){d=!0}function F(){d=!1}function W(){var e=C();e.addEventListener("mousedown",N,!0),e.addEventListener("touchend",N,Ae),e.addEventListener("touchstart",F,Ae),e.addEventListener("touchmove",Z,Ae)}function I(){var e=C();e.removeEventListener("mousedown",N,!0),e.removeEventListener("touchend",N,Ae),e.removeEventListener("touchstart",F,Ae),e.removeEventListener("touchmove",Z,Ae)}function z(e,t){var n=S().box;function r(e){e.target===n&&(Ue(n,"remove",r),t())}if(0===e)return t();Ue(n,"remove",a),Ue(n,"add",r),a=r}function V(t,n,r){void 0===r&&(r=!1),Me(g.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),v.push({node:e,eventType:t,handler:n,options:r})}))}function H(){var e;A()&&(V("touchstart",$,{passive:!0}),V("touchend",G,{passive:!0})),(e=g.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(V(e,$),e){case"mouseenter":V("mouseleave",G);break;case"focus":V(Ke?"focusout":"blur",X);break;case"focusin":V("focusout",X)}}))}function U(){v.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),v=[]}function $(e){var t,n=!1;if(g.state.isEnabled&&!J(e)&&!f){var r="focus"===(null==(t=i)?void 0:t.type);i=e,c=e.currentTarget,D(),!g.state.isVisible&&Fe(e)&<.forEach((function(t){return t(e)})),"click"===e.type&&(g.props.trigger.indexOf("mouseenter")<0||p)&&!1!==g.props.hideOnClick&&g.state.isVisible?n=!0:ee(e),"click"===e.type&&(p=!n),n&&!r&&te(e)}}function q(e){var t=e.target,n=P().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var r=Q().concat(_).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:l}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=Be(o.placement),s=o.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,l="right"===a?s.left.x:0,p="left"===a?s.right.x:0,f=t.top-r+c>i,d=r-t.bottom-u>i,h=t.left-n+l>i,v=n-t.right-p>i;return f||d||h||v}))})(r,e)&&(R(),te(e))}}function G(e){J(e)||g.props.trigger.indexOf("click")>=0&&p||(g.props.interactive?g.hideWithInteractivity(e):te(e))}function X(e){g.props.trigger.indexOf("focusin")<0&&e.target!==P()||g.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function J(e){return!!qe.isTouch&&A()!==e.type.indexOf("touch")>=0}function Y(){K();var t=g.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=k()?st(_).arrow:null,u=i?{getBoundingClientRect:i,contextElement:i.contextElement||P()}:e,l={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(k()){var n=S().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},l];k()&&c&&p.push({name:"arrow",options:{element:c,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),g.popperInstance=_e(u,_,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:p}))}function K(){g.popperInstance&&(g.popperInstance.destroy(),g.popperInstance=null)}function Q(){return De(_.querySelectorAll("[data-tippy-root]"))}function ee(e){g.clearDelayTimeouts(),e&&T("onTrigger",[g,e]),W();var t=E(!0),r=O(),o=r[0],i=r[1];qe.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){g.show()}),t):g.show()}function te(e){if(g.clearDelayTimeouts(),T("onUntrigger",[g,e]),g.state.isVisible){if(!(g.props.trigger.indexOf("mouseenter")>=0&&g.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=E(!1);t?r=setTimeout((function(){g.state.isVisible&&g.hide()}),t):o=requestAnimationFrame((function(){g.hide()}))}}else I()}}function dt(e,t){void 0===t&&(t={});var n=et.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Xe,Ae),window.addEventListener("blur",Ye);var r=Object.assign({},t,{plugins:n}),o=Ie(e).reduce((function(e,t){var n=t&&ft(t,r);return n&&e.push(n),e}),[]);return Ze(e)?o[0]:o}dt.defaultProps=et,dt.setDefaultProps=function(e){Object.keys(e).forEach((function(t){et[t]=e[t]}))},dt.currentInput=qe;Object.assign({},re,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});dt.setDefaultProps({render:ct});var ht=dt,vt=window.ReactDOM;function yt(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var mt="undefined"!=typeof window&&"undefined"!=typeof document;function bt(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function gt(){return mt&&document.createElement("div")}function xt(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!xt(e[n],t[n]))return!1}return!0}return!1}function _t(e){var t=[];return e.forEach((function(e){t.find((function(t){return xt(e,t)}))||t.push(e)})),t}function wt(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:_t([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var jt=mt?e.useLayoutEffect:e.useEffect;function Lt(t){var n=(0,e.useRef)();return n.current||(n.current="function"==typeof t?t():t),n.current}function Ot(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var At={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||Ot(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&Ot(t,"remove",e.props.className)},onAfterUpdate:r}}};function kt(n){return function(r){var o=r.children,i=r.content,a=r.visible,s=r.singleton,c=r.render,u=r.reference,l=r.disabled,p=void 0!==l&&l,f=r.ignoreAttributes,d=void 0===f||f,h=(r.__source,r.__self,yt(r,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),v=void 0!==a,y=void 0!==s,m=(0,e.useState)(!1),b=m[0],g=m[1],x=(0,e.useState)({}),_=x[0],w=x[1],j=(0,e.useState)(),L=j[0],O=j[1],A=Lt((function(){return{container:gt(),renders:1}})),k=Object.assign({ignoreAttributes:d},h,{content:A.container});v&&(k.trigger="manual",k.hideOnClick=!1),y&&(p=!0);var P=k,C=k.plugins||[];c&&(P=Object.assign({},k,{plugins:y&&null!=s.data?[].concat(C,[{fn:function(){return{onTrigger:function(e,t){var n=s.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,O(n.content)}}}}]):C,render:function(){return{popper:A.container}}}));var S=[u].concat(o?[o.type]:[]);return jt((function(){var e=u;u&&u.hasOwnProperty("current")&&(e=u.current);var t=n(e||A.ref||gt(),Object.assign({},P,{plugins:[At].concat(k.plugins||[])}));return A.instance=t,p&&t.disable(),a&&t.show(),y&&s.hook({instance:t,content:i,props:P,setSingletonContent:O}),g(!0),function(){t.destroy(),null==s||s.cleanup(t)}}),S),jt((function(){var e;if(1!==A.renders){var t=A.instance;t.setProps(wt(t.props,P)),null==(e=t.popperInstance)||e.forceUpdate(),p?t.disable():t.enable(),v&&(a?t.show():t.hide()),y&&s.hook({instance:t,content:i,props:P,setSingletonContent:O})}else A.renders++})),jt((function(){var e;if(c){var t=A.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;_.placement===n.placement&&_.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&_.escaped===(null==r?void 0:r.hasPopperEscaped)||w({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[_.placement,_.referenceHidden,_.escaped].concat(S)),t().createElement(t().Fragment,null,o?(0,e.cloneElement)(o,{ref:function(e){A.ref=e,bt(o.ref,e)}}):null,b&&(0,vt.createPortal)(c?c(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(_),L,A.instance):i,A.container))}}var Pt=function(n,r){return(0,e.forwardRef)((function(o,i){var a=o.children,s=yt(o,["children"]);return t().createElement(n,Object.assign({},r,s),a?(0,e.cloneElement)(a,{ref:function(e){bt(i,e),bt(a.ref,e)}}):null)}))},Ct=Pt(kt(ht)),St=(window.wp["components/buildStyle/style.css"],window.wp.components),Et=window.wp.blockEditor,Mt=window.ReactJSXRuntime;const Tt=()=>(0,Mt.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Mt.jsx)("title",{children:"shape-round"}),(0,Mt.jsx)("desc",{children:"Created with Sketch."}),(0,Mt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Mt.jsx)("g",{id:"widgets/shape-round",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Mt.jsx)("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,5 C8.13400675,5 5,8.13400675 5,12 C5,15.8659932 8.13400675,19 12,19 C15.8659932,19 19,15.8659932 19,12 C19,8.13400675 15.8659932,5 12,5 Z",id:"Combined-Shape"})})})]}),Bt=()=>(0,Mt.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Mt.jsx)("title",{children:"ratio-square"}),(0,Mt.jsx)("desc",{children:"Created with Sketch."}),(0,Mt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Mt.jsx)("g",{id:"widgets/shape-square",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Mt.jsx)("path",{d:"M3,3 L3,21 L21,21 L21,3 L3,3 Z M5,5 L5,19 L19,19 L19,5 L5,5 Z",id:"shape"})})})]}),Dt=()=>(0,Mt.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Mt.jsx)("title",{children:"shape-radius"}),(0,Mt.jsx)("desc",{children:"Created with Sketch."}),(0,Mt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Mt.jsx)("g",{id:"widgets/shape-radius",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Mt.jsx)("path",{d:"M17,3 C19.209139,3 21,4.790861 21,7 L21,17 C21,19.209139 19.209139,21 17,21 L7,21 C4.790861,21 3,19.209139 3,17 L3,7 C3,4.790861 4.790861,3 7,3 L17,3 Z M17,5 L7,5 C5.9456382,5 5.08183488,5.81587779 5.00548574,6.85073766 L5,7 L5,17 C5,18.0543618 5.81587779,18.9181651 6.85073766,18.9945143 L7,19 L17,19 C18.0543618,19 18.9181651,18.1841222 18.9945143,17.1492623 L19,17 L19,7 C19,5.9456382 18.1841222,5.08183488 17.1492623,5.00548574 L17,5 Z",id:"Rectangle"})})})]}),Rt=()=>(0,Mt.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Mt.jsx)("title",{children:"shape-none"}),(0,Mt.jsx)("desc",{children:"Created with Sketch."}),(0,Mt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Mt.jsx)("g",{id:"widgets/shape-none",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Mt.jsx)("path",{d:"M5,19 L5,21 L3,21 L3,19 L5,19 Z M21,19 L21,21 L19,21 L19,19 L21,19 Z M13,19 L13,21 L11,21 L11,19 L13,19 Z M9,19 L9,21 L7,21 L7,19 L9,19 Z M17,19 L17,21 L15,21 L15,19 L17,19 Z M21,15 L21,17 L19,17 L19,15 L21,15 Z M21,11 L21,13 L19,13 L19,11 L21,11 Z M5,11 L5,13 L3,13 L3,11 L5,11 Z M21,7 L21,9 L19,9 L19,7 L21,7 Z M5,7 L5,9 L3,9 L3,7 L5,7 Z M13,3 L13,5 L11,5 L11,3 L13,3 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z M17,3 L17,5 L15,5 L15,3 L17,3 Z M21,3 L21,5 L19,5 L19,3 L21,3 Z M5,3 L5,5 L3,5 L3,3 L5,3 Z M3,15 L5,15 L5,17 L3,17 L3,15 Z",id:"Shape"})})})]}),Nt=[{value:{type:"expanded",columns:1},icon:()=>(0,Mt.jsxs)("svg",{width:"17px",height:"20px",viewBox:"0 0 17 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Mt.jsx)("title",{children:"layout-modern"}),(0,Mt.jsx)("desc",{children:"Created with Sketch."}),(0,Mt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Mt.jsx)("g",{id:"widgets/layout-modern",transform:"translate(-2.000000, -3.000000)",fill:"#000000",children:(0,Mt.jsx)("path",{d:"M2,10 L5,10 L5,7 L2,7 L2,10 Z M2,14 L5,14 L5,11 L2,11 L2,14 Z M2,6 L5,6 L5,3 L2,3 L2,6 Z M6,3 L6,17 L19,17 L19,3 L6,3 Z M8,5 L8,15 L17,15 L17,5 L8,5 Z M6,18 L6,23 L19,23 L19,18 L6,18 Z M8,20 L8,23 L17,23 L17,20 L8,20 Z",id:"shape"})})})]}),label:(0,a.__)("Expanded - 1 Column","cloudinary")},{value:{type:"expanded",columns:2},icon:()=>(0,Mt.jsxs)("svg",{width:"18px",height:"17px",viewBox:"0 0 18 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Mt.jsx)("title",{children:"layout-grid-2-column"}),(0,Mt.jsx)("desc",{children:"Created with Sketch."}),(0,Mt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Mt.jsx)("g",{id:"widgets/layout-gird-2-col",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,Mt.jsx)("path",{d:"M11,12 L11,20 L3,20 L3,12 L11,12 Z M21,12 L21,20 L13,20 L13,12 L21,12 Z M9,14 L5,14 L5,18 L9,18 L9,14 Z M19,14 L15,14 L15,18 L19,18 L19,14 Z M11,3 L11,11 L3,11 L3,3 L11,3 Z M21,3 L21,11 L13,11 L13,3 L21,3 Z M9,5 L5,5 L5,9 L9,9 L9,5 Z M19,5 L15,5 L15,9 L19,9 L19,5 Z",id:"Shape"})})})]}),label:(0,a.__)("Expanded - 2 Column","cloudinary")},{value:{type:"expanded",columns:3},icon:()=>(0,Mt.jsxs)("svg",{width:"20px",height:"13px",viewBox:"0 0 20 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Mt.jsx)("title",{children:"layout-grid-3-column"}),(0,Mt.jsx)("desc",{children:"Created with Sketch."}),(0,Mt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Mt.jsx)("g",{id:"widgets/layout-gird-3-col",transform:"translate(-2.000000, -5.000000)",fill:"#000000",children:(0,Mt.jsx)("path",{d:"M8,12 L8,18 L2,18 L2,12 L8,12 Z M15,12 L15,18 L9,18 L9,12 L15,12 Z M22,12 L22,18 L16,18 L16,12 L22,12 Z M6,14 L4,14 L4,16 L6,16 L6,14 Z M13,14 L11,14 L11,16 L13,16 L13,14 Z M20,14 L18,14 L18,16 L20,16 L20,14 Z M8,5 L8,11 L2,11 L2,5 L8,5 Z M15,5 L15,11 L9,11 L9,5 L15,5 Z M22,5 L22,11 L16,11 L16,5 L22,5 Z M6,7 L4,7 L4,9 L6,9 L6,7 Z M13,7 L11,7 L11,9 L13,9 L13,7 Z M20,7 L18,7 L18,9 L20,9 L20,7 Z",id:"Combined-Shape"})})})]}),label:(0,a.__)("Expanded - 3 Column","cloudinary")},{value:{type:"classic",columns:1},icon:()=>(0,Mt.jsxs)("svg",{width:"17px",height:"14px",viewBox:"0 0 17 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Mt.jsx)("title",{children:"layout-classic"}),(0,Mt.jsx)("desc",{children:"Created with Sketch."}),(0,Mt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Mt.jsx)("g",{id:"widgets/layout-classic",transform:"translate(-3.000000, -5.000000)",fill:"#000000",children:(0,Mt.jsx)("path",{d:"M3,12 L6,12 L6,9 L3,9 L3,12 Z M3,16 L6,16 L6,13 L3,13 L3,16 Z M3,8 L6,8 L6,5 L3,5 L3,8 Z M7,5 L7,19 L20,19 L20,5 L7,5 Z M9,7 L9,17 L18,17 L18,7 L9,7 Z",id:"shape"})})})]}),label:(0,a.__)("Classic","cloudinary")}],Zt=[{label:(0,a.__)("1:1","cloudinary"),value:"1:1"},{label:(0,a.__)("3:4","cloudinary"),value:"3:4"},{label:(0,a.__)("4:3","cloudinary"),value:"4:3"},{label:(0,a.__)("4:6","cloudinary"),value:"4:6"},{label:(0,a.__)("6:4","cloudinary"),value:"6:4"},{label:(0,a.__)("5:7","cloudinary"),value:"5:7"},{label:(0,a.__)("7:5","cloudinary"),value:"7:5"},{label:(0,a.__)("8:5","cloudinary"),value:"8:5"},{label:(0,a.__)("5:8","cloudinary"),value:"5:8"},{label:(0,a.__)("9:16","cloudinary"),value:"9:16"},{label:(0,a.__)("16:9","cloudinary"),value:"16:9"}],Ft=[{label:(0,a.__)("None","cloudinary"),value:"none"},{label:(0,a.__)("Fade","cloudinary"),value:"fade"},{label:(0,a.__)("Slide","cloudinary"),value:"slide"}],Wt=[{label:(0,a.__)("Always","cloudinary"),value:"always"},{label:(0,a.__)("None","cloudinary"),value:"none"},{label:(0,a.__)("MouseOver","cloudinary"),value:"mouseover"}],It=[{label:(0,a.__)("Inline","cloudinary"),value:"inline"},{label:(0,a.__)("Flyout","cloudinary"),value:"flyout"},{label:(0,a.__)("Popup","cloudinary"),value:"popup"}],zt=[{label:(0,a.__)("Top","cloudinary"),value:"top"},{label:(0,a.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,a.__)("Left","cloudinary"),value:"left"},{label:(0,a.__)("Right","cloudinary"),value:"right"}],Vt=[{label:(0,a.__)("Click","cloudinary"),value:"click"},{label:(0,a.__)("Hover","cloudinary"),value:"hover"}],Ht=[{label:(0,a.__)("Left","cloudinary"),value:"left"},{label:(0,a.__)("Right","cloudinary"),value:"right"},{label:(0,a.__)("Top","cloudinary"),value:"top"},{label:(0,a.__)("Bottom","cloudinary"),value:"bottom"}],Ut=[{label:(0,a.__)("Thumbnails","cloudinary"),value:"thumbnails"},{label:(0,a.__)("Indicators","cloudinary"),value:"indicators"},{label:(0,a.__)("None","cloudinary"),value:"none"}],$t=[{value:"round",icon:Tt,label:(0,a.__)("Round","cloudinary")},{value:"radius",icon:Dt,label:(0,a.__)("Radius","cloudinary")},{value:"none",icon:Rt,label:(0,a.__)("None","cloudinary")},{value:"square",icon:Bt,label:(0,a.__)("Square","cloudinary")},{value:"rectangle",icon:()=>(0,Mt.jsxs)("svg",{width:"14px",height:"20px",viewBox:"0 0 14 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,Mt.jsx)("title",{children:"ratio-9-16"}),(0,Mt.jsx)("desc",{children:"Created with Sketch."}),(0,Mt.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,Mt.jsx)("g",{id:"ratio/9-16",transform:"translate(-5.000000, -2.000000)",fill:"#000000",children:(0,Mt.jsx)("path",{d:"M22,5.5 L22,18.5 L2,18.5 L2,5.5 L22,5.5 Z M20,7.5 L4,7.5 L4,16.5 L20,16.5 L20,7.5 Z",id:"Combined-Shape",transform:"translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) "})})})]}),label:(0,a.__)("Rectangle","cloudinary")}],qt=[{value:"round",icon:Tt,label:(0,a.__)("Round","cloudinary")},{value:"radius",icon:Dt,label:(0,a.__)("Radius","cloudinary")},{value:"square",icon:Bt,label:(0,a.__)("Square","cloudinary")}],Gt=[{label:(0,a.__)("All","cloudinary"),value:"all"},{label:(0,a.__)("Border","cloudinary"),value:"border"},{label:(0,a.__)("Gradient","cloudinary"),value:"gradient"}],Xt=[{label:(0,a.__)("All","cloudinary"),value:"all"},{label:(0,a.__)("Top","cloudinary"),value:"top"},{label:(0,a.__)("Top-Bottom","cloudinary"),value:"top-bottom"},{label:(0,a.__)("Left-Right","cloudinary"),value:"left-right"},{label:(0,a.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,a.__)("Left","cloudinary"),value:"left"},{label:(0,a.__)("Right","cloudinary"),value:"right"}],Jt=[{value:"round",icon:Tt,label:(0,a.__)("Round","cloudinary")},{value:"radius",icon:Dt,label:(0,a.__)("Radius","cloudinary")},{value:"none",icon:Rt,label:(0,a.__)("None","cloudinary")},{value:"square",icon:Bt,label:(0,a.__)("Square","cloudinary")}],Yt=[{label:(0,a.__)("Pad","cloudinary"),value:"pad"},{label:(0,a.__)("Fill","cloudinary"),value:"fill"}],Kt=[{label:(0,a.__)("White padding","cloudinary"),value:"rgb:FFFFFF"},{label:(0,a.__)("Border color padding","cloudinary"),value:"auto"},{label:(0,a.__)("Predominant color padding","cloudinary"),value:"auto:predominant"},{label:(0,a.__)("Gradient fade padding","cloudinary"),value:"auto:predominant_gradient"}];var Qt=n(2485),en=n.n(Qt),tn=({value:e,children:t,icon:n,onChange:r,current:o})=>{const i="object"==typeof e?JSON.stringify(e)===JSON.stringify(o):o===e;return(0,Mt.jsxs)("button",{type:"button",onClick:()=>r(e),className:en()("radio-select",{"radio-select--active":i}),children:[(0,Mt.jsx)(n,{}),(0,Mt.jsx)("div",{className:"radio-select__label",children:t})]})};window.wp.data;const nn=e=>{const t=/var\((.*)\)/g.exec(e);return t?getComputedStyle(document.documentElement).getPropertyValue(t[1]):e},rn=({children:e,value:t})=>(0,Mt.jsxs)("div",{className:"colorpalette-color-label",children:[(0,Mt.jsx)("span",{children:e}),(0,Mt.jsx)("span",{className:"component-color-indicator","aria-label":`Color: ${t}`,style:{background:t}})]}),on=new(o())("_");var an=({attributes:t,setAttributes:n,colors:r})=>{const o=c()(t),i=on.object(o),[s,u]=(0,e.useState)(i.customSettings);t.transformation_crop||(t.transformation_crop="pad",t.transformation_background="rgb:FFFFFF"),"fill"===t.transformation_crop&&delete t.transformation_background;const l=(e,t)=>{const r={[t]:nn(e)};n(r)};return(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)(St.PanelBody,{title:(0,a.__)("Layout","cloudinary"),children:Nt.map((e=>(0,Mt.jsx)(tn,{value:e.value,onChange:e=>{n({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:e.icon,current:{type:t.displayProps_mode,columns:t.displayProps_columns||1},children:e.label},`${e.value.type}-${e.value.columns}-layout`)))}),(0,Mt.jsxs)(St.PanelBody,{title:(0,a.__)("Color Palette","cloudinary"),initialOpen:!1,children:[(0,Mt.jsx)(rn,{value:t.themeProps_primary,children:(0,a.__)("Primary","cloudinary")}),(0,Mt.jsx)(Et.ColorPalette,{value:t.themeProps_primary,colors:r,disableCustomColors:!1,onChange:e=>l(e,"themeProps_primary")}),(0,Mt.jsx)(rn,{value:t.themeProps_onPrimary,children:(0,a.__)("On Primary","cloudinary")}),(0,Mt.jsx)(Et.ColorPalette,{value:t.themeProps_onPrimary,colors:r,disableCustomColors:!1,onChange:e=>l(e,"themeProps_onPrimary")}),(0,Mt.jsx)(rn,{value:t.themeProps_active,children:(0,a.__)("Active","cloudinary")}),(0,Mt.jsx)(Et.ColorPalette,{value:t.themeProps_active,colors:r,disableCustomColors:!1,onChange:e=>l(e,"themeProps_active")})]}),"classic"===t.displayProps_mode&&(0,Mt.jsx)(St.PanelBody,{title:(0,a.__)("Fade Transition","cloudinary"),initialOpen:!1,children:(0,Mt.jsx)(St.SelectControl,{value:t.transition,options:Ft,onChange:e=>n({transition:e})})}),(0,Mt.jsxs)(St.PanelBody,{title:(0,a.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1,children:[(0,Mt.jsx)(St.SelectControl,{label:(0,a.__)("Aspect Ratio","cloudinary"),value:t.aspectRatio,options:Zt,onChange:e=>n({aspectRatio:e})}),(0,Mt.jsxs)("p",{children:[(0,Mt.jsx)(Ct,{content:(0,Mt.jsx)("span",{children:(0,a.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary")}),theme:"cloudinary",arrow:!1,placement:"bottom-start",children:(0,Mt.jsxs)("div",{className:"cld-ui-title",children:[(0,a.__)("Resize/Crop Mode","cloudinary"),(0,Mt.jsx)("span",{className:"dashicons dashicons-info cld-tooltip"})]})}),(0,Mt.jsx)(St.ButtonGroup,{children:Yt.map((e=>(0,Mt.jsx)(St.Button,{isDefault:!0,isPressed:e.value===t.transformation_crop,onClick:()=>n({transformation_crop:e.value,transformation_background:null}),children:e.label},e.value+"-look-and-feel")))})]}),"pad"===t.transformation_crop&&(0,Mt.jsx)(St.SelectControl,{label:(0,a.__)("Pad style","cloudinary"),value:t.transformation_background,options:Kt,onChange:e=>{n({transformation_background:e})}}),(0,Mt.jsx)("p",{children:(0,a.__)("Navigation","cloudinary")}),(0,Mt.jsx)("p",{children:(0,Mt.jsx)(St.ButtonGroup,{children:Wt.map((e=>(0,Mt.jsx)(St.Button,{isDefault:!0,isPressed:e.value===t.navigation,onClick:()=>n({navigation:e.value}),children:e.label},e.value+"-navigation")))})}),(0,Mt.jsxs)("div",{style:{marginTop:"30px"},children:[(0,Mt.jsx)(St.ToggleControl,{label:(0,a.__)("Show Zoom","cloudinary"),checked:t.zoom,onChange:()=>n({zoom:!t.zoom})}),t.zoom&&(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)("p",{children:(0,a.__)("Zoom Type","cloudinary")}),(0,Mt.jsx)("p",{children:(0,Mt.jsx)(St.ButtonGroup,{children:It.map((e=>(0,Mt.jsx)(St.Button,{isDefault:!0,isPressed:e.value===t.zoomProps_type,onClick:()=>n({zoomProps_type:e.value}),children:e.label},e.value+"-zoom-type")))})}),"flyout"===t.zoomProps_type&&(0,Mt.jsx)(St.SelectControl,{label:(0,a.__)("Zoom Viewer Position","cloudinary"),value:t.zoomProps_viewerPosition,options:zt,onChange:e=>n({zoomProps_viewerPosition:e})}),"popup"!==t.zoomProps_type&&(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)("p",{children:(0,a.__)("Zoom Trigger","cloudinary")}),(0,Mt.jsx)("p",{children:(0,Mt.jsx)(St.ButtonGroup,{children:Vt.map((e=>(0,Mt.jsx)(St.Button,{isDefault:!0,isPressed:e.value===t.zoomProps_trigger,onClick:()=>n({zoomProps_trigger:e.value}),children:e.label},e.value+"-zoom-trigger")))})})]})]})]})]}),(0,Mt.jsxs)(St.PanelBody,{title:(0,a.__)("Carousel Parameters","cloudinary"),initialOpen:!1,children:[(0,Mt.jsx)("p",{children:(0,a.__)("Carousel Location","cloudinary")}),(0,Mt.jsx)("p",{children:(0,Mt.jsx)(St.ButtonGroup,{children:Ht.map((e=>(0,Mt.jsx)(St.Button,{isDefault:!0,isPressed:e.value===t.carouselLocation,onClick:()=>n({carouselLocation:e.value}),children:e.label},e.value+"-carousel-location")))})}),(0,Mt.jsx)(St.RangeControl,{label:(0,a.__)("Carousel Offset","cloudinary"),value:t.carouselOffset,onChange:e=>n({carouselOffset:e}),min:0,max:100}),(0,Mt.jsx)("p",{children:(0,a.__)("Carousel Style","cloudinary")}),(0,Mt.jsx)("p",{children:(0,Mt.jsx)(St.ButtonGroup,{children:Ut.map((e=>(0,Mt.jsx)(St.Button,{isDefault:!0,isPressed:e.value===t.carouselStyle,onClick:()=>n({carouselStyle:e.value}),children:e.label},e.value+"-carousel-style")))})}),"thumbnails"===t.carouselStyle&&(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)(St.RangeControl,{label:(0,a.__)("Width","cloudinary"),value:t.thumbnailProps_width,onChange:e=>n({thumbnailProps_width:e}),min:5,max:300}),(0,Mt.jsx)(St.RangeControl,{label:(0,a.__)("Height","cloudinary"),value:t.thumbnailProps_height,onChange:e=>n({thumbnailProps_height:e}),min:5,max:300}),(0,Mt.jsx)("p",{children:(0,a.__)("Navigation Button Shape","cloudinary")}),$t.map((e=>(0,Mt.jsx)(tn,{value:e.value,onChange:e=>n({thumbnailProps_navigationShape:e}),icon:e.icon,current:t.thumbnailProps_navigationShape,children:e.label},e.value+"-navigation-button-shape"))),(0,Mt.jsx)("p",{children:(0,a.__)("Selected Style","cloudinary")}),(0,Mt.jsx)("p",{children:(0,Mt.jsx)(St.ButtonGroup,{children:Gt.map((e=>(0,Mt.jsx)(St.Button,{isDefault:!0,isPressed:e.value===t.thumbnailProps_selectedStyle,onClick:()=>n({thumbnailProps_selectedStyle:e.value}),children:e.label},e.value+"-selected-style")))})}),(0,Mt.jsx)(St.SelectControl,{label:(0,a.__)("Selected Border Position","cloudinary"),value:t.thumbnailProps_selectedBorderPosition,options:Xt,onChange:e=>n({thumbnailProps_selectedBorderPosition:e})}),(0,Mt.jsx)(St.RangeControl,{label:(0,a.__)("Selected Border Width","cloudinary"),value:t.thumbnailProps_selectedBorderWidth,onChange:e=>n({thumbnailProps_selectedBorderWidth:e}),min:0,max:10}),(0,Mt.jsx)("p",{children:(0,a.__)("Media Shape Icon","cloudinary")}),Jt.map((e=>(0,Mt.jsx)(tn,{value:e.value,onChange:e=>n({thumbnailProps_mediaSymbolShape:e}),icon:e.icon,current:t.thumbnailProps_mediaSymbolShape,children:e.label},e.value+"-media")))]}),"indicators"===t.carouselStyle&&(0,Mt.jsxs)(Mt.Fragment,{children:[(0,Mt.jsx)("p",{children:(0,a.__)("Indicators Shape","cloudinary")}),qt.map((e=>(0,Mt.jsx)(tn,{value:e.value,onChange:e=>n({indicatorProps_shape:e}),icon:e.icon,current:t.indicatorProps_shape,children:e.label},e.value+"-indicator")))]})]}),(0,Mt.jsx)(St.PanelBody,{title:(0,a.__)("Additional Settings","cloudinary"),initialOpen:!1,children:(0,Mt.jsx)(St.TextareaControl,{label:(0,a.__)("Custom Settings","cloudinary"),help:(0,a.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:s,onChange:e=>{let t={};u(e);try{t=JSON.parse(e)}catch(e){}if("object"==typeof t){const e={...i};e.customSettings=t,n({...i,...e})}}})})]})};const{cloudName:sn,mediaAssets:cn,...un}=(e=>{const t={};return Object.keys(e).forEach((n=>{t[n]={type:typeof e[n],default:e[n]}})),t})(new(o())("_").dot(CLD_GALLERY_CONFIG)),ln={};Object.keys(un).forEach((e=>{ln[e]=un[e]?.default}));const pn=e=>({cloudName:"demo",...e,mediaAssets:[{tag:"shoes_product_gallery_demo",mediaType:"image"}],container:".gallery-preview"}),fn=document.querySelector("#cloudinary-settings-page form");void 0!==fn&&fn.addEventListener("submit",(function(e){(!e.submitter.name||e.submitter.name&&"cld_submission"!==e.submitter.name)&&e.preventDefault()}));const dn=()=>{const[e,t]=(0,i.useState)(ln),n=CLD_THEME_COLORS.map((e=>({...e,color:nn(e.color)}))).filter((e=>0!==e.color.length));return(0,i.useEffect)((()=>{let t,n;const r=(e=>{const t=new(o())("_"),n=c()(e),{selectedImages:r,...i}=t.object(n,{});return i.mediaAssets=r,"classic"!==i?.displayProps?.mode?delete i.transition:delete i.displayProps.columns,"pad"!==i?.transformation_crop&&delete i.transformation_background,"pad"!==i?.transformation?.crop&&delete i.transformation.background,i?.themeProps?.primary&&(i.themeProps.primary=nn(i?.themeProps?.primary)),i?.themeProps?.onPrimary&&(i.themeProps.onPrimary=nn(i?.themeProps?.onPrimary)),i?.themeProps?.active&&(i.themeProps.active=nn(i?.themeProps?.active)),i})(e),{customSettings:i,...a}=r;try{try{n=JSON.parse(i)}catch{n=i}t=cloudinary.galleryWidget(pn({...a,...n}))}catch{t=cloudinary.galleryWidget(pn(a))}t.render();const s=document.getElementById("gallery_settings_input");return s&&(s.value=JSON.stringify(r)),()=>t.destroy()})),(0,Mt.jsx)("div",{className:"cld-gallery-settings-container",children:(0,Mt.jsxs)("div",{className:"cld-gallery-settings",children:[(0,Mt.jsx)("div",{className:"interface-interface-skeleton__sidebar cld-gallery-settings__column",children:(0,Mt.jsx)("div",{className:"interface-complementary-area edit-post-sidebar",children:(0,Mt.jsx)("div",{className:"components-panel",children:(0,Mt.jsx)("div",{className:"block-editor-block-inspector",children:(0,Mt.jsx)(an,{attributes:e,setAttributes:n=>{t({...e,...n})},colors:n})})})})}),(0,Mt.jsx)("div",{className:"gallery-preview cld-gallery-settings__column"})]})})};(0,i.render)((0,Mt.jsx)(dn,{}),document.getElementById("app_gallery_gallery_config"))}()}(); 1 (()=>{var e={1780(e){"use strict";function t(e,t){var r,n;if("function"==typeof t)void 0!==(n=t(e))&&(e=n);else if(Array.isArray(t))for(r=0;r<t.length;r++)void 0!==(n=t[r](e))&&(e=n);return e}function r(e,t){return"-"===e[0]&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(e){return Object(e)===e}function a(e){return 0===Object.keys(e).length}var i=["__proto__","prototype","constructor"],s=function(e){return-1===i.indexOf(e)};function l(e,t){e.indexOf("[")>=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var r=e.split(t);if(r.filter(s).length!==r.length)throw Error("Refusing to update blacklisted property "+e);return r}var c=Object.prototype.hasOwnProperty;function u(e,t,r,n){if(!(this instanceof u))return new u(e,t,r,n);void 0===t&&(t=!1),void 0===r&&(r=!0),void 0===n&&(n=!0),this.separator=e||".",this.override=t,this.useArray=r,this.useBrackets=n,this.keepArray=!1,this.cleanup=[]}var p=new u(".",!1,!0,!0);function d(e){return function(){return p[e].apply(p,arguments)}}u.prototype._fill=function(e,r,n,i){var s=e.shift();if(e.length>0){if(r[s]=r[s]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!o(r[s])){if(!this.override){if(!o(n)||!a(n))throw new Error("Trying to redefine `"+s+"` which is a "+typeof r[s]);return}r[s]={}}this._fill(e,r[s],n,i)}else{if(!this.override&&o(r[s])&&!a(r[s])){if(!o(n)||!a(n))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}r[s]=t(n,i)}},u.prototype.object=function(e,r){var n=this;return Object.keys(e).forEach(function(o){var a=void 0===r?null:r[o],i=l(o,n.separator).join(n.separator);-1!==i.indexOf(n.separator)?(n._fill(i.split(n.separator),e,e[o],a),delete e[o]):e[o]=t(e[o],a)}),e},u.prototype.str=function(e,r,n,o){var a=l(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(a.split(this.separator),n,r,o):n[e]=t(r,o),n},u.prototype.pick=function(e,t,n,o){var a,i,s,c,u;for(i=l(e,this.separator),a=0;a<i.length;a++){if(c=r(i[a],t),!t||"object"!=typeof t||!(c in t))return;if(a===i.length-1)return n?(s=t[c],o&&Array.isArray(t)?t.splice(c,1):delete t[c],Array.isArray(t)&&(u=i.slice(0,-1).join("."),-1===this.cleanup.indexOf(u)&&this.cleanup.push(u)),s):t[c];t=t[c]}return n&&Array.isArray(t)&&(t=t.filter(function(e){return void 0!==e})),t},u.prototype.delete=function(e,t){return this.remove(e,t,!0)},u.prototype.remove=function(e,t,r){var n;if(this.cleanup=[],Array.isArray(e)){for(n=0;n<e.length;n++)this.pick(e[n],t,!0,r);return r||this._cleanup(t),t}return this.pick(e,t,!0,r)},u.prototype._cleanup=function(e){var t,r,n,o;if(this.cleanup.length){for(r=0;r<this.cleanup.length;r++)t=(t=(o=(n=this.cleanup[r].split(".")).splice(0,-1).join("."))?this.pick(o,e):e)[n[0]].filter(function(e){return void 0!==e}),this.set(this.cleanup[r],t,e);this.cleanup=[]}},u.prototype.del=u.prototype.remove,u.prototype.move=function(e,r,n,o,a){return"function"==typeof o||Array.isArray(o)?this.set(r,t(this.pick(e,n,!0),o),n,a):(a=o,this.set(r,this.pick(e,n,!0),n,a)),n},u.prototype.transfer=function(e,r,n,o,a,i){return"function"==typeof a||Array.isArray(a)?this.set(r,t(this.pick(e,n,!0),a),o,i):(i=a,this.set(r,this.pick(e,n,!0),o,i)),o},u.prototype.copy=function(e,r,n,o,a,i){return"function"==typeof a||Array.isArray(a)?this.set(r,t(JSON.parse(JSON.stringify(this.pick(e,n,!1))),a),o,i):(i=a,this.set(r,this.pick(e,n,!1),o,i)),o},u.prototype.set=function(e,t,r,o){var a,i,s,u;if(void 0===t)return r;for(s=l(e,this.separator),a=0;a<s.length;a++){if(u=s[a],a===s.length-1)if(o&&n(t)&&n(r[u]))for(i in t)c.call(t,i)&&(r[u][i]=t[i]);else if(o&&Array.isArray(r[u])&&Array.isArray(t))for(var p=0;p<t.length;p++)r[s[a]].push(t[p]);else r[u]=t;else c.call(r,u)&&(n(r[u])||Array.isArray(r[u]))||(/^\d+$/.test(s[a+1])?r[u]=[]:r[u]={});r=r[u]}return r},u.prototype.transform=function(e,t,r){return t=t||{},r=r||{},Object.keys(e).forEach(function(n){this.set(e[n],this.pick(n,t),r)}.bind(this)),r},u.prototype.dot=function(e,t,r){t=t||{},r=r||[];var i=Array.isArray(e);return Object.keys(e).forEach(function(s){var l=i&&this.useBrackets?"["+s+"]":s;if(o(e[s])&&(n(e[s])&&!a(e[s])||Array.isArray(e[s])&&!this.keepArray&&0!==e[s].length)){if(i&&this.useBrackets){var c=r[r.length-1]||"";return this.dot(e[s],t,r.slice(0,-1).concat(c+l))}return this.dot(e[s],t,r.concat(l))}i&&this.useBrackets?t[r.join(this.separator).concat("["+s+"]")]=e[s]:t[r.concat(l).join(this.separator)]=e[s]}.bind(this)),t},u.pick=d("pick"),u.move=d("move"),u.transfer=d("transfer"),u.transform=d("transform"),u.copy=d("copy"),u.object=d("object"),u.str=d("str"),u.set=d("set"),u.delete=d("delete"),u.del=u.remove=d("remove"),u.dot=d("dot"),["override","overwrite"].forEach(function(e){Object.defineProperty(u,e,{get:function(){return p.override},set:function(e){p.override=!!e}})}),["useArray","keepArray","useBrackets"].forEach(function(e){Object.defineProperty(u,e,{get:function(){return p[e]},set:function(t){p[e]=t}})}),u._process=t,e.exports=u},5580(e,t,r){var n=r(6110)(r(9325),"DataView");e.exports=n},1549(e,t,r){var n=r(2032),o=r(3862),a=r(6721),i=r(2749),s=r(5749);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},79(e,t,r){var n=r(3702),o=r(80),a=r(4739),i=r(8655),s=r(1175);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},8223(e,t,r){var n=r(6110)(r(9325),"Map");e.exports=n},3661(e,t,r){var n=r(3040),o=r(7670),a=r(289),i=r(4509),s=r(2949);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},2804(e,t,r){var n=r(6110)(r(9325),"Promise");e.exports=n},6545(e,t,r){var n=r(6110)(r(9325),"Set");e.exports=n},7217(e,t,r){var n=r(79),o=r(1420),a=r(938),i=r(3605),s=r(9817),l=r(945);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=s,c.prototype.set=l,e.exports=c},1873(e,t,r){var n=r(9325).Symbol;e.exports=n},7828(e,t,r){var n=r(9325).Uint8Array;e.exports=n},8303(e,t,r){var n=r(6110)(r(9325),"WeakMap");e.exports=n},3729(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},9770(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}},695(e,t,r){var n=r(8096),o=r(2428),a=r(6449),i=r(3656),s=r(361),l=r(7167),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=a(e),u=!r&&o(e),p=!r&&!u&&i(e),d=!r&&!u&&!p&&l(e),f=r||u||p||d,v=f?n(e.length,String):[],m=v.length;for(var h in e)!t&&!c.call(e,h)||f&&("length"==h||p&&("offset"==h||"parent"==h)||d&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||s(h,m))||v.push(h);return v}},4528(e){e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},6547(e,t,r){var n=r(3360),o=r(5288),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var i=e[t];a.call(e,t)&&o(i,r)&&(void 0!==r||t in e)||n(e,t,r)}},6025(e,t,r){var n=r(5288);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},4733(e,t,r){var n=r(1791),o=r(5950);e.exports=function(e,t){return e&&n(t,o(t),e)}},3838(e,t,r){var n=r(1791),o=r(7241);e.exports=function(e,t){return e&&n(t,o(t),e)}},3360(e,t,r){var n=r(3243);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},9999(e,t,r){var n=r(7217),o=r(3729),a=r(6547),i=r(4733),s=r(3838),l=r(3290),c=r(3007),u=r(2271),p=r(8948),d=r(2),f=r(3349),v=r(5861),m=r(6189),h=r(7199),y=r(5529),b=r(6449),g=r(3656),_=r(7730),x=r(3805),w=r(8440),L=r(5950),E=r(7241),O="[object Arguments]",j="[object Function]",k="[object Object]",A={};A[O]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[k]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[j]=A["[object WeakMap]"]=!1,e.exports=function e(t,r,P,S,C,M){var B,T=1&r,D=2&r,N=4&r;if(P&&(B=C?P(t,S,C,M):P(t)),void 0!==B)return B;if(!x(t))return t;var R=b(t);if(R){if(B=m(t),!T)return c(t,B)}else{var Z=v(t),z=Z==j||"[object GeneratorFunction]"==Z;if(g(t))return l(t,T);if(Z==k||Z==O||z&&!C){if(B=D||z?{}:y(t),!T)return D?p(t,s(B,t)):u(t,i(B,t))}else{if(!A[Z])return C?t:{};B=h(t,Z,T)}}M||(M=new n);var F=M.get(t);if(F)return F;M.set(t,B),w(t)?t.forEach(function(n){B.add(e(n,r,P,n,t,M))}):_(t)&&t.forEach(function(n,o){B.set(o,e(n,r,P,o,t,M))});var W=R?void 0:(N?D?f:d:D?E:L)(t);return o(W||t,function(n,o){W&&(n=t[o=n]),a(B,o,e(n,r,P,o,t,M))}),B}},9344(e,t,r){var n=r(3805),o=Object.create,a=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=a},2199(e,t,r){var n=r(4528),o=r(6449);e.exports=function(e,t,r){var a=t(e);return o(e)?a:n(a,r(e))}},2552(e,t,r){var n=r(1873),o=r(659),a=r(9350),i=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},7534(e,t,r){var n=r(2552),o=r(346);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},9172(e,t,r){var n=r(5861),o=r(346);e.exports=function(e){return o(e)&&"[object Map]"==n(e)}},5083(e,t,r){var n=r(1882),o=r(7296),a=r(3805),i=r(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,p=c.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(n(e)?d:s).test(i(e))}},6038(e,t,r){var n=r(5861),o=r(346);e.exports=function(e){return o(e)&&"[object Set]"==n(e)}},4901(e,t,r){var n=r(2552),o=r(294),a=r(346),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[n(e)]}},8984(e,t,r){var n=r(5527),o=r(3650),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))a.call(e,r)&&"constructor"!=r&&t.push(r);return t}},2903(e,t,r){var n=r(3805),o=r(5527),a=r(181),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return a(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&r.push(s);return r}},8096(e){e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},7301(e){e.exports=function(e){return function(t){return e(t)}}},9653(e,t,r){var n=r(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},3290(e,t,r){e=r.nmd(e);var n=r(9325),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},6169(e,t,r){var n=r(9653);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},3201(e){var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},3736(e,t,r){var n=r(1873),o=n?n.prototype:void 0,a=o?o.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},1961(e,t,r){var n=r(9653);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},3007(e){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},1791(e,t,r){var n=r(6547),o=r(3360);e.exports=function(e,t,r,a){var i=!r;r||(r={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=a?a(r[c],e[c],c,r,e):void 0;void 0===u&&(u=e[c]),i?o(r,c,u):n(r,c,u)}return r}},2271(e,t,r){var n=r(1791),o=r(4664);e.exports=function(e,t){return n(e,o(e),t)}},8948(e,t,r){var n=r(1791),o=r(6375);e.exports=function(e,t){return n(e,o(e),t)}},5481(e,t,r){var n=r(9325)["__core-js_shared__"];e.exports=n},3243(e,t,r){var n=r(6110),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},4840(e){var t="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;e.exports=t},2(e,t,r){var n=r(2199),o=r(4664),a=r(5950);e.exports=function(e){return n(e,a,o)}},3349(e,t,r){var n=r(2199),o=r(6375),a=r(7241);e.exports=function(e){return n(e,a,o)}},2651(e,t,r){var n=r(4218);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},6110(e,t,r){var n=r(5083),o=r(392);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},8879(e,t,r){var n=r(4335)(Object.getPrototypeOf,Object);e.exports=n},659(e,t,r){var n=r(1873),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=i.call(e);return n&&(t?e[s]=r:delete e[s]),o}},4664(e,t,r){var n=r(9770),o=r(3345),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(e){return null==e?[]:(e=Object(e),n(i(e),function(t){return a.call(e,t)}))}:o;e.exports=s},6375(e,t,r){var n=r(4528),o=r(8879),a=r(4664),i=r(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,a(e)),e=o(e);return t}:i;e.exports=s},5861(e,t,r){var n=r(5580),o=r(8223),a=r(2804),i=r(6545),s=r(8303),l=r(2552),c=r(7473),u="[object Map]",p="[object Promise]",d="[object Set]",f="[object WeakMap]",v="[object DataView]",m=c(n),h=c(o),y=c(a),b=c(i),g=c(s),_=l;(n&&_(new n(new ArrayBuffer(1)))!=v||o&&_(new o)!=u||a&&_(a.resolve())!=p||i&&_(new i)!=d||s&&_(new s)!=f)&&(_=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return v;case h:return u;case y:return p;case b:return d;case g:return f}return t}),e.exports=_},392(e){e.exports=function(e,t){return null==e?void 0:e[t]}},2032(e,t,r){var n=r(1042);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},3862(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721(e,t,r){var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},2749(e,t,r){var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},5749(e,t,r){var n=r(1042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},6189(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},7199(e,t,r){var n=r(9653),o=r(6169),a=r(3201),i=r(3736),s=r(1961);e.exports=function(e,t,r){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,r);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return a(e);case"[object Symbol]":return i(e)}}},5529(e,t,r){var n=r(9344),o=r(8879),a=r(5527);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:n(o(e))}},361(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},4218(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296(e,t,r){var n,o=r(5481),a=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!a&&a in e}},5527(e){var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},3702(e){e.exports=function(){this.__data__=[],this.size=0}},80(e,t,r){var n=r(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},4739(e,t,r){var n=r(6025);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},8655(e,t,r){var n=r(6025);e.exports=function(e){return n(this.__data__,e)>-1}},1175(e,t,r){var n=r(6025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},3040(e,t,r){var n=r(1549),o=r(79),a=r(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(a||o),string:new n}}},7670(e,t,r){var n=r(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},289(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).get(e)}},4509(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).has(e)}},2949(e,t,r){var n=r(2651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},1042(e,t,r){var n=r(6110)(Object,"create");e.exports=n},3650(e,t,r){var n=r(4335)(Object.keys,Object);e.exports=n},181(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},6009(e,t,r){e=r.nmd(e);var n=r(4840),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o&&n.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s},9350(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335(e){e.exports=function(e,t){return function(r){return e(t(r))}}},9325(e,t,r){var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},1420(e,t,r){var n=r(79);e.exports=function(){this.__data__=new n,this.size=0}},938(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},3605(e){e.exports=function(e){return this.__data__.get(e)}},9817(e){e.exports=function(e){return this.__data__.has(e)}},945(e,t,r){var n=r(79),o=r(8223),a=r(3661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var i=r.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(i)}return r.set(e,t),this.size=r.size,this}},7473(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8055(e,t,r){var n=r(9999);e.exports=function(e){return n(e,5)}},5288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},2428(e,t,r){var n=r(7534),o=r(346),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},6449(e){var t=Array.isArray;e.exports=t},4894(e,t,r){var n=r(1882),o=r(294);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},3656(e,t,r){e=r.nmd(e);var n=r(9325),o=r(9935),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,s=i&&i.exports===a?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},1882(e,t,r){var n=r(2552),o=r(3805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7730(e,t,r){var n=r(9172),o=r(7301),a=r(6009),i=a&&a.isMap,s=i?o(i):n;e.exports=s},3805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8440(e,t,r){var n=r(6038),o=r(7301),a=r(6009),i=a&&a.isSet,s=i?o(i):n;e.exports=s},7167(e,t,r){var n=r(4901),o=r(7301),a=r(6009),i=a&&a.isTypedArray,s=i?o(i):n;e.exports=s},5950(e,t,r){var n=r(695),o=r(8984),a=r(4894);e.exports=function(e){return a(e)?n(e):o(e)}},7241(e,t,r){var n=r(695),o=r(2903),a=r(4894);e.exports=function(e){return a(e)?n(e,!0):o(e)}},3345(e){e.exports=function(){return[]}},9935(e){e.exports=function(){return!1}},6087(e){"use strict";e.exports=window.wp.element},6942(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,a(r)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=i(t,r));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={id:n,loaded:!1,exports:{}};return e[n](a,a.exports,r),a.loaded=!0,a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=r(1780),t=r.n(e),n=r(6087),o=r(8055),a=r.n(o);const i=window.wp.i18n,s=(window.wp["components/buildStyle/style.css"],window.wp.components),l=window.wp.blockEditor;var c=r(6087);const u=()=>c.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},c.createElement("title",null,"shape-round"),c.createElement("desc",null,"Created with Sketch."),c.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"widgets/shape-round",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},c.createElement("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,5 C8.13400675,5 5,8.13400675 5,12 C5,15.8659932 8.13400675,19 12,19 C15.8659932,19 19,15.8659932 19,12 C19,8.13400675 15.8659932,5 12,5 Z",id:"Combined-Shape"})))),p=()=>c.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},c.createElement("title",null,"ratio-square"),c.createElement("desc",null,"Created with Sketch."),c.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"widgets/shape-square",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},c.createElement("path",{d:"M3,3 L3,21 L21,21 L21,3 L3,3 Z M5,5 L5,19 L19,19 L19,5 L5,5 Z",id:"shape"})))),d=()=>c.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},c.createElement("title",null,"shape-radius"),c.createElement("desc",null,"Created with Sketch."),c.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"widgets/shape-radius",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},c.createElement("path",{d:"M17,3 C19.209139,3 21,4.790861 21,7 L21,17 C21,19.209139 19.209139,21 17,21 L7,21 C4.790861,21 3,19.209139 3,17 L3,7 C3,4.790861 4.790861,3 7,3 L17,3 Z M17,5 L7,5 C5.9456382,5 5.08183488,5.81587779 5.00548574,6.85073766 L5,7 L5,17 C5,18.0543618 5.81587779,18.9181651 6.85073766,18.9945143 L7,19 L17,19 C18.0543618,19 18.9181651,18.1841222 18.9945143,17.1492623 L19,17 L19,7 C19,5.9456382 18.1841222,5.08183488 17.1492623,5.00548574 L17,5 Z",id:"Rectangle"})))),f=()=>c.createElement("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},c.createElement("title",null,"shape-none"),c.createElement("desc",null,"Created with Sketch."),c.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"widgets/shape-none",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},c.createElement("path",{d:"M5,19 L5,21 L3,21 L3,19 L5,19 Z M21,19 L21,21 L19,21 L19,19 L21,19 Z M13,19 L13,21 L11,21 L11,19 L13,19 Z M9,19 L9,21 L7,21 L7,19 L9,19 Z M17,19 L17,21 L15,21 L15,19 L17,19 Z M21,15 L21,17 L19,17 L19,15 L21,15 Z M21,11 L21,13 L19,13 L19,11 L21,11 Z M5,11 L5,13 L3,13 L3,11 L5,11 Z M21,7 L21,9 L19,9 L19,7 L21,7 Z M5,7 L5,9 L3,9 L3,7 L5,7 Z M13,3 L13,5 L11,5 L11,3 L13,3 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z M17,3 L17,5 L15,5 L15,3 L17,3 Z M21,3 L21,5 L19,5 L19,3 L21,3 Z M5,3 L5,5 L3,5 L3,3 L5,3 Z M3,15 L5,15 L5,17 L3,17 L3,15 Z",id:"Shape"})))),v=[{value:{type:"expanded",columns:1},icon:()=>c.createElement("svg",{width:"17px",height:"20px",viewBox:"0 0 17 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},c.createElement("title",null,"layout-modern"),c.createElement("desc",null,"Created with Sketch."),c.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"widgets/layout-modern",transform:"translate(-2.000000, -3.000000)",fill:"#000000"},c.createElement("path",{d:"M2,10 L5,10 L5,7 L2,7 L2,10 Z M2,14 L5,14 L5,11 L2,11 L2,14 Z M2,6 L5,6 L5,3 L2,3 L2,6 Z M6,3 L6,17 L19,17 L19,3 L6,3 Z M8,5 L8,15 L17,15 L17,5 L8,5 Z M6,18 L6,23 L19,23 L19,18 L6,18 Z M8,20 L8,23 L17,23 L17,20 L8,20 Z",id:"shape"})))),label:(0,i.__)("Expanded - 1 Column","cloudinary")},{value:{type:"expanded",columns:2},icon:()=>c.createElement("svg",{width:"18px",height:"17px",viewBox:"0 0 18 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},c.createElement("title",null,"layout-grid-2-column"),c.createElement("desc",null,"Created with Sketch."),c.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"widgets/layout-gird-2-col",transform:"translate(-3.000000, -3.000000)",fill:"#000000"},c.createElement("path",{d:"M11,12 L11,20 L3,20 L3,12 L11,12 Z M21,12 L21,20 L13,20 L13,12 L21,12 Z M9,14 L5,14 L5,18 L9,18 L9,14 Z M19,14 L15,14 L15,18 L19,18 L19,14 Z M11,3 L11,11 L3,11 L3,3 L11,3 Z M21,3 L21,11 L13,11 L13,3 L21,3 Z M9,5 L5,5 L5,9 L9,9 L9,5 Z M19,5 L15,5 L15,9 L19,9 L19,5 Z",id:"Shape"})))),label:(0,i.__)("Expanded - 2 Column","cloudinary")},{value:{type:"expanded",columns:3},icon:()=>c.createElement("svg",{width:"20px",height:"13px",viewBox:"0 0 20 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},c.createElement("title",null,"layout-grid-3-column"),c.createElement("desc",null,"Created with Sketch."),c.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"widgets/layout-gird-3-col",transform:"translate(-2.000000, -5.000000)",fill:"#000000"},c.createElement("path",{d:"M8,12 L8,18 L2,18 L2,12 L8,12 Z M15,12 L15,18 L9,18 L9,12 L15,12 Z M22,12 L22,18 L16,18 L16,12 L22,12 Z M6,14 L4,14 L4,16 L6,16 L6,14 Z M13,14 L11,14 L11,16 L13,16 L13,14 Z M20,14 L18,14 L18,16 L20,16 L20,14 Z M8,5 L8,11 L2,11 L2,5 L8,5 Z M15,5 L15,11 L9,11 L9,5 L15,5 Z M22,5 L22,11 L16,11 L16,5 L22,5 Z M6,7 L4,7 L4,9 L6,9 L6,7 Z M13,7 L11,7 L11,9 L13,9 L13,7 Z M20,7 L18,7 L18,9 L20,9 L20,7 Z",id:"Combined-Shape"})))),label:(0,i.__)("Expanded - 3 Column","cloudinary")},{value:{type:"classic",columns:1},icon:()=>c.createElement("svg",{width:"17px",height:"14px",viewBox:"0 0 17 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},c.createElement("title",null,"layout-classic"),c.createElement("desc",null,"Created with Sketch."),c.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"widgets/layout-classic",transform:"translate(-3.000000, -5.000000)",fill:"#000000"},c.createElement("path",{d:"M3,12 L6,12 L6,9 L3,9 L3,12 Z M3,16 L6,16 L6,13 L3,13 L3,16 Z M3,8 L6,8 L6,5 L3,5 L3,8 Z M7,5 L7,19 L20,19 L20,5 L7,5 Z M9,7 L9,17 L18,17 L18,7 L9,7 Z",id:"shape"})))),label:(0,i.__)("Classic","cloudinary")}],m=[{label:(0,i.__)("1:1","cloudinary"),value:"1:1"},{label:(0,i.__)("3:4","cloudinary"),value:"3:4"},{label:(0,i.__)("4:3","cloudinary"),value:"4:3"},{label:(0,i.__)("4:6","cloudinary"),value:"4:6"},{label:(0,i.__)("6:4","cloudinary"),value:"6:4"},{label:(0,i.__)("5:7","cloudinary"),value:"5:7"},{label:(0,i.__)("7:5","cloudinary"),value:"7:5"},{label:(0,i.__)("8:5","cloudinary"),value:"8:5"},{label:(0,i.__)("5:8","cloudinary"),value:"5:8"},{label:(0,i.__)("9:16","cloudinary"),value:"9:16"},{label:(0,i.__)("16:9","cloudinary"),value:"16:9"}],h=[{label:(0,i.__)("None","cloudinary"),value:"none"},{label:(0,i.__)("Fade","cloudinary"),value:"fade"},{label:(0,i.__)("Slide","cloudinary"),value:"slide"}],y=[{label:(0,i.__)("Always","cloudinary"),value:"always"},{label:(0,i.__)("None","cloudinary"),value:"none"},{label:(0,i.__)("MouseOver","cloudinary"),value:"mouseover"}],b=[{label:(0,i.__)("Inline","cloudinary"),value:"inline"},{label:(0,i.__)("Flyout","cloudinary"),value:"flyout"},{label:(0,i.__)("Popup","cloudinary"),value:"popup"}],g=[{label:(0,i.__)("Top","cloudinary"),value:"top"},{label:(0,i.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,i.__)("Left","cloudinary"),value:"left"},{label:(0,i.__)("Right","cloudinary"),value:"right"}],_=[{label:(0,i.__)("Click","cloudinary"),value:"click"},{label:(0,i.__)("Hover","cloudinary"),value:"hover"}],x=[{label:(0,i.__)("Left","cloudinary"),value:"left"},{label:(0,i.__)("Right","cloudinary"),value:"right"},{label:(0,i.__)("Top","cloudinary"),value:"top"},{label:(0,i.__)("Bottom","cloudinary"),value:"bottom"}],w=[{label:(0,i.__)("Thumbnails","cloudinary"),value:"thumbnails"},{label:(0,i.__)("Indicators","cloudinary"),value:"indicators"},{label:(0,i.__)("None","cloudinary"),value:"none"}],L=[{value:"round",icon:u,label:(0,i.__)("Round","cloudinary")},{value:"radius",icon:d,label:(0,i.__)("Radius","cloudinary")},{value:"none",icon:f,label:(0,i.__)("None","cloudinary")},{value:"square",icon:p,label:(0,i.__)("Square","cloudinary")},{value:"rectangle",icon:()=>c.createElement("svg",{width:"14px",height:"20px",viewBox:"0 0 14 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},c.createElement("title",null,"ratio-9-16"),c.createElement("desc",null,"Created with Sketch."),c.createElement("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},c.createElement("g",{id:"ratio/9-16",transform:"translate(-5.000000, -2.000000)",fill:"#000000"},c.createElement("path",{d:"M22,5.5 L22,18.5 L2,18.5 L2,5.5 L22,5.5 Z M20,7.5 L4,7.5 L4,16.5 L20,16.5 L20,7.5 Z",id:"Combined-Shape",transform:"translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) "})))),label:(0,i.__)("Rectangle","cloudinary")}],E=[{value:"round",icon:u,label:(0,i.__)("Round","cloudinary")},{value:"radius",icon:d,label:(0,i.__)("Radius","cloudinary")},{value:"square",icon:p,label:(0,i.__)("Square","cloudinary")}],O=[{label:(0,i.__)("All","cloudinary"),value:"all"},{label:(0,i.__)("Border","cloudinary"),value:"border"},{label:(0,i.__)("Gradient","cloudinary"),value:"gradient"}],j=[{label:(0,i.__)("All","cloudinary"),value:"all"},{label:(0,i.__)("Top","cloudinary"),value:"top"},{label:(0,i.__)("Top-Bottom","cloudinary"),value:"top-bottom"},{label:(0,i.__)("Left-Right","cloudinary"),value:"left-right"},{label:(0,i.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,i.__)("Left","cloudinary"),value:"left"},{label:(0,i.__)("Right","cloudinary"),value:"right"}],k=[{value:"round",icon:u,label:(0,i.__)("Round","cloudinary")},{value:"radius",icon:d,label:(0,i.__)("Radius","cloudinary")},{value:"none",icon:f,label:(0,i.__)("None","cloudinary")},{value:"square",icon:p,label:(0,i.__)("Square","cloudinary")}],A=[{label:(0,i.__)("Pad","cloudinary"),value:"pad"},{label:(0,i.__)("Fill","cloudinary"),value:"fill"}],P=[{label:(0,i.__)("White padding","cloudinary"),value:"rgb:FFFFFF"},{label:(0,i.__)("Border color padding","cloudinary"),value:"auto"},{label:(0,i.__)("Predominant color padding","cloudinary"),value:"auto:predominant"},{label:(0,i.__)("Gradient fade padding","cloudinary"),value:"auto:predominant_gradient"}];var S=r(6942),C=r.n(S),M=r(6087);const B=({value:e,children:t,icon:r,onChange:n,current:o})=>{const a="object"==typeof e?JSON.stringify(e)===JSON.stringify(o):o===e;return M.createElement("button",{type:"button",onClick:()=>n(e),className:C()("radio-select",{"radio-select--active":a})},M.createElement(r,null),M.createElement("div",{className:"radio-select__label"},t))};window.wp.data;const T=e=>{const t=/var\((.*)\)/g.exec(e);return t?getComputedStyle(document.documentElement).getPropertyValue(t[1]):e};function D(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function N(e){return e instanceof D(e).Element||e instanceof Element}function R(e){return e instanceof D(e).HTMLElement||e instanceof HTMLElement}function Z(e){return"undefined"!=typeof ShadowRoot&&(e instanceof D(e).ShadowRoot||e instanceof ShadowRoot)}var z=Math.max,F=Math.min,W=Math.round;function H(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function I(){return!/^((?!chrome|android).)*safari/i.test(H())}function V(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&R(e)&&(o=e.offsetWidth>0&&W(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&W(n.height)/e.offsetHeight||1);var i=(N(e)?D(e):window).visualViewport,s=!I()&&r,l=(n.left+(s&&i?i.offsetLeft:0))/o,c=(n.top+(s&&i?i.offsetTop:0))/a,u=n.width/o,p=n.height/a;return{width:u,height:p,top:c,right:l+u,bottom:c+p,left:l,x:l,y:c}}function U(e){var t=D(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function q(e){return e?(e.nodeName||"").toLowerCase():null}function $(e){return((N(e)?e.ownerDocument:e.document)||window.document).documentElement}function G(e){return V($(e)).left+U(e).scrollLeft}function X(e){return D(e).getComputedStyle(e)}function J(e){var t=X(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function Y(e,t,r){void 0===r&&(r=!1);var n,o,a=R(t),i=R(t)&&function(e){var t=e.getBoundingClientRect(),r=W(t.width)/e.offsetWidth||1,n=W(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),s=$(t),l=V(e,i,r),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!r)&&(("body"!==q(t)||J(s))&&(c=(n=t)!==D(n)&&R(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:U(n)),R(t)?((u=V(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=G(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function K(e){var t=V(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Q(e){return"html"===q(e)?e:e.assignedSlot||e.parentNode||(Z(e)?e.host:null)||$(e)}function ee(e){return["html","body","#document"].indexOf(q(e))>=0?e.ownerDocument.body:R(e)&&J(e)?e:ee(Q(e))}function te(e,t){var r;void 0===t&&(t=[]);var n=ee(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),a=D(n),i=o?[a].concat(a.visualViewport||[],J(n)?n:[]):n,s=t.concat(i);return o?s:s.concat(te(Q(i)))}function re(e){return["table","td","th"].indexOf(q(e))>=0}function ne(e){return R(e)&&"fixed"!==X(e).position?e.offsetParent:null}function oe(e){for(var t=D(e),r=ne(e);r&&re(r)&&"static"===X(r).position;)r=ne(r);return r&&("html"===q(r)||"body"===q(r)&&"static"===X(r).position)?t:r||function(e){var t=/firefox/i.test(H());if(/Trident/i.test(H())&&R(e)&&"fixed"===X(e).position)return null;var r=Q(e);for(Z(r)&&(r=r.host);R(r)&&["html","body"].indexOf(q(r))<0;){var n=X(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var ae="top",ie="bottom",se="right",le="left",ce="auto",ue=[ae,ie,se,le],pe="start",de="end",fe="viewport",ve="popper",me=ue.reduce(function(e,t){return e.concat([t+"-"+pe,t+"-"+de])},[]),he=[].concat(ue,[ce]).reduce(function(e,t){return e.concat([t,t+"-"+pe,t+"-"+de])},[]),ye=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function be(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||o(e)}),n}var ge={placement:"bottom",modifiers:[],strategy:"absolute"};function _e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function xe(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,a=void 0===o?ge:o;return function(e,t,r){void 0===r&&(r=a);var o,i,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},ge,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(r){var o="function"==typeof r?r(s.options):r;p(),s.options=Object.assign({},a,s.options,o),s.scrollParents={reference:N(e)?te(e):e.contextElement?te(e.contextElement):[],popper:te(t)};var i,c,d=function(e){var t=be(e);return ye.reduce(function(e,r){return e.concat(t.filter(function(e){return e.phase===r}))},[])}((i=[].concat(n,s.options.modifiers),c=i.reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return s.orderedModifiers=d.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var a=o({state:s,name:t,instance:u,options:n}),i=function(){};l.push(a||i)}}),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,r=e.popper;if(_e(t,r)){s.rects={reference:Y(t,oe(r),"fixed"===s.options.strategy),popper:K(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var o=s.orderedModifiers[n],a=o.fn,i=o.options,l=void 0===i?{}:i,p=o.name;"function"==typeof a&&(s=a({state:s,options:l,name:p,instance:u})||s)}else s.reset=!1,n=-1}}},update:(o=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(o())})})),i}),destroy:function(){p(),c=!0}};if(!_e(e,t))return u;function p(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(r).then(function(e){!c&&r.onFirstUpdate&&r.onFirstUpdate(e)}),u}}var we={passive:!0};function Le(e){return e.split("-")[0]}function Ee(e){return e.split("-")[1]}function Oe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function je(e){var t,r=e.reference,n=e.element,o=e.placement,a=o?Le(o):null,i=o?Ee(o):null,s=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(a){case ae:t={x:s,y:r.y-n.height};break;case ie:t={x:s,y:r.y+r.height};break;case se:t={x:r.x+r.width,y:l};break;case le:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=a?Oe(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case pe:t[c]=t[c]-(r[u]/2-n[u]/2);break;case de:t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var ke={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ae(e){var t,r=e.popper,n=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,p=e.isFixed,d=i.x,f=void 0===d?0:d,v=i.y,m=void 0===v?0:v,h="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=h.x,m=h.y;var y=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),g=le,_=ae,x=window;if(c){var w=oe(r),L="clientHeight",E="clientWidth";if(w===D(r)&&"static"!==X(w=$(r)).position&&"absolute"===s&&(L="scrollHeight",E="scrollWidth"),o===ae||(o===le||o===se)&&a===de)_=ie,m-=(p&&w===x&&x.visualViewport?x.visualViewport.height:w[L])-n.height,m*=l?1:-1;if(o===le||(o===ae||o===ie)&&a===de)g=se,f-=(p&&w===x&&x.visualViewport?x.visualViewport.width:w[E])-n.width,f*=l?1:-1}var O,j=Object.assign({position:s},c&&ke),k=!0===u?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:W(r*o)/o||0,y:W(n*o)/o||0}}({x:f,y:m},D(r)):{x:f,y:m};return f=k.x,m=k.y,l?Object.assign({},j,((O={})[_]=b?"0":"",O[g]=y?"0":"",O.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",O)):Object.assign({},j,((t={})[_]=b?m+"px":"",t[g]=y?f+"px":"",t.transform="",t))}const Pe={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];R(o)&&q(o)&&(Object.assign(o.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});R(n)&&q(n)&&(Object.assign(n.style,a),Object.keys(o).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};const Se={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=void 0===o?[0,0]:o,i=he.reduce(function(e,r){return e[r]=function(e,t,r){var n=Le(e),o=[le,ae].indexOf(n)>=0?-1:1,a="function"==typeof r?r(Object.assign({},t,{placement:e})):r,i=a[0],s=a[1];return i=i||0,s=(s||0)*o,[le,se].indexOf(n)>=0?{x:s,y:i}:{x:i,y:s}}(r,t.rects,a),e},{}),s=i[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=i}};var Ce={left:"right",right:"left",bottom:"top",top:"bottom"};function Me(e){return e.replace(/left|right|bottom|top/g,function(e){return Ce[e]})}var Be={start:"end",end:"start"};function Te(e){return e.replace(/start|end/g,function(e){return Be[e]})}function De(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Z(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ne(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Re(e,t,r){return t===fe?Ne(function(e,t){var r=D(e),n=$(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;var c=I();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s+G(e),y:l}}(e,r)):N(t)?function(e,t){var r=V(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):Ne(function(e){var t,r=$(e),n=U(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=z(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=z(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+G(e),l=-n.scrollTop;return"rtl"===X(o||r).direction&&(s+=z(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:s,y:l}}($(e)))}function Ze(e,t,r,n){var o="clippingParents"===t?function(e){var t=te(Q(e)),r=["absolute","fixed"].indexOf(X(e).position)>=0&&R(e)?oe(e):e;return N(r)?t.filter(function(e){return N(e)&&De(e,r)&&"body"!==q(e)}):[]}(e):[].concat(t),a=[].concat(o,[r]),i=a[0],s=a.reduce(function(t,r){var o=Re(e,r,n);return t.top=z(o.top,t.top),t.right=F(o.right,t.right),t.bottom=F(o.bottom,t.bottom),t.left=z(o.left,t.left),t},Re(e,i,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ze(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Fe(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function We(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,a=r.strategy,i=void 0===a?e.strategy:a,s=r.boundary,l=void 0===s?"clippingParents":s,c=r.rootBoundary,u=void 0===c?fe:c,p=r.elementContext,d=void 0===p?ve:p,f=r.altBoundary,v=void 0!==f&&f,m=r.padding,h=void 0===m?0:m,y=ze("number"!=typeof h?h:Fe(h,ue)),b=d===ve?"reference":ve,g=e.rects.popper,_=e.elements[v?b:d],x=Ze(N(_)?_:_.contextElement||$(e.elements.popper),l,u,i),w=V(e.elements.reference),L=je({reference:w,element:g,strategy:"absolute",placement:o}),E=Ne(Object.assign({},g,L)),O=d===ve?E:w,j={top:x.top-O.top+y.top,bottom:O.bottom-x.bottom+y.bottom,left:x.left-O.left+y.left,right:O.right-x.right+y.right},k=e.modifiersData.offset;if(d===ve&&k){var A=k[o];Object.keys(j).forEach(function(e){var t=[se,ie].indexOf(e)>=0?1:-1,r=[ae,ie].indexOf(e)>=0?"y":"x";j[e]+=A[r]*t})}return j}function He(e,t,r){return z(e,F(t,r))}const Ie={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=void 0===o||o,i=r.altAxis,s=void 0!==i&&i,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,p=r.padding,d=r.tether,f=void 0===d||d,v=r.tetherOffset,m=void 0===v?0:v,h=We(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:u}),y=Le(t.placement),b=Ee(t.placement),g=!b,_=Oe(y),x="x"===_?"y":"x",w=t.modifiersData.popperOffsets,L=t.rects.reference,E=t.rects.popper,O="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,j="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(w){if(a){var P,S="y"===_?ae:le,C="y"===_?ie:se,M="y"===_?"height":"width",B=w[_],T=B+h[S],D=B-h[C],N=f?-E[M]/2:0,R=b===pe?L[M]:E[M],Z=b===pe?-E[M]:-L[M],W=t.elements.arrow,H=f&&W?K(W):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=I[S],U=I[C],q=He(0,L[M],H[M]),$=g?L[M]/2-N-q-V-j.mainAxis:R-q-V-j.mainAxis,G=g?-L[M]/2+N+q+U+j.mainAxis:Z+q+U+j.mainAxis,X=t.elements.arrow&&oe(t.elements.arrow),J=X?"y"===_?X.clientTop||0:X.clientLeft||0:0,Y=null!=(P=null==k?void 0:k[_])?P:0,Q=B+G-Y,ee=He(f?F(T,B+$-Y-J):T,B,f?z(D,Q):D);w[_]=ee,A[_]=ee-B}if(s){var te,re="x"===_?ae:le,ne="x"===_?ie:se,ce=w[x],ue="y"===x?"height":"width",de=ce+h[re],fe=ce-h[ne],ve=-1!==[ae,le].indexOf(y),me=null!=(te=null==k?void 0:k[x])?te:0,he=ve?de:ce-L[ue]-E[ue]-me+j.altAxis,ye=ve?ce+L[ue]+E[ue]-me-j.altAxis:fe,be=f&&ve?function(e,t,r){var n=He(e,t,r);return n>r?r:n}(he,ce,ye):He(f?he:de,ce,f?ye:fe);w[x]=be,A[x]=be-ce}t.modifiersData[n]=A}},requiresIfExists:["offset"]};const Ve={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,i=r.modifiersData.popperOffsets,s=Le(r.placement),l=Oe(s),c=[le,se].indexOf(s)>=0?"height":"width";if(a&&i){var u=function(e,t){return ze("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Fe(e,ue))}(o.padding,r),p=K(a),d="y"===l?ae:le,f="y"===l?ie:se,v=r.rects.reference[c]+r.rects.reference[l]-i[l]-r.rects.popper[c],m=i[l]-r.rects.reference[l],h=oe(a),y=h?"y"===l?h.clientHeight||0:h.clientWidth||0:0,b=v/2-m/2,g=u[d],_=y-p[c]-u[f],x=y/2-p[c]/2+b,w=He(g,x,_),L=l;r.modifiersData[n]=((t={})[L]=w,t.centerOffset=w-x,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&De(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ue(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function qe(e){return[ae,se,ie,le].some(function(t){return e[t]>=0})}var $e=xe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=void 0===o||o,i=n.resize,s=void 0===i||i,l=D(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(e){e.addEventListener("scroll",r.update,we)}),s&&l.addEventListener("resize",r.update,we),function(){a&&c.forEach(function(e){e.removeEventListener("scroll",r.update,we)}),s&&l.removeEventListener("resize",r.update,we)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=je({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,a=r.adaptive,i=void 0===a||a,s=r.roundOffsets,l=void 0===s||s,c={placement:Le(t.placement),variation:Ee(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ae(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ae(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},Pe,Se,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=void 0===o||o,i=r.altAxis,s=void 0===i||i,l=r.fallbackPlacements,c=r.padding,u=r.boundary,p=r.rootBoundary,d=r.altBoundary,f=r.flipVariations,v=void 0===f||f,m=r.allowedAutoPlacements,h=t.options.placement,y=Le(h),b=l||(y===h||!v?[Me(h)]:function(e){if(Le(e)===ce)return[];var t=Me(e);return[Te(e),t,Te(t)]}(h)),g=[h].concat(b).reduce(function(e,r){return e.concat(Le(r)===ce?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,i=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?he:l,u=Ee(n),p=u?s?me:me.filter(function(e){return Ee(e)===u}):ue,d=p.filter(function(e){return c.indexOf(e)>=0});0===d.length&&(d=p);var f=d.reduce(function(t,r){return t[r]=We(e,{placement:r,boundary:o,rootBoundary:a,padding:i})[Le(r)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}(t,{placement:r,boundary:u,rootBoundary:p,padding:c,flipVariations:v,allowedAutoPlacements:m}):r)},[]),_=t.rects.reference,x=t.rects.popper,w=new Map,L=!0,E=g[0],O=0;O<g.length;O++){var j=g[O],k=Le(j),A=Ee(j)===pe,P=[ae,ie].indexOf(k)>=0,S=P?"width":"height",C=We(t,{placement:j,boundary:u,rootBoundary:p,altBoundary:d,padding:c}),M=P?A?se:le:A?ie:ae;_[S]>x[S]&&(M=Me(M));var B=Me(M),T=[];if(a&&T.push(C[k]<=0),s&&T.push(C[M]<=0,C[B]<=0),T.every(function(e){return e})){E=j,L=!1;break}w.set(j,T)}if(L)for(var D=function(e){var t=g.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return E=t,"break"},N=v?3:1;N>0;N--){if("break"===D(N))break}t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Ie,Ve,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=We(t,{elementContext:"reference"}),s=We(t,{altBoundary:!0}),l=Ue(i,n),c=Ue(s,o,a),u=qe(l),p=qe(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}}]}),Ge="tippy-content",Xe="tippy-backdrop",Je="tippy-arrow",Ye="tippy-svg-arrow",Ke={passive:!0,capture:!0},Qe=function(){return document.body};function et(e,t,r){if(Array.isArray(e)){var n=e[t];return null==n?Array.isArray(r)?r[t]:r:n}return e}function tt(e,t){var r={}.toString.call(e);return 0===r.indexOf("[object")&&r.indexOf(t+"]")>-1}function rt(e,t){return"function"==typeof e?e.apply(void 0,t):e}function nt(e,t){return 0===t?e:function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)};var r}function ot(e){return[].concat(e)}function at(e,t){-1===e.indexOf(t)&&e.push(t)}function it(e){return e.split("-")[0]}function st(e){return[].slice.call(e)}function lt(e){return Object.keys(e).reduce(function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t},{})}function ct(){return document.createElement("div")}function ut(e){return["Element","Fragment"].some(function(t){return tt(e,t)})}function pt(e){return tt(e,"MouseEvent")}function dt(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function ft(e){return ut(e)?[e]:function(e){return tt(e,"NodeList")}(e)?st(e):Array.isArray(e)?e:st(document.querySelectorAll(e))}function vt(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function mt(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function ht(e){var t,r=ot(e)[0];return null!=r&&null!=(t=r.ownerDocument)&&t.body?r.ownerDocument:document}function yt(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,r)})}function bt(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=null==r.getRootNode||null==(n=r.getRootNode())?void 0:n.host}return!1}var gt={isTouch:!1},_t=0;function xt(){gt.isTouch||(gt.isTouch=!0,window.performance&&document.addEventListener("mousemove",wt))}function wt(){var e=performance.now();e-_t<20&&(gt.isTouch=!1,document.removeEventListener("mousemove",wt)),_t=e}function Lt(){var e=document.activeElement;if(dt(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Et=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Ot={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},jt=Object.assign({appendTo:Qe,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ot,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),kt=Object.keys(jt);function At(e){var t=(e.plugins||[]).reduce(function(t,r){var n,o=r.name,a=r.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(n=jt[o])?n:a);return t},{});return Object.assign({},e,t)}function Pt(e,t){var r=Object.assign({},t,{content:rt(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(At(Object.assign({},jt,{plugins:t}))):kt).reduce(function(t,r){var n=(e.getAttribute("data-tippy-"+r)||"").trim();if(!n)return t;if("content"===r)t[r]=n;else try{t[r]=JSON.parse(n)}catch(e){t[r]=n}return t},{})}(e,t.plugins));return r.aria=Object.assign({},jt.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?t.interactive:r.aria.expanded,content:"auto"===r.aria.content?t.interactive?null:"describedby":r.aria.content},r}function St(e,t){e.innerHTML=t}function Ct(e){var t=ct();return!0===e?t.className=Je:(t.className=Ye,ut(e)?t.appendChild(e):St(t,e)),t}function Mt(e,t){ut(t.content)?(St(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?St(e,t.content):e.textContent=t.content)}function Bt(e){var t=e.firstElementChild,r=st(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(Ge)}),arrow:r.find(function(e){return e.classList.contains(Je)||e.classList.contains(Ye)}),backdrop:r.find(function(e){return e.classList.contains(Xe)})}}function Tt(e){var t=ct(),r=ct();r.className="tippy-box",r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=ct();function o(r,n){var o=Bt(t),a=o.box,i=o.content,s=o.arrow;n.theme?a.setAttribute("data-theme",n.theme):a.removeAttribute("data-theme"),"string"==typeof n.animation?a.setAttribute("data-animation",n.animation):a.removeAttribute("data-animation"),n.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?a.setAttribute("role",n.role):a.removeAttribute("role"),r.content===n.content&&r.allowHTML===n.allowHTML||Mt(i,e.props),n.arrow?s?r.arrow!==n.arrow&&(a.removeChild(s),a.appendChild(Ct(n.arrow))):a.appendChild(Ct(n.arrow)):s&&a.removeChild(s)}return n.className=Ge,n.setAttribute("data-state","hidden"),Mt(n,e.props),t.appendChild(r),r.appendChild(n),o(e.props,e.props),{popper:t,onUpdate:o}}Tt.$$tippy=!0;var Dt=1,Nt=[],Rt=[];function Zt(e,t){var r,n,o,a,i,s,l,c,u=Pt(e,Object.assign({},jt,At(lt(t)))),p=!1,d=!1,f=!1,v=!1,m=[],h=nt($,u.interactiveDebounce),y=Dt++,b=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),g={id:y,reference:e,popper:ct(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(n),cancelAnimationFrame(o)},setProps:function(t){0;if(g.state.isDestroyed)return;B("onBeforeUpdate",[g,t]),U();var r=g.props,n=Pt(e,Object.assign({},r,lt(t),{ignoreAttributes:!0}));g.props=n,V(),r.interactiveDebounce!==n.interactiveDebounce&&(N(),h=nt($,n.interactiveDebounce));r.triggerTarget&&!n.triggerTarget?ot(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded");D(),M(),w&&w(r,n);g.popperInstance&&(Y(),Q().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));B("onAfterUpdate",[g,t])},setContent:function(e){g.setProps({content:e})},show:function(){0;var e=g.state.isVisible,t=g.state.isDestroyed,r=!g.state.isEnabled,n=gt.isTouch&&!g.props.touch,o=et(g.props.duration,0,jt.duration);if(e||t||r||n)return;if(A().hasAttribute("disabled"))return;if(B("onShow",[g],!1),!1===g.props.onShow(g))return;g.state.isVisible=!0,k()&&(x.style.visibility="visible");M(),F(),g.state.isMounted||(x.style.transition="none");if(k()){var a=S();vt([a.box,a.content],0)}s=function(){var e;if(g.state.isVisible&&!v){if(v=!0,x.offsetHeight,x.style.transition=g.props.moveTransition,k()&&g.props.animation){var t=S(),r=t.box,n=t.content;vt([r,n],o),mt([r,n],"visible")}T(),D(),at(Rt,g),null==(e=g.popperInstance)||e.forceUpdate(),B("onMount",[g]),g.props.animation&&k()&&function(e,t){H(e,t)}(o,function(){g.state.isShown=!0,B("onShown",[g])})}},function(){var e,t=g.props.appendTo,r=A();e=g.props.interactive&&t===Qe||"parent"===t?r.parentNode:rt(t,[r]);e.contains(x)||e.appendChild(x);g.state.isMounted=!0,Y(),!1}()},hide:function(){0;var e=!g.state.isVisible,t=g.state.isDestroyed,r=!g.state.isEnabled,n=et(g.props.duration,1,jt.duration);if(e||t||r)return;if(B("onHide",[g],!1),!1===g.props.onHide(g))return;g.state.isVisible=!1,g.state.isShown=!1,v=!1,p=!1,k()&&(x.style.visibility="hidden");if(N(),W(),M(!0),k()){var o=S(),a=o.box,i=o.content;g.props.animation&&(vt([a,i],n),mt([a,i],"hidden"))}T(),D(),g.props.animation?k()&&function(e,t){H(e,function(){!g.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()})}(n,g.unmount):g.unmount()},hideWithInteractivity:function(e){0;P().addEventListener("mousemove",h),at(Nt,h),h(e)},enable:function(){g.state.isEnabled=!0},disable:function(){g.hide(),g.state.isEnabled=!1},unmount:function(){0;g.state.isVisible&&g.hide();if(!g.state.isMounted)return;K(),Q().forEach(function(e){e._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x);Rt=Rt.filter(function(e){return e!==g}),g.state.isMounted=!1,B("onHidden",[g])},destroy:function(){0;if(g.state.isDestroyed)return;g.clearDelayTimeouts(),g.unmount(),U(),delete e._tippy,g.state.isDestroyed=!0,B("onDestroy",[g])}};if(!u.render)return g;var _=u.render(g),x=_.popper,w=_.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+g.id,g.popper=x,e._tippy=g,x._tippy=g;var L=b.map(function(e){return e.fn(g)}),E=e.hasAttribute("aria-expanded");return V(),D(),M(),B("onCreate",[g]),u.showOnCreate&&ee(),x.addEventListener("mouseenter",function(){g.props.interactive&&g.state.isVisible&&g.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){g.props.interactive&&g.props.trigger.indexOf("mouseenter")>=0&&P().addEventListener("mousemove",h)}),g;function O(){var e=g.props.touch;return Array.isArray(e)?e:[e,0]}function j(){return"hold"===O()[0]}function k(){var e;return!(null==(e=g.props.render)||!e.$$tippy)}function A(){return l||e}function P(){var e=A().parentNode;return e?ht(e):document}function S(){return Bt(x)}function C(e){return g.state.isMounted&&!g.state.isVisible||gt.isTouch||a&&"focus"===a.type?0:et(g.props.delay,e?0:1,jt.delay)}function M(e){void 0===e&&(e=!1),x.style.pointerEvents=g.props.interactive&&!e?"":"none",x.style.zIndex=""+g.props.zIndex}function B(e,t,r){var n;(void 0===r&&(r=!0),L.forEach(function(r){r[e]&&r[e].apply(r,t)}),r)&&(n=g.props)[e].apply(n,t)}function T(){var t=g.props.aria;if(t.content){var r="aria-"+t.content,n=x.id;ot(g.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(r);if(g.state.isVisible)e.setAttribute(r,t?t+" "+n:n);else{var o=t&&t.replace(n,"").trim();o?e.setAttribute(r,o):e.removeAttribute(r)}})}}function D(){!E&&g.props.aria.expanded&&ot(g.props.triggerTarget||e).forEach(function(e){g.props.interactive?e.setAttribute("aria-expanded",g.state.isVisible&&e===A()?"true":"false"):e.removeAttribute("aria-expanded")})}function N(){P().removeEventListener("mousemove",h),Nt=Nt.filter(function(e){return e!==h})}function R(t){if(!gt.isTouch||!f&&"mousedown"!==t.type){var r=t.composedPath&&t.composedPath()[0]||t.target;if(!g.props.interactive||!bt(x,r)){if(ot(g.props.triggerTarget||e).some(function(e){return bt(e,r)})){if(gt.isTouch)return;if(g.state.isVisible&&g.props.trigger.indexOf("click")>=0)return}else B("onClickOutside",[g,t]);!0===g.props.hideOnClick&&(g.clearDelayTimeouts(),g.hide(),d=!0,setTimeout(function(){d=!1}),g.state.isMounted||W())}}}function Z(){f=!0}function z(){f=!1}function F(){var e=P();e.addEventListener("mousedown",R,!0),e.addEventListener("touchend",R,Ke),e.addEventListener("touchstart",z,Ke),e.addEventListener("touchmove",Z,Ke)}function W(){var e=P();e.removeEventListener("mousedown",R,!0),e.removeEventListener("touchend",R,Ke),e.removeEventListener("touchstart",z,Ke),e.removeEventListener("touchmove",Z,Ke)}function H(e,t){var r=S().box;function n(e){e.target===r&&(yt(r,"remove",n),t())}if(0===e)return t();yt(r,"remove",i),yt(r,"add",n),i=n}function I(t,r,n){void 0===n&&(n=!1),ot(g.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,r,n),m.push({node:e,eventType:t,handler:r,options:n})})}function V(){var e;j()&&(I("touchstart",q,{passive:!0}),I("touchend",G,{passive:!0})),(e=g.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(I(e,q),e){case"mouseenter":I("mouseleave",G);break;case"focus":I(Et?"focusout":"blur",X);break;case"focusin":I("focusout",X)}})}function U(){m.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,o=e.options;t.removeEventListener(r,n,o)}),m=[]}function q(e){var t,r=!1;if(g.state.isEnabled&&!J(e)&&!d){var n="focus"===(null==(t=a)?void 0:t.type);a=e,l=e.currentTarget,D(),!g.state.isVisible&&pt(e)&&Nt.forEach(function(t){return t(e)}),"click"===e.type&&(g.props.trigger.indexOf("mouseenter")<0||p)&&!1!==g.props.hideOnClick&&g.state.isVisible?r=!0:ee(e),"click"===e.type&&(p=!r),r&&!n&&te(e)}}function $(e){var t=e.target,r=A().contains(t)||x.contains(t);if("mousemove"!==e.type||!r){var n=Q().concat(x).map(function(e){var t,r=null==(t=e._tippy.popperInstance)?void 0:t.state;return r?{popperRect:e.getBoundingClientRect(),popperState:r,props:u}:null}).filter(Boolean);(function(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,i=it(o.placement),s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===i?s.top.y:0,c="top"===i?s.bottom.y:0,u="right"===i?s.left.x:0,p="left"===i?s.right.x:0,d=t.top-n+l>a,f=n-t.bottom-c>a,v=t.left-r+u>a,m=r-t.right-p>a;return d||f||v||m})})(n,e)&&(N(),te(e))}}function G(e){J(e)||g.props.trigger.indexOf("click")>=0&&p||(g.props.interactive?g.hideWithInteractivity(e):te(e))}function X(e){g.props.trigger.indexOf("focusin")<0&&e.target!==A()||g.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||te(e)}function J(e){return!!gt.isTouch&&j()!==e.type.indexOf("touch")>=0}function Y(){K();var t=g.props,r=t.popperOptions,n=t.placement,o=t.offset,a=t.getReferenceClientRect,i=t.moveTransition,l=k()?Bt(x).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||A()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(k()){var r=S().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?r.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?r.setAttribute("data-"+e,""):r.removeAttribute("data-"+e)}),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},u];k()&&l&&p.push({name:"arrow",options:{element:l,padding:3}}),p.push.apply(p,(null==r?void 0:r.modifiers)||[]),g.popperInstance=$e(c,x,Object.assign({},r,{placement:n,onFirstUpdate:s,modifiers:p}))}function K(){g.popperInstance&&(g.popperInstance.destroy(),g.popperInstance=null)}function Q(){return st(x.querySelectorAll("[data-tippy-root]"))}function ee(e){g.clearDelayTimeouts(),e&&B("onTrigger",[g,e]),F();var t=C(!0),n=O(),o=n[0],a=n[1];gt.isTouch&&"hold"===o&&a&&(t=a),t?r=setTimeout(function(){g.show()},t):g.show()}function te(e){if(g.clearDelayTimeouts(),B("onUntrigger",[g,e]),g.state.isVisible){if(!(g.props.trigger.indexOf("mouseenter")>=0&&g.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=C(!1);t?n=setTimeout(function(){g.state.isVisible&&g.hide()},t):o=requestAnimationFrame(function(){g.hide()})}}else W()}}function zt(e,t){void 0===t&&(t={});var r=jt.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",xt,Ke),window.addEventListener("blur",Lt);var n=Object.assign({},t,{plugins:r}),o=ft(e).reduce(function(e,t){var r=t&&Zt(t,n);return r&&e.push(r),e},[]);return ut(e)?o[0]:o}zt.defaultProps=jt,zt.setDefaultProps=function(e){Object.keys(e).forEach(function(t){jt[t]=e[t]})},zt.currentInput=gt;Object.assign({},Pe,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}});zt.setDefaultProps({render:Tt});const Ft=zt;var Wt=r(6087);const Ht=({children:e,value:t})=>Wt.createElement("div",{className:"colorpalette-color-label"},Wt.createElement("span",null,e),Wt.createElement("span",{className:"component-color-indicator","aria-label":`Color: ${t}`,style:{background:t}})),It=new(t())("_"),Vt=({attributes:e,setAttributes:t,colors:r})=>{const o=a()(e),c=It.object(o),[u,p]=(0,n.useState)(c.customSettings);e.transformation_crop||(e.transformation_crop="pad",e.transformation_background="rgb:FFFFFF"),"fill"===e.transformation_crop&&delete e.transformation_background;const d=(e,r)=>{const n={[r]:T(e)};t(n)},f=(e=>{const[t,r]=(0,n.useState)(null),o=(0,n.useCallback)(e=>r(e),[]);return(0,n.useEffect)(()=>{if(!t)return;const r=Ft(t,{content:e});return()=>{r?.destroy()}},[t,e]),o})((0,i.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary"));return Wt.createElement(Wt.Fragment,null,Wt.createElement(s.PanelBody,{title:(0,i.__)("Layout","cloudinary")},v.map(r=>Wt.createElement(B,{key:`${r.value.type}-${r.value.columns}-layout`,value:r.value,onChange:e=>{t({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:r.icon,current:{type:e.displayProps_mode,columns:e.displayProps_columns||1}},r.label))),Wt.createElement(s.PanelBody,{title:(0,i.__)("Color Palette","cloudinary"),initialOpen:!1},Wt.createElement(Ht,{value:e.themeProps_primary},(0,i.__)("Primary","cloudinary")),Wt.createElement(l.ColorPalette,{value:e.themeProps_primary,colors:r,disableCustomColors:!1,onChange:e=>d(e,"themeProps_primary")}),Wt.createElement(Ht,{value:e.themeProps_onPrimary},(0,i.__)("On Primary","cloudinary")),Wt.createElement(l.ColorPalette,{value:e.themeProps_onPrimary,colors:r,disableCustomColors:!1,onChange:e=>d(e,"themeProps_onPrimary")}),Wt.createElement(Ht,{value:e.themeProps_active},(0,i.__)("Active","cloudinary")),Wt.createElement(l.ColorPalette,{value:e.themeProps_active,colors:r,disableCustomColors:!1,onChange:e=>d(e,"themeProps_active")})),"classic"===e.displayProps_mode&&Wt.createElement(s.PanelBody,{title:(0,i.__)("Fade Transition","cloudinary"),initialOpen:!1},Wt.createElement(s.SelectControl,{value:e.transition,options:h,onChange:e=>t({transition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})),Wt.createElement(s.PanelBody,{title:(0,i.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1},Wt.createElement(s.SelectControl,{label:(0,i.__)("Aspect Ratio","cloudinary"),value:e.aspectRatio,options:m,onChange:e=>t({aspectRatio:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Wt.createElement("p",null,Wt.createElement("div",{className:"cld-ui-title"},(0,i.__)("Resize/Crop Mode","cloudinary"),Wt.createElement("span",{className:"dashicons dashicons-info cld-tooltip",ref:f})),Wt.createElement(s.ButtonGroup,null,A.map(r=>Wt.createElement(s.Button,{key:r.value+"-look-and-feel",variant:"secondary",isSecondary:!0,isPressed:r.value===e.transformation_crop,onClick:()=>t({transformation_crop:r.value,transformation_background:null})},r.label)))),"pad"===e.transformation_crop&&Wt.createElement(s.SelectControl,{label:(0,i.__)("Pad style","cloudinary"),value:e.transformation_background,options:P,onChange:e=>{t({transformation_background:e})},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Wt.createElement("p",null,(0,i.__)("Navigation","cloudinary")),Wt.createElement("p",null,Wt.createElement(s.ButtonGroup,null,y.map(r=>Wt.createElement(s.Button,{key:r.value+"-navigation",variant:"secondary",isSecondary:!0,isPressed:r.value===e.navigation,onClick:()=>t({navigation:r.value})},r.label)))),Wt.createElement("div",{style:{marginTop:"30px"}},Wt.createElement(s.ToggleControl,{label:(0,i.__)("Show Zoom","cloudinary"),checked:e.zoom,onChange:()=>t({zoom:!e.zoom}),__nextHasNoMarginBottom:!0}),e.zoom&&Wt.createElement(Wt.Fragment,null,Wt.createElement("p",null,(0,i.__)("Zoom Type","cloudinary")),Wt.createElement("p",null,Wt.createElement(s.ButtonGroup,null,b.map(r=>Wt.createElement(s.Button,{key:r.value+"-zoom-type",variant:"secondary",isSecondary:!0,isPressed:r.value===e.zoomProps_type,onClick:()=>t({zoomProps_type:r.value})},r.label)))),"flyout"===e.zoomProps_type&&Wt.createElement(s.SelectControl,{label:(0,i.__)("Zoom Viewer Position","cloudinary"),value:e.zoomProps_viewerPosition,options:g,onChange:e=>t({zoomProps_viewerPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"popup"!==e.zoomProps_type&&Wt.createElement(Wt.Fragment,null,Wt.createElement("p",null,(0,i.__)("Zoom Trigger","cloudinary")),Wt.createElement("p",null,Wt.createElement(s.ButtonGroup,null,_.map(r=>Wt.createElement(s.Button,{key:r.value+"-zoom-trigger",variant:"secondary",isSecondary:!0,isPressed:r.value===e.zoomProps_trigger,onClick:()=>t({zoomProps_trigger:r.value})},r.label)))))))),Wt.createElement(s.PanelBody,{title:(0,i.__)("Carousel Parameters","cloudinary"),initialOpen:!1},Wt.createElement("p",null,(0,i.__)("Carousel Location","cloudinary")),Wt.createElement("p",null,Wt.createElement(s.ButtonGroup,null,x.map(r=>Wt.createElement(s.Button,{key:r.value+"-carousel-location",variant:"secondary",isSecondary:!0,isPressed:r.value===e.carouselLocation,onClick:()=>t({carouselLocation:r.value})},r.label)))),Wt.createElement(s.RangeControl,{label:(0,i.__)("Carousel Offset","cloudinary"),value:e.carouselOffset,onChange:e=>t({carouselOffset:e}),min:0,max:100,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Wt.createElement("p",null,(0,i.__)("Carousel Style","cloudinary")),Wt.createElement("p",null,Wt.createElement(s.ButtonGroup,null,w.map(r=>Wt.createElement(s.Button,{key:r.value+"-carousel-style",variant:"secondary",isSecondary:!0,isPressed:r.value===e.carouselStyle,onClick:()=>t({carouselStyle:r.value})},r.label)))),"thumbnails"===e.carouselStyle&&Wt.createElement(Wt.Fragment,null,Wt.createElement(s.RangeControl,{label:(0,i.__)("Width","cloudinary"),value:e.thumbnailProps_width,onChange:e=>t({thumbnailProps_width:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Wt.createElement(s.RangeControl,{label:(0,i.__)("Height","cloudinary"),value:e.thumbnailProps_height,onChange:e=>t({thumbnailProps_height:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Wt.createElement("p",null,(0,i.__)("Navigation Button Shape","cloudinary")),L.map(r=>Wt.createElement(B,{key:r.value+"-navigation-button-shape",value:r.value,onChange:e=>t({thumbnailProps_navigationShape:e}),icon:r.icon,current:e.thumbnailProps_navigationShape},r.label)),Wt.createElement("p",null,(0,i.__)("Selected Style","cloudinary")),Wt.createElement("p",null,Wt.createElement(s.ButtonGroup,null,O.map(r=>Wt.createElement(s.Button,{key:r.value+"-selected-style",variant:"secondary",isSecondary:!0,isPressed:r.value===e.thumbnailProps_selectedStyle,onClick:()=>t({thumbnailProps_selectedStyle:r.value})},r.label)))),Wt.createElement(s.SelectControl,{label:(0,i.__)("Selected Border Position","cloudinary"),value:e.thumbnailProps_selectedBorderPosition,options:j,onChange:e=>t({thumbnailProps_selectedBorderPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Wt.createElement(s.RangeControl,{label:(0,i.__)("Selected Border Width","cloudinary"),value:e.thumbnailProps_selectedBorderWidth,onChange:e=>t({thumbnailProps_selectedBorderWidth:e}),min:0,max:10,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),Wt.createElement("p",null,(0,i.__)("Media Shape Icon","cloudinary")),k.map(r=>Wt.createElement(B,{key:r.value+"-media",value:r.value,onChange:e=>t({thumbnailProps_mediaSymbolShape:e}),icon:r.icon,current:e.thumbnailProps_mediaSymbolShape},r.label))),"indicators"===e.carouselStyle&&Wt.createElement(Wt.Fragment,null,Wt.createElement("p",null,(0,i.__)("Indicators Shape","cloudinary")),E.map(r=>Wt.createElement(B,{key:r.value+"-indicator",value:r.value,onChange:e=>t({indicatorProps_shape:e}),icon:r.icon,current:e.indicatorProps_shape},r.label)))),Wt.createElement(s.PanelBody,{title:(0,i.__)("Additional Settings","cloudinary"),initialOpen:!1},Wt.createElement(s.TextareaControl,{label:(0,i.__)("Custom Settings","cloudinary"),help:(0,i.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:u,onChange:e=>{let r={};p(e);try{r=JSON.parse(e)}catch(e){}if("object"==typeof r){const e={...c};e.customSettings=r,t({...c,...e})}},__nextHasNoMarginBottom:!0})))};var Ut=r(6087);const{cloudName:qt,mediaAssets:$t,...Gt}=(e=>{const t={};return Object.keys(e).forEach(r=>{t[r]={type:typeof e[r],default:e[r]}}),t})(new(t())("_").dot(CLD_GALLERY_CONFIG)),Xt={};Object.keys(Gt).forEach(e=>{Xt[e]=Gt[e]?.default});const Jt=e=>({cloudName:"demo",...e,mediaAssets:[{tag:"shoes_product_gallery_demo",mediaType:"image"}],container:".gallery-preview"}),Yt=document.querySelector("#cloudinary-settings-page form");void 0!==Yt&&Yt.addEventListener("submit",function(e){(!e.submitter.name||e.submitter.name&&"cld_submission"!==e.submitter.name)&&e.preventDefault()});const Kt=()=>{const[e,r]=(0,n.useState)(Xt),o=CLD_THEME_COLORS.map(e=>({...e,color:T(e.color)})).filter(e=>0!==e.color.length);return(0,n.useEffect)(()=>{let r,n;const o=(e=>{const r=new(t())("_"),n=a()(e),{selectedImages:o,...i}=r.object(n,{});return i.mediaAssets=o,"classic"!==i?.displayProps?.mode?delete i.transition:delete i.displayProps.columns,"pad"!==i?.transformation_crop&&delete i.transformation_background,"pad"!==i?.transformation?.crop&&delete i.transformation.background,i?.themeProps?.primary&&(i.themeProps.primary=T(i?.themeProps?.primary)),i?.themeProps?.onPrimary&&(i.themeProps.onPrimary=T(i?.themeProps?.onPrimary)),i?.themeProps?.active&&(i.themeProps.active=T(i?.themeProps?.active)),i})(e),{customSettings:i,...s}=o;try{try{n=JSON.parse(i)}catch{n=i}r=cloudinary.galleryWidget(Jt({...s,...n}))}catch{r=cloudinary.galleryWidget(Jt(s))}r.render();const l=document.getElementById("gallery_settings_input");return l&&(l.value=JSON.stringify(o)),()=>r.destroy()}),Ut.createElement("div",{className:"cld-gallery-settings-container"},Ut.createElement("div",{className:"cld-gallery-settings"},Ut.createElement("div",{className:"interface-interface-skeleton__sidebar cld-gallery-settings__column"},Ut.createElement("div",{className:"interface-complementary-area edit-post-sidebar"},Ut.createElement("div",{className:"components-panel"},Ut.createElement("div",{className:"block-editor-block-inspector"},Ut.createElement(Vt,{attributes:e,setAttributes:t=>{r({...e,...t})},colors:o}))))),Ut.createElement("div",{className:"gallery-preview cld-gallery-settings__column"})))},Qt=document.getElementById("app_gallery_gallery_config");n.createRoot?(0,n.createRoot)(Qt).render(Ut.createElement(Kt,null)):(0,n.render)(Ut.createElement(Kt,null),Qt)})()})(); 2 //# sourceMappingURL=gallery.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/inline-loader.asset.php
r3454408 r3518458 1 <?php return array('dependencies' => array(), 'version' => ' 3a26d9a7f786a21ffdd9');1 <?php return array('dependencies' => array(), 'version' => '11b32a5cda03df3ea9b9'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/inline-loader.js
r3454408 r3518458 1 !function(){"use strict";const e=e=>Math.round(2*e)/2,t={deviceDensity:window.devicePixelRatio?window.devicePixelRatio:"auto",density:null,config:CLDLB||{},lazyThreshold:0,enabled:!1,sizeBands:[],iObserver:null,pObserver:null,rObserver:null,aboveFold:!0,minPlaceholderThreshold:500,bind(e){e.CLDbound=!0,this.enabled||this._init();const t=e.dataset.size.split(" ");e.originalWidth=t[0],e.originalHeight=t[1],this.pObserver?(this.aboveFold&&this.inInitialView(e)?this.buildImage(e):(this.pObserver.observe(e),this.iObserver.observe(e)),e.addEventListener("error",(t=>{e.srcset="",e.src='data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="rgba(0,0,0,0.1)"/><text x="50%" y="50%" fill="red" text-anchor="middle" dominant-baseline="middle">%26%23x26A0%3B︎</text></svg>',this.rObserver.unobserve(e)}))):this.setupFallback(e)},buildImage(e){e.dataset.srcset?(e.cld_loaded=!0,e.srcset=e.dataset.srcset):(e.src=this.getSizeURL(e),e.dataset.responsive&&this.rObserver.observe(e))},inInitialView(e){const t=e.getBoundingClientRect();return this.aboveFold=t.top<window.innerHeight+this.lazyThreshold,this.aboveFold},setupFallback(e){const t=[];this.sizeBands.forEach((i=>{if(i<=e.originalWidth){let s=this.getSizeURL(e,i,!0)+` ${i}w`;-1===t.indexOf(s)&&t.push(s)}})),e.srcset=t.join(","),e.sizes=`(max-width: ${e.originalWidth}px) 100vw, ${e.originalWidth}px`},_init(){this.enabled=!0,this._calcThreshold(),this._getDensity();let e=parseInt(this.config.max_width);const t=parseInt(this.config.min_width),i=parseInt(this.config.pixel_step);for(;e-i>=t;)e-=i,this.sizeBands.push(e);"undefined"!=typeof IntersectionObserver&&this._setupObservers(),this.enabled=!0},_setupObservers(){const e={rootMargin:this.lazyThreshold+"px 0px "+this.lazyThreshold+"px 0px"},t=this.minPlaceholderThreshold<2*this.lazyThreshold?2*this.lazyThreshold:this.minPlaceholderThreshold,i={rootMargin:t+"px 0px "+t+"px 0px"};this.rObserver=new ResizeObserver(((e,t)=>{e.forEach((e=>{e.target.cld_loaded&&e.contentRect.width>=e.target.cld_loaded&&(e.target.src=this.getSizeURL(e.target))}))})),this.iObserver=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(this.buildImage(e.target),t.unobserve(e.target),this.pObserver.unobserve(e.target))}))}),e),this.pObserver=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(e.target.src=this.getPlaceholderURL(e.target),t.unobserve(e.target))}))}),i)},_calcThreshold(){const e=this.config.lazy_threshold.replace(/[^0-9]/g,"");let t=0;switch(this.config.lazy_threshold.replace(/[0-9]/g,"").toLowerCase()){case"em":t=parseFloat(getComputedStyle(document.body).fontSize)*e;break;case"rem":t=parseFloat(getComputedStyle(document.documentElement).fontSize)*e;break;case"vh":t=window.innerHeight/e*100;break;default:t=e}this.lazyThreshold=parseInt(t,10)},_getDensity(){let t=this.config.dpr?this.config.dpr.replace("X",""):"off";if("off"===t)return this.density=1,1;let i=this.deviceDensity;"auto"!==i&&(i=e(i)),"max"!==t&&"auto"!==i&&(t=parseFloat(t),t=e(t),i=i>Math.ceil(t)?t:i),this.density=i},scaleWidth(e,t,i){const s=parseInt(this.config.max_width),r=Math.round(s/i);if(!t){t=e.width;let a=Math.round(t/i);for(;-1===this.sizeBands.indexOf(t)&&a<r&&t<s;)t++,a=Math.round(t/i)}return t>s&&(t=s),e.originalWidth<t&&(t=e.originalWidth),t},scaleSize(e,t,i){const s=e.dataset.crop?parseFloat(e.dataset.crop):(e.originalWidth/e.originalHeight).toFixed(2),r=this.scaleWidth(e,t,s),a=Math.round(r/s),o=[];return e.dataset.transformationCrop?o.push(e.dataset.transformationCrop):e.dataset.crop||(o.push(e.dataset.crop?"c_fill":"c_scale"),e.dataset.crop&&o.push("g_auto")),o.push("w_"+r),o.push("h_"+a),i&&1!==this.density&&o.push("dpr_"+this.density),e.cld_loaded=r,{transformation:o.join(","),nameExtension:r+"x"+a}},getDeliveryMethod:e=>e.dataset.seo&&"upload"===e.dataset.delivery?"images":"image/"+e.dataset.delivery,getSizeURL(e,t){const i=this.scaleSize(e,t,!0);return[this.config.base_url,this.getDeliveryMethod(e),"upload"===e.dataset.delivery?i.transformation:"",e.dataset.transformations,"v"+e.dataset.version,e.dataset.publicId+"?_i=AA"].filter(this.empty).join("/")},getPlaceholderURL(e){e.cld_placehold=!0;const t=this.scaleSize(e,null,!1);return[this.config.base_url,this.getDeliveryMethod(e),t.transformation,this.config.placeholder,e.dataset.publicId].filter(this.empty).join("/")},empty:e=>void 0!==e&&0!==e.length};window.CLDBind=e=>{e.CLDbound||t.bind(e)},window.initFallback=()=>{[...document.querySelectorAll('img[data-cloudinary="lazy"]')].forEach((e=>{CLDBind(e)}))},window.addEventListener("load",(()=>{initFallback()})),document.querySelector('script[src*="?cloudinary_lazy_load_loader"]')&&initFallback()}(); 1 (()=>{"use strict";const e=e=>Math.round(2*e)/2,t={deviceDensity:window.devicePixelRatio?window.devicePixelRatio:"auto",density:null,config:CLDLB||{},lazyThreshold:0,enabled:!1,sizeBands:[],iObserver:null,pObserver:null,rObserver:null,aboveFold:!0,minPlaceholderThreshold:500,bind(e){e.CLDbound=!0,this.enabled||this._init();const t=e.dataset.size.split(" ");e.originalWidth=t[0],e.originalHeight=t[1],this.pObserver?(this.aboveFold&&this.inInitialView(e)?this.buildImage(e):(this.pObserver.observe(e),this.iObserver.observe(e)),e.addEventListener("error",t=>{e.srcset="",e.src='data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="rgba(0,0,0,0.1)"/><text x="50%" y="50%" fill="red" text-anchor="middle" dominant-baseline="middle">%26%23x26A0%3B︎</text></svg>',this.rObserver.unobserve(e)})):this.setupFallback(e)},buildImage(e){e.dataset.srcset?(e.cld_loaded=!0,e.srcset=e.dataset.srcset):(e.src=this.getSizeURL(e),e.dataset.responsive&&this.rObserver.observe(e))},inInitialView(e){const t=e.getBoundingClientRect();return this.aboveFold=t.top<window.innerHeight+this.lazyThreshold,this.aboveFold},setupFallback(e){const t=[];this.sizeBands.forEach(i=>{if(i<=e.originalWidth){let s=this.getSizeURL(e,i,!0)+` ${i}w`;-1===t.indexOf(s)&&t.push(s)}}),e.srcset=t.join(","),e.sizes=`(max-width: ${e.originalWidth}px) 100vw, ${e.originalWidth}px`},_init(){this.enabled=!0,this._calcThreshold(),this._getDensity();let e=parseInt(this.config.max_width);const t=parseInt(this.config.min_width),i=parseInt(this.config.pixel_step);for(;e-i>=t;)e-=i,this.sizeBands.push(e);"undefined"!=typeof IntersectionObserver&&this._setupObservers(),this.enabled=!0},_setupObservers(){const e={rootMargin:this.lazyThreshold+"px 0px "+this.lazyThreshold+"px 0px"},t=this.minPlaceholderThreshold<2*this.lazyThreshold?2*this.lazyThreshold:this.minPlaceholderThreshold,i={rootMargin:t+"px 0px "+t+"px 0px"};this.rObserver=new ResizeObserver((e,t)=>{e.forEach(e=>{e.target.cld_loaded&&e.contentRect.width>=e.target.cld_loaded&&(e.target.src=this.getSizeURL(e.target))})}),this.iObserver=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(this.buildImage(e.target),t.unobserve(e.target),this.pObserver.unobserve(e.target))})},e),this.pObserver=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.src=this.getPlaceholderURL(e.target),t.unobserve(e.target))})},i)},_calcThreshold(){const e=this.config.lazy_threshold.replace(/[^0-9]/g,"");let t=0;switch(this.config.lazy_threshold.replace(/[0-9]/g,"").toLowerCase()){case"em":t=parseFloat(getComputedStyle(document.body).fontSize)*e;break;case"rem":t=parseFloat(getComputedStyle(document.documentElement).fontSize)*e;break;case"vh":t=window.innerHeight/e*100;break;default:t=e}this.lazyThreshold=parseInt(t,10)},_getDensity(){let t=this.config.dpr?this.config.dpr.replace("X",""):"off";if("off"===t)return this.density=1,1;let i=this.deviceDensity;"auto"!==i&&(i=e(i)),"max"!==t&&"auto"!==i&&(t=parseFloat(t),t=e(t),i=i>Math.ceil(t)?t:i),this.density=i},scaleWidth(e,t,i){const s=parseInt(this.config.max_width),r=Math.round(s/i);if(!t){t=e.width;let a=Math.round(t/i);for(;-1===this.sizeBands.indexOf(t)&&a<r&&t<s;)t++,a=Math.round(t/i)}return t>s&&(t=s),e.originalWidth<t&&(t=e.originalWidth),t},scaleSize(e,t,i){const s=e.dataset.crop?parseFloat(e.dataset.crop):(e.originalWidth/e.originalHeight).toFixed(2),r=this.scaleWidth(e,t,s),a=Math.round(r/s),o=[];return e.dataset.transformationCrop?o.push(e.dataset.transformationCrop):e.dataset.crop||(o.push(e.dataset.crop?"c_fill":"c_scale"),e.dataset.crop&&o.push("g_auto")),o.push("w_"+r),o.push("h_"+a),i&&1!==this.density&&o.push("dpr_"+this.density),e.cld_loaded=r,{transformation:o.join(","),nameExtension:r+"x"+a}},getDeliveryMethod:e=>e.dataset.seo&&"upload"===e.dataset.delivery?"images":"image/"+e.dataset.delivery,getSizeURL(e,t){const i=this.scaleSize(e,t,!0);return[this.config.base_url,this.getDeliveryMethod(e),"upload"===e.dataset.delivery?i.transformation:"",e.dataset.transformations,"v"+e.dataset.version,e.dataset.publicId+"?_i=AA"].filter(this.empty).join("/")},getPlaceholderURL(e){e.cld_placehold=!0;const t=this.scaleSize(e,null,!1);return[this.config.base_url,this.getDeliveryMethod(e),t.transformation,this.config.placeholder,e.dataset.publicId].filter(this.empty).join("/")},empty:e=>void 0!==e&&0!==e.length};window.CLDBind=e=>{e.CLDbound||t.bind(e)},window.initFallback=()=>{[...document.querySelectorAll('img[data-cloudinary="lazy"]')].forEach(e=>{CLDBind(e)})},window.addEventListener("load",()=>{initFallback()}),document.querySelector('script[src*="?cloudinary_lazy_load_loader"]')&&initFallback()})(); 2 //# sourceMappingURL=inline-loader.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/lazy-load.asset.php
r3454408 r3518458 1 <?php return array('dependencies' => array(), 'version' => ' 2b871bf412f8d66d43d2');1 <?php return array('dependencies' => array(), 'version' => 'f9ca20744898bd9abaec'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/lazy-load.js
r3454408 r3518458 1 !function(){"use strict";const t=t=>Math.round(2*t)/2,i={deviceDensity:window.devicePixelRatio?window.devicePixelRatio:"auto",density:null,images:[],throttle:!1,config:CLDLB||{},lazyThreshold:0,_init(){this._calcThreshold(),[...document.images].forEach((t=>{if(!t.dataset.publicId)return;const i=t.dataset.size.split(" ");t.originalWidth=i[0],t.originalHeight=i[1],i[2]&&(t.crop=i[2]),this.images.push(t),t.addEventListener("error",(i=>{t.src='data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="rgba(0,0,0,0.1)"/><text x="50%" y="50%" fill="red" text-anchor="middle" dominant-baseline="middle">%26%23x26A0%3B︎</text></svg>';const e=this.images.indexOf(t);this.images.splice(e,1)}))})),window.addEventListener("resize",(()=>{this._throttle(this._build.bind(this),100,!0)})),window.addEventListener("scroll",(()=>{this._throttle(this._build.bind(this),100,!1)})),setTimeout((()=>this._build()),0)},_calcThreshold(){const t=this.config.lazy_threshold.replace(/[^0-9]/g,"");let i=0;switch(this.config.lazy_threshold.replace(/[0-9]/g,"").toLowerCase()){case"em":i=parseFloat(getComputedStyle(document.body).fontSize)*t;break;case"rem":i=parseFloat(getComputedStyle(document.documentElement).fontSize)*t;break;case"vh":i=window.innerHeight/t*100;break;default:i=t}this.lazyThreshold=window.innerHeight+parseInt(i,10)},_getDensity(){if(this.density)return this.density;let i=this.config.dpr?this.config.dpr.replace("X",""):"off";if("off"===i)return this.density=1,1;let e=this.deviceDensity;return"auto"!==e&&(e=t(e)),"max"!==i&&"auto"!==e&&(i=parseFloat(i),i=t(i),e=e>Math.ceil(i)?i:e),this.density=e,e},_throttle(t,i,e){this.throttle||setTimeout((()=>{t(e),this.throttle=!1}),i)},_build(t){this.images.forEach((i=>{!t&&i.cld_loaded||this.buildSize(i)}))},_shouldRebuild(t){const i=this.scaleWidth(t),e=t.getBoundingClientRect(),s="auto"!==this.density?this._getDensity():1;return e.top<this.lazyThreshold&&(i>t.naturalWidth/s||!t.cld_loaded)},_shouldPlacehold(t){const i=this.scaleWidth(t),e=t.getBoundingClientRect(),s="auto"!==this.density?this._getDensity():1;return this.config.placeholder&&!t.cld_loaded&&e.top<2*this.lazyThreshold&&(i>t.naturalWidth/s||!t.cld_placehold)},scaleWidth(t){const i=this.config.pixel_step,e=Math.floor((t.originalWidth-t.width)/i);let s=t.originalWidth-i*e;return s>t.originalWidth?s=t.originalWidth:this.config.max_width<s?s=this.config.max_width:this.config.min_width>s&&(s=this.config.min_width),s},scaleSize(t,i){const e=(t.originalWidth/t.originalHeight).toFixed(3),s=(t.width/t.height).toFixed(3),o=this.scaleWidth(t),a=[];t.width!==t.originalWidth&&a.push(e===s?"c_scale":"c_fill,g_auto");const h=Math.round(o/s);if(a.push("w_"+o),a.push("h_"+h),i){const t=this._getDensity();1!==t&&a.push("dpr_"+t)}return{transformation:a.join(","),nameExtension:o+"x"+h}},buildSize(t){this._shouldRebuild(t)?t.dataset.srcset?(t.cld_loaded=!0,t.srcset=t.dataset.srcset):t.src=this.getSizeURL(t):this._shouldPlacehold(t)&&(t.src=this.getPlaceholderURL(t))},getSizeURL(t){t.cld_loaded=!0;const i=this.scaleSize(t,!0),e="auto"!==this.config.image_format&&"none"!==this.config.image_format?this.config.image_format:t.dataset.format,s=t.dataset.publicId.split("/").pop();return[this.config.base_url,"images",i.transformation,t.dataset.transformations,t.dataset.publicId,s+"-"+i.nameExtension+"."+e+"?_i=AA"].filter(this.empty).join("/")},getPlaceholderURL(t){t.cld_placehold=!0;const i=this.scaleSize(t,!1);return[this.config.base_url,"images",i.transformation,this.config.placeholder,t.dataset.publicId,"placeholder"].filter(this.empty).join("/")},empty:t=>0!==t.length};window.addEventListener("load",(()=>{i._init()}))}(); 1 (()=>{"use strict";const t=t=>Math.round(2*t)/2,i={deviceDensity:window.devicePixelRatio?window.devicePixelRatio:"auto",density:null,images:[],throttle:!1,config:CLDLB||{},lazyThreshold:0,_init(){this._calcThreshold(),[...document.images].forEach(t=>{if(!t.dataset.publicId)return;const i=t.dataset.size.split(" ");t.originalWidth=i[0],t.originalHeight=i[1],i[2]&&(t.crop=i[2]),this.images.push(t),t.addEventListener("error",i=>{t.src='data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="rgba(0,0,0,0.1)"/><text x="50%" y="50%" fill="red" text-anchor="middle" dominant-baseline="middle">%26%23x26A0%3B︎</text></svg>';const e=this.images.indexOf(t);this.images.splice(e,1)})}),window.addEventListener("resize",()=>{this._throttle(this._build.bind(this),100,!0)}),window.addEventListener("scroll",()=>{this._throttle(this._build.bind(this),100,!1)}),setTimeout(()=>this._build(),0)},_calcThreshold(){const t=this.config.lazy_threshold.replace(/[^0-9]/g,"");let i=0;switch(this.config.lazy_threshold.replace(/[0-9]/g,"").toLowerCase()){case"em":i=parseFloat(getComputedStyle(document.body).fontSize)*t;break;case"rem":i=parseFloat(getComputedStyle(document.documentElement).fontSize)*t;break;case"vh":i=window.innerHeight/t*100;break;default:i=t}this.lazyThreshold=window.innerHeight+parseInt(i,10)},_getDensity(){if(this.density)return this.density;let i=this.config.dpr?this.config.dpr.replace("X",""):"off";if("off"===i)return this.density=1,1;let e=this.deviceDensity;return"auto"!==e&&(e=t(e)),"max"!==i&&"auto"!==e&&(i=parseFloat(i),i=t(i),e=e>Math.ceil(i)?i:e),this.density=e,e},_throttle(t,i,e){this.throttle||setTimeout(()=>{t(e),this.throttle=!1},i)},_build(t){this.images.forEach(i=>{!t&&i.cld_loaded||this.buildSize(i)})},_shouldRebuild(t){const i=this.scaleWidth(t),e=t.getBoundingClientRect(),s="auto"!==this.density?this._getDensity():1;return e.top<this.lazyThreshold&&(i>t.naturalWidth/s||!t.cld_loaded)},_shouldPlacehold(t){const i=this.scaleWidth(t),e=t.getBoundingClientRect(),s="auto"!==this.density?this._getDensity():1;return this.config.placeholder&&!t.cld_loaded&&e.top<2*this.lazyThreshold&&(i>t.naturalWidth/s||!t.cld_placehold)},scaleWidth(t){const i=this.config.pixel_step,e=Math.floor((t.originalWidth-t.width)/i);let s=t.originalWidth-i*e;return s>t.originalWidth?s=t.originalWidth:this.config.max_width<s?s=this.config.max_width:this.config.min_width>s&&(s=this.config.min_width),s},scaleSize(t,i){const e=(t.originalWidth/t.originalHeight).toFixed(3),s=(t.width/t.height).toFixed(3),o=this.scaleWidth(t),a=[];t.width!==t.originalWidth&&a.push(e===s?"c_scale":"c_fill,g_auto");const h=Math.round(o/s);if(a.push("w_"+o),a.push("h_"+h),i){const t=this._getDensity();1!==t&&a.push("dpr_"+t)}return{transformation:a.join(","),nameExtension:o+"x"+h}},buildSize(t){this._shouldRebuild(t)?t.dataset.srcset?(t.cld_loaded=!0,t.srcset=t.dataset.srcset):t.src=this.getSizeURL(t):this._shouldPlacehold(t)&&(t.src=this.getPlaceholderURL(t))},getSizeURL(t){t.cld_loaded=!0;const i=this.scaleSize(t,!0),e="auto"!==this.config.image_format&&"none"!==this.config.image_format?this.config.image_format:t.dataset.format,s=t.dataset.publicId.split("/").pop();return[this.config.base_url,"images",i.transformation,t.dataset.transformations,t.dataset.publicId,s+"-"+i.nameExtension+"."+e+"?_i=AA"].filter(this.empty).join("/")},getPlaceholderURL(t){t.cld_placehold=!0;const i=this.scaleSize(t,!1);return[this.config.base_url,"images",i.transformation,this.config.placeholder,t.dataset.publicId,"placeholder"].filter(this.empty).join("/")},empty:t=>0!==t.length};window.addEventListener("load",()=>{i._init()})})(); 2 //# sourceMappingURL=lazy-load.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/lazyload-preview.js
r3343538 r3518458 1 !function(){var e={604:function(e,t,r){var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return function(e,t){var r,n,s,a,l,c,u,h,d,p=1,f=e.length,g="";for(n=0;n<f;n++)if("string"==typeof e[n])g+=e[n];else if("object"==typeof e[n]){if((a=e[n]).keys)for(r=t[p],s=0;s<a.keys.length;s++){if(null==r)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[s],a.keys[s-1]));r=r[a.keys[s]]}else r=a.param_no?t[a.param_no]:t[p++];if(i.not_type.test(a.type)&&i.not_primitive.test(a.type)&&r instanceof Function&&(r=r()),i.numeric_arg.test(a.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(o("[sprintf] expecting number but found %T",r));switch(i.number.test(a.type)&&(h=r>=0),a.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a.width?parseInt(a.width):0);break;case"e":r=a.precision?parseFloat(r).toExponential(a.precision):parseFloat(r).toExponential();break;case"f":r=a.precision?parseFloat(r).toFixed(a.precision):parseFloat(r);break;case"g":r=a.precision?String(Number(r.toPrecision(a.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a.precision?r.substring(0,a.precision):r;break;case"t":r=String(!!r),r=a.precision?r.substring(0,a.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a.precision?r.substring(0,a.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a.precision?r.substring(0,a.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(a.type)?g+=r:(!i.number.test(a.type)||h&&!a.sign?d="":(d=h?"+":"-",r=r.toString().replace(i.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(d+r).length,l=a.width&&u>0?c.repeat(u):"",g+=a.align?d+r+l:"0"===c?d+l+r:l+d+r)}return g}(function(e){if(a[e])return a[e];var t,r=e,n=[],o=0;for(;r;){if(null!==(t=i.text.exec(r)))n.push(t[0]);else if(null!==(t=i.modulo.exec(r)))n.push("%");else{if(null===(t=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var s=[],l=t[2],c=[];if(null===(c=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=i.key_access.exec(l)))s.push(c[1]);else{if(null===(c=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}t[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return a[e]=n}(e),arguments)}function s(e,t){return o.apply(null,[e].concat(t||[]))}var a=Object.create(null);"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(t,r,t,e))||(e.exports=n))}()},616:function(e){e.exports=function(e,t){var r,n,i=0;function o(){var o,s,a=r,l=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(s=0;s<l;s++)if(a.args[s]!==arguments[s]){a=a.next;continue e}return a!==r&&(a===n&&(n=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=r,a.prev=null,r.prev=a,r=a),a.val}a=a.next}for(o=new Array(l),s=0;s<l;s++)o[s]=arguments[s];return a={args:o,val:e.apply(null,o)},r?(r.prev=a,a.next=r):n=a,i===t.maxSize?(n=n.prev).next=null:i++,r=a,a.val}return t=t||{},o.clear=function(){r=null,n=null,i=0},o}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e,t,n,i,o=r(616),s=r.n(o);r(604),s()(console.error);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}e={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},t=["(","?"],n={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var c={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};function u(r){var o=function(r){for(var o,s,a,l,c=[],u=[];o=r.match(i);){for(s=o[0],(a=r.substr(0,o.index).trim())&&c.push(a);l=u.pop();){if(n[s]){if(n[s][0]===l){s=n[s][1]||s;break}}else if(t.indexOf(l)>=0||e[l]<e[s]){u.push(l);break}c.push(l)}n[s]||u.push(s),r=r.substr(o.index+s.length)}return(r=r.trim())&&c.push(r),c.concat(u.reverse())}(r);return function(e){return function(e,t){var r,n,i,o,s,a,l=[];for(r=0;r<e.length;r++){if(s=e[r],o=c[s]){for(n=o.length,i=Array(n);n--;)i[n]=l.pop();try{a=o.apply(null,i)}catch(e){return e}}else a=t.hasOwnProperty(s)?t[s]:+s;l.push(a)}return l[0]}(o,e)}}var h={contextDelimiter:"",onMissingKey:null};function d(e,t){var r;for(r in this.data=e,this.pluralForms={},this.options={},h)this.options[r]=void 0!==t&&r in t?t[r]:h[r]}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){var n,i,o;n=e,i=t,o=r[t],(i=l(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}d.prototype.getPluralForm=function(e,t){var r,n,i,o=this.pluralForms[e];return o||("function"!=typeof(i=(r=this.data[e][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(e){var t,r,n;for(t=e.split(";"),r=0;r<t.length;r++)if(0===(n=t[r].trim()).indexOf("plural="))return n.substr(7)}(r["Plural-Forms"]||r["plural-forms"]||r.plural_forms),i=function(e){var t=u(e);return function(e){return+t({n:e})}}(n)),o=this.pluralForms[e]=i),o(t)},d.prototype.dcnpgettext=function(e,t,r,n,i){var o,s,a;return o=void 0===i?0:this.getPluralForm(e,i),s=r,t&&(s=t+this.options.contextDelimiter+r),(a=this.data[e][s])&&a[o]?a[o]:(this.options.onMissingKey&&this.options.onMissingKey(r,e),0===o?r:n)};var g={"":{plural_forms:function(e){return 1===e?0:1}}},y=/^i18n\.(n?gettext|has_translation)(_|$)/;var m=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var v=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var b=function(e,t){return function(r,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,s=e[t];if(v(r)&&m(n))if("function"==typeof i)if("number"==typeof o){var a={callback:i,priority:o,namespace:n};if(s[r]){var l,c=s[r].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach((function(e){e.name===r&&e.currentIndex>=l&&e.currentIndex++}))}else s[r]={handlers:[a],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,n,i,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var _=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,i){var o=e[t];if(v(n)&&(r||m(i))){if(!o[n])return 0;var s=0;if(r)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(e){a[e].namespace===i&&(a.splice(e,1),s++,o.__current.forEach((function(t){t.name===n&&t.currentIndex>=e&&t.currentIndex--})))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&e.doAction("hookRemoved",n,i),s}}};var x=function(e,t){return function(r,n){var i=e[t];return void 0!==n?r in i&&i[r].handlers.some((function(e){return e.namespace===n})):r in i}};var w=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n){var i=e[t];i[n]||(i[n]={handlers:[],runs:0}),i[n].runs++;var o=i[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];if(!o||!o.length)return r?a[0]:void 0;var c={name:n,currentIndex:0};for(i.__current.push(c);c.currentIndex<o.length;){var u=o[c.currentIndex].callback.apply(null,a);r&&(a[0]=u),c.currentIndex++}return i.__current.pop(),r?a[0]:void 0}};var P=function(e,t){return function(){var r,n,i=e[t];return null!==(r=null===(n=i.__current[i.__current.length-1])||void 0===n?void 0:n.name)&&void 0!==r?r:null}};var k=function(e,t){return function(r){var n=e[t];return void 0===r?void 0!==n.__current[0]:!!n.__current[0]&&r===n.__current[0].name}};var F=function(e,t){return function(r){var n=e[t];if(v(r))return n[r]&&n[r].runs?n[r].runs:0}},T=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=b(this,"actions"),this.addFilter=b(this,"filters"),this.removeAction=_(this,"actions"),this.removeFilter=_(this,"filters"),this.hasAction=x(this,"actions"),this.hasFilter=x(this,"filters"),this.removeAllActions=_(this,"actions",!0),this.removeAllFilters=_(this,"filters",!0),this.doAction=w(this,"actions"),this.applyFilters=w(this,"filters",!0),this.currentAction=P(this,"actions"),this.currentFilter=P(this,"filters"),this.doingAction=k(this,"actions"),this.doingFilter=k(this,"filters"),this.didAction=F(this,"actions"),this.didFilter=F(this,"filters")};var A=function(){return new T}(),S=(A.addAction,A.addFilter,A.removeAction,A.removeFilter,A.hasAction,A.hasFilter,A.removeAllActions,A.removeAllFilters,A.doAction,A.applyFilters,A.currentAction,A.currentFilter,A.doingAction,A.doingFilter,A.didAction,A.didFilter,A.actions,A.filters,function(e,t,r){var n=new d({}),i=new Set,o=function(){i.forEach((function(e){return e()}))},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[t]=f(f(f({},g),n.data[t]),e),n.data[t][""]=f(f({},g[""]),n.data[t][""])},a=function(e,t){s(e,t),o()},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[e]||s(void 0,e),n.dcnpgettext(e,t,r,i,o)},c=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},u=function(e,t,n){var i=l(n,t,e);return r?(i=r.applyFilters("i18n.gettext_with_context",i,e,t,n),r.applyFilters("i18n.gettext_with_context_"+c(n),i,e,t,n)):i};if(e&&a(e,t),r){var h=function(e){y.test(e)&&o()};r.addAction("hookAdded","core/i18n",h),r.addAction("hookRemoved","core/i18n",h)}return{getLocaleData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[e]},setLocaleData:a,resetLocaleData:function(e,t){n.data={},n.pluralForms={},a(e,t)},subscribe:function(e){return i.add(e),function(){return i.delete(e)}},__:function(e,t){var n=l(t,void 0,e);return r?(n=r.applyFilters("i18n.gettext",n,e,t),r.applyFilters("i18n.gettext_"+c(t),n,e,t)):n},_x:u,_n:function(e,t,n,i){var o=l(i,void 0,e,t,n);return r?(o=r.applyFilters("i18n.ngettext",o,e,t,n,i),r.applyFilters("i18n.ngettext_"+c(i),o,e,t,n,i)):o},_nx:function(e,t,n,i,o){var s=l(o,i,e,t,n);return r?(s=r.applyFilters("i18n.ngettext_with_context",s,e,t,n,i,o),r.applyFilters("i18n.ngettext_with_context_"+c(o),s,e,t,n,i,o)):s},isRTL:function(){return"rtl"===u("ltr","text direction")},hasTranslation:function(e,t,i){var o,s,a=t?t+""+e:e,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=i?i:"default"])||void 0===s||!s[a]);return r&&(l=r.applyFilters("i18n.has_translation",l,e,t,i),l=r.applyFilters("i18n.has_translation_"+c(i),l,e,t,i)),l}}}(void 0,void 0,A));S.getLocaleData.bind(S),S.setLocaleData.bind(S),S.resetLocaleData.bind(S),S.subscribe.bind(S),S.__.bind(S),S._x.bind(S),S._n.bind(S),S._nx.bind(S),S.isRTL.bind(S),S.hasTranslation.bind(S);const E={cycleTime:2e3,animate:document.getElementById("lazy_loading.lazy_animate"),image:document.getElementById("lazyload-image"),placeHolders:document.querySelectorAll('[name="lazy_loading[lazy_placeholder]"]'),preloader:document.getElementById("preloader-image"),color:document.getElementById("lazy_loading.lazy_custom_color"),previewCycle:document.getElementById("preview-cycle"),progress:document.getElementById("progress-bar"),threshold:document.getElementById("lazy_loading.lazy_threshold"),currentPlaceholder:null,svg:null,running:!1,init(){this.svg=this.image.dataset.svg,this.currentPlaceholder=document.getElementById("placeholder-"+this.getPlaceholder()),[...this.placeHolders].forEach((e=>{e.addEventListener("change",(()=>this.changePlaceholder(e.value)))})),this.color.addEventListener("input",(()=>this.changePreloader())),this.animate.addEventListener("change",(()=>this.changePreloader())),this.previewCycle.addEventListener("click",(()=>this.startCycle()))},getPlaceholder:()=>document.querySelector('[name="lazy_loading[lazy_placeholder]"]:checked').value,changePreloader(){this.preloader.src=this.getSVG()},changePlaceholder(e){const t=document.getElementById("placeholder-"+e);this.currentPlaceholder&&(this.currentPlaceholder.style.display="none",this.currentPlaceholder.style.width="85%",this.currentPlaceholder.style.boxShadow="",this.currentPlaceholder.style.bottom="0"),t&&(t.style.display=""),this.currentPlaceholder=t},getThreshold(){return parseInt(this.threshold.value)+this.image.parentNode.parentNode.offsetHeight},startCycle(){this.running?this.endCycle():(this.changePlaceholder("none"),this.image.parentNode.parentNode.style.overflowY="scroll",this.image.parentNode.style.visibility="hidden",this.image.parentNode.style.width="100%",this.image.parentNode.style.boxShadow="none",this.progress.style.width="100%",this.preloader.parentNode.style.visibility="hidden",this.running=setTimeout((()=>{this.progress.style.visibility="hidden",this.progress.style.width="0%",this.preloader.parentNode.style.visibility="",setTimeout((()=>{const e=this.getThreshold();this.image.parentNode.style.visibility="",this.preloader.parentNode.style.bottom="-"+e+"px",setTimeout((()=>{setTimeout((()=>{this.image.parentNode.parentNode.scrollTo({top:e,behavior:"smooth"}),this.showPlaceholder()}),this.cycleTime/3)}),this.cycleTime/2)}),this.cycleTime/2)}),this.cycleTime/2))},showPlaceholder(){const e=this.getPlaceholder(),t=this.getThreshold();"off"!==e&&(this.changePlaceholder(e),this.currentPlaceholder&&(this.currentPlaceholder.style.width="100%",this.currentPlaceholder.style.boxShadow="none",this.currentPlaceholder.style.bottom="-"+t+"px")),setTimeout((()=>{this.showImage()}),this.cycleTime/2)},showImage(){const e=this.getThreshold();this.changePlaceholder("none"),this.image.parentNode.style.bottom="-"+e+"px",this.image.parentNode.style.visibility="",setTimeout((()=>{this.endCycle()}),this.cycleTime)},endCycle(){clearTimeout(this.running),this.running=!1,this.changePlaceholder(this.getPlaceholder()),this.image.parentNode.style.visibility="",this.image.parentNode.style.bottom="0",this.image.parentNode.style.width="65%",this.image.parentNode.style.boxShadow="",this.preloader.parentNode.style.bottom="0",this.image.parentNode.parentNode.style.overflowY="",this.progress.style.visibility=""},getSVG(){let e=this.color.value;const t=[e];if(this.animate.checked){const r=[...e.matchAll(new RegExp(/[\d+\.*]+/g))];r[3]=.1,t.push("rgba("+r.join(",")+")"),t.push(e)}return this.svg.replace("-color-",t.join(";"))},showLoader(){this.image.parentNode.style.opacity=1,this.image.parentNode.src=this.getSVG(),setTimeout((()=>{this.showPlaceholder(this.image.parentNode.dataset.placeholder)}),this.cycleTime)}};window.addEventListener("load",(()=>E.init()))}()}(); 1 (()=>{"use strict";var e,t,r,n;e={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},t=["(","?"],r={")":["("],":":["?","?:"]},n=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var i={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};function o(o){var s=function(i){for(var o,s,l,a,c=[],d=[];o=i.match(n);){for(s=o[0],(l=i.substr(0,o.index).trim())&&c.push(l);a=d.pop();){if(r[s]){if(r[s][0]===a){s=r[s][1]||s;break}}else if(t.indexOf(a)>=0||e[a]<e[s]){d.push(a);break}c.push(a)}r[s]||d.push(s),i=i.substr(o.index+s.length)}return(i=i.trim())&&c.push(i),c.concat(d.reverse())}(o);return function(e){return function(e,t){var r,n,o,s,l,a,c=[];for(r=0;r<e.length;r++){if(l=e[r],s=i[l]){for(n=s.length,o=Array(n);n--;)o[n]=c.pop();try{a=s.apply(null,o)}catch(e){return e}}else a=t.hasOwnProperty(l)?t[l]:+l;c.push(a)}return c[0]}(s,e)}}var s={contextDelimiter:"",onMissingKey:null};function l(e,t){var r;for(r in this.data=e,this.pluralForms={},this.options={},s)this.options[r]=void 0!==t&&r in t?t[r]:s[r]}l.prototype.getPluralForm=function(e,t){var r,n,i,s=this.pluralForms[e];return s||("function"!=typeof(i=(r=this.data[e][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(e){var t,r,n;for(t=e.split(";"),r=0;r<t.length;r++)if(0===(n=t[r].trim()).indexOf("plural="))return n.substr(7)}(r["Plural-Forms"]||r["plural-forms"]||r.plural_forms),i=function(e){var t=o(e);return function(e){return+t({n:e})}}(n)),s=this.pluralForms[e]=i),s(t)},l.prototype.dcnpgettext=function(e,t,r,n,i){var o,s,l;return o=void 0===i?0:this.getPluralForm(e,i),s=r,t&&(s=t+this.options.contextDelimiter+r),(l=this.data[e][s])&&l[o]?l[o]:(this.options.onMissingKey&&this.options.onMissingKey(r,e),0===o?r:n)};var a={plural_forms:e=>1===e?0:1},c=/^i18n\.(n?gettext|has_translation)(_|$)/;var d=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var h=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var u=function(e,t){return function(r,n,i,o=10){const s=e[t];if(!h(r))return;if(!d(n))return;if("function"!=typeof i)return void console.error("The hook callback must be a function.");if("number"!=typeof o)return void console.error("If specified, the hook priority must be a number.");const l={callback:i,priority:o,namespace:n};if(s[r]){const e=s[r].handlers;let t;for(t=e.length;t>0&&!(o>=e[t-1].priority);t--);t===e.length?e[t]=l:e.splice(t,0,l),s.__current.forEach(e=>{e.name===r&&e.currentIndex>=t&&e.currentIndex++})}else s[r]={handlers:[l],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,n,i,o)}};var p=function(e,t,r=!1){return function(n,i){const o=e[t];if(!h(n))return;if(!r&&!d(i))return;if(!o[n])return 0;let s=0;if(r)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else{const e=o[n].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===i&&(e.splice(t,1),s++,o.__current.forEach(e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex--}))}return"hookRemoved"!==n&&e.doAction("hookRemoved",n,i),s}};var m=function(e,t){return function(r,n){const i=e[t];return void 0!==n?r in i&&i[r].handlers.some(e=>e.namespace===n):r in i}};var y=function(e,t,r,n){return function(i,...o){const s=e[t];s[i]||(s[i]={handlers:[],runs:0}),s[i].runs++;const l=s[i].handlers;if(!l||!l.length)return r?o[0]:void 0;const a={name:i,currentIndex:0};return(n?async function(){try{s.__current.add(a);let e=r?o[0]:void 0;for(;a.currentIndex<l.length;){const t=l[a.currentIndex];e=await t.callback.apply(null,o),r&&(o[0]=e),a.currentIndex++}return r?e:void 0}finally{s.__current.delete(a)}}:function(){try{s.__current.add(a);let e=r?o[0]:void 0;for(;a.currentIndex<l.length;){e=l[a.currentIndex].callback.apply(null,o),r&&(o[0]=e),a.currentIndex++}return r?e:void 0}finally{s.__current.delete(a)}})()}};var f=function(e,t){return function(){const r=e[t],n=Array.from(r.__current);return n.at(-1)?.name??null}};var g=function(e,t){return function(r){const n=e[t];return void 0===r?n.__current.size>0:Array.from(n.__current).some(e=>e.name===r)}};var v=function(e,t){return function(r){const n=e[t];if(h(r))return n[r]&&n[r].runs?n[r].runs:0}},_=class{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=u(this,"actions"),this.addFilter=u(this,"filters"),this.removeAction=p(this,"actions"),this.removeFilter=p(this,"filters"),this.hasAction=m(this,"actions"),this.hasFilter=m(this,"filters"),this.removeAllActions=p(this,"actions",!0),this.removeAllFilters=p(this,"filters",!0),this.doAction=y(this,"actions",!1,!1),this.doActionAsync=y(this,"actions",!1,!0),this.applyFilters=y(this,"filters",!0,!1),this.applyFiltersAsync=y(this,"filters",!0,!0),this.currentAction=f(this,"actions"),this.currentFilter=f(this,"filters"),this.doingAction=g(this,"actions"),this.doingFilter=g(this,"filters"),this.didAction=v(this,"actions"),this.didFilter=v(this,"filters")}};var b=function(){return new _}(),{addAction:A,addFilter:F,removeAction:x,removeFilter:w,hasAction:P,hasFilter:T,removeAllActions:N,removeAllFilters:I,doAction:k,doActionAsync:E,applyFilters:z,applyFiltersAsync:L,currentAction:S,currentFilter:B,doingAction:D,doingFilter:C,didAction:R,didFilter:O,actions:j,filters:Z}=b,G=((e,t,r)=>{const n=new l({}),i=new Set,o=()=>{i.forEach(e=>e())},s=(e,t="default")=>{n.data[t]={...n.data[t],...e},n.data[t][""]={...a,...n.data[t]?.[""]},delete n.pluralForms[t]},d=(e,t)=>{s(e,t),o()},h=(e="default",t,r,i,o)=>(n.data[e]||s(void 0,e),n.dcnpgettext(e,t,r,i,o)),u=e=>e||"default",p=(e,t,n)=>{let i=h(n,t,e);return r?(i=r.applyFilters("i18n.gettext_with_context",i,e,t,n),r.applyFilters("i18n.gettext_with_context_"+u(n),i,e,t,n)):i};if(e&&d(e,t),r){const e=e=>{c.test(e)&&o()};r.addAction("hookAdded","core/i18n",e),r.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:(e="default")=>n.data[e],setLocaleData:d,addLocaleData:(e,t="default")=>{n.data[t]={...n.data[t],...e,"":{...a,...n.data[t]?.[""],...e?.[""]}},delete n.pluralForms[t],o()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},d(e,t)},subscribe:e=>(i.add(e),()=>i.delete(e)),__:(e,t)=>{let n=h(t,void 0,e);return r?(n=r.applyFilters("i18n.gettext",n,e,t),r.applyFilters("i18n.gettext_"+u(t),n,e,t)):n},_x:p,_n:(e,t,n,i)=>{let o=h(i,void 0,e,t,n);return r?(o=r.applyFilters("i18n.ngettext",o,e,t,n,i),r.applyFilters("i18n.ngettext_"+u(i),o,e,t,n,i)):o},_nx:(e,t,n,i,o)=>{let s=h(o,i,e,t,n);return r?(s=r.applyFilters("i18n.ngettext_with_context",s,e,t,n,i,o),r.applyFilters("i18n.ngettext_with_context_"+u(o),s,e,t,n,i,o)):s},isRTL:()=>"rtl"===p("ltr","text direction"),hasTranslation:(e,t,i)=>{const o=t?t+""+e:e;let s=!!n.data?.[i??"default"]?.[o];return r&&(s=r.applyFilters("i18n.has_translation",s,e,t,i),s=r.applyFilters("i18n.has_translation_"+u(i),s,e,t,i)),s}}})(void 0,void 0,b);G.getLocaleData.bind(G),G.setLocaleData.bind(G),G.resetLocaleData.bind(G),G.subscribe.bind(G),G.__.bind(G),G._x.bind(G),G._n.bind(G),G._nx.bind(G),G.isRTL.bind(G),G.hasTranslation.bind(G);const H={cycleTime:2e3,animate:document.getElementById("lazy_loading.lazy_animate"),image:document.getElementById("lazyload-image"),placeHolders:document.querySelectorAll('[name="lazy_loading[lazy_placeholder]"]'),preloader:document.getElementById("preloader-image"),color:document.getElementById("lazy_loading.lazy_custom_color"),previewCycle:document.getElementById("preview-cycle"),progress:document.getElementById("progress-bar"),threshold:document.getElementById("lazy_loading.lazy_threshold"),currentPlaceholder:null,svg:null,running:!1,init(){this.svg=this.image.dataset.svg,this.currentPlaceholder=document.getElementById("placeholder-"+this.getPlaceholder()),[...this.placeHolders].forEach(e=>{e.addEventListener("change",()=>this.changePlaceholder(e.value))}),this.color.addEventListener("input",()=>this.changePreloader()),this.animate.addEventListener("change",()=>this.changePreloader()),this.previewCycle.addEventListener("click",()=>this.startCycle())},getPlaceholder:()=>document.querySelector('[name="lazy_loading[lazy_placeholder]"]:checked').value,changePreloader(){this.preloader.src=this.getSVG()},changePlaceholder(e){const t=document.getElementById("placeholder-"+e);this.currentPlaceholder&&(this.currentPlaceholder.style.display="none",this.currentPlaceholder.style.width="85%",this.currentPlaceholder.style.boxShadow="",this.currentPlaceholder.style.bottom="0"),t&&(t.style.display=""),this.currentPlaceholder=t},getThreshold(){return parseInt(this.threshold.value)+this.image.parentNode.parentNode.offsetHeight},startCycle(){this.running?this.endCycle():(this.changePlaceholder("none"),this.image.parentNode.parentNode.style.overflowY="scroll",this.image.parentNode.style.visibility="hidden",this.image.parentNode.style.width="100%",this.image.parentNode.style.boxShadow="none",this.progress.style.width="100%",this.preloader.parentNode.style.visibility="hidden",this.running=setTimeout(()=>{this.progress.style.visibility="hidden",this.progress.style.width="0%",this.preloader.parentNode.style.visibility="",setTimeout(()=>{const e=this.getThreshold();this.image.parentNode.style.visibility="",this.preloader.parentNode.style.bottom="-"+e+"px",setTimeout(()=>{setTimeout(()=>{this.image.parentNode.parentNode.scrollTo({top:e,behavior:"smooth"}),this.showPlaceholder()},this.cycleTime/3)},this.cycleTime/2)},this.cycleTime/2)},this.cycleTime/2))},showPlaceholder(){const e=this.getPlaceholder(),t=this.getThreshold();"off"!==e&&(this.changePlaceholder(e),this.currentPlaceholder&&(this.currentPlaceholder.style.width="100%",this.currentPlaceholder.style.boxShadow="none",this.currentPlaceholder.style.bottom="-"+t+"px")),setTimeout(()=>{this.showImage()},this.cycleTime/2)},showImage(){const e=this.getThreshold();this.changePlaceholder("none"),this.image.parentNode.style.bottom="-"+e+"px",this.image.parentNode.style.visibility="",setTimeout(()=>{this.endCycle()},this.cycleTime)},endCycle(){clearTimeout(this.running),this.running=!1,this.changePlaceholder(this.getPlaceholder()),this.image.parentNode.style.visibility="",this.image.parentNode.style.bottom="0",this.image.parentNode.style.width="65%",this.image.parentNode.style.boxShadow="",this.preloader.parentNode.style.bottom="0",this.image.parentNode.parentNode.style.overflowY="",this.progress.style.visibility=""},getSVG(){let e=this.color.value;const t=[e];if(this.animate.checked){const r=[...e.matchAll(new RegExp(/[\d+\.*]+/g))];r[3]=.1,t.push("rgba("+r.join(",")+")"),t.push(e)}return this.svg.replace("-color-",t.join(";"))},showLoader(){this.image.parentNode.style.opacity=1,this.image.parentNode.src=this.getSVG(),setTimeout(()=>{this.showPlaceholder(this.image.parentNode.dataset.placeholder)},this.cycleTime)}};window.addEventListener("load",()=>H.init())})(); 2 //# sourceMappingURL=lazyload-preview.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/media-modal.asset.php
r3306515 r3518458 1 <?php return array('dependencies' => array(), 'version' => ' a833cdbcaab9d93c37cf');1 <?php return array('dependencies' => array(), 'version' => 'cffc26ed672e922e6588'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/media-modal.js
r3306515 r3518458 1 !function(){if(wp.media){wp.media.events.on("editor:image-edit",(function(e){e.metadata.cldoverwrite=null;e.image.className.split(" ").indexOf("cld-overwrite")>=0&&(e.metadata.cldoverwrite="true")})),wp.media.events.on("editor:image-update",(function(e){const t=e.image.className.split(" ");e.metadata.cldoverwrite&&-1===t.indexOf("cld-overwrite")?t.push("cld-overwrite"):!e.metadata.cldoverwrite&&t.indexOf("cld-overwrite")>=0&&delete t[t.indexOf("cld-overwrite")],e.image.className=t.join(" ")}));let e=null;const t=wp.media.string.props;wp.media.string.props=function(i,a){i.cldoverwrite&&(i.classes=["cld-overwrite"],e=!0);return t(i,a)},wp.media.post=function(t,i){if("send-attachment-to-editor"===t){const t=wp?.media?.editor?.get()?.state(),a=t?.get("selection")?.get(i.attachment);a?.attributes?.transformations&&(i.attachment.transformations=a.attributes.transformations),(i?.html.indexOf("cld-overwrite")>-1||!0===e)&&(i.attachment.cldoverwrite=!0,e=null)}return wp.ajax.post(t,i)};const i=wp.media.view.MediaFrame.Select,a=wp.media.view.MediaFrame.Post,n=wp.media.view.MediaFrame.ImageDetails,o=wp.media.view.MediaFrame.VideoDetails,r=wp.media.view.Settings.AttachmentDisplay,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const e=this.controller,t=this.model.get("selection"),i=this.model.get("library"),a=wp.media.model.Attachment;if(CLDN.mloptions.multiple=e.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+e.cid,1===t.length){const e=a.get(t.models[0].id);void 0!==e.attributes.public_id&&(CLDN.mloptions.asset={resource_id:e.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const e=t.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(e)?e[0]:e}catch(e){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){for(let o=0;o<n.assets.length;o++){const r=n.assets[o];wp.media.post("cloudinary-down-sync",{nonce:CLDN.nonce,asset:r}).done((function(n){const o=function(e,t){e.uploading=!1,t.set(e),wp.Uploader.queue.remove(t),0===wp.Uploader.queue.length&&wp.Uploader.queue.reset()};if(void 0!==n.resync&&n.resync.forEach((function(e){a.get(e.id).set(e)})),void 0!==n.fetch){const e=a.get(n.attachment_id);e.set(n),i.add(e),wp.Uploader.queue.add(e),wp.ajax.send({url:n.fetch,beforeSend(e){e.setRequestHeader("X-WP-Nonce",CLDN.nonce)},data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations}}).done((function(e){const t=a.get(e.id);o(e,t)})).fail((function(a){o(n,e),i.remove(e),t.remove(e),"string"==typeof a?alert(a):500===a.status&&alert("HTTP error.")}))}else{const e=a.get(n.id);e.set(n),t.add(e)}0===wp.Uploader.queue.length&&wp.Uploader.queue.reset(),e.content.mode("browse")}))}}},document.querySelectorAll(".dam-cloudinary")[0])}return this.active=this.cid,this}}),d=function(e){const t={bindHandlers(){e.prototype.bindHandlers.apply(this,arguments),this.on("content:render:cloudinary",this.cloudinaryContent,this)},browseRouter(t){e.prototype.browseRouter.apply(this,arguments),t.set({cloudinary:{text:"Cloudinary",priority:60}})},cloudinaryContent(){this.$el.addClass("hide-toolbar");const e=this.state(),t=new s({controller:this,model:e}).render();this.content.set(t)}};return t},l=function(e){return{initialize(){e.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:cldoverwrite",this.handleOverwrite)},handleOverwrite(e){const t=this.options.attachment.attributes.sizes;for(const i in t){const a=new URL(t[i].url);e.attributes.cldoverwrite?a.searchParams.set("cld_overwrite",!0):a.searchParams.delete("cld_overwrite"),this.options.attachment.attributes.sizes[i].url=a.href}}}};wp.media.view.MediaFrame.Select=i.extend(d(i)),wp.media.view.MediaFrame.Post=a.extend(d(a)),wp.media.view.MediaFrame.ImageDetails=n.extend(d(n)),wp.media.view.MediaFrame.VideoDetails=o.extend(d(o)),wp.media.view.Settings.AttachmentDisplay=r.extend(l(r))}}(); 1 (()=>{if(wp.media){wp.media.events.on("editor:image-edit",function(e){e.metadata.cldoverwrite=null;e.image.className.split(" ").indexOf("cld-overwrite")>=0&&(e.metadata.cldoverwrite="true")}),wp.media.events.on("editor:image-update",function(e){const t=e.image.className.split(" ");e.metadata.cldoverwrite&&-1===t.indexOf("cld-overwrite")?t.push("cld-overwrite"):!e.metadata.cldoverwrite&&t.indexOf("cld-overwrite")>=0&&delete t[t.indexOf("cld-overwrite")],e.image.className=t.join(" ")});let e=null;const t=wp.media.string.props;wp.media.string.props=function(i,a){i.cldoverwrite&&(i.classes=["cld-overwrite"],e=!0);return t(i,a)},wp.media.post=function(t,i){if("send-attachment-to-editor"===t){const t=wp?.media?.editor?.get()?.state(),a=t?.get("selection")?.get(i.attachment);a?.attributes?.transformations&&(i.attachment.transformations=a.attributes.transformations),(i?.html.indexOf("cld-overwrite")>-1||!0===e)&&(i.attachment.cldoverwrite=!0,e=null)}return wp.ajax.post(t,i)};const i=wp.media.view.MediaFrame.Select,a=wp.media.view.MediaFrame.Post,o=wp.media.view.MediaFrame.ImageDetails,n=wp.media.view.MediaFrame.VideoDetails,r=wp.media.view.Settings.AttachmentDisplay,s=wp.media.View.extend({tagName:"div",className:"cloudinary-widget",template:wp.template("cloudinary-dam"),active:!1,toolbar:null,frame:null,ready(){const e=this.controller,t=this.model.get("selection"),i=this.model.get("library"),a=wp.media.model.Attachment;if(CLDN.mloptions.multiple=e.options.multiple,this.cid!==this.active){if(CLDN.mloptions.inline_container="#cloudinary-dam-"+e.cid,1===t.length){const e=a.get(t.models[0].id);void 0!==e.attributes.public_id&&(CLDN.mloptions.asset={resource_id:e.attributes.public_id})}else CLDN.mloptions.asset=null;try{CLDN.mloptions.folder||(CLDN.mloptions.folder={path:""});const e=t.props.attributes.type;CLDN.mloptions.folder.resource_type=Array.isArray(e)?e[0]:e}catch(e){}window.ml=cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(o){for(let n=0;n<o.assets.length;n++){const r=o.assets[n];wp.media.post("cloudinary-down-sync",{nonce:CLDN.nonce,asset:r}).done(function(o){const n=function(e,t){e.uploading=!1,t.set(e),wp.Uploader.queue.remove(t),0===wp.Uploader.queue.length&&wp.Uploader.queue.reset()};if(void 0!==o.resync&&o.resync.forEach(function(e){a.get(e.id).set(e)}),void 0!==o.fetch){const e=a.get(o.attachment_id);e.set(o),i.add(e),wp.Uploader.queue.add(e),wp.ajax.send({url:o.fetch,beforeSend(e){e.setRequestHeader("X-WP-Nonce",CLDN.nonce)},data:{src:o.url,filename:o.filename,attachment_id:o.attachment_id,transformations:o.transformations}}).done(function(e){const t=a.get(e.id);n(e,t)}).fail(function(a){n(o,e),i.remove(e),t.remove(e),"string"==typeof a?alert(a):500===a.status&&alert("HTTP error.")})}else{const e=a.get(o.id);e.set(o),t.add(e)}0===wp.Uploader.queue.length&&wp.Uploader.queue.reset(),e.content.mode("browse")})}}},document.querySelectorAll(".dam-cloudinary")[0])}return this.active=this.cid,this}}),d=function(e){const t={bindHandlers(){e.prototype.bindHandlers.apply(this,arguments),this.on("content:render:cloudinary",this.cloudinaryContent,this)},browseRouter(t){e.prototype.browseRouter.apply(this,arguments),t.set({cloudinary:{text:"Cloudinary",priority:60}})},cloudinaryContent(){this.$el.addClass("hide-toolbar");const e=this.state(),t=new s({controller:this,model:e}).render();this.content.set(t)}};return t},l=function(e){return{initialize(){e.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:cldoverwrite",this.handleOverwrite)},handleOverwrite(e){const t=this.options.attachment.attributes.sizes;for(const i in t){const a=new URL(t[i].url);e.attributes.cldoverwrite?a.searchParams.set("cld_overwrite",!0):a.searchParams.delete("cld_overwrite"),this.options.attachment.attributes.sizes[i].url=a.href}}}};wp.media.view.MediaFrame.Select=i.extend(d(i)),wp.media.view.MediaFrame.Post=a.extend(d(a)),wp.media.view.MediaFrame.ImageDetails=o.extend(d(o)),wp.media.view.MediaFrame.VideoDetails=n.extend(d(n)),wp.media.view.Settings.AttachmentDisplay=r.extend(l(r))}})(); 2 //# sourceMappingURL=media-modal.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/syntax-highlight.js
r3343538 r3518458 1 !function(){var e={237:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,a=l&&(n?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\/(\d+)/.exec(e),f=c&&+c[1],d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),v=h&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),y=v||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),C=d&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(d=!1,s=!0);var k=b&&(u||d&&(null==C||C<12.11)),S=r||l&&a>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,M=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return N(e).appendChild(t)}function A(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function D(e,t,r,n){var i=A(e,t,r,n);return i.setAttribute("role","presentation"),i}function W(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function H(e){var t;try{t=e.activeElement}catch(r){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function F(e,t){var r=e.className;L(t).test(r)||(e.className+=(r?" ":"")+t)}function E(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!L(r[n]).test(t)&&(t+=" "+r[n]);return t}T=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var P=function(e){e.select()};function z(e){return e.display.wrapper.ownerDocument}function I(e){return z(e).defaultView}function R(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function B(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function V(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=r-l%r,o=a+1}}v?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var G=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};function j(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}G.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},G.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var U=50,K={toString:function(){return"CodeMirror.Pass"}},_={scroll:!1},X={origin:"*mouse"},$={origin:"+move"};function Y(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var q=[""];function Z(e){for(;q.length<=e;)q.push(J(q)+" ");return q[e]}function J(e){return e[e.length-1]}function Q(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function ee(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function te(){}function re(e,t){var r;return Object.create?r=Object.create(e):(te.prototype=e,r=new te),t&&B(t,r),r}var ne=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ie(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ne.test(e))}function oe(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ie(e))||t.test(e):ie(e)}function le(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ae=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function se(e){return e.charCodeAt(0)>=768&&ae.test(e)}function ue(e,t,r){for(;(r<0?t>0:t<e.length)&&se(e.charAt(t));)t+=r;return t}function ce(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function fe(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var de=null;function he(e,t,r){var n;de=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:de=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:de=i)}return null!=n?n:de}var pe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var c=e.length,f=[],d=0;d<c;++d)f.push(r(e.charCodeAt(d)));for(var h=0,p=u;h<c;++h){var g=f[h];"m"==g?f[h]=p:p=g}for(var v=0,m=u;v<c;++v){var y=f[v];"1"==y&&"r"==m?f[v]="n":o.test(y)&&(m=y,"r"==y&&(f[v]="R"))}for(var b=1,w=f[0];b<c-1;++b){var x=f[b];"+"==x&&"1"==w&&"1"==f[b+1]?f[b]="1":","!=x||w!=f[b+1]||"1"!=w&&"n"!=w||(f[b]=w),w=x}for(var C=0;C<c;++C){var k=f[C];if(","==k)f[C]="N";else if("%"==k){var S=void 0;for(S=C+1;S<c&&"%"==f[S];++S);for(var L=C&&"!"==f[C-1]||S<c&&"1"==f[S]?"1":"N",T=C;T<S;++T)f[T]=L;C=S-1}}for(var M=0,N=u;M<c;++M){var O=f[M];"L"==N&&"1"==O?f[M]="L":o.test(O)&&(N=O)}for(var A=0;A<c;++A)if(i.test(f[A])){var D=void 0;for(D=A+1;D<c&&i.test(f[D]);++D);for(var W="L"==(A?f[A-1]:u),H=W==("L"==(D<c?f[D]:u))?W?"L":"R":u,F=A;F<D;++F)f[F]=H;A=D-1}for(var E,P=[],z=0;z<c;)if(l.test(f[z])){var I=z;for(++z;z<c&&l.test(f[z]);++z);P.push(new s(0,I,z))}else{var R=z,B=P.length,V="rtl"==t?1:0;for(++z;z<c&&"L"!=f[z];++z);for(var G=R;G<z;)if(a.test(f[G])){R<G&&(P.splice(B,0,new s(1,R,G)),B+=V);var j=G;for(++G;G<z&&a.test(f[G]);++G);P.splice(B,0,new s(2,j,G)),B+=V,R=G}else++G;R<z&&P.splice(B,0,new s(1,R,z))}return"ltr"==t&&(1==P[0].level&&(E=e.match(/^\s+/))&&(P[0].from=E[0].length,P.unshift(new s(0,0,E[0].length))),1==J(P).level&&(E=e.match(/\s+$/))&&(J(P).to-=E[0].length,P.push(new s(0,c-E[0].length,c)))),"rtl"==t?P.reverse():P}}();function ge(e,t){var r=e.order;return null==r&&(r=e.order=pe(e.text,t)),r}var ve=[],me=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||ve).concat(r)}};function ye(e,t){return e._handlers&&e._handlers[t]||ve}function be(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=j(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function we(e,t){var r=ye(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function xe(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),we(e,r||t.type,e,t),Me(t)||t.codemirrorIgnore}function Ce(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==j(r,t[n])&&r.push(t[n])}function ke(e,t){return ye(e,t).length>0}function Se(e){e.prototype.on=function(e,t){me(this,e,t)},e.prototype.off=function(e,t){be(this,e,t)}}function Le(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Te(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Me(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ne(e){Le(e),Te(e)}function Oe(e){return e.target||e.srcElement}function Ae(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var De,We,He=function(){if(l&&a<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Fe(e){if(null==De){var t=A("span","");O(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(De=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&a<8))}var r=De?A("span",""):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ee(e){if(null!=We)return We;var t=O(e,document.createTextNode("AخA")),r=T(t,0,1).getBoundingClientRect(),n=T(t,1,2).getBoundingClientRect();return N(e),!(!r||r.left==r.right)&&(We=n.right-r.right<3)}var Pe,ze=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(Pe=A("div"))||(Pe.setAttribute("oncopy","return;"),"function"==typeof Pe.oncopy),Be=null;function Ve(e){if(null!=Be)return Be;var t=O(e,A("span","x")),r=t.getBoundingClientRect(),n=T(t,0,1).getBoundingClientRect();return Be=Math.abs(r.left-n.left)>1}var Ge={},je={};function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ge[e]=t}function Ke(e,t){je[e]=t}function _e(e){if("string"==typeof e&&je.hasOwnProperty(e))e=je[e];else if(e&&"string"==typeof e.name&&je.hasOwnProperty(e.name)){var t=je[e.name];"string"==typeof t&&(t={name:t}),(e=re(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return _e("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return _e("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Xe(e,t){t=_e(t);var r=Ge[t.name];if(!r)return Xe(e,"text/plain");var n=r(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var $e={};function Ye(e,t){B(t,$e.hasOwnProperty(e)?$e[e]:$e[e]={})}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ze(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Je(e,t,r){return!e.startState||e.startState(t,r)}var Qe=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function et(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function tt(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,(function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i})),n}function rt(e,t,r){var n=[];return e.iter(t,r,(function(e){n.push(e.text)})),n}function nt(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function it(e){if(null==e.parent)return null;for(var t=e.parent,r=j(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function ot(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var a=e.lines[l].height;if(t<a)break;t-=a}return r+l}function lt(e,t){return t>=e.first&&t<e.first+e.size}function at(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function st(e,t,r){if(void 0===r&&(r=null),!(this instanceof st))return new st(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ut(e,t){return e.line-t.line||e.ch-t.ch}function ct(e,t){return e.sticky==t.sticky&&0==ut(e,t)}function ft(e){return st(e.line,e.ch)}function dt(e,t){return ut(e,t)<0?t:e}function ht(e,t){return ut(e,t)<0?e:t}function pt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function gt(e,t){if(t.line<e.first)return st(e.first,0);var r=e.first+e.size-1;return t.line>r?st(r,et(e,r).text.length):vt(t,et(e,t.line).text.length)}function vt(e,t){var r=e.ch;return null==r||r>t?st(e.line,t):r<0?st(e.line,0):e}function mt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=gt(e,t[n]);return r}Qe.prototype.eol=function(){return this.pos>=this.string.length},Qe.prototype.sol=function(){return this.pos==this.lineStart},Qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Qe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Qe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Qe.prototype.skipToEnd=function(){this.pos=this.string.length},Qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Qe.prototype.backUp=function(e){this.pos-=e},Qe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=V(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},Qe.prototype.indentation=function(){return V(this.string,null,this.tabSize)-(this.lineStart?V(this.string,this.lineStart,this.tabSize):0)},Qe.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var yt=function(e,t){this.state=e,this.lookAhead=t},bt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function wt(e,t,r,n){var i=[e.state.modeGen],o={};Ot(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var l=r.state,a=function(n){r.baseTokens=i;var a=e.state.overlays[n],s=1,u=0;r.state=!0,Ot(e,t.text,a.mode,r,(function(e,t){for(var r=s;u<e;){var n=i[s];n>e&&i.splice(s,1,e,i[s+1],n),s+=2,u=Math.min(e,n)}if(t)if(a.opaque)i.splice(r,s-r,e,"overlay "+t),s=r+2;else for(;r<s;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}}),o),r.state=l,r.baseTokens=null,r.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)a(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function xt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Ct(e,it(t)),i=t.text.length>e.options.maxHighlightLength&&qe(e.doc.mode,n.state),o=wt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ct(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new bt(n,!0,t);var o=At(e,t,r),l=o>n.first&&et(n,o-1).stateAfter,a=l?bt.fromSaved(n,l,o):new bt(n,Je(n.mode),o);return n.iter(o,t,(function(r){kt(e,r.text,a);var n=a.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?a.save():null,a.nextLine()})),r&&(n.modeFrontier=a.line),a}function kt(e,t,r,n){var i=e.doc.mode,o=new Qe(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&St(i,r.state);!o.eol();)Lt(i,o,r.state),o.start=o.pos}function St(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Ze(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Lt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Ze(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}bt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},bt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},bt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},bt.fromSaved=function(e,t,r){return t instanceof yt?new bt(e,qe(e.mode,t.state),r,t.lookAhead):new bt(e,qe(e.mode,t),r)},bt.prototype.save=function(e){var t=!1!==e?qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yt(t,this.maxLookAhead):t};var Tt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Mt(e,t,r,n){var i,o,l=e.doc,a=l.mode,s=et(l,(t=gt(l,t)).line),u=Ct(e,t.line,r),c=new Qe(s.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=Lt(a,c,u.state),n&&o.push(new Tt(c,i,qe(l.mode,u.state)));return n?o:new Tt(c,i,u.state)}function Nt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Ot(e,t,r,n,i,o,l){var a=r.flattenSpans;null==a&&(a=e.options.flattenSpans);var s,u=0,c=null,f=new Qe(t,e.options.tabSize,n),d=e.options.addModeClass&&[null];for(""==t&&Nt(St(r,n.state),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(a=!1,l&&kt(e,t,n,f.pos),f.pos=t.length,s=null):s=Nt(Lt(r,f,n.state,d),o),d){var h=d[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!a||c!=s){for(;u<f.start;)i(u=Math.min(f.start,u+5e3),c);c=s}f.start=f.pos}for(;u<f.pos;){var p=Math.min(f.pos,u+5e3);i(p,c),u=p}}function At(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=et(o,a-1),u=s.stateAfter;if(u&&(!r||a+(u instanceof yt?u.lookAhead:0)<=o.modeFrontier))return a;var c=V(s.text,null,e.options.tabSize);(null==i||n>c)&&(i=a-1,n=c)}return i}function Dt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=et(e,n).stateAfter;if(i&&(!(i instanceof yt)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Wt=!1,Ht=!1;function Ft(){Wt=!0}function Et(){Ht=!0}function Pt(e,t,r){this.marker=e,this.from=t,this.to=r}function zt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function It(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Rt(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&e.markedSpans&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function Bt(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var a=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Pt(l,o.from,a?null:o.to))}}return n}function Vt(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Pt(l,a?null:o.from-t,null==o.to?null:o.to-t))}}return n}function Gt(e,t){if(t.full)return null;var r=lt(e,t.from.line)&&et(e,t.from.line).markedSpans,n=lt(e,t.to.line)&&et(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==ut(t.from,t.to),a=Bt(r,i,l),s=Vt(n,o,l),u=1==t.text.length,c=J(t.text).length+(u?i:0);if(a)for(var f=0;f<a.length;++f){var d=a[f];if(null==d.to){var h=zt(s,d.marker);h?u&&(d.to=null==h.to?null:h.to+c):d.to=i}}if(s)for(var p=0;p<s.length;++p){var g=s[p];null!=g.to&&(g.to+=c),null==g.from?zt(a,g.marker)||(g.from=c,u&&(a||(a=[])).push(g)):(g.from+=c,u&&(a||(a=[])).push(g))}a&&(a=jt(a)),s&&s!=a&&(s=jt(s));var v=[a];if(!u){var m,y=t.text.length-2;if(y>0&&a)for(var b=0;b<a.length;++b)null==a[b].to&&(m||(m=[])).push(new Pt(a[b].marker,null,null));for(var w=0;w<y;++w)v.push(m);v.push(s)}return v}function jt(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ut(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=j(n,r)||(n||(n=[])).push(r)}})),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],a=l.find(0),s=0;s<i.length;++s){var u=i[s];if(!(ut(u.to,a.from)<0||ut(u.from,a.to)>0)){var c=[s,1],f=ut(u.from,a.from),d=ut(u.to,a.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:a.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:a.to,to:u.to}),i.splice.apply(i,c),s+=c.length-3}}return i}function Kt(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function _t(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Xt(e){return e.inclusiveLeft?-1:0}function $t(e){return e.inclusiveRight?1:0}function Yt(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=ut(n.from,i.from)||Xt(e)-Xt(t);if(o)return-o;var l=ut(n.to,i.to)||$t(e)-$t(t);return l||t.id-e.id}function qt(e,t){var r,n=Ht&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Yt(r,i.marker)<0)&&(r=i.marker);return r}function Zt(e){return qt(e,!0)}function Jt(e){return qt(e,!1)}function Qt(e,t){var r,n=Ht&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||Yt(r,o.marker)<0)&&(r=o.marker)}return r}function er(e,t,r,n,i){var o=et(e,t),l=Ht&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(s.marker.collapsed){var u=s.marker.find(0),c=ut(u.from,r)||Xt(s.marker)-Xt(i),f=ut(u.to,n)||$t(s.marker)-$t(i);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ut(u.to,r)>=0:ut(u.to,r)>0)||c>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ut(u.from,n)<=0:ut(u.from,n)<0)))return!0}}}function tr(e){for(var t;t=Zt(e);)e=t.find(-1,!0).line;return e}function rr(e){for(var t;t=Jt(e);)e=t.find(1,!0).line;return e}function nr(e){for(var t,r;t=Jt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function ir(e,t){var r=et(e,t),n=tr(r);return r==n?t:it(n)}function or(e,t){if(t>e.lastLine())return t;var r,n=et(e,t);if(!lr(e,n))return t;for(;r=Jt(n);)n=r.find(1,!0).line;return it(n)+1}function lr(e,t){var r=Ht&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&ar(e,t,n))return!0}}function ar(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return ar(e,n.line,zt(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&ar(e,t,i))return!0}function sr(e){for(var t=0,r=(e=tr(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==r)break;t+=a.height}return t}function ur(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Zt(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Jt(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function cr(e){var t=e.display,r=e.doc;t.maxLine=et(r,r.first),t.maxLineLength=ur(t.maxLine),t.maxLineChanged=!0,r.iter((function(e){var r=ur(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var fr=function(e,t,r){this.text=e,_t(this,t),this.height=r?r(this):1};function dr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Kt(e),_t(e,r);var i=n?n(e):1;i!=e.height&&nt(e,i)}function hr(e){e.parent=null,Kt(e)}fr.prototype.lineNo=function(){return it(this)},Se(fr);var pr={},gr={};function vr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?gr:pr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function mr(e,t){var r=D("span",null,null,s?"padding-right: .1px":null),n={pre:D("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=br,Ee(e.display.measure)&&(l=ge(o,e.doc.direction))&&(n.addToken=xr(n.addToken,l)),n.map=[],kr(o,n,xt(e,o,t!=e.display.externalMeasured&&it(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=E(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=E(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Fe(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var a=n.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return we(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=E(n.pre.className,n.textClass||"")),n}function yr(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function br(e,t,r,n,i,o,s){if(t){var u,c=e.splitSpaces?wr(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){u=document.createDocumentFragment();for(var h=0;;){f.lastIndex=h;var p=f.exec(t),g=p?p.index-h:t.length-h;if(g){var v=document.createTextNode(c.slice(h,h+g));l&&a<9?u.appendChild(A("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=u.appendChild(A("span",Z(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=u.appendChild(A("span","\r"==p[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&a<9?u.appendChild(A("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&a<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||d||o||s){var w=r||"";n&&(w+=n),i&&(w+=i);var x=A("span",[u],w,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&x.setAttribute(C,s[C]);return e.content.appendChild(x)}e.content.appendChild(u)}}function wr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function xr(e,t){return function(r,n,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var f=void 0,d=0;d<t.length&&!((f=t[d]).to>u&&f.from<=u);d++);if(f.to>=c)return e(r,n,i,o,l,a,s);e(r,n.slice(0,f.to-u),i,o,null,a,s),o=null,n=n.slice(f.to-u),u=f.to}}}function Cr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function kr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,a,s,u,c,f,d,h=i.length,p=0,g=1,v="",m=0;;){if(m==p){s=u=c=a="",d=null,f=null,m=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],C=x.marker;if("bookmark"==C.type&&x.from==p&&C.widgetNode)y.push(C);else if(x.from<=p&&(null==x.to||x.to>p||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(s+=" "+C.className),C.css&&(a=(a?a+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var k in C.attributes)(d||(d={}))[k]=C.attributes[k];C.collapsed&&(!f||Yt(f.marker,C)<0)&&(f=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==m&&(u+=" "+b[S]);if(!f||f.from==p)for(var L=0;L<y.length;++L)Cr(t,0,y[L]);if(f&&(f.from||0)==p){if(Cr(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=h)break;for(var T=Math.min(h,m);;){if(v){var M=p+v.length;if(!f){var N=M>T?v.slice(0,T-p):v;t.addToken(t,N,l?l+s:s,c,p+N.length==m?u:"",a,d)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=r[g++]),l=vr(r[g++],t.cm.options)}}else for(var O=1;O<r.length;O+=2)t.addToken(t,i.slice(o,o=r[O]),vr(r[O+1],t.cm.options))}function Sr(e,t,r){this.line=t,this.rest=nr(t),this.size=this.rest?it(J(this.rest))-r+1:1,this.node=this.text=null,this.hidden=lr(e,t)}function Lr(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new Sr(e.doc,et(e.doc,o),o);n=o+l.size,i.push(l)}return i}var Tr=null;function Mr(e){Tr?Tr.ops.push(e):e.ownsGroup=Tr={ops:[e],delayedCallbacks:[]}}function Nr(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Or(e,t){var r=e.ownsGroup;if(r)try{Nr(r)}finally{Tr=null,t(r)}}var Ar=null;function Dr(e,t){var r=ye(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);Tr?n=Tr.delayedCallbacks:Ar?n=Ar:(n=Ar=[],setTimeout(Wr,0));for(var o=function(e){n.push((function(){return r[e].apply(null,i)}))},l=0;l<r.length;++l)o(l)}}function Wr(){var e=Ar;Ar=null;for(var t=0;t<e.length;++t)e[t]()}function Hr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?zr(e,t):"gutter"==o?Rr(e,t,r,n):"class"==o?Ir(e,t):"widget"==o&&Br(e,t,n)}t.changes=null}function Fr(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&a<8&&(e.node.style.zIndex=2)),e.node}function Er(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=Fr(t);t.background=n.insertBefore(A("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Pr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):mr(e,t)}function zr(e,t){var r=t.text.className,n=Pr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Ir(e,t)):r&&(t.text.className=r)}function Ir(e,t){Er(e,t),t.line.wrapClass?Fr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Rr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Fr(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=Fr(t),a=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(a.setAttribute("aria-hidden","true"),e.display.input.setUneditable(a),l.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(A("div",at(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,c=o.hasOwnProperty(u)&&o[u];c&&a.appendChild(A("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Br(e,t,r){t.alignable&&(t.alignable=null);for(var n=L("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Gr(e,t,r)}function Vr(e,t,r,n){var i=Pr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Ir(e,t),Rr(e,t,r,n),Gr(e,t,n),t.node}function Gr(e,t,r){if(jr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)jr(e,t.rest[n],t,r,!1)}function jr(e,t,r,n,i){if(t.widgets)for(var o=Fr(r),l=0,a=t.widgets;l<a.length;++l){var s=a[l],u=A("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Ur(s,u,r,n),e.display.input.setUneditable(u),i&&s.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),Dr(s,"redraw")}}function Ur(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Kr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!W(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),O(t.display.measure,A("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function _r(e,t){for(var r=Oe(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Xr(e){return e.lineSpace.offsetTop}function $r(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Yr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=O(e.measure,A("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function qr(e){return U-e.display.nativeBarWidth}function Zr(e){return e.display.scroller.clientWidth-qr(e)-e.display.barWidth}function Jr(e){return e.display.scroller.clientHeight-qr(e)-e.display.barHeight}function Qr(e,t,r){var n=e.options.lineWrapping,i=n&&Zr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),a=0;a<l.length-1;a++){var s=l[a],u=l[a+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function en(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(it(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function tn(e,t){var r=it(t=tr(t)),n=e.display.externalMeasured=new Sr(e.doc,t,r);n.lineN=r;var i=n.built=mr(e,n);return n.text=i.pre,O(e.display.lineMeasure,i.pre),n}function rn(e,t,r,n){return ln(e,on(e,t),r,n)}function nn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Rn(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function on(e,t){var r=it(t),n=nn(e,r);n&&!n.text?n=null:n&&n.changes&&(Hr(e,n,r,Fn(e)),e.curOp.forceUpdate=!0),n||(n=tn(e,t));var i=en(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function ln(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Qr(e,t.view,t.rect),t.hasHeights=!0),(o=fn(e,t,r,n)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var an,sn={left:0,right:0,top:0,bottom:0};function un(e,t,r){for(var n,i,o,l,a,s,u=0;u<e.length;u+=3)if(a=e[u],s=e[u+1],t<a?(i=0,o=1,l="left"):t<s?o=1+(i=t-a):(u==e.length-3||t==s&&e[u+3]>t)&&(i=(o=s-a)-1,t>=s&&(l="right")),null!=i){if(n=e[u+2],a==s&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==s-a)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:a,coverEnd:s}}function cn(e,t){var r=sn;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function fn(e,t,r,n){var i,o=un(t.map,r,n),s=o.node,u=o.start,c=o.end,f=o.collapse;if(3==s.nodeType){for(var d=0;d<4;d++){for(;u&&se(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&se(t.line.text.charAt(o.coverStart+c));)++c;if((i=l&&a<9&&0==u&&c==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():cn(T(s,u,c).getClientRects(),n)).left||i.right||0==u)break;c=u,u-=1,f="right"}l&&a<11&&(i=dn(e.display.measure,i))}else{var h;u>0&&(f=n="right"),i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==n?h.length-1:0]:s.getBoundingClientRect()}if(l&&a<9&&!u&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Hn(e.display),top:p.top,bottom:p.bottom}:sn}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(m<y[b]);b++);var w=b?y[b-1]:0,x=y[b],C={left:("right"==f?i.right:i.left)-t.rect.left,right:("left"==f?i.left:i.right)-t.rect.left,top:w,bottom:x};return i.left||i.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=v),C}function dn(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ve(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function hn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function pn(e){e.display.externalMeasure=null,N(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)hn(e.display.view[t])}function gn(e){pn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function vn(e){return c&&m?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function mn(e){return c&&m?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function yn(e){var t=tr(e).widgets,r=0;if(t)for(var n=0;n<t.length;++n)t[n].above&&(r+=Kr(t[n]));return r}function bn(e,t,r,n,i){if(!i){var o=yn(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=sr(t);if("local"==n?l+=Xr(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var a=e.display.lineSpace.getBoundingClientRect();l+=a.top+("window"==n?0:mn(z(e)));var s=a.left+("window"==n?0:vn(z(e)));r.left+=s,r.right+=s}return r.top+=l,r.bottom+=l,r}function wn(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=vn(z(e)),i-=mn(z(e));else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function xn(e,t,r,n,i){return n||(n=et(e.doc,t.line)),bn(e,n,rn(e,n,t.ch,i),r)}function Cn(e,t,r,n,i,o){function l(t,l){var a=ln(e,i,t,l?"right":"left",o);return l?a.left=a.right:a.right=a.left,bn(e,n,a,r)}n=n||et(e.doc,t.line),i||(i=on(e,n));var a=ge(n,e.doc.direction),s=t.ch,u=t.sticky;if(s>=n.text.length?(s=n.text.length,u="before"):s<=0&&(s=0,u="after"),!a)return l("before"==u?s-1:s,"before"==u);function c(e,t,r){return l(r?e-1:e,1==a[t].level!=r)}var f=he(a,s,u),d=de,h=c(s,f,"before"==u);return null!=d&&(h.other=c(s,d,"before"!=u)),h}function kn(e,t){var r=0;t=gt(e.doc,t),e.options.lineWrapping||(r=Hn(e.display)*t.ch);var n=et(e.doc,t.line),i=sr(n)+Xr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Sn(e,t,r,n,i){var o=st(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Ln(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Sn(n.first,0,null,-1,-1);var i=ot(n,r),o=n.first+n.size-1;if(i>o)return Sn(n.first+n.size-1,et(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=et(n,i);;){var a=On(e,l,i,t,r),s=Qt(l,a.ch+(a.xRel>0||a.outside>0?1:0));if(!s)return a;var u=s.find(1);if(u.line==i)return u;l=et(n,i=u.line)}}function Tn(e,t,r,n){n-=yn(t);var i=t.text.length,o=ce((function(t){return ln(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=ce((function(t){return ln(e,r,t).top>n}),o,i)}}function Mn(e,t,r,n){return r||(r=on(e,t)),Tn(e,t,r,bn(e,t,ln(e,r,n),"line").top)}function Nn(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function On(e,t,r,n,i){i-=sr(t);var o=on(e,t),l=yn(t),a=0,s=t.text.length,u=!0,c=ge(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?Dn:An)(e,t,r,o,c,n,i);a=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var d,h,p=null,g=null,v=ce((function(t){var r=ln(e,o,t);return r.top+=l,r.bottom+=l,!!Nn(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)}),a,s),m=!1;if(g){var y=n-g.left<g.right-n,b=y==u;v=p+(b?0:1),h=b?"after":"before",d=y?g.left:g.right}else{u||v!=s&&v!=a||v++,h=0==v?"after":v==t.text.length?"before":ln(e,o,v-(u?1:0)).bottom+l<=i==u?"after":"before";var w=Cn(e,st(r,v,h),"line",t,o);d=w.left,m=i<w.top?-1:i>=w.bottom?1:0}return Sn(r,v=ue(t.text,v,1),h,m,n-d)}function An(e,t,r,n,i,o,l){var a=ce((function(a){var s=i[a],u=1!=s.level;return Nn(Cn(e,st(r,u?s.to:s.from,u?"before":"after"),"line",t,n),o,l,!0)}),0,i.length-1),s=i[a];if(a>0){var u=1!=s.level,c=Cn(e,st(r,u?s.from:s.to,u?"after":"before"),"line",t,n);Nn(c,o,l,!0)&&c.top>l&&(s=i[a-1])}return s}function Dn(e,t,r,n,i,o,l){var a=Tn(e,t,n,l),s=a.begin,u=a.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,f=null,d=0;d<i.length;d++){var h=i[d];if(!(h.from>=u||h.to<=s)){var p=ln(e,n,1!=h.level?Math.min(u,h.to)-1:Math.max(s,h.from)).right,g=p<o?o-p+1e9:p-o;(!c||f>g)&&(c=h,f=g)}}return c||(c=i[i.length-1]),c.from<s&&(c={from:s,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function Wn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==an){an=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)an.appendChild(document.createTextNode("x")),an.appendChild(A("br"));an.appendChild(document.createTextNode("x"))}O(e.measure,an);var r=an.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),N(e.measure),r||1}function Hn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),r=A("pre",[t],"CodeMirror-line-like");O(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Fn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var a=e.display.gutterSpecs[l].className;r[a]=o.offsetLeft+o.clientLeft+i,n[a]=o.clientWidth}return{fixedPos:En(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function En(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Pn(e){var t=Wn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Hn(e.display)-3);return function(i){if(lr(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function zn(e){var t=e.doc,r=Pn(e);t.iter((function(e){var t=r(e);t!=e.height&&nt(e,t)}))}function In(e,t,r,n){var i=e.display;if(!r&&"true"==Oe(t).getAttribute("cm-not-content"))return null;var o,l,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,l=t.clientY-a.top}catch(e){return null}var s,u=Ln(e,o,l);if(n&&u.xRel>0&&(s=et(e.doc,u.line).text).length==u.ch){var c=V(s,s.length,e.options.tabSize)-s.length;u=st(u.line,Math.max(0,Math.round((o-Yr(e.display).left)/Hn(e.display))-c))}return u}function Rn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Bn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ht&&ir(e.doc,t)<i.viewTo&&Gn(e);else if(r<=i.viewFrom)Ht&&or(e.doc,r+n)>i.viewFrom?Gn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Gn(e);else if(t<=i.viewFrom){var o=jn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Gn(e)}else if(r>=i.viewTo){var l=jn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Gn(e)}else{var a=jn(e,t,t,-1),s=jn(e,r,r+n,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Lr(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):Gn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function Vn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[Rn(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==j(l,r)&&l.push(r)}}}function Gn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function jn(e,t,r,n){var i,o=Rn(e,t),l=e.display.view;if(!Ht||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var a=e.display.viewFrom,s=0;s<o;s++)a+=l[s].size;if(a!=t){if(n>0){if(o==l.length-1)return null;i=a+l[o].size-t,o++}else i=a-t;t+=i,r+=i}for(;ir(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Un(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Lr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Lr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Rn(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Lr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Rn(e,r)))),n.viewTo=r}function Kn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function _n(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Xn(e,t){void 0===t&&(t=!0);var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=e.options.$customCursor;l&&(t=!0);for(var a=0;a<r.sel.ranges.length;a++)if(t||a!=r.sel.primIndex){var s=r.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var u=s.empty();if(l){var c=l(e,s);c&&$n(e,c,i)}else(u||e.options.showCursorWhenSelecting)&&$n(e,s.head,i);u||qn(e,s,o)}}return n}function $n(e,t,r){var n=Cn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(A("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=xn(e,t,"div",null,null),l=o.right-o.left;i.style.width=(l>0?l:e.defaultCharWidth())+"px"}if(n.other){var a=r.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Yn(e,t){return e.top-t.top||e.left-t.left}function qn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Yr(e.display),a=l.left,s=Math.max(n.sizerWidth,Zr(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?s-e:r)+"px;\n height: "+(n-t)+"px"))}function f(t,r,n){var o,l,f=et(i,t),d=f.text.length;function h(r,n){return xn(e,st(t,r),"div",f,n)}function p(t,r,n){var i=Mn(e,f,null,t),o="ltr"==r==("after"==n)?"left":"right";return h("after"==n?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=ge(f,i.direction);return fe(g,r||0,null==n?d:n,(function(e,t,i,f){var v="ltr"==i,m=h(e,v?"left":"right"),y=h(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==d,x=0==f,C=!g||f==g.length-1;if(y.top-m.top<=3){var k=(u?w:b)&&C,S=(u?b:w)&&x?a:(v?m:y).left,L=k?s:(v?y:m).right;c(S,m.top,L-S,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?a:m.left,M=u?s:p(e,i,"before"),N=u?a:p(t,i,"after"),O=u&&w&&C?s:y.right):(T=u?p(e,i,"before"):a,M=!u&&b&&x?s:m.right,N=!u&&w&&C?a:y.left,O=u?p(t,i,"after"):s),c(T,m.top,M-T,m.bottom),m.bottom<y.top&&c(a,m.bottom,null,y.top),c(N,y.top,O-N,y.bottom)}(!o||Yn(m,o)<0)&&(o=m),Yn(y,o)<0&&(o=y),(!l||Yn(m,l)<0)&&(l=m),Yn(y,l)<0&&(l=y)})),{start:o,end:l}}var d=t.from(),h=t.to();if(d.line==h.line)f(d.line,d.ch,h.ch);else{var p=et(i,d.line),g=et(i,h.line),v=tr(p)==tr(g),m=f(d.line,d.ch,v?p.text.length+1:null).end,y=f(h.line,v?0:null,h.ch).start;v&&(m.top<y.top-2?(c(m.right,m.top,null,m.bottom),c(a,y.top,y.left,y.bottom)):c(m.right,m.top,y.left-m.right,m.bottom)),m.bottom<y.top&&c(a,m.bottom,null,y.top)}r.appendChild(o)}function Zn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||ti(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Jn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ei(e))}function Qn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ti(e))}),100)}function ei(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(we(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Zn(e))}function ti(e,t){e.state.delayingBlurEvent||(e.state.focused&&(we(e,"blur",e,t),e.state.focused=!1,M(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function ri(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s<t.view.length;s++){var u=t.view[s],c=e.options.lineWrapping,f=void 0,d=0;if(!u.hidden){if(i+=u.line.height,l&&a<8){var h=u.node.offsetTop+u.node.offsetHeight;f=h-r,r=h}else{var p=u.node.getBoundingClientRect();f=p.bottom-p.top,!c&&u.text.firstChild&&(d=u.text.firstChild.getBoundingClientRect().right-p.left-1)}var g=u.line.height-f;if((g>.005||g<-.005)&&(i<n&&(o-=g),nt(u.line,f),ni(u.line),u.rest))for(var v=0;v<u.rest.length;v++)ni(u.rest[v]);if(d>e.display.sizerWidth){var m=Math.ceil(d/Hn(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function ni(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function ii(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Xr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=ot(t,n),l=ot(t,i);if(r&&r.ensure){var a=r.ensure.from.line,s=r.ensure.to.line;a<o?(o=a,l=ot(t,sr(et(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=ot(t,sr(et(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function oi(e,t){if(!xe(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null,o=r.wrapper.ownerDocument;if(t.top+n.top<0?i=!0:t.bottom+n.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var l=A("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Xr(e.display))+"px;\n height: "+(t.bottom-t.top+qr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function li(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?st(t.line,t.ch+1,"before"):t,t=t.ch?st(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=Cn(e,t),s=r&&r!=t?Cn(e,r):a,u=si(e,i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-n,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+n}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(gi(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(mi(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function ai(e,t){var r=si(e,t);null!=r.scrollTop&&gi(e,r.scrollTop),null!=r.scrollLeft&&mi(e,r.scrollLeft)}function si(e,t){var r=e.display,n=Wn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Jr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+$r(r),s=t.top<n,u=t.bottom>a-n;if(t.top<i)l.scrollTop=s?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?a:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-f,h=Zr(e)-r.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.left<d?l.scrollLeft=Math.max(0,t.left+f-(p?0:10)):t.right>h+d-3&&(l.scrollLeft=t.right+(p?0:10)-h),l}function ui(e,t){null!=t&&(hi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ci(e){hi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function fi(e,t,r){null==t&&null==r||hi(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function di(e,t){hi(e),e.curOp.scrollToPos=t}function hi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,pi(e,kn(e,t.from),kn(e,t.to),t.margin))}function pi(e,t,r,n){var i=si(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});fi(e,i.scrollLeft,i.scrollTop)}function gi(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||_i(e,{top:t}),vi(e,t,!0),r&&_i(e),Ii(e,100))}function vi(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function mi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,qi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function yi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+$r(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+qr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var bi=function(e,t,r){this.cm=r;var n=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),me(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),me(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};bi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},bi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},bi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},bi.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new G,this.disableVert=new G},bi.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,n)}e.style.visibility="",t.set(1e3,n)},bi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var wi=function(){};function xi(e,t){t||(t=yi(e));var r=e.display.barWidth,n=e.display.barHeight;Ci(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&ri(e),Ci(e,yi(e)),r=e.display.barWidth,n=e.display.barHeight}function Ci(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}wi.prototype.update=function(){return{bottom:0,right:0}},wi.prototype.setScrollLeft=function(){},wi.prototype.setScrollTop=function(){},wi.prototype.clear=function(){};var ki={native:bi,null:wi};function Si(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ki[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?mi(e,t):gi(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Li=0;function Ti(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Li,markArrays:null},Mr(e.curOp)}function Mi(e){var t=e.curOp;t&&Or(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Ni(e)}))}function Ni(e){for(var t=e.ops,r=0;r<t.length;r++)Oi(t[r]);for(var n=0;n<t.length;n++)Ai(t[n]);for(var i=0;i<t.length;i++)Di(t[i]);for(var o=0;o<t.length;o++)Wi(t[o]);for(var l=0;l<t.length;l++)Hi(t[l])}function Oi(e){var t=e.cm,r=t.display;Vi(t),e.updateMaxLine&&cr(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Bi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ai(e){e.updatedDisplay=e.mustUpdate&&Ui(e.cm,e.update)}function Di(e){var t=e.cm,r=t.display;e.updatedDisplay&&ri(t),e.barMeasure=yi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=rn(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+qr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Zr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Wi(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&mi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==H(z(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&xi(t,e.barMeasure),e.updatedDisplay&&Yi(t,e.barMeasure),e.selectionChanged&&Zn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Jn(e.cm)}function Hi(e){var t=e.cm,r=t.display,n=t.doc;e.updatedDisplay&&Ki(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&vi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&mi(t,e.scrollLeft,!0,!0),e.scrollToPos&&oi(t,li(t,gt(n,e.scrollToPos.from),gt(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||we(i[l],"hide");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&we(o[a],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&we(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Fi(e,t){if(e.curOp)return t();Ti(e);try{return t()}finally{Mi(e)}}function Ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ti(e);try{return t.apply(e,arguments)}finally{Mi(e)}}}function Pi(e){return function(){if(this.curOp)return e.apply(this,arguments);Ti(this);try{return e.apply(this,arguments)}finally{Mi(this)}}}function zi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ti(t);try{return e.apply(this,arguments)}finally{Mi(t)}}}function Ii(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,R(Ri,e))}function Ri(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Ct(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var l=o.styles,a=o.text.length>e.options.maxHighlightLength?qe(t.mode,n.state):null,s=wt(e,o,n,!0);a&&(n.state=a),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!f&&d<l.length;++d)f=l[d]!=o.styles[d];f&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&kt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Ii(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Fi(e,(function(){for(var t=0;t<i.length;t++)Vn(e,i[t],"text")}))}}var Bi=function(e,t,r){var n=e.display;this.viewport=t,this.visible=ii(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Zr(e),this.force=r,this.dims=Fn(e),this.events=[]};function Vi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=qr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=qr(e)+"px",t.scrollbarsClipped=!0)}function Gi(e){if(e.hasFocus())return null;var t=H(z(e));if(!t||!W(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=I(e).getSelection();n.anchorNode&&n.extend&&W(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ji(e){if(e&&e.activeElt&&e.activeElt!=H(e.activeElt.ownerDocument)&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&W(document.body,e.anchorNode)&&W(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,r=t.defaultView.getSelection(),n=t.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),r.removeAllRanges(),r.addRange(n),r.extend(e.focusNode,e.focusOffset)}}function Ui(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Gn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Kn(e))return!1;Zi(e)&&(Gn(e),t.dims=Fn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Ht&&(o=ir(e.doc,o),l=or(e.doc,l));var a=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Un(e,o,l),r.viewOffset=sr(et(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var s=Kn(e);if(!a&&0==s&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=Gi(e);return s>4&&(r.lineDiv.style.display="none"),Xi(e,r.updateLineNumbers,t.dims),s>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ji(u),N(r.cursorDiv),N(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,a&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Ii(e,400)),r.updateLineNumbers=null,!0}function Ki(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Zr(e))n&&(t.visible=ii(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+$r(e.display)-Jr(e),r.top)}),t.visible=ii(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ui(e,t))break;ri(e);var i=yi(e);_n(e),xi(e,i),Yi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _i(e,t){var r=new Bi(e,t);if(Ui(e,r)){ri(e),Ki(e,r);var n=yi(e);_n(e),xi(e,n),Yi(e,n),r.finish()}}function Xi(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function a(t){var r=t.nextSibling;return s&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,f=0;f<u.length;f++){var d=u[f];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;l!=d.node;)l=a(l);var h=i&&null!=t&&t<=c&&d.lineNumber;d.changes&&(j(d.changes,"gutter")>-1&&(h=!1),Hr(e,d,c,r)),h&&(N(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(at(e.options,c)))),l=d.node.nextSibling}else{var p=Vr(e,d,c,r);o.insertBefore(p,l)}c+=d.size}for(;l;)l=a(l)}function $i(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Dr(e,"gutterChanged",e)}function Yi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+qr(e)+"px"}function qi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=En(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var a=r[l].alignable;if(a)for(var s=0;s<a.length;s++)a[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Zi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=at(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(A("div",[A("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",$i(e.display),!0}return!1}function Ji(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],l=null;if("string"!=typeof o&&(l=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;n=!0}r.push({className:o,style:l})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Qi(e){var t=e.gutters,r=e.gutterSpecs;N(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,l=i.style,a=t.appendChild(A("div",null,"CodeMirror-gutter "+o));l&&(a.style.cssText=l),"CodeMirror-linenumbers"==o&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",$i(e)}function eo(e){Qi(e.display),Bn(e),qi(e)}function to(e,t,n,i){var o=this;this.input=n,o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=D("div",null,"CodeMirror-code"),o.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=A("div",null,"CodeMirror-cursors"),o.measure=A("div",null,"CodeMirror-measure"),o.lineMeasure=A("div",null,"CodeMirror-measure"),o.lineSpace=D("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var u=D("div",[o.lineSpace],"CodeMirror-lines");o.mover=A("div",[u],null,"position: relative"),o.sizer=A("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=A("div",null,null,"position: absolute; height: "+U+"px; width: 1px;"),o.gutters=A("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),c&&f>=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),l&&a<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),s||r&&y||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Ji(i.gutters,i.lineNumbers),Qi(o),n.init(o)}Bi.prototype.signal=function(e,t){ke(e,t)&&this.events.push(arguments)},Bi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)we.apply(null,this.events[e])};var ro=0,no=null;function io(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function oo(e){var t=io(e);return t.x*=no,t.y*=no,t}function lo(e,t){c&&102==f&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var n=io(t),i=n.x,o=n.y,l=no;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,l=1);var a=e.display,u=a.scroller,h=u.scrollWidth>u.clientWidth,p=u.scrollHeight>u.clientHeight;if(i&&h||o&&p){if(o&&b&&s)e:for(var g=t.target,v=a.view;g!=u;g=g.parentNode)for(var m=0;m<v.length;m++)if(v[m].node==g){e.display.currentWheelTarget=g;break e}if(i&&!r&&!d&&null!=l)return o&&p&&gi(e,Math.max(0,u.scrollTop+o*l)),mi(e,Math.max(0,u.scrollLeft+i*l)),(!o||o&&p)&&Le(t),void(a.wheelStartX=null);if(o&&null!=l){var y=o*l,w=e.doc.scrollTop,x=w+a.wrapper.clientHeight;y<0?w=Math.max(0,w+y-50):x=Math.min(e.doc.height,x+y+50),_i(e,{top:w,bottom:x})}ro<20&&0!==t.deltaMode&&(null==a.wheelStartX?(a.wheelStartX=u.scrollLeft,a.wheelStartY=u.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=u.scrollLeft-a.wheelStartX,t=u.scrollTop-a.wheelStartY,r=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,r&&(no=(no*ro+r)/(ro+1),++ro)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}l?no=-.53:r?no=15:c?no=-.7:h&&(no=-1/3);var ao=function(e,t){this.ranges=e,this.primIndex=t};ao.prototype.primary=function(){return this.ranges[this.primIndex]},ao.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ct(r.anchor,n.anchor)||!ct(r.head,n.head))return!1}return!0},ao.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new so(ft(this.ranges[t].anchor),ft(this.ranges[t].head));return new ao(e,this.primIndex)},ao.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ao.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ut(t,n.from())>=0&&ut(e,n.to())<=0)return r}return-1};var so=function(e,t){this.anchor=e,this.head=t};function uo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return ut(e.from(),t.from())})),r=j(t,i);for(var o=1;o<t.length;o++){var l=t[o],a=t[o-1],s=ut(a.to(),l.from());if(n&&!l.empty()?s>0:s>=0){var u=ht(a.from(),l.from()),c=dt(a.to(),l.to()),f=a.empty()?l.from()==l.head:a.from()==a.head;o<=r&&--r,t.splice(--o,2,new so(f?c:u,f?u:c))}}return new ao(t,r)}function co(e,t){return new ao([new so(e,t||e)],0)}function fo(e){return e.text?st(e.from.line+e.text.length-1,J(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function ho(e,t){if(ut(e,t.from)<0)return e;if(ut(e,t.to)<=0)return fo(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=fo(t).ch-t.to.ch),st(r,n)}function po(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new so(ho(i.anchor,t),ho(i.head,t)))}return uo(e.cm,r,e.sel.primIndex)}function go(e,t,r){return e.line==t.line?st(r.line,e.ch-t.ch+r.ch):st(r.line+(e.line-t.line),e.ch)}function vo(e,t,r){for(var n=[],i=st(e.first,0),o=i,l=0;l<t.length;l++){var a=t[l],s=go(a.from,i,o),u=go(fo(a),i,o);if(i=a.to,o=u,"around"==r){var c=e.sel.ranges[l],f=ut(c.head,c.anchor)<0;n[l]=new so(f?u:s,f?s:u)}else n[l]=new so(s,s)}return new ao(n,e.sel.primIndex)}function mo(e){e.doc.mode=Xe(e.options,e.doc.modeOption),yo(e)}function yo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ii(e,100),e.state.modeGen++,e.curOp&&Bn(e)}function bo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==J(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function wo(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){dr(e,r,i,n),Dr(e,"change",e,t)}function l(e,t){for(var r=[],o=e;o<t;++o)r.push(new fr(u[o],i(o),n));return r}var a=t.from,s=t.to,u=t.text,c=et(e,a.line),f=et(e,s.line),d=J(u),h=i(u.length-1),p=s.line-a.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(bo(e,t)){var g=l(0,u.length-1);o(f,f.text,h),p&&e.remove(a.line,p),g.length&&e.insert(a.line,g)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,a.ch)+d+c.text.slice(s.ch),h);else{var v=l(1,u.length-1);v.push(new fr(d+c.text.slice(s.ch),h,n)),o(c,c.text.slice(0,a.ch)+u[0],i(0)),e.insert(a.line+1,v)}else if(1==u.length)o(c,c.text.slice(0,a.ch)+u[0]+f.text.slice(s.ch),i(0)),e.remove(a.line+1,p);else{o(c,c.text.slice(0,a.ch)+u[0],i(0)),o(f,d+f.text.slice(s.ch),h);var m=l(1,u.length-1);p>1&&e.remove(a.line+1,p-1),e.insert(a.line+1,m)}Dr(e,"change",e,t)}function xo(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l<e.linked.length;++l){var a=e.linked[l];if(a.doc!=i){var s=o&&a.sharedHist;r&&!s||(t(a.doc,s),n(a.doc,e,s))}}}n(e,null,!0)}function Co(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,zn(e),mo(e),ko(e),e.options.direction=t.direction,e.options.lineWrapping||cr(e),e.options.mode=t.modeOption,Bn(e)}function ko(e){("rtl"==e.doc.direction?F:M)(e.display.lineDiv,"CodeMirror-rtl")}function So(e){Fi(e,(function(){ko(e),Bn(e)}))}function Lo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function To(e,t){var r={from:ft(t.from),to:fo(t),text:tt(e,t.from,t.to)};return Ho(e,r,t.from.line,t.to.line+1),xo(e,(function(e){return Ho(e,r,t.from.line,t.to.line+1)}),!0),r}function Mo(e){for(;e.length&&J(e).ranges;)e.pop()}function No(e,t){return t?(Mo(e.done),J(e.done)):e.done.length&&!J(e.done).ranges?J(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),J(e.done)):void 0}function Oo(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,a=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=No(i,i.lastOp==n)))l=J(o.changes),0==ut(t.from,t.to)&&0==ut(t.from,l.to)?l.to=fo(t):o.changes.push(To(e,t));else{var s=J(i.done);for(s&&s.ranges||Wo(e.sel,i.done),o={changes:[To(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||we(e,"historyAdded")}function Ao(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Do(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Ao(e,o,J(i.done),t))?i.done[i.done.length-1]=t:Wo(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Mo(i.undone)}function Wo(e,t){var r=J(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ho(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Fo(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Eo(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Fo(r[i]));return n}function Po(e,t){var r=Eo(e,t),n=Gt(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var a=0;a<l.length;++a){for(var s=l[a],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else l&&(r[i]=l)}return r}function zo(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?ao.prototype.deepCopy.call(o):o);else{var l=o.changes,a=[];n.push({changes:a});for(var s=0;s<l.length;++s){var u=l[s],c=void 0;if(a.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&j(t,Number(c[1]))>-1&&(J(a)[f]=u[f],delete u[f])}}}return n}function Io(e,t,r,n){if(n){var i=e.anchor;if(r){var o=ut(t,i)<0;o!=ut(r,i)<0?(i=t,t=r):o!=ut(t,r)<0&&(t=r)}return new so(i,t)}return new so(r||t,t)}function Ro(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ko(e,new ao([Io(e.sel.primary(),t,r,i)],0),n)}function Bo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Io(e.sel.ranges[o],t[o],null,i);Ko(e,uo(e.cm,n,e.sel.primIndex),r)}function Vo(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Ko(e,uo(e.cm,i,e.sel.primIndex),n)}function Go(e,t,r,n){Ko(e,co(t,r),n)}function jo(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new so(gt(e,t[r].anchor),gt(e,t[r].head))},origin:r&&r.origin};return we(e,"beforeSelectionChange",e,n),e.cm&&we(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?uo(e.cm,n.ranges,n.ranges.length-1):t}function Uo(e,t,r){var n=e.history.done,i=J(n);i&&i.ranges?(n[n.length-1]=t,_o(e,t,r)):Ko(e,t,r)}function Ko(e,t,r){_o(e,t,r),Do(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function _o(e,t,r){(ke(e,"beforeSelectionChange")||e.cm&&ke(e.cm,"beforeSelectionChange"))&&(t=jo(e,t,r));var n=r&&r.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);Xo(e,Yo(e,t,n,!0)),r&&!1===r.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||ci(e.cm)}function Xo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ce(e.cm)),Dr(e,"cursorActivity",e))}function $o(e){Xo(e,Yo(e,e.sel,null,!1))}function Yo(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Zo(e,l.anchor,a&&a.anchor,r,n),u=l.head==l.anchor?s:Zo(e,l.head,a&&a.head,r,n);(i||s!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new so(s,u))}return i?uo(e.cm,i,t.primIndex):t}function qo(e,t,r,n,i){var o=et(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var a=o.markedSpans[l],s=a.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,c="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==a.from||(u?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(c?a.to>=t.ch:a.to>t.ch))){if(i&&(we(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!s.atomic)continue;if(r){var f=s.find(n<0?1:-1),d=void 0;if((n<0?c:u)&&(f=Jo(e,f,-n,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(d=ut(f,r))&&(n<0?d<0:d>0))return qo(e,f,t,n,i)}var h=s.find(n<0?-1:1);return(n<0?u:c)&&(h=Jo(e,h,n,h.line==t.line?o:null)),h?qo(e,h,t,n,i):null}}return t}function Zo(e,t,r,n,i){var o=n||1,l=qo(e,t,r,o,i)||!i&&qo(e,t,r,o,!0)||qo(e,t,r,-o,i)||!i&&qo(e,t,r,-o,!0);return l||(e.cantEdit=!0,st(e.first,0))}function Jo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?gt(e,st(t.line-1)):null:r>0&&t.ch==(n||et(e,t.line)).text.length?t.line<e.first+e.size-1?st(t.line+1,0):null:new st(t.line,t.ch+r)}function Qo(e){e.setSelection(st(e.firstLine(),0),st(e.lastLine()),_)}function el(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=gt(e,t)),r&&(n.to=gt(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),we(e,"beforeChange",e,n),e.cm&&we(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function tl(e,t,r){if(e.cm){if(!e.cm.curOp)return Ei(e.cm,tl)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(ke(e,"beforeChange")||e.cm&&ke(e.cm,"beforeChange"))||(t=el(e,t,!0))){var n=Wt&&!r&&Ut(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)rl(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else rl(e,t)}}function rl(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ut(t.from,t.to)){var r=po(e,t);Oo(e,t,r,e.cm?e.cm.curOp.id:NaN),ol(e,t,r,Gt(e,t));var n=[];xo(e,(function(e,r){r||-1!=j(n,e.history)||(cl(e.history,t),n.push(e.history)),ol(e,t,null,Gt(e,t))}))}}function nl(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,a="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u<a.length&&(i=a[u],r?!i.ranges||i.equals(e.sel):i.ranges);u++);if(u!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=a.pop()).ranges){if(n)return void a.push(i);break}if(Wo(i,s),r&&!i.equals(e.sel))return void Ko(e,i,{clearRedo:!1});l=i}var c=[];Wo(l,s),s.push({changes:c,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var f=ke(e,"beforeChange")||e.cm&&ke(e.cm,"beforeChange"),d=function(r){var n=i.changes[r];if(n.origin=t,f&&!el(e,n,!1))return a.length=0,{};c.push(To(e,n));var o=r?po(e,n):J(a);ol(e,n,o,Po(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:fo(n)});var l=[];xo(e,(function(e,t){t||-1!=j(l,e.history)||(cl(e.history,n),l.push(e.history)),ol(e,n,null,Po(e,n))}))},h=i.changes.length-1;h>=0;--h){var p=d(h);if(p)return p.v}}}}function il(e,t){if(0!=t&&(e.first+=t,e.sel=new ao(Q(e.sel.ranges,(function(e){return new so(st(e.anchor.line+t,e.anchor.ch),st(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Bn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Vn(e.cm,n,"gutter")}}function ol(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ei(e.cm,ol)(e,t,r,n);if(t.to.line<e.first)il(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);il(e,i),t={from:st(e.first,0),to:st(t.to.line+i,t.to.ch),text:[J(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:st(o,et(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=tt(e,t.from,t.to),r||(r=po(e,t)),e.cm?ll(e.cm,t,n):wo(e,t,n),_o(e,r,_),e.cantEdit&&Zo(e,st(e.firstLine(),0))&&(e.cantEdit=!1)}}function ll(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,a=!1,s=o.line;e.options.lineWrapping||(s=it(tr(et(n,o.line))),n.iter(s,l.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&Ce(e),wo(n,t,r,Pn(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,(function(e){var t=ur(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),Dt(n,o.line),Ii(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?Bn(e):o.line!=l.line||1!=t.text.length||bo(e.doc,t)?Bn(e,o.line,l.line+1,u):Vn(e,o.line,"text");var c=ke(e,"changes"),f=ke(e,"change");if(f||c){var d={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&Dr(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function al(e,t,r,n,i){var o;n||(n=r),ut(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),tl(e,{from:r,to:n,text:t,origin:i})}function sl(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ul(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)sl(o.ranges[a].anchor,t,r,n),sl(o.ranges[a].head,t,r,n)}else{for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(r<u.from.line)u.from=st(u.from.line+n,u.from.ch),u.to=st(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function cl(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ul(e.done,r,n,i),ul(e.undone,r,n,i)}function fl(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=et(e,pt(e,t)):i=it(t),null==i?null:(n(o,i)&&e.cm&&Vn(e.cm,i,r),o)}function dl(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function hl(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}so.prototype.from=function(){return ht(this.anchor,this.head)},so.prototype.to=function(){return dt(this.anchor,this.head)},so.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},dl.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,hr(i),Dr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},hl.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),l=n.height;if(n.removeInner(e,o),this.height-=l-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof dl))){var a=[];this.collapse(a),this.children=[new dl(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,a=l;a<i.lines.length;){var s=new dl(i.lines.slice(a,a+=25));i.height-=s.height,this.children.splice(++n,0,s),s.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new hl(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=j(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new hl(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var pl=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function gl(e,t,r){sr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ui(e,r)}function vl(e,t,r,n){var i=new pl(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),fl(e,t,"widget",(function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!lr(e,t)){var n=sr(t)<e.scrollTop;nt(t,t.height+Kr(i)),n&&ui(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Dr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:it(t)),i}pl.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=it(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Kr(this);nt(r,Math.max(0,r.height-o)),e&&(Fi(e,(function(){gl(e,r,-o),Vn(e,n,"widget")})),Dr(e,"lineWidgetCleared",e,this,n))}},pl.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Kr(this)-t;i&&(lr(this.doc,n)||nt(n,n.height+i),r&&Fi(r,(function(){r.curOp.forceUpdate=!0,gl(r,n,i),Dr(r,"lineWidgetChanged",r,e,it(n))})))},Se(pl);var ml=0,yl=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ml};function bl(e,t,r,n,i){if(n&&n.shared)return xl(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ei(e.cm,bl)(e,t,r,n,i);var o=new yl(e,i),l=ut(t,r);if(n&&B(n,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(er(e,t.line,t,r,o)||t.line!=r.line&&er(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et()}o.addToHistory&&Oo(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,s=t.line,u=e.cm;if(e.iter(s,r.line+1,(function(n){u&&o.collapsed&&!u.options.lineWrapping&&tr(n)==u.display.maxLine&&(a=!0),o.collapsed&&s!=t.line&&nt(n,0),Rt(n,new Pt(o,s==t.line?t.ch:null,s==r.line?r.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){lr(e,t)&&nt(t,0)})),o.clearOnEnter&&me(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Ft(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ml,o.atomic=!0),u){if(a&&(u.curOp.updateMaxLine=!0),o.collapsed)Bn(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)Vn(u,c,"text");o.atomic&&$o(u.doc),Dr(u,"markerAdded",u,o)}return o}yl.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ti(e),ke(this,"clear")){var r=this.find();r&&Dr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],a=zt(l.markedSpans,this);e&&!this.collapsed?Vn(e,it(l),"text"):e&&(null!=a.to&&(i=it(l)),null!=a.from&&(n=it(l))),l.markedSpans=It(l.markedSpans,a),null==a.from&&this.collapsed&&!lr(this.doc,l)&&e&&nt(l,Wn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=tr(this.lines[s]),c=ur(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Bn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&$o(e.doc)),e&&Dr(e,"markerCleared",e,this,n,i),t&&Mi(e),this.parent&&this.parent.clear()}},yl.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=zt(o.markedSpans,this);if(null!=l.from&&(r=st(t?o:it(o),l.from),-1==e))return r;if(null!=l.to&&(n=st(t?o:it(o),l.to),1==e))return n}return r&&{from:r,to:n}},yl.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&Fi(n,(function(){var i=t.line,o=it(t.line),l=nn(n,o);if(l&&(hn(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!lr(r.doc,i)&&null!=r.height){var a=r.height;r.height=null;var s=Kr(r)-a;s&&nt(i,i.height+s)}Dr(n,"markerChanged",n,e)}))},yl.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=j(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},yl.prototype.detachLine=function(e){if(this.lines.splice(j(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Se(yl);var wl=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function xl(e,t,r,n,i){(n=B(n)).shared=!1;var o=[bl(e,t,r,n,i)],l=o[0],a=n.widgetNode;return xo(e,(function(e){a&&(n.widgetNode=a.cloneNode(!0)),o.push(bl(e,gt(e,t),gt(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;l=J(o)})),new wl(o,l)}function Cl(e){return e.findMarks(st(e.first,0),e.clipPos(st(e.lastLine())),(function(e){return e.parent}))}function kl(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(ut(o,l)){var a=bl(e,o,l,n.primary,n.primary.type);n.markers.push(a),a.parent=n}}}function Sl(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];xo(r.primary.doc,(function(e){return n.push(e)}));for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==j(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}wl.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Dr(this,"clear")}},wl.prototype.find=function(e,t){return this.primary.find(e,t)},Se(wl);var Ll=0,Tl=function(e,t,r,n,i){if(!(this instanceof Tl))return new Tl(e,t,r,n,i);null==r&&(r=0),hl.call(this,[new dl([new fr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=st(r,0);this.sel=co(o),this.history=new Lo(null),this.id=++Ll,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),wo(this,{from:o,to:o,text:e}),Ko(this,co(o),_)};Tl.prototype=re(hl.prototype,{constructor:Tl,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=rt(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:zi((function(e){var t=st(this.first,0),r=this.first+this.size-1;tl(this,{from:t,to:st(r,et(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&fi(this.cm,0,0),Ko(this,co(t),_)})),replaceRange:function(e,t,r,n){al(this,e,t=gt(this,t),r=r?gt(this,r):t,n)},getRange:function(e,t,r){var n=tt(this,gt(this,e),gt(this,t));return!1===r?n:""===r?n.join(""):n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(lt(this,e))return et(this,e)},getLineNumber:function(e){return it(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=et(this,e)),tr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return gt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:zi((function(e,t,r){Go(this,gt(this,"number"==typeof e?st(e,t||0):e),null,r)})),setSelection:zi((function(e,t,r){Go(this,gt(this,e),gt(this,t||e),r)})),extendSelection:zi((function(e,t,r){Ro(this,gt(this,e),t&>(this,t),r)})),extendSelections:zi((function(e,t){Bo(this,mt(this,e),t)})),extendSelectionsBy:zi((function(e,t){Bo(this,mt(this,Q(this.sel.ranges,e)),t)})),setSelections:zi((function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new so(gt(this,e[i].anchor),gt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Ko(this,uo(this.cm,n,t),r)}})),addSelection:zi((function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new so(gt(this,e),gt(this,t||e))),Ko(this,uo(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=tt(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=tt(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:zi((function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];n[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:r}}for(var a=t&&"end"!=t&&vo(this,n,t),s=n.length-1;s>=0;s--)tl(this,n[s]);a?Uo(this,a):this.cm&&ci(this.cm)})),undo:zi((function(){nl(this,"undo")})),redo:zi((function(){nl(this,"redo")})),undoSelection:zi((function(){nl(this,"undo",!0)})),redoSelection:zi((function(){nl(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Lo(this.history),xo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:zo(this.history.done),undone:zo(this.history.undone)}},setHistory:function(e){var t=this.history=new Lo(this.history);t.done=zo(e.done.slice(0),null,!0),t.undone=zo(e.undone.slice(0),null,!0)},setGutterMarker:zi((function(e,t,r){return fl(this,e,"gutter",(function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&le(n)&&(e.gutterMarkers=null),!0}))})),clearGutter:zi((function(e){var t=this;this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&fl(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,le(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!lt(this,e))return null;if(t=e,!(e=et(this,e)))return null}else if(null==(t=it(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:zi((function(e,t,r){return fl(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(L(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0}))})),removeLineClass:zi((function(e,t,r){return fl(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(L(r));if(!o)return!1;var l=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0}))})),addLineWidget:zi((function(e,t,r){return vl(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return bl(this,gt(this,e),gt(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return bl(this,e=gt(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=et(this,(e=gt(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=gt(this,e),t=gt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var a=0;a<l.length;a++){var s=l[a];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r})),gt(this,st(r,t))},indexFromPos:function(e){var t=(e=gt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+r})),t},copy:function(e){var t=new Tl(rt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Tl(rt(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],kl(n,Cl(this)),n},unlinkDoc:function(e){if(e instanceof Ba&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Sl(Cl(this));break}if(e.history==this.history){var r=[e.id];xo(e,(function(e){return r.push(e.id)}),!0),e.history=new Lo(null),e.history.done=zo(this.history.done,r),e.history.undone=zo(this.history.undone,r)}},iterLinkedDocs:function(e){xo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ze(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:zi((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&So(this.cm))}))}),Tl.prototype.eachLine=Tl.prototype.iter;var Ml=0;function Nl(e){var t=this;if(Dl(t),!xe(t,e)&&!_r(t.display,e)){Le(e),l&&(Ml=+new Date);var r=In(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,s=function(){++a==i&&Ei(t,(function(){var e={from:r=gt(t.doc,r),to:r,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};tl(t.doc,e),Uo(t.doc,co(gt(t.doc,r),gt(t.doc,fo(e))))}))()},u=function(e,r){if(t.options.allowDropFileTypes&&-1==j(t.options.allowDropFileTypes,e.type))s();else{var n=new FileReader;n.onerror=function(){return s()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[r]=e),s()},n.readAsText(e)}},c=0;c<n.length;c++)u(n[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),_o(t.doc,co(r,r)),d)for(var h=0;h<d.length;++h)al(t.doc,"",d[h].anchor,d[h].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ol(e,t){if(l&&(!e.state.draggingText||+new Date-Ml<100))Ne(t);else if(!xe(e,t)&&!_r(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var r=A("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),d&&r.parentNode.removeChild(r)}}function Al(e,t){var r=In(e,t);if(r){var n=document.createDocumentFragment();$n(e,r,n),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,n)}}function Dl(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Wl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation((function(){for(var t=0;t<r.length;t++)e(r[t])}))}}var Hl=!1;function Fl(){Hl||(El(),Hl=!0)}function El(){var e;me(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Wl(Pl)}),100))})),me(window,"blur",(function(){return Wl(ti)}))}function Pl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var zl={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Il=0;Il<10;Il++)zl[Il+48]=zl[Il+96]=String(Il);for(var Rl=65;Rl<=90;Rl++)zl[Rl]=String.fromCharCode(Rl);for(var Bl=1;Bl<=12;Bl++)zl[Bl+111]=zl[Bl+63235]="F"+Bl;var Vl={};function Gl(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var a=o[l];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function jl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=Q(r.split(" "),Gl),o=0;o<i.length;o++){var l=void 0,a=void 0;o==i.length-1?(a=i.join(" "),l=n):(a=i.slice(0,o+1).join(" "),l="...");var s=t[a];if(s){if(s!=l)throw new Error("Inconsistent bindings for "+a)}else t[a]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function Ul(e,t,r,n){var i=(t=$l(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ul(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=Ul(e,t.fallthrough[o],r,n);if(l)return l}}}function Kl(e){var t="string"==typeof e?e:zl[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function _l(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(k?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Xl(e,t){if(d&&34==e.keyCode&&e.char)return!1;var r=zl[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),_l(r,e,t))}function $l(e){return"string"==typeof e?Vl[e]:e}function Yl(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&ut(o.from,J(n).to)<=0;){var l=n.pop();if(ut(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}Fi(e,(function(){for(var t=n.length-1;t>=0;t--)al(e.doc,"",n[t].from,n[t].to,"+delete");ci(e)}))}function ql(e,t,r){var n=ue(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Zl(e,t,r){var n=ql(e,t.ch,r);return null==n?null:new st(t.line,n,r<0?"after":"before")}function Jl(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ge(r,t.doc.direction);if(o){var l,a=i<0?J(o):o[0],s=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var u=on(t,r);l=i<0?r.text.length-1:0;var c=ln(t,u,l).top;l=ce((function(e){return ln(t,u,e).top==c}),i<0==(1==a.level)?a.from:a.to-1,l),"before"==s&&(l=ql(r,l,1))}else l=i<0?a.to:a.from;return new st(n,l,s)}}return new st(n,i<0?r.text.length:0,i<0?"before":"after")}function Ql(e,t,r,n){var i=ge(t,e.doc.direction);if(!i)return Zl(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=he(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from<r.ch))return Zl(t,r,n);var a,s=function(e,r){return ql(t,e instanceof st?e.ch:e,r)},u=function(r){return e.options.lineWrapping?(a=a||on(e,t),Mn(e,t,a,r)):{begin:0,end:t.text.length}},c=u("before"==r.sticky?s(r,-1):r.ch);if("rtl"==e.doc.direction||1==l.level){var f=1==l.level==n<0,d=s(r,f?1:-1);if(null!=d&&(f?d<=l.to&&d<=c.end:d>=l.from&&d>=c.begin)){var h=f?"before":"after";return new st(r.line,d,h)}}var p=function(e,t,n){for(var o=function(e,t){return t?new st(r.line,s(e,1),"before"):new st(r.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],a=t>0==(1!=l.level),u=a?n.begin:s(n.end,-1);if(l.from<=u&&u<l.to)return o(u,a);if(u=a?l.from:s(l.to,-1),n.begin<=u&&u<n.end)return o(u,a)}},g=p(o+n,n,c);if(g)return g;var v=n>0?c.end:s(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}Vl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Vl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Vl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Vl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Vl.default=b?Vl.macDefault:Vl.pcDefault;var ea={selectAll:Qo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),_)},killLine:function(e){return Yl(e,(function(t){if(t.empty()){var r=et(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:st(t.head.line+1,0)}:{from:t.head,to:st(t.head.line,r)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Yl(e,(function(t){return{from:st(t.from().line,0),to:gt(e.doc,st(t.to().line+1,0))}}))},delLineLeft:function(e){return Yl(e,(function(e){return{from:st(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Yl(e,(function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Yl(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(st(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(st(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return ta(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return na(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return ra(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),$)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")}),$)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?na(e,t.head):n}),$)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=V(e.getLine(o.line),o.ch,n);t.push(Z(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Fi(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=et(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new st(i.line,i.ch-1)),i.ch>0)i=new st(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),st(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=et(e.doc,i.line-1).text;l&&(i=new st(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),st(i.line-1,l.length-1),i,"+transpose"))}r.push(new so(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Fi(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);ci(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ta(e,t){var r=et(e.doc,t),n=tr(r);return n!=r&&(t=it(n)),Jl(!0,e,n,t,1)}function ra(e,t){var r=et(e.doc,t),n=rr(r);return n!=r&&(t=it(n)),Jl(!0,e,r,t,-1)}function na(e,t){var r=ta(e,t.line),n=et(e.doc,r.line),i=ge(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(r.ch,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return st(r.line,l?0:o,r.sticky)}return r}function ia(e,t,r){if("string"==typeof t&&!(t=ea[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=K}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function oa(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ul(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ul(t,e.options.extraKeys,r,e)||Ul(t,e.options.keyMap,r,e)}var la=new G;function aa(e,t,r,n){var i=e.state.keySeq;if(i){if(Kl(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:la.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),sa(e,i+" "+t,r,n))return!0}return sa(e,t,r,n)}function sa(e,t,r,n){var i=oa(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Dr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(Le(r),Zn(e)),!!i}function ua(e,t){var r=Xl(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?aa(e,"Shift-"+r,t,(function(t){return ia(e,t,!0)}))||aa(e,r,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ia(e,t)})):aa(e,r,t,(function(t){return ia(e,t)})))}function ca(e,t,r){return aa(e,"'"+r+"'",t,(function(t){return ia(e,t,!0)}))}var fa=null;function da(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=H(z(t)),xe(t,e)))){l&&a<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var i=ua(t,e);d&&(fa=i?n:null,i||88!=n||Re||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),r&&!b&&!i&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||ha(t)}}function ha(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(M(t,"CodeMirror-crosshair"),be(document,"keyup",r),be(document,"mouseover",r))}F(t,"CodeMirror-crosshair"),me(document,"keyup",r),me(document,"mouseover",r)}function pa(e){16==e.keyCode&&(this.doc.sel.shift=!1),xe(this,e)}function ga(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||_r(t.display,e)||xe(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(d&&r==fa)return fa=null,void Le(e);if(!d||e.which&&!(e.which<10)||!ua(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(ca(t,e,i)||t.display.input.onKeyPress(e))}}}var va,ma,ya=400,ba=function(e,t,r){this.time=e,this.pos=t,this.button=r};function wa(e,t){var r=+new Date;return ma&&ma.compare(r,e,t)?(va=ma=null,"triple"):va&&va.compare(r,e,t)?(ma=new ba(r,e,t),va=null,"double"):(va=new ba(r,e,t),ma=null,"single")}function xa(e){var t=this,r=t.display;if(!(xe(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,_r(r,e))s||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100));else if(!Aa(t,e)){var n=In(t,e),i=Ae(e),o=n?wa(n,i):"single";I(t).focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&Ca(t,i,n,o,e)||(1==i?n?Sa(t,n,o,e):Oe(e)==r.scroller&&Le(e):2==i?(n&&Ro(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):Qn(t)))}}function Ca(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),aa(e,_l(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=ea[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=K}finally{e.state.suppressEdits=!1}return n}))}function ka(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=w?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=b?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?r.altKey:r.ctrlKey)),i}function Sa(e,t,r,n){l?setTimeout(R(Jn,e),0):e.curOp.focus=H(z(e));var i,o=ka(e,r,n),a=e.doc.sel;e.options.dragDrop&&He&&!e.isReadOnly()&&"single"==r&&(i=a.contains(t))>-1&&(ut((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(ut(i.to(),t)>0||t.xRel<0)?La(e,n,t,o):Ma(e,n,t,o)}function La(e,t,r,n){var i=e.display,o=!1,u=Ei(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Qn(e)),be(i.wrapper.ownerDocument,"mouseup",u),be(i.wrapper.ownerDocument,"mousemove",c),be(i.scroller,"dragstart",f),be(i.scroller,"drop",u),o||(Le(t),n.addNew||Ro(e.doc,r,null,null,n.extend),s&&!h||l&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};s&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!n.moveOnDrag,me(i.wrapper.ownerDocument,"mouseup",u),me(i.wrapper.ownerDocument,"mousemove",c),me(i.scroller,"dragstart",f),me(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Ta(e,t,r){if("char"==r)return new so(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new so(st(t.line,0),gt(e.doc,st(t.line+1,0)));var n=r(e,t);return new so(n.from,n.to)}function Ma(e,t,r,n){l&&Qn(e);var i=e.display,o=e.doc;Le(t);var a,s,u=o.sel,c=u.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),a=s>-1?c[s]:new so(r,r)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new so(r,r)),r=In(e,t,!0,!0),s=-1;else{var f=Ta(e,r,n.unit);a=n.extend?Io(a,f.anchor,f.head,n.extend):f}n.addNew?-1==s?(s=c.length,Ko(o,uo(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==n.unit&&!n.extend?(Ko(o,uo(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Vo(o,s,a,X):(s=0,Ko(o,new ao([a],0),X),u=o.sel);var d=r;function h(t){if(0!=ut(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],l=e.options.tabSize,c=V(et(o,r.line).text,r.ch,l),f=V(et(o,t.line).text,t.ch,l),h=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=et(o,g).text,y=Y(m,h,l);h==p?i.push(new so(st(g,y),st(g,y))):m.length>y&&i.push(new so(st(g,y),st(g,Y(m,p,l))))}i.length||i.push(new so(r,r)),Ko(o,uo(e,u.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,x=Ta(e,t,n.unit),C=w.anchor;ut(x.anchor,C)>0?(b=x.head,C=ht(w.from(),x.anchor)):(b=x.anchor,C=dt(w.to(),x.head));var k=u.ranges.slice(0);k[s]=Na(e,new so(gt(o,C),b)),Ko(o,uo(e,k,s),X)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){var r=++g,l=In(e,t,!0,"rectangle"==n.unit);if(l)if(0!=ut(l,d)){e.curOp.focus=H(z(e)),h(l);var a=ii(i,o);(l.line>=a.to||l.line<a.from)&&setTimeout(Ei(e,(function(){g==r&&v(t)})),150)}else{var s=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;s&&setTimeout(Ei(e,(function(){g==r&&(i.scroller.scrollTop+=s,v(t))})),50)}}function m(t){e.state.selectingText=!1,g=1/0,t&&(Le(t),i.input.focus()),be(i.wrapper.ownerDocument,"mousemove",y),be(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var y=Ei(e,(function(e){0!==e.buttons&&Ae(e)?v(e):m(e)})),b=Ei(e,m);e.state.selectingText=b,me(i.wrapper.ownerDocument,"mousemove",y),me(i.wrapper.ownerDocument,"mouseup",b)}function Na(e,t){var r=t.anchor,n=t.head,i=et(e.doc,r.line);if(0==ut(r,n)&&r.sticky==n.sticky)return t;var o=ge(i);if(!o)return t;var l=he(o,r.ch,r.sticky),a=o[l];if(a.from!=r.ch&&a.to!=r.ch)return t;var s,u=l+(a.from==r.ch==(1!=a.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)s=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=he(o,n.ch,n.sticky),f=c-l||(n.ch-r.ch)*(1==a.level?-1:1);s=c==u-1||c==u?f<0:f>0}var d=o[u+(s?-1:0)],h=s==(1==d.level),p=h?d.from:d.to,g=h?"after":"before";return r.ch==p&&r.sticky==g?t:new so(new st(r.line,p,g),n)}function Oa(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Le(t);var l=e.display,a=l.lineDiv.getBoundingClientRect();if(o>a.bottom||!ke(e,r))return Me(t);o-=a.top-l.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=l.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=i)return we(e,r,e,ot(e.doc,o),e.display.gutterSpecs[s].className,t),Me(t)}}function Aa(e,t){return Oa(e,t,"gutterClick",!0)}function Da(e,t){_r(e.display,t)||Wa(e,t)||xe(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function Wa(e,t){return!!ke(e,"gutterContextMenu")&&Oa(e,t,"gutterContextMenu",!1)}function Ha(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),gn(e)}ba.prototype.compare=function(e,t,r){return this.time+ya>e&&0==ut(t,this.pos)&&r==this.button};var Fa={toString:function(){return"CodeMirror.Init"}},Ea={},Pa={};function za(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=Fa&&i(e,t,r)}:i)}e.defineOption=r,e.Init=Fa,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,mo(e)}),!0),r("indentUnit",2,mo,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){yo(e),gn(e),Bn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(st(n,o))}n++}));for(var i=r.length-1;i>=0;i--)al(e.doc,t,r[i],st(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Fa&&e.refresh()})),r("specialCharPlaceholder",yr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!x),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Ha(e),eo(e)}),!0),r("keyMap","default",(function(e,t,r){var n=$l(t),i=r!=Fa&&$l(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Ra,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Ji(t,e.options.lineNumbers),eo(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?En(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return xi(e)}),!0),r("scrollbarStyle","native",(function(e){Si(e),xi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Ji(e.options.gutters,t),eo(e)}),!0),r("firstLineNumber",1,eo,!0),r("lineNumberFormatter",(function(e){return e}),eo,!0),r("showCursorWhenSelecting",!1,_n,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(ti(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Ia),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,_n,!0),r("singleCursorHeightPerLine",!0,_n,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,yo,!0),r("addModeClass",!1,yo,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,yo,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Ia(e,t,r){if(!t!=!(r&&r!=Fa)){var n=e.display.dragFunctions,i=t?me:be;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Ra(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(M(e.display.wrapper,"CodeMirror-wrap"),cr(e)),zn(e),Bn(e),gn(e),setTimeout((function(){return xi(e)}),100)}function Ba(e,t){var r=this;if(!(this instanceof Ba))return new Ba(e,t);this.options=t=t?B(t):{},B(Ea,t,!1);var n=t.value;"string"==typeof n?n=new Tl(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Ba.inputStyles[t.inputStyle](this),o=this.display=new to(e,n,i,t);for(var u in o.wrapper.CodeMirror=this,Ha(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Si(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new G,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),l&&a<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),Va(this),Fl(),Ti(this),this.curOp.forceUpdate=!0,Co(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&ei(r)}),20):ti(this),Pa)Pa.hasOwnProperty(u)&&Pa[u](this,t[u],Fa);Zi(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Ga.length;++c)Ga[c](this);Mi(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Va(e){var t=e.display;me(t.scroller,"mousedown",Ei(e,xa)),me(t.scroller,"dblclick",l&&a<11?Ei(e,(function(t){if(!xe(e,t)){var r=In(e,t);if(r&&!Aa(e,t)&&!_r(e.display,t)){Le(t);var n=e.findWordAt(r);Ro(e.doc,n.anchor,n.head)}}})):function(t){return xe(e,t)||Le(t)}),me(t.scroller,"contextmenu",(function(t){return Da(e,t)})),me(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||Da(e,r)}));var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}me(t.scroller,"touchstart",(function(i){if(!xe(e,i)&&!o(i)&&!Aa(e,i)){t.input.ensurePolled(),clearTimeout(r);var l=+new Date;t.activeTouch={start:l,moved:!1,prev:l-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),me(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),me(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!_r(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,l=e.coordsChar(t.activeTouch,"page");o=!n.prev||s(n,n.prev)?new so(l,l):!n.prev.prev||s(n,n.prev.prev)?e.findWordAt(l):new so(st(l.line,0),gt(e.doc,st(l.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Le(r)}i()})),me(t.scroller,"touchcancel",i),me(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(gi(e,t.scroller.scrollTop),mi(e,t.scroller.scrollLeft,!0),we(e,"scroll",e))})),me(t.scroller,"mousewheel",(function(t){return lo(e,t)})),me(t.scroller,"DOMMouseScroll",(function(t){return lo(e,t)})),me(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){xe(e,t)||Ne(t)},over:function(t){xe(e,t)||(Al(e,t),Ne(t))},start:function(t){return Ol(e,t)},drop:Ei(e,Nl),leave:function(t){xe(e,t)||Dl(e)}};var u=t.input.getField();me(u,"keyup",(function(t){return pa.call(e,t)})),me(u,"keydown",Ei(e,da)),me(u,"keypress",Ei(e,ga)),me(u,"focus",(function(t){return ei(e,t)})),me(u,"blur",(function(t){return ti(e,t)}))}Ba.defaults=Ea,Ba.optionHandlers=Pa;var Ga=[];function ja(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Ct(e,t).state:r="prev");var l=e.options.tabSize,a=et(o,t),s=V(a.text,null,l);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(n||/\S/.test(a.text)){if("smart"==r&&((u=o.mode.indent(i,a.text.slice(c.length),a.text))==K||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?V(et(o,t-1).text,null,l):0:"add"==r?u=s+e.options.indentUnit:"subtract"==r?u=s-e.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/l);h;--h)d+=l,f+="\t";if(d<u&&(f+=Z(u-d)),f!=c)return al(o,f,st(t,0),st(t,c.length),"+input"),a.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<c.length){var v=st(t,c.length);Vo(o,p,new so(v,v));break}}}Ba.defineInitHook=function(e){return Ga.push(e)};var Ua=null;function Ka(e){Ua=e}function _a(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l=+new Date-200,a="paste"==i||e.state.pasteIncoming>l,s=ze(t),u=null;if(a&&n.ranges.length>1)if(Ua&&Ua.text.join("\n")==t){if(n.ranges.length%Ua.text.length==0){u=[];for(var c=0;c<Ua.text.length;c++)u.push(o.splitLines(Ua.text[c]))}}else s.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=Q(s,(function(e){return[e]})));for(var f=e.curOp.updateInput,d=n.ranges.length-1;d>=0;d--){var h=n.ranges[d],p=h.from(),g=h.to();h.empty()&&(r&&r>0?p=st(p.line,p.ch-r):e.state.overwrite&&!a?g=st(g.line,Math.min(et(o,g.line).text.length,g.ch+J(s).length)):a&&Ua&&Ua.lineWise&&Ua.text.join("\n")==s.join("\n")&&(p=g=st(p.line,0)));var v={from:p,to:g,text:u?u[d%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};tl(e.doc,v),Dr(e,"inputRead",e,v)}t&&!a&&$a(e,t),ci(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Xa(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||Fi(t,(function(){return _a(t,r,0,null,"paste")})),!0}function $a(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=ja(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(et(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=ja(e,i.head.line,"smart"));l&&Dr(e,"electricInput",e,i.head.line)}}}function Ya(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:st(i,0),head:st(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function qa(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Za(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),v&&(e.style.border="1px solid black"),qa(e),t}function Ja(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){I(this).focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Ei(this,t[e])(this,r,i),we(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"]($l(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Pi((function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");ee(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},(function(e){return e.priority})),this.state.modeGen++,Bn(this)})),removeOverlay:Pi((function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Bn(this)}})),indentLine:Pi((function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),lt(this.doc,e)&&ja(this,e,t,r)})),indentSelection:Pi((function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(ja(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&ci(this));else{var o=i.from(),l=i.to(),a=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var s=a;s<r;++s)ja(this,s,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[n].from().ch>0&&Vo(this.doc,n,new so(o,u[n].to()),_)}}})),getTokenAt:function(e,t){return Mt(this,e,t)},getLineTokens:function(e,t){return Mt(this,st(e),t,!0)},getTokenTypeAt:function(e){e=gt(this.doc,e);var t,r=xt(this,et(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var a=t?t.indexOf("overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var a=i[o[t][l]];a&&n.push(a)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var s=0;s<i._global.length;s++){var u=i._global[s];u.pred(o,this)&&-1==j(n,u.val)&&n.push(u.val)}return n},getStateAfter:function(e,t){var r=this.doc;return Ct(this,(e=pt(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Cn(this,null==e?r.head:"object"==typeof e?gt(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return xn(this,gt(this.doc,e),t||"page")},coordsChar:function(e,t){return Ln(this,(e=wn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=wn(this,{top:e,left:0},t||"page").top,ot(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=et(this.doc,e)}else n=e;return bn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-sr(n):0)},defaultTextHeight:function(){return Wn(this.display)},defaultCharWidth:function(){return Hn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,l=(e=Cn(this,gt(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(l=e.bottom),a+t.offsetWidth>u&&(a=u-t.offsetWidth)}t.style.top=l+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),r&&ai(this,{left:a,top:l,right:a+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:Pi(da),triggerOnKeyPress:Pi(ga),triggerOnKeyUp:pa,triggerOnMouseDown:Pi(xa),execCommand:function(e){if(ea.hasOwnProperty(e))return ea[e].call(null,this)},triggerElectric:Pi((function(e){$a(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=gt(this.doc,e),l=0;l<t&&!(o=Qa(this.doc,o,i,r,n)).hitSide;++l);return o},moveH:Pi((function(e,t){var r=this;this.extendSelectionsBy((function(n){return r.display.shift||r.doc.extend||n.empty()?Qa(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()}),$)})),deleteH:Pi((function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Yl(this,(function(r){var i=Qa(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}}))})),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var l=gt(this.doc,e),a=0;a<t;++a){var s=Cn(this,l,"div");if(null==o?o=s.left:s.left=o,(l=es(this,s,i,r)).hitSide)break}return l},moveV:Pi((function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy((function(l){if(o)return e<0?l.from():l.to();var a=Cn(r,l.head,"div");null!=l.goalColumn&&(a.left=l.goalColumn),i.push(a.left);var s=es(r,a,e,t);return"page"==t&&l==n.sel.primary()&&ui(r,xn(r,s,"div").top-a.top),s}),$),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]})),findWordAt:function(e){var t=et(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),l=oe(o,i)?function(e){return oe(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!oe(e)};r>0&&l(t.charAt(r-1));)--r;for(;n<t.length&&l(t.charAt(n));)++n}return new so(st(e.line,r),st(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?F(this.display.cursorDiv,"CodeMirror-overwrite"):M(this.display.cursorDiv,"CodeMirror-overwrite"),we(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==H(z(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Pi((function(e,t){fi(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-qr(this)-this.display.barHeight,width:e.scrollWidth-qr(this)-this.display.barWidth,clientHeight:Jr(this),clientWidth:Zr(this)}},scrollIntoView:Pi((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:st(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?di(this,e):pi(this,e.from,e.to,e.margin)})),setSize:Pi((function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&pn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Vn(r,i,"widget");break}++i})),this.curOp.forceUpdate=!0,we(this,"refresh",this)})),operation:function(e){return Fi(this,e)},startOperation:function(){return Ti(this)},endOperation:function(){return Mi(this)},refresh:Pi((function(){var e=this.display.cachedTextHeight;Bn(this),this.curOp.forceUpdate=!0,gn(this),fi(this,this.doc.scrollLeft,this.doc.scrollTop),$i(this.display),(null==e||Math.abs(e-Wn(this.display))>.5||this.options.lineWrapping)&&zn(this),we(this,"refresh",this)})),swapDoc:Pi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Co(this,e),gn(this),this.display.input.reset(),fi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Dr(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Se(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function Qa(e,t,r,n,i){var o=t,l=r,a=et(e,t.line),s=i&&"rtl"==e.direction?-r:r;function u(){var r=t.line+s;return!(r<e.first||r>=e.first+e.size)&&(t=new st(r,t.ch,t.sticky),a=et(e,r))}function c(o){var l;if("codepoint"==n){var c=a.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))l=null;else{var f=r>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new st(t.line,Math.max(0,Math.min(a.text.length,t.ch+r*(f?2:1))),-r)}}else l=i?Ql(e.cm,a,t,r):Zl(a,t,r);if(null==l){if(o||!u())return!1;t=Jl(i,e.cm,a,t.line,s)}else t=l;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var f=null,d="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||c(!p);p=!1){var g=a.text.charAt(t.ch)||"\n",v=oe(g,h)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||p||v||(v="s"),f&&f!=v){r<0&&(r=1,c(),t.sticky="after");break}if(v&&(f=v),r>0&&!c(!p))break}var m=Zo(e,t,o,l,!0);return ct(o,m)&&(m.hitSide=!0),m}function es(e,t,r,n){var i,o,l=e.doc,a=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,I(e).innerHeight||l(e).documentElement.clientHeight),u=Math.max(s-.5*Wn(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=Ln(e,a,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var ts=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new G,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function rs(e,t){var r=nn(e,t.line);if(!r||r.hidden)return null;var n=et(e.doc,t.line),i=en(r,n,t.line),o=ge(n,e.doc.direction),l="left";o&&(l=he(o,t.ch)%2?"right":"left");var a=un(i.map,t.ch,l);return a.offset="right"==a.collapse?a.end:a.start,a}function ns(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function is(e,t){return t&&(e.bad=!0),e}function os(e,t,r,n,i){var o="",l=!1,a=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){l&&(o+=a,s&&(o+=a),l=s=!1)}function f(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void f(r);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(st(n,0),st(i+1,0),u(+h));return void(p.length&&(o=p[0].find(0))&&f(tt(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;g&&c();for(var v=0;v<t.childNodes.length;v++)d(t.childNodes[v]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),g&&(l=!0)}else 3==t.nodeType&&f(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;d(t),t!=r;)t=t.nextSibling,s=!1;return o}function ls(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return is(e.clipPos(st(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return as(o,t,r)}}function as(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!W(n,t))return is(st(it(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?J(e.rest):e.line;return is(st(it(o),o.text.length),i)}var l=3==t.nodeType?t:null,a=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,r&&(r=l.nodeValue.length));a.parentNode!=n;)a=a.parentNode;var s=e.measure,u=s.maps;function c(t,r,n){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?s.map:u[i],l=0;l<o.length;l+=3){var a=o[l+2];if(a==t||a==r){var c=it(i<0?e.line:e.rest[i]),f=o[l]+n;return(n<0||a!=t)&&(f=o[l+(n?1:0)]),st(c,f)}}}var f=c(l,a,r);if(f)return is(f,i);for(var d=a.nextSibling,h=l?l.nodeValue.length-r:0;d;d=d.nextSibling){if(f=c(d,d.firstChild,0))return is(st(f.line,f.ch-h),i);h+=d.textContent.length}for(var p=a.previousSibling,g=r;p;p=p.previousSibling){if(f=c(p,p.firstChild,-1))return is(st(f.line,f.ch+g),i);g+=p.textContent.length}}ts.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function l(e){if(o(e)&&!xe(n,e)){if(n.somethingSelected())Ka({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Ya(n);Ka({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,_),n.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var l=Ua.text.join("\n");if(e.clipboardData.setData("Text",l),e.clipboardData.getData("Text")==l)return void e.preventDefault()}var a=Za(),s=a.firstChild;n.display.lineSpace.insertBefore(a,n.display.lineSpace.firstChild),s.value=Ua.text.join("\n");var u=H(i.ownerDocument);P(s),setTimeout((function(){n.display.lineSpace.removeChild(a),u.focus(),u==i&&r.showPrimarySelection()}),50)}}i.contentEditable=!0,qa(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),me(i,"paste",(function(e){!o(e)||xe(n,e)||Xa(e,n)||a<=11&&setTimeout(Ei(n,(function(){return t.updateFromDOM()})),20)})),me(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),me(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),me(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),me(i,"touchstart",(function(){return r.forceCompositionEnd()})),me(i,"input",(function(){t.composing||t.readFromDOMSoon()})),me(i,"copy",l),me(i,"cut",l)},ts.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},ts.prototype.prepareSelection=function(){var e=Xn(this.cm,!1);return e.focus=H(this.div.ownerDocument)==this.div,e},ts.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},ts.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ts.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var l=ls(t,e.anchorNode,e.anchorOffset),a=ls(t,e.focusNode,e.focusOffset);if(!l||l.bad||!a||a.bad||0!=ut(ht(l,a),i)||0!=ut(dt(l,a),o)){var s=t.display.view,u=i.line>=t.display.viewFrom&&rs(t,i)||{node:s[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&rs(t,o);if(!c){var f=s[s.length-1].measure,d=f.maps?f.maps[f.maps.length-1]:f.map;c={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(u&&c){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=T(u.node,u.offset,c.offset,c.node)}catch(e){}h&&(!r&&t.state.focused?(e.collapse(u.node,u.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},ts.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},ts.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors),O(this.cm.display.selectionDiv,e.selection)},ts.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},ts.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return W(this.div,t)},ts.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&H(this.div.ownerDocument)==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},ts.prototype.blur=function(){this.div.blur()},ts.prototype.getField=function(){return this.div},ts.prototype.supportsTouch=function(){return!0},ts.prototype.receivedFocus=function(){var e=this,t=this;function r(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,r))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):Fi(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,r)},ts.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},ts.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(m&&c&&this.cm.display.gutterSpecs.length&&ns(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=ls(t,e.anchorNode,e.anchorOffset),n=ls(t,e.focusNode,e.focusOffset);r&&n&&Fi(t,(function(){Ko(t.doc,co(r,n),_),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},ts.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),l=o.from(),a=o.to();if(0==l.ch&&l.line>n.firstLine()&&(l=st(l.line-1,et(n.doc,l.line-1).length)),a.ch==et(n.doc,a.line).text.length&&a.line<n.lastLine()&&(a=st(a.line+1,0)),l.line<i.viewFrom||a.line>i.viewTo-1)return!1;l.line==i.viewFrom||0==(e=Rn(n,l.line))?(t=it(i.view[0].line),r=i.view[0].node):(t=it(i.view[e].line),r=i.view[e-1].node.nextSibling);var s,u,c=Rn(n,a.line);if(c==i.view.length-1?(s=i.viewTo-1,u=i.lineDiv.lastChild):(s=it(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(os(n,r,u,t,s)),d=tt(n.doc,st(t,0),st(s,et(n.doc,s).text.length));f.length>1&&d.length>1;)if(J(f)==J(d))f.pop(),d.pop(),s--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);h<m&&g.charCodeAt(h)==v.charCodeAt(h);)++h;for(var y=J(f),b=J(d),w=Math.min(y.length-(1==f.length?h:0),b.length-(1==d.length?h:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==f.length&&1==d.length&&t==l.line)for(;h&&h>l.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var x=st(t,h),C=st(s,d.length?J(d).length-p:0);return f.length>1||f[0]||ut(x,C)?(al(n.doc,f,x,C,"+input"),!0):void 0},ts.prototype.ensurePolled=function(){this.forceCompositionEnd()},ts.prototype.reset=function(){this.forceCompositionEnd()},ts.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ts.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},ts.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Fi(this.cm,(function(){return Bn(e.cm)}))},ts.prototype.setUneditable=function(e){e.contentEditable="false"},ts.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ei(this.cm,_a)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},ts.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},ts.prototype.onContextMenu=function(){},ts.prototype.resetPosition=function(){},ts.prototype.needsContentAttribute=!0;var ss=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new G,this.hasSelection=!1,this.composing=null,this.resetting=!1};function us(e,t){if((t=t?B(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=H(e.ownerDocument);t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=a.getValue()}var i;if(e.form&&(me(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(be(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Ba((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a}function cs(e){e.off=be,e.on=me,e.wheelEventPixels=oo,e.Doc=Tl,e.splitLines=ze,e.countColumn=V,e.findColumn=Y,e.isWordChar=ie,e.Pass=K,e.signal=we,e.Line=fr,e.changeEnd=fo,e.scrollbarModel=ki,e.Pos=st,e.cmpPos=ut,e.modes=Ge,e.mimeModes=je,e.resolveMode=_e,e.getMode=Xe,e.modeExtensions=$e,e.extendMode=Ye,e.copyState=qe,e.startState=Je,e.innerMode=Ze,e.commands=ea,e.keyMap=Vl,e.keyName=Xl,e.isModifierKey=Kl,e.lookupKey=Ul,e.normalizeKeyMap=jl,e.StringStream=Qe,e.SharedTextMarker=wl,e.TextMarker=yl,e.LineWidget=pl,e.e_preventDefault=Le,e.e_stopPropagation=Te,e.e_stop=Ne,e.addClass=F,e.contains=W,e.rmClass=M,e.keyNames=zl}ss.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!xe(n,e)){if(n.somethingSelected())Ka({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Ya(n);Ka({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,_):(r.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(i.style.width="0px"),me(i,"input",(function(){l&&a>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),me(i,"paste",(function(e){xe(n,e)||Xa(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),me(i,"cut",o),me(i,"copy",o),me(e.scroller,"paste",(function(t){if(!_r(e,t)&&!xe(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),me(e.lineSpace,"selectstart",(function(t){_r(e,t)||Le(t)})),me(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),me(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},ss.prototype.createField=function(e){this.wrapper=Za(),this.textarea=this.wrapper.firstChild},ss.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ss.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Xn(e);if(e.options.moveInputWithCursor){var i=Cn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},ss.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ss.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),l&&a>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&a>=9&&(this.hasSelection=null));this.resetting=!1}},ss.prototype.getField=function(){return this.textarea},ss.prototype.supportsTouch=function(){return!1},ss.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||H(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},ss.prototype.blur=function(){this.textarea.blur()},ss.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ss.prototype.receivedFocus=function(){this.slowPoll()},ss.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ss.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},ss.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Ie(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&a>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,u=Math.min(n.length,i.length);s<u&&n.charCodeAt(s)==i.charCodeAt(s);)++s;return Fi(t,(function(){_a(t,i.slice(s),n.length-s,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ss.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ss.prototype.onKeyPress=function(){l&&a>=9&&(this.hasSelection=null),this.fastPoll()},ss.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=In(r,e),u=n.scroller.scrollTop;if(o&&!d){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Ei(r,Ko)(r.doc,co(o),_);var c,f=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=i.ownerDocument.defaultView.scrollY),n.input.focus(),s&&i.ownerDocument.defaultView.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&a>=9&&v(),S){Ne(e);var g=function(){be(window,"mouseup",g),setTimeout(m,20)};me(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=f,l&&a<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&a<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?Ei(r,Qo)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},ss.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ss.prototype.setUneditable=function(){},ss.prototype.needsContentAttribute=!1,za(Ba),Ja(Ba);var fs="iter insert remove copy getEditor constructor".split(" ");for(var ds in Tl.prototype)Tl.prototype.hasOwnProperty(ds)&&j(fs,ds)<0&&(Ba.prototype[ds]=function(e){return function(){return e.apply(this.doc,arguments)}}(Tl.prototype[ds]));return Se(Tl),Ba.inputStyles={textarea:ss,contenteditable:ts},Ba.defineMode=function(e){Ba.defaults.mode||"null"==e||(Ba.defaults.mode=e),Ue.apply(this,arguments)},Ba.defineMIME=Ke,Ba.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ba.defineMIME("text/plain","null"),Ba.defineExtension=function(e,t){Ba.prototype[e]=t},Ba.defineDocExtension=function(e,t){Tl.prototype[e]=t},Ba.fromTextArea=us,cs(Ba),Ba.version="5.65.9",Ba}()},274:function(e,t,r){!function(e){"use strict";e.defineOption("foldGutter",!1,(function(t,i,o){o&&o!=e.Init&&(t.clearGutter(t.state.foldGutter.options.gutter),t.state.foldGutter=null,t.off("gutterClick",u),t.off("changes",f),t.off("viewportChange",d),t.off("fold",h),t.off("unfold",h),t.off("swapDoc",f),t.off("optionChange",c)),i&&(t.state.foldGutter=new r(n(i)),s(t),t.on("gutterClick",u),t.on("changes",f),t.on("viewportChange",d),t.on("fold",h),t.on("unfold",h),t.on("swapDoc",f),t.on("optionChange",c))}));var t=e.Pos;function r(e){this.options=e,this.from=this.to=0}function n(e){return!0===e&&(e={}),null==e.gutter&&(e.gutter="CodeMirror-foldgutter"),null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open"),null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded"),e}function i(e,r){for(var n=e.findMarks(t(r,0),t(r+1,0)),i=0;i<n.length;++i)if(n[i].__isFold){var o=n[i].find(-1);if(o&&o.line===r)return n[i]}}function o(e){if("string"==typeof e){var t=document.createElement("div");return t.className=e+" CodeMirror-guttermarker-subtle",t}return e.cloneNode(!0)}function l(e,r,n){var l=e.state.foldGutter.options,s=r-1,u=e.foldOption(l,"minFoldSize"),c=e.foldOption(l,"rangeFinder"),f="string"==typeof l.indicatorFolded&&a(l.indicatorFolded),d="string"==typeof l.indicatorOpen&&a(l.indicatorOpen);e.eachLine(r,n,(function(r){++s;var n=null,a=r.gutterMarkers;if(a&&(a=a[l.gutter]),i(e,s)){if(f&&a&&f.test(a.className))return;n=o(l.indicatorFolded)}else{var h=t(s,0),p=c&&c(e,h);if(p&&p.to.line-p.from.line>=u){if(d&&a&&d.test(a.className))return;n=o(l.indicatorOpen)}}(n||a)&&e.setGutterMarker(r,l.gutter,n)}))}function a(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),r=e.state.foldGutter;r&&(e.operation((function(){l(e,t.from,t.to)})),r.from=t.from,r.to=t.to)}function u(e,r,n){var o=e.state.foldGutter;if(o){var l=o.options;if(n==l.gutter){var a=i(e,r);a?a.clear():e.foldCode(t(r,0),l)}}}function c(e,t){"mode"==t&&f(e)}function f(e){var t=e.state.foldGutter;if(t){var r=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),r.foldOnChangeTimeSpan||600)}}function d(e){var t=e.state.foldGutter;if(t){var r=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var r=e.getViewport();t.from==t.to||r.from-t.to>20||t.from-r.to>20?s(e):e.operation((function(){r.from<t.from&&(l(e,r.from,t.from),t.from=r.from),r.to>t.to&&(l(e,t.to,r.to),t.to=r.to)}))}),r.updateViewportTimeSpan||400)}}function h(e,t){var r=e.state.foldGutter;if(r){var n=t.line;n>=r.from&&n<r.to&&l(e,n,n+1)}}}(r(237),r(948))},792:function(e,t,r){!function(e){"use strict";e.defineMode("javascript",(function(t,r){var n,i,o=t.indentUnit,l=r.statementIndent,a=r.jsonld,s=r.json||a,u=!1!==r.trackScope,c=r.typescript,f=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("keyword d"),o=e("operator"),l={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:i,break:i,continue:i,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:l,false:l,null:l,undefined:l,NaN:l,Infinity:l,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),h=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function v(e,t,r){return n=e,i=r,t}function m(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==r&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return v(r);if("="==r&&e.eat(">"))return v("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):it(e,t,1)?(g(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==r)return t.tokenize=w,w(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==r&&e.eatWhile(f))return v("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(h.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?v("."):v("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var i=d[n];return v(i.type,i.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",n)}return v("variable","variable",n)}}function y(e){return function(t,r){var n,i=!1;if(a&&"@"==t.peek()&&t.match(p))return r.tokenize=m,v("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=m),v("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=m;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=m;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var x="([{}])";function C(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,l=r-1;l>=0;--l){var a=e.string.charAt(l),s=x.indexOf(a);if(s>=0&&s<3){if(!i){++l;break}if(0==--i){"("==a&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(f.test(a))o=!0;else if(/["'\/`]/.test(a))for(;;--l){if(0==l)return;if(e.string.charAt(l-1)==a&&"\\"!=e.string.charAt(l-2)){l--;break}}else if(o&&!i){++l;break}}o&&!i&&(t.fatArrowAt=l)}}var k={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function L(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function T(e,t,r,n,i){var o=e.cc;for(M.state=e,M.stream=i,M.marked=null,M.cc=o,M.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((o.length?o.pop():s?K:j)(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return M.marked?M.marked:"variable"==r&&L(e,n)?"variable-2":t}}var M={state:null,column:null,marked:null,cc:null};function N(){for(var e=arguments.length-1;e>=0;e--)M.cc.push(arguments[e])}function O(){return N.apply(null,arguments),!0}function A(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function D(e){var t=M.state;if(M.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=W(e,t.context);if(null!=n)return void(t.context=n)}else if(!A(e,t.localVars))return void(t.localVars=new E(e,t.localVars));r.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new E(e,t.globalVars))}}function W(e,t){if(t){if(t.block){var r=W(e,t.prev);return r?r==t.prev?t:new F(r,t.vars,!0):null}return A(e,t.vars)?t:new F(t.prev,new E(e,t.vars),!1)}return null}function H(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function F(e,t,r){this.prev=e,this.vars=t,this.block=r}function E(e,t){this.name=e,this.next=t}var P=new E("this",new E("arguments",null));function z(){M.state.context=new F(M.state.context,M.state.localVars,!1),M.state.localVars=P}function I(){M.state.context=new F(M.state.context,M.state.localVars,!0),M.state.localVars=null}function R(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}function B(e,t){var r=function(){var r=M.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new S(n,M.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function V(){var e=M.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function G(e){function t(r){return r==e?O():";"==e||"}"==r||")"==r||"]"==r?N():O(t)}return t}function j(e,t){return"var"==e?O(B("vardef",t),Ne,G(";"),V):"keyword a"==e?O(B("form"),X,j,V):"keyword b"==e?O(B("form"),j,V):"keyword d"==e?M.stream.match(/^\s*$/,!1)?O():O(B("stat"),Y,G(";"),V):"debugger"==e?O(G(";")):"{"==e?O(B("}"),I,de,V,R):";"==e?O():"if"==e?("else"==M.state.lexical.info&&M.state.cc[M.state.cc.length-1]==V&&M.state.cc.pop()(),O(B("form"),X,j,V,Fe)):"function"==e?O(Ie):"for"==e?O(B("form"),I,Ee,j,R,V):"class"==e||c&&"interface"==t?(M.marked="keyword",O(B("form","class"==e?e:t),je,V)):"variable"==e?c&&"declare"==t?(M.marked="keyword",O(j)):c&&("module"==t||"enum"==t||"type"==t)&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword","enum"==t?O(tt):"type"==t?O(Be,G("operator"),me,G(";")):O(B("form"),Oe,G("{"),B("}"),de,V,V)):c&&"namespace"==t?(M.marked="keyword",O(B("form"),K,j,V)):c&&"abstract"==t?(M.marked="keyword",O(j)):O(B("stat"),oe):"switch"==e?O(B("form"),X,G("{"),B("}","switch"),I,de,V,V,R):"case"==e?O(K,G(":")):"default"==e?O(G(":")):"catch"==e?O(B("form"),z,U,j,V,R):"export"==e?O(B("stat"),Xe,V):"import"==e?O(B("stat"),Ye,V):"async"==e?O(j):"@"==t?O(K,j):N(B("stat"),K,G(";"),V)}function U(e){if("("==e)return O(Ve,G(")"))}function K(e,t){return $(e,t,!1)}function _(e,t){return $(e,t,!0)}function X(e){return"("!=e?N():O(B(")"),Y,G(")"),V)}function $(e,t,r){if(M.state.fatArrowAt==M.stream.start){var n=r?te:ee;if("("==e)return O(z,B(")"),ce(Ve,")"),V,G("=>"),n,R);if("variable"==e)return N(z,Oe,G("=>"),n,R)}var i=r?Z:q;return k.hasOwnProperty(e)?O(i):"function"==e?O(Ie,i):"class"==e||c&&"interface"==t?(M.marked="keyword",O(B("form"),Ge,V)):"keyword c"==e||"async"==e?O(r?_:K):"("==e?O(B(")"),Y,G(")"),V,i):"operator"==e||"spread"==e?O(r?_:K):"["==e?O(B("]"),et,V,i):"{"==e?fe(ae,"}",null,i):"quasi"==e?N(J,i):"new"==e?O(re(r)):O()}function Y(e){return e.match(/[;\}\)\],]/)?N():N(K)}function q(e,t){return","==e?O(Y):Z(e,t,!1)}function Z(e,t,r){var n=0==r?q:Z,i=0==r?K:_;return"=>"==e?O(z,r?te:ee,R):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?O(n):c&&"<"==t&&M.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?O(B(">"),ce(me,">"),V,n):"?"==t?O(K,G(":"),i):O(i):"quasi"==e?N(J,n):";"!=e?"("==e?fe(_,")","call",n):"."==e?O(le,n):"["==e?O(B("]"),Y,G("]"),V,n):c&&"as"==t?(M.marked="keyword",O(me,n)):"regexp"==e?(M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),O(i)):void 0:void 0}function J(e,t){return"quasi"!=e?N():"${"!=t.slice(t.length-2)?O(J):O(Y,Q)}function Q(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,O(J)}function ee(e){return C(M.stream,M.state),N("{"==e?j:K)}function te(e){return C(M.stream,M.state),N("{"==e?j:_)}function re(e){return function(t){return"."==t?O(e?ie:ne):"variable"==t&&c?O(Le,e?Z:q):N(e?_:K)}}function ne(e,t){if("target"==t)return M.marked="keyword",O(q)}function ie(e,t){if("target"==t)return M.marked="keyword",O(Z)}function oe(e){return":"==e?O(V,j):N(q,G(";"),V)}function le(e){if("variable"==e)return M.marked="property",O()}function ae(e,t){return"async"==e?(M.marked="property",O(ae)):"variable"==e||"keyword"==M.style?(M.marked="property","get"==t||"set"==t?O(se):(c&&M.state.fatArrowAt==M.stream.start&&(r=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+r[0].length),O(ue))):"number"==e||"string"==e?(M.marked=a?"property":M.style+" property",O(ue)):"jsonld-keyword"==e?O(ue):c&&H(t)?(M.marked="keyword",O(ae)):"["==e?O(K,he,G("]"),ue):"spread"==e?O(_,ue):"*"==t?(M.marked="keyword",O(ae)):":"==e?N(ue):void 0;var r}function se(e){return"variable"!=e?N(ue):(M.marked="property",O(Ie))}function ue(e){return":"==e?O(_):"("==e?N(Ie):void 0}function ce(e,t,r){function n(i,o){if(r?r.indexOf(i)>-1:","==i){var l=M.state.lexical;return"call"==l.info&&(l.pos=(l.pos||0)+1),O((function(r,n){return r==t||n==t?N():N(e)}),n)}return i==t||o==t?O():r&&r.indexOf(";")>-1?N(e):O(G(t))}return function(r,i){return r==t||i==t?O():N(e,n)}}function fe(e,t,r){for(var n=3;n<arguments.length;n++)M.cc.push(arguments[n]);return O(B(t,r),ce(e,t),V)}function de(e){return"}"==e?O():N(j,de)}function he(e,t){if(c){if(":"==e)return O(me);if("?"==t)return O(he)}}function pe(e,t){if(c&&(":"==e||"in"==t))return O(me)}function ge(e){if(c&&":"==e)return M.stream.match(/^\s*\w+\s+is\b/,!1)?O(K,ve,me):O(me)}function ve(e,t){if("is"==t)return M.marked="keyword",O()}function me(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(M.marked="keyword",O("typeof"==t?_:me)):"variable"==e||"void"==t?(M.marked="type",O(Se)):"|"==t||"&"==t?O(me):"string"==e||"number"==e||"atom"==e?O(Se):"["==e?O(B("]"),ce(me,"]",","),V,Se):"{"==e?O(B("}"),be,V,Se):"("==e?O(ce(ke,")"),ye,Se):"<"==e?O(ce(me,">"),me):"quasi"==e?N(xe,Se):void 0}function ye(e){if("=>"==e)return O(me)}function be(e){return e.match(/[\}\)\]]/)?O():","==e||";"==e?O(be):N(we,be)}function we(e,t){return"variable"==e||"keyword"==M.style?(M.marked="property",O(we)):"?"==t||"number"==e||"string"==e?O(we):":"==e?O(me):"["==e?O(G("variable"),pe,G("]"),we):"("==e?N(Re,we):e.match(/[;\}\)\],]/)?void 0:O()}function xe(e,t){return"quasi"!=e?N():"${"!=t.slice(t.length-2)?O(xe):O(me,Ce)}function Ce(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,O(xe)}function ke(e,t){return"variable"==e&&M.stream.match(/^\s*[?:]/,!1)||"?"==t?O(ke):":"==e?O(me):"spread"==e?O(ke):N(me)}function Se(e,t){return"<"==t?O(B(">"),ce(me,">"),V,Se):"|"==t||"."==e||"&"==t?O(me):"["==e?O(me,G("]"),Se):"extends"==t||"implements"==t?(M.marked="keyword",O(me)):"?"==t?O(me,G(":"),me):void 0}function Le(e,t){if("<"==t)return O(B(">"),ce(me,">"),V,Se)}function Te(){return N(me,Me)}function Me(e,t){if("="==t)return O(me)}function Ne(e,t){return"enum"==t?(M.marked="keyword",O(tt)):N(Oe,he,We,He)}function Oe(e,t){return c&&H(t)?(M.marked="keyword",O(Oe)):"variable"==e?(D(t),O()):"spread"==e?O(Oe):"["==e?fe(De,"]"):"{"==e?fe(Ae,"}"):void 0}function Ae(e,t){return"variable"!=e||M.stream.match(/^\s*:/,!1)?("variable"==e&&(M.marked="property"),"spread"==e?O(Oe):"}"==e?N():"["==e?O(K,G("]"),G(":"),Ae):O(G(":"),Oe,We)):(D(t),O(We))}function De(){return N(Oe,We)}function We(e,t){if("="==t)return O(_)}function He(e){if(","==e)return O(Ne)}function Fe(e,t){if("keyword b"==e&&"else"==t)return O(B("form","else"),j,V)}function Ee(e,t){return"await"==t?O(Ee):"("==e?O(B(")"),Pe,V):void 0}function Pe(e){return"var"==e?O(Ne,ze):"variable"==e?O(ze):N(ze)}function ze(e,t){return")"==e?O():";"==e?O(ze):"in"==t||"of"==t?(M.marked="keyword",O(K,ze)):N(K,ze)}function Ie(e,t){return"*"==t?(M.marked="keyword",O(Ie)):"variable"==e?(D(t),O(Ie)):"("==e?O(z,B(")"),ce(Ve,")"),V,ge,j,R):c&&"<"==t?O(B(">"),ce(Te,">"),V,Ie):void 0}function Re(e,t){return"*"==t?(M.marked="keyword",O(Re)):"variable"==e?(D(t),O(Re)):"("==e?O(z,B(")"),ce(Ve,")"),V,ge,R):c&&"<"==t?O(B(">"),ce(Te,">"),V,Re):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(M.marked="type",O(Be)):"<"==t?O(B(">"),ce(Te,">"),V):void 0}function Ve(e,t){return"@"==t&&O(K,Ve),"spread"==e?O(Ve):c&&H(t)?(M.marked="keyword",O(Ve)):c&&"this"==e?O(he,We):N(Oe,he,We)}function Ge(e,t){return"variable"==e?je(e,t):Ue(e,t)}function je(e,t){if("variable"==e)return D(t),O(Ue)}function Ue(e,t){return"<"==t?O(B(">"),ce(Te,">"),V,Ue):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(M.marked="keyword"),O(c?me:K,Ue)):"{"==e?O(B("}"),Ke,V):void 0}function Ke(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&H(t))&&M.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(M.marked="keyword",O(Ke)):"variable"==e||"keyword"==M.style?(M.marked="property",O(_e,Ke)):"number"==e||"string"==e?O(_e,Ke):"["==e?O(K,he,G("]"),_e,Ke):"*"==t?(M.marked="keyword",O(Ke)):c&&"("==e?N(Re,Ke):";"==e||","==e?O(Ke):"}"==e?O():"@"==t?O(K,Ke):void 0}function _e(e,t){if("!"==t)return O(_e);if("?"==t)return O(_e);if(":"==e)return O(me,We);if("="==t)return O(_);var r=M.state.lexical.prev;return N(r&&"interface"==r.info?Re:Ie)}function Xe(e,t){return"*"==t?(M.marked="keyword",O(Qe,G(";"))):"default"==t?(M.marked="keyword",O(K,G(";"))):"{"==e?O(ce($e,"}"),Qe,G(";")):N(j)}function $e(e,t){return"as"==t?(M.marked="keyword",O(G("variable"))):"variable"==e?N(_,$e):void 0}function Ye(e){return"string"==e?O():"("==e?N(K):"."==e?N(q):N(qe,Ze,Qe)}function qe(e,t){return"{"==e?fe(qe,"}"):("variable"==e&&D(t),"*"==t&&(M.marked="keyword"),O(Je))}function Ze(e){if(","==e)return O(qe,Ze)}function Je(e,t){if("as"==t)return M.marked="keyword",O(qe)}function Qe(e,t){if("from"==t)return M.marked="keyword",O(K)}function et(e){return"]"==e?O():N(ce(_,"]"))}function tt(){return N(B("form"),Oe,G("{"),B("}"),ce(rt,"}"),V,V)}function rt(){return N(Oe,We)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function it(e,t,r){return t.tokenize==m&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return z.lex=I.lex=!0,R.lex=!0,V.lex=!0,{startState:function(e){var t={tokenize:m,lastType:"sof",cc:[],lexical:new S((e||0)-o,0,"block",!1),localVars:r.localVars,context:r.localVars&&new F(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),C(e,t)),t.tokenize!=b&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=i&&"--"!=i?n:"incdec",T(t,r,n,i,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==w)return e.Pass;if(t.tokenize!=m)return 0;var i,a=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var c=t.cc[u];if(c==V)s=s.prev;else if(c!=Fe&&c!=R)break}for(;("stat"==s.type||"form"==s.type)&&("}"==a||(i=t.cc[t.cc.length-1])&&(i==q||i==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;l&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var f=s.type,d=a==f;return"vardef"==f?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==f&&"{"==a?s.indented:"form"==f?s.indented+o:"stat"==f?s.indented+(nt(t,n)?l||o:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:o):s.indented+(/^(?:case|default)\b/.test(n)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:a,jsonMode:s,expressionAllowed:it,skipExpression:function(t){T(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(237))},795:function(e,t,r){!function(e){"use strict";function t(t){return function(r,n){var i=n.line,o=r.getLine(i);function l(t){for(var l,a=n.ch,s=0;;){var u=a<=0?-1:o.lastIndexOf(t[0],a-1);if(-1!=u){if(1==s&&u<n.ch)break;if(l=r.getTokenTypeAt(e.Pos(i,u+1)),!/^(comment|string)/.test(l))return{ch:u+1,tokenType:l,pair:t};a=u-1}else{if(1==s)break;s=1,a=o.length}}}function a(t){var n,o,l=1,a=r.lastLine(),s=t.ch;e:for(var u=i;u<=a;++u)for(var c=r.getLine(u),f=u==i?s:0;;){var d=c.indexOf(t.pair[0],f),h=c.indexOf(t.pair[1],f);if(d<0&&(d=c.length),h<0&&(h=c.length),(f=Math.min(d,h))==c.length)break;if(r.getTokenTypeAt(e.Pos(u,f+1))==t.tokenType)if(f==d)++l;else if(! --l){n=u,o=f;break e}++f}return null==n||i==n?null:{from:e.Pos(i,s),to:e.Pos(n,o)}}for(var s=[],u=0;u<t.length;u++){var c=l(t[u]);c&&s.push(c)}for(s.sort((function(e,t){return e.ch-t.ch})),u=0;u<s.length;u++){var f=a(s[u]);if(f)return f}return null}}e.registerHelper("fold","brace",t([["{","}"],["[","]"]])),e.registerHelper("fold","brace-paren",t([["{","}"],["[","]"],["(",")"]])),e.registerHelper("fold","import",(function(t,r){function n(r){if(r<t.firstLine()||r>t.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));if(/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"keyword"!=n.type||"import"!=n.string)return null;for(var i=r,o=Math.min(t.lastLine(),r+10);i<=o;++i){var l=t.getLine(i).indexOf(";");if(-1!=l)return{startCh:n.end,end:e.Pos(i,l)}}}var i,o=r.line,l=n(o);if(!l||n(o-1)||(i=n(o-2))&&i.end.line==o-1)return null;for(var a=l.end;;){var s=n(a.line+1);if(null==s)break;a=s.end}return{from:t.clipPos(e.Pos(o,l.startCh+1)),to:a}})),e.registerHelper("fold","include",(function(t,r){function n(r){if(r<t.firstLine()||r>t.lastLine())return null;var n=t.getTokenAt(e.Pos(r,1));return/\S/.test(n.string)||(n=t.getTokenAt(e.Pos(r,n.end+1))),"meta"==n.type&&"#include"==n.string.slice(0,8)?n.start+8:void 0}var i=r.line,o=n(i);if(null==o||null!=n(i-1))return null;for(var l=i;null!=n(l+1);)++l;return{from:e.Pos(i,o+1),to:t.clipPos(e.Pos(l))}}))}(r(237))},948:function(e,t,r){!function(e){"use strict";function t(t,n,o,l){if(o&&o.call){var a=o;o=null}else a=i(t,o,"rangeFinder");"number"==typeof n&&(n=e.Pos(n,0));var s=i(t,o,"minFoldSize");function u(e){var r=a(t,n);if(!r||r.to.line-r.from.line<s)return null;if("fold"===l)return r;for(var i=t.findMarksAt(r.from),o=0;o<i.length;++o)if(i[o].__isFold){if(!e)return null;r.cleared=!0,i[o].clear()}return r}var c=u(!0);if(i(t,o,"scanUp"))for(;!c&&n.line>t.firstLine();)n=e.Pos(n.line-1,0),c=u(!1);if(c&&!c.cleared&&"unfold"!==l){var f=r(t,o,c);e.on(f,"mousedown",(function(t){d.clear(),e.e_preventDefault(t)}));var d=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});d.on("clear",(function(r,n){e.signal(t,"unfold",t,r,n)})),e.signal(t,"fold",t,c.from,c.to)}}function r(e,t,r){var n=i(e,t,"widget");if("function"==typeof n&&(n=n(r.from,r.to)),"string"==typeof n){var o=document.createTextNode(n);(n=document.createElement("span")).appendChild(o),n.className="CodeMirror-foldmarker"}else n&&(n=n.cloneNode(!0));return n}e.newFoldFunction=function(e,r){return function(n,i){t(n,i,{rangeFinder:e,widget:r})}},e.defineExtension("foldCode",(function(e,r,n){t(this,e,r,n)})),e.defineExtension("isFolded",(function(e){for(var t=this.findMarksAt(e),r=0;r<t.length;++r)if(t[r].__isFold)return!0})),e.commands.toggleFold=function(e){e.foldCode(e.getCursor())},e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")},e.commands.unfold=function(e){e.foldCode(e.getCursor(),{scanUp:!1},"unfold")},e.commands.foldAll=function(t){t.operation((function(){for(var r=t.firstLine(),n=t.lastLine();r<=n;r++)t.foldCode(e.Pos(r,0),{scanUp:!1},"fold")}))},e.commands.unfoldAll=function(t){t.operation((function(){for(var r=t.firstLine(),n=t.lastLine();r<=n;r++)t.foldCode(e.Pos(r,0),{scanUp:!1},"unfold")}))},e.registerHelper("fold","combine",(function(){var e=Array.prototype.slice.call(arguments,0);return function(t,r){for(var n=0;n<e.length;++n){var i=e[n](t,r);if(i)return i}}})),e.registerHelper("fold","auto",(function(e,t){for(var r=e.getHelpers(t,"fold"),n=0;n<r.length;n++){var i=r[n](e,t);if(i)return i}}));var n={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function i(e,t,r){if(t&&void 0!==t[r])return t[r];var i=e.options.foldOptions;return i&&void 0!==i[r]?i[r]:n[r]}e.defineOption("foldOptions",null),e.defineExtension("foldOption",(function(e,t){return i(this,e,t)}))}(r(237))}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=r(237),t=r.n(e);r(795),r(274),r(792);const n={init(){document.addEventListener("DOMContentLoaded",(function(){if(void 0===CLD_METADATA)return;const e=document.getElementById("meta-data");t()(e,{value:JSON.stringify(CLD_METADATA,null," "),lineNumbers:!0,theme:"material",readOnly:!0,mode:{name:"javascript",json:!0},matchBrackets:!0,foldGutter:!0,htmlMode:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],viewportMargin:50}).setSize(null,600)}))}};n.init()}()}(); 1 (()=>{"use strict";const t=1024;let e=0;class i{constructor(t,e){this.from=t,this.to=e}}class s{constructor(t={}){this.id=e++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=t.combine||null}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=o.match(t)),e=>{let i=t(e);return void 0===i?null:[this,i]}}}s.closedBy=new s({deserialize:t=>t.split(" ")}),s.openedBy=new s({deserialize:t=>t.split(" ")}),s.group=new s({deserialize:t=>t.split(" ")}),s.isolate=new s({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),s.contextHash=new s({perNode:!0}),s.lookAhead=new s({perNode:!0}),s.mounted=new s({perNode:!0});class n{constructor(t,e,i,s=!1){this.tree=t,this.overlay=e,this.parser=i,this.bracketed=s}static get(t){return t&&t.props&&t.props[s.mounted.id]}}const r=Object.create(null);class o{constructor(t,e,i,s=0){this.name=t,this.props=e,this.id=i,this.flags=s}static define(t){let e=t.props&&t.props.length?Object.create(null):r,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),s=new o(t.name||"",e,t.id,i);if(t.props)for(let i of t.props)if(Array.isArray(i)||(i=i(s)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[i[0].id]=i[1]}return s}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(s.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let s of i.split(" "))e[s]=t[i];return t=>{for(let i=t.prop(s.group),n=-1;n<(i?i.length:0);n++){let s=e[n<0?t.name:i[n]];if(s)return s}}}}o.none=new o("",Object.create(null),0,8);class l{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let i of this.types){let s=null;for(let e of t){let t=e(i);if(t){s||(s=Object.assign({},i.props));let e=t[1],n=t[0];n.combine&&n.id in s&&(e=n.combine(s[n.id],e)),s[n.id]=e}}e.push(s?new o(i.name,s,i.id,i.flags):i)}return new l(e)}}const a=new WeakMap,h=new WeakMap;var c;!function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"}(c||(c={}));class u{constructor(t,e,i,s,n){if(this.type=t,this.children=e,this.positions=i,this.length=s,this.props=null,n&&n.length){this.props=Object.create(null);for(let[t,e]of n)this.props["number"==typeof t?t:t.id]=e}}toString(){let t=n.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let t of this.children){let i=t.toString();i&&(e&&(e+=","),e+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new C(this.topNode,t)}cursorAt(t,e=0,i=0){let s=a.get(this)||this.topNode,n=new C(s);return n.moveTo(t,e),a.set(this,n._tree),n}get topNode(){return new v(this,0,0,null)}resolve(t,e=0){let i=m(a.get(this)||this.topNode,t,e,!1);return a.set(this,i),i}resolveInner(t,e=0){let i=m(h.get(this)||this.topNode,t,e,!0);return h.set(this,i),i}resolveStack(t,e=0){return function(t,e,i){let s=t.resolveInner(e,i),r=null;for(let t=s instanceof v?s:s.context.parent;t;t=t.parent)if(t.index<0){let n=t.parent;(r||(r=[s])).push(n.resolve(e,i)),t=n}else{let o=n.get(t.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let n=new v(o.tree,o.overlay[0].from+t.from,-1,t);(r||(r=[s])).push(m(n,e,i,!1))}}return r?k(r):s}(this,t,e)}iterate(t){let{enter:e,leave:i,from:s=0,to:n=this.length}=t,r=t.mode||0,o=(r&c.IncludeAnonymous)>0;for(let t=this.cursor(r|c.IncludeAnonymous);;){let r=!1;if(t.from<=n&&t.to>=s&&(!o&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;r=!0}for(;r&&i&&(o||!t.type.isAnonymous)&&i(t),!t.nextSibling();){if(!t.parent())return;r=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:T(o.none,this.children,this.positions,0,this.children.length,0,this.length,(t,e,i)=>new u(this.type,t,e,i,this.propValues),t.makeTree||((t,e,i)=>new u(o.none,t,e,i)))}static build(e){return function(e){var i;let{buffer:n,nodeSet:r,maxBufferLength:o=t,reused:l=[],minRepeatType:a=r.types.length}=e,h=Array.isArray(n)?new f(n,n.length):n,c=r.types,p=0,m=0;function g(t,e,i,s,n,u){let{id:f,start:S,end:C,size:A}=h,M=m,O=p;if(A<0){if(h.next(),-1==A){let e=l[f];return i.push(e),void s.push(S-t)}if(-3==A)return void(p=f);if(-4==A)return void(m=f);throw new RangeError(`Unrecognized record size: ${A}`)}let D,R,P=c[f],B=S-t;if(C-S<=o&&(R=x(h.pos-e,n))){let e=new Uint16Array(R.size-R.skip),i=h.pos-R.size,s=e.length;for(;h.pos>i;)s=k(R.start,e,s);D=new d(e,C-R.start,r),B=R.start-t}else{let t=h.pos-A;h.next();let e=[],i=[],s=f>=a?f:-1,n=0,r=C;for(;h.pos>t;)s>=0&&h.id==s&&h.size>=0?(h.end<=r-o&&(b(e,i,S,n,h.end,r,s,M,O),n=e.length,r=h.end),h.next()):u>2500?v(S,t,e,i):g(S,t,e,i,s,u+1);if(s>=0&&n>0&&n<e.length&&b(e,i,S,n,S,r,s,M,O),e.reverse(),i.reverse(),s>-1&&n>0){let t=w(P,O);D=T(P,e,i,0,e.length,0,C-S,t,t)}else D=y(P,e,i,C-S,M-C,O)}i.push(D),s.push(B)}function v(t,e,i,s){let n=[],l=0,a=-1;for(;h.pos>e;){let{id:t,start:e,end:i,size:s}=h;if(s>4)h.next();else{if(a>-1&&e<a)break;a<0&&(a=i-o),n.push(t,e,i),l++,h.next()}}if(l){let e=new Uint16Array(4*l),o=n[n.length-2];for(let t=n.length-3,i=0;t>=0;t-=3)e[i++]=n[t],e[i++]=n[t+1]-o,e[i++]=n[t+2]-o,e[i++]=i;i.push(new d(e,n[2]-o,r)),s.push(o-t)}}function w(t,e){return(i,n,r)=>{let o,l,a=0,h=i.length-1;if(h>=0&&(o=i[h])instanceof u){if(!h&&o.type==t&&o.length==r)return o;(l=o.prop(s.lookAhead))&&(a=n[h]+o.length+l)}return y(t,i,n,r,a,e)}}function b(t,e,i,s,n,o,l,a,h){let c=[],u=[];for(;t.length>s;)c.push(t.pop()),u.push(e.pop()+i-n);t.push(y(r.types[l],c,u,o-n,a-o,h)),e.push(n-i)}function y(t,e,i,n,r,o,l){if(o){let t=[s.contextHash,o];l=l?[t].concat(l):[t]}if(r>25){let t=[s.lookAhead,r];l=l?[t].concat(l):[t]}return new u(t,e,i,n,l)}function x(t,e){let i=h.fork(),s=0,n=0,r=0,l=i.end-o,c={size:0,start:0,skip:0};t:for(let o=i.pos-t;i.pos>o;){let t=i.size;if(i.id==e&&t>=0){c.size=s,c.start=n,c.skip=r,r+=4,s+=4,i.next();continue}let h=i.pos-t;if(t<0||h<o||i.start<l)break;let u=i.id>=a?4:0,f=i.start;for(i.next();i.pos>h;){if(i.size<0){if(-3!=i.size&&-4!=i.size)break t;u+=4}else i.id>=a&&(u+=4);i.next()}n=f,s+=t,r+=u}return(e<0||s==t)&&(c.size=s,c.start=n,c.skip=r),c.size>4?c:void 0}function k(t,e,i){let{id:s,start:n,end:r,size:o}=h;if(h.next(),o>=0&&s<a){let l=i;if(o>4){let s=h.pos-(o-4);for(;h.pos>s;)i=k(t,e,i)}e[--i]=l,e[--i]=r-t,e[--i]=n-t,e[--i]=s}else-3==o?p=s:-4==o&&(m=s);return i}let S=[],C=[];for(;h.pos>0;)g(e.start||0,e.bufferStart||0,S,C,-1,0);let A=null!==(i=e.length)&&void 0!==i?i:S.length?C[0]+S[0].length:0;return new u(c[e.topID],S.reverse(),C.reverse(),A)}(e)}}u.empty=new u(o.none,[],[],0);class f{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new f(this.buffer,this.index)}}class d{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return o.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],i=this.buffer[t+3],s=this.set.types[e],n=s.name;if(/\W/.test(n)&&!s.isError&&(n=JSON.stringify(n)),i==(t+=4))return n;let r=[];for(;t<i;)r.push(this.childString(t)),t=this.buffer[t+3];return n+"("+r.join(",")+")"}findChild(t,e,i,s,n){let{buffer:r}=this,o=-1;for(let l=t;l!=e&&!(p(n,s,r[l+1],r[l+2])&&(o=l,i>0));l=r[l+3]);return o}slice(t,e,i){let s=this.buffer,n=new Uint16Array(e-t),r=0;for(let o=t,l=0;o<e;){n[l++]=s[o++],n[l++]=s[o++]-i;let e=n[l++]=s[o++]-i;n[l++]=s[o++]-t,r=Math.max(r,e)}return new d(n,r,this.set)}}function p(t,e,i,s){switch(t){case-2:return i<e;case-1:return s>=e&&i<e;case 0:return i<e&&s>e;case 1:return i<=e&&s>e;case 2:return s>e;case 4:return!0}}function m(t,e,i,s){for(var n;t.from==t.to||(i<1?t.from>=e:t.from>e)||(i>-1?t.to<=e:t.to<e);){let e=!s&&t instanceof v&&t.index<0?null:t.parent;if(!e)return t;t=e}let r=s?0:c.IgnoreOverlays;if(s)for(let s=t,o=s.parent;o;s=o,o=s.parent)s instanceof v&&s.index<0&&(null===(n=o.enter(e,i,r))||void 0===n?void 0:n.from)!=s.from&&(t=o);for(;;){let s=t.enter(e,i,r);if(!s)return t;t=s}}class g{cursor(t=0){return new C(this,t)}getChild(t,e=null,i=null){let s=w(this,t,e,i);return s.length?s[0]:null}getChildren(t,e=null,i=null){return w(this,t,e,i)}resolve(t,e=0){return m(this,t,e,!1)}resolveInner(t,e=0){return m(this,t,e,!0)}matchContext(t){return b(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),i=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(i=e,e=t.prevSibling):e=t}return i}get node(){return this}get next(){return this.parent}}class v extends g{constructor(t,e,i,s){super(),this._tree=t,this.from=e,this.index=i,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,i,s,r=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=e>0?l.length:-1;t!=h;t+=e){let h,f=l[t],m=a[t]+o.from;if(r&c.EnterBracketed&&f instanceof u&&(h=n.get(f))&&!h.overlay&&h.bracketed&&i>=m&&i<=m+f.length||p(s,i,m,m+f.length))if(f instanceof d){if(r&c.ExcludeBuffers)continue;let n=f.findChild(0,f.buffer.length,e,i-m,s);if(n>-1)return new x(new y(o,f,t,m),null,n)}else if(r&c.IncludeAnonymous||!f.type.isAnonymous||A(f)){let l;if(!(r&c.IgnoreMounts)&&(l=n.get(f))&&!l.overlay)return new v(l.tree,m,t,o);let a=new v(f,m,t,o);return r&c.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(e<0?f.children.length-1:0,e,i,s,r)}}if(r&c.IncludeAnonymous||!o.type.isAnonymous)return null;if(t=o.index>=0?o.index+e:e<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}prop(t){return this._tree.prop(t)}enter(t,e,i=0){let s;if(!(i&c.IgnoreOverlays)&&(s=n.get(this._tree))&&s.overlay){let n=t-this.from,r=i&c.EnterBracketed&&s.bracketed;for(let{from:t,to:i}of s.overlay)if((e>0||r?t<=n:t<n)&&(e<0||r?i>=n:i>n))return new v(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,i)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function w(t,e,i,s){let n=t.cursor(),r=[];if(!n.firstChild())return r;if(null!=i)for(let t=!1;!t;)if(t=n.type.is(i),!n.nextSibling())return r;for(;;){if(null!=s&&n.type.is(s))return r;if(n.type.is(e)&&r.push(n.node),!n.nextSibling())return null==s?r:[]}}function b(t,e,i=e.length-1){for(let s=t;i>=0;s=s.parent){if(!s)return!1;if(!s.type.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}class y{constructor(t,e,i,s){this.parent=t,this.buffer=e,this.index=i,this.start=s}}class x extends g{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,i){super(),this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}child(t,e,i){let{buffer:s}=this.context,n=s.findChild(this.index+4,s.buffer[this.index+3],t,e-this.context.start,i);return n<0?null:new x(this.context,this,n)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}prop(t){return this.type.prop(t)}enter(t,e,i=0){if(i&c.ExcludeBuffers)return null;let{buffer:s}=this.context,n=s.findChild(this.index+4,s.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return n<0?null:new x(this.context,this,n)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new x(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new x(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,s=this.index+4,n=i.buffer[this.index+3];if(n>s){let r=i.buffer[this.index+1];t.push(i.slice(s,n,r)),e.push(0)}return new u(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function k(t){if(!t.length)return null;let e=0,i=t[0];for(let s=1;s<t.length;s++){let n=t[s];(n.from>i.from||n.to<i.to)&&(i=n,e=s)}let s=i instanceof v&&i.index<0?null:i.parent,n=t.slice();return s?n[e]=s:n.splice(e,1),new S(n,i)}class S{constructor(t,e){this.heads=t,this.node=e}get next(){return k(this.heads)}}class C{get name(){return this.type.name}constructor(t,e=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=e&~c.EnterBracketed,t instanceof v)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:i,buffer:s}=this.buffer;return this.type=e||s.set.types[s.buffer[t]],this.from=i+s.buffer[t+1],this.to=i+s.buffer[t+2],!0}yield(t){return!!t&&(t instanceof v?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,i,this.mode));let{buffer:s}=this.buffer,n=s.findChild(this.index+4,s.buffer[this.index+3],t,e-this.buffer.start,i);return!(n<0)&&(this.stack.push(this.index),this.yieldBuf(n))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,i=this.mode){return this.buffer?!(i&c.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&c.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&c.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,i=this.stack.length-1;if(t<0){let t=i<0?0:this.stack[i]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(t)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,i,{buffer:s}=this;if(s){if(t>0){if(this.index<s.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(s.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:i}=s)}else({index:e,_parent:i}=this._tree);for(;i;({index:e,_parent:i}=i))if(e>-1)for(let s=e+t,n=t<0?-1:i._tree.children.length;s!=n;s+=t){let t=i._tree.children[s];if(this.mode&c.IncludeAnonymous||t instanceof d||!t.type.isAnonymous||A(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,i=0;if(t&&t.context==this.buffer)t:for(let s=this.index,n=this.stack.length;n>=0;){for(let r=t;r;r=r._parent)if(r.index==s){if(s==this.index)return r;e=r,i=n+1;break t}s=this.stack[--n]}for(let t=i;t<this.stack.length;t++)e=new x(this.buffer,e,this.stack[t]);return this.bufferNode=new x(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let i=0;;){let s=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){i++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&e&&e(this),s=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,s=!0}}}matchContext(t){if(!this.buffer)return b(this.node.parent,t);let{buffer:e}=this.buffer,{types:i}=e.set;for(let s=t.length-1,n=this.stack.length-1;s>=0;n--){if(n<0)return b(this._tree,t,s);let r=i[e.buffer[this.stack[n]]];if(!r.isAnonymous){if(t[s]&&t[s]!=r.name)return!1;s--}}return!0}}function A(t){return t.children.some(t=>t instanceof d||!t.type.isAnonymous||A(t))}const M=new WeakMap;function O(t,e){if(!t.isAnonymous||e instanceof d||e.type!=t)return 1;let i=M.get(e);if(null==i){i=1;for(let s of e.children){if(s.type!=t||!(s instanceof u)){i=1;break}i+=O(t,s)}M.set(e,i)}return i}function T(t,e,i,s,n,r,o,l,a){let h=0;for(let i=s;i<n;i++)h+=O(t,e[i]);let c=Math.ceil(1.5*h/8),u=[],f=[];return function e(i,s,n,o,l){for(let h=n;h<o;){let n=h,d=s[h],p=O(t,i[h]);for(h++;h<o;h++){let e=O(t,i[h]);if(p+e>=c)break;p+=e}if(h==n+1){if(p>c){let t=i[n];e(t.children,t.positions,0,t.children.length,s[n]+l);continue}u.push(i[n])}else{let e=s[h-1]+i[h-1].length-d;u.push(T(t,i,s,n,h,d,e,null,a))}f.push(d+l-r)}}(e,i,s,n,0),(l||a)(u,f,o)}class D{constructor(t,e,i,s,n=!1,r=!1){this.from=t,this.to=e,this.tree=i,this.offset=s,this.open=(n?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],i=!1){let s=[new D(0,t.length,t,0,!1,i)];for(let i of e)i.to>t.length&&s.push(i);return s}static applyChanges(t,e,i=128){if(!e.length)return t;let s=[],n=1,r=t.length?t[0]:null;for(let o=0,l=0,a=0;;o++){let h=o<e.length?e[o]:null,c=h?h.fromA:1e9;if(c-l>=i)for(;r&&r.from<c;){let e=r;if(l>=e.from||c<=e.to||a){let t=Math.max(e.from,l)-a,i=Math.min(e.to,c)-a;e=t>=i?null:new D(t,i,e.tree,e.offset+a,o>0,!!h)}if(e&&s.push(e),r.to>c)break;r=n<t.length?t[n++]:null}if(!h)break;l=h.toA,a=h.toA-h.toB}return s}}class R{startParse(t,e,s){return"string"==typeof t&&(t=new P(t)),s=s?s.length?s.map(t=>new i(t.from,t.to)):[new i(0,0)]:[new i(0,t.length)],this.createParse(t,e||[],s)}parse(t,e,i){let s=this.startParse(t,e,i);for(;;){let t=s.advance();if(t)return t}}}class P{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}new s({perNode:!0});class B{constructor(t,e,i,s,n,r,o,l,a,h=0,c){this.p=t,this.stack=e,this.state=i,this.reducePos=s,this.pos=n,this.score=r,this.buffer=o,this.bufferBase=l,this.curContext=a,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,i=0){let s=t.parser.context;return new B(t,[],e,i,i,0,[],0,s?new E(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let i=t>>19,s=65535&t,{parser:n}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),o=n.dynamicPrecedence(s);if(o&&(this.score+=o),0==i)return this.pushState(n.getGoto(this.state,s,!0),this.reducePos),s<n.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,r?8:4,!0),void this.reduceContext(s,this.reducePos);let l=this.stack.length-3*(i-1)-(262144&t?6:0),a=l?this.stack[l-2]:this.p.ranges[0].from,h=this.reducePos-a;h>=2e3&&!(null===(e=this.p.parser.nodeSet.types[s])||void 0===e?void 0:e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSize<h&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=h));let c=l?this.stack[l-1]:0,u=this.bufferBase+this.buffer.length-c;if(s<n.minRepeatTerm||131072&t){let t=n.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,a,t,u+4,!0)}if(262144&t)this.state=this.stack[l];else{let t=this.stack[l-3];this.state=n.getGoto(t,s,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(s,a)}storeNode(t,e,i,s=4,n=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,s=this.buffer.length;if(0==s&&t.parent&&(s=t.bufferBase-t.parent.bufferBase,t=t.parent),s>0&&0==t.buffer[s-4]&&t.buffer[s-1]>-1){if(e==i)return;if(t.buffer[s-2]>=e)return void(t.buffer[s-2]=i)}}if(n&&this.pos!=i){let n=this.buffer.length;if(n>0&&(0!=this.buffer[n-4]||this.buffer[n-1]<0)){let t=!1;for(let e=n;e>0&&this.buffer[e-2]>i;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;n>0&&this.buffer[n-2]>i;)this.buffer[n]=this.buffer[n-4],this.buffer[n+1]=this.buffer[n-3],this.buffer[n+2]=this.buffer[n-2],this.buffer[n+3]=this.buffer[n-1],n-=4,s>4&&(s-=4)}this.buffer[n]=t,this.buffer[n+1]=e,this.buffer[n+2]=i,this.buffer[n+3]=s}else this.buffer.push(t,e,i,s)}shift(t,e,i,s){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=s,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,s,4);else{let n=t,{parser:r}=this.p;this.pos=s;let o=r.stateFlag(n,1);!o&&(s>i||e<=r.maxNode)&&(this.reducePos=s),this.pushState(n,o?i:Math.min(i,this.reducePos)),this.shiftContext(e,i),e<=r.maxNode&&this.buffer.push(e,i,s,4)}}apply(t,e,i,s){65536&t?this.reduce(t):this.shift(t,e,i,s)}useNode(t,e){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let s=this.pos;this.reducePos=this.pos=s+t.length,this.pushState(e,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let i=t.buffer.slice(e),s=t.bufferBase+e;for(;t&&s==t.bufferBase;)t=t.parent;return new B(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new L(this);;){let i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==i)return!1;if(!(65536&i))return!0;e.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let s,n=0;n<e.length;n+=2)(s=e[n+1])!=this.state&&this.p.parser.hasAction(s,t)&&i.push(e[n],s);if(this.stack.length<120)for(let t=0;i.length<8&&t<e.length;t+=2){let s=e[t+1];i.some((t,e)=>1&e&&t==s)||i.push(e[t],s)}e=i}let i=[];for(let t=0;t<e.length&&i.length<4;t+=2){let s=e[t+1];if(s==this.state)continue;let n=this.split();n.pushState(s,this.pos),n.storeNode(0,n.pos,n.pos,4,!0),n.shiftContext(e[t],this.pos),n.reducePos=this.pos,n.score-=200,i.push(n)}return i}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let i=e>>19,s=65535&e,n=this.stack.length-3*i;if(n<0||t.getGoto(this.stack[n],s,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],i=(s,n)=>{if(!e.includes(s))return e.push(s),t.allActions(s,e=>{if(393216&e);else if(65536&e){let i=(e>>19)-n;if(i>1){let s=65535&e,n=this.stack.length-3*i;if(n>=0&&t.getGoto(this.stack[n],s,!1)>=0)return i<<19|65536|s}}else{let t=i(e,n+1);if(null!=t)return t}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new E(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return!(t<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class E{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class L{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,i=t>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let s=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=s}}class N{constructor(t,e,i){this.stack=t,this.pos=e,this.index=i,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new N(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new N(this.stack,this.pos,this.index)}}function I(t,e=Uint16Array){if("string"!=typeof t)return t;let i=null;for(let s=0,n=0;s<t.length;){let r=0;for(;;){let e=t.charCodeAt(s++),i=!1;if(126==e){r=65535;break}e>=92&&e--,e>=34&&e--;let n=e-32;if(n>=46&&(n-=46,i=!0),r+=n,i)break;r*=46}i?i[n++]=r:i=new e(r)}return i}class W{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const V=new W;class H{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=V,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let i=this.range,s=this.rangeIndex,n=this.pos+t;for(;n<i.from;){if(!s)return null;let t=this.ranges[--s];n-=i.from-t.to,i=t}for(;e<0?n>i.to:n>=i.to;){if(s==this.ranges.length-1)return null;let t=this.ranges[++s];n+=t.from-i.to,i=t}return n}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,i,s=this.chunkOff+t;if(s>=0&&s<this.chunk.length)e=this.pos+t,i=this.chunk.charCodeAt(s);else{let s=this.resolveOffset(t,1);if(null==s)return-1;if(e=s,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,s=this.range;for(;s.to<=e;)s=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>s.to&&(this.chunk2=this.chunk2.slice(0,s.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}acceptToken(t,e=0){let i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=i}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=V,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let i="";for(let s of this.ranges){if(s.from>=e)break;s.to>t&&(i+=this.input.read(Math.max(s.from,t),Math.min(s.to,e)))}return i}}class F{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:i}=e.p;z(this.data,t,e,this.id,i.data,i.tokenPrecTable)}}F.prototype.contextual=F.prototype.fallback=F.prototype.extend=!1;F.prototype.fallback=F.prototype.extend=!1;function z(t,e,i,s,n,r){let o=0,l=1<<s,{dialect:a}=i.p.parser;t:for(;0!=(l&t[o]);){let i=t[o+1];for(let s=o+3;s<i;s+=2)if((t[s+1]&l)>0){let i=t[s];if(a.allows(i)&&(-1==e.token.value||e.token.value==i||_(i,e.token.value,n,r))){e.acceptToken(i);break}}let s=e.next,h=0,c=t[o+2];if(!(e.next<0&&c>h&&65535==t[i+3*c-3])){for(;h<c;){let n=h+c>>1,r=i+n+(n<<1),l=t[r],a=t[r+1]||65536;if(s<l)c=n;else{if(!(s>=a)){o=t[r+2],e.advance();continue t}h=n+1}}break}o=t[i+3*c-1]}}function q(t,e,i){for(let s,n=e;65535!=(s=t[n]);n++)if(s==i)return n-e;return-1}function _(t,e,i,s){let n=q(i,s,e);return n<0||q(i,s,t)<n}const $="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let j=null;function K(t,e,i){let s=t.cursor(c.IncludeAnonymous);for(s.moveTo(e);;)if(!(i<0?s.childBefore(e):s.childAfter(e)))for(;;){if((i<0?s.to<e:s.from>e)&&!s.type.isError)return i<0?Math.max(0,Math.min(s.to-1,e-25)):Math.min(t.length,Math.max(s.from+1,e+25));if(i<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return i<0?0:t.length}}class U{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?K(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?K(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let i=this.trees[e],n=this.index[e];if(n==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=i.children[n],o=this.start[e]+i.positions[n];if(o>t)return this.nextStart=o,null;if(r instanceof u){if(o==t){if(o<this.safeFrom)return null;let t=o+r.length;if(t<=this.safeTo){let e=r.prop(s.lookAhead);if(!e||t+e<this.fragment.to)return r}}this.index[e]++,o+r.length>=Math.max(this.safeFrom,t)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[e]++,this.nextStart=o+r.length}}}class Q{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(t=>new W)}getActions(t){let e=0,i=null,{parser:s}=t.p,{tokenizers:n}=s,r=s.stateSlot(t.state,3),o=t.curContext?t.curContext.hash:0,l=0;for(let s=0;s<n.length;s++){if(!(1<<s&r))continue;let a=n[s],h=this.tokens[s];if((!i||a.fallback)&&((a.contextual||h.start!=t.pos||h.mask!=r||h.context!=o)&&(this.updateCachedToken(h,a,t),h.mask=r,h.context=o),h.lookAhead>h.end+25&&(l=Math.max(h.lookAhead,l)),0!=h.value)){let s=e;if(h.extended>-1&&(e=this.addActions(t,h.extended,h.end,e)),e=this.addActions(t,h.value,h.end,e),!a.extend&&(i=h,e>s))break}}for(;this.actions.length>e;)this.actions.pop();return l&&t.setLookAhead(l),i||t.pos!=this.stream.end||(i=new W,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,e=this.addActions(t,i.value,i.end,e)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new W,{pos:i,p:s}=t;return e.start=i,e.end=Math.min(i+1,s.stream.end),e.value=i==s.stream.end?s.parser.eofTerm:0,e}updateCachedToken(t,e,i){let s=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(s,t),i),t.value>-1){let{parser:e}=i.p;for(let s=0;s<e.specialized.length;s++)if(e.specialized[s]==t.value){let n=e.specializers[s](this.stream.read(t.start,t.end),i);if(n>=0&&i.p.parser.dialect.allows(n>>1)){1&n?t.extended=n>>1:t.value=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(s+1)}putAction(t,e,i,s){for(let e=0;e<s;e+=3)if(this.actions[e]==t)return s;return this.actions[s++]=t,this.actions[s++]=e,this.actions[s++]=i,s}addActions(t,e,i,s){let{state:n}=t,{parser:r}=t.p,{data:o}=r;for(let t=0;t<2;t++)for(let l=r.stateSlot(n,t?2:1);;l+=3){if(65535==o[l]){if(1!=o[l+1]){0==s&&2==o[l+1]&&(s=this.putAction(Z(o,l+2),e,i,s));break}l=Z(o,l+2)}o[l]==e&&(s=this.putAction(Z(o,l+1),e,i,s))}return s}}class Y{constructor(t,e,i,s){this.parser=t,this.input=e,this.ranges=s,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new H(e,s),this.tokens=new Q(t,this.stream),this.topTerm=t.top[1];let{from:n}=s[0];this.stacks=[B.start(this,t.top[0],n)],this.fragments=i.length&&this.stream.end-n>4*t.bufferLength?new U(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,i=this.stacks,s=this.minStackPos,n=this.stacks=[];if(this.bigReductionCount>300&&1==i.length){let[t]=i;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<i.length;r++){let o=i[r];for(;;){if(this.tokens.mainToken=null,o.pos>s)n.push(o);else{if(this.advanceStack(o,n,i))continue;{t||(t=[],e=[]),t.push(o);let i=this.tokens.getMainToken(o);e.push(i.value,i.end)}}break}}if(!n.length){let e=t&&function(t){let e=null;for(let i of t){let t=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=t&&i.pos>t)&&i.p.parser.stateFlag(i.state,2)&&(!e||e.score<i.score)&&(e=i)}return e}(t);if(e)return $&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw $&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+s);this.recovering||(this.recovering=5)}if(this.recovering&&t){let i=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,n);if(i)return $&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(n.length>t)for(n.sort((t,e)=>e.score-t.score);n.length>t;)n.pop();n.some(t=>t.reducePos>s)&&this.recovering--}else if(n.length>1){t:for(let t=0;t<n.length-1;t++){let e=n[t];for(let i=t+1;i<n.length;i++){let s=n[i];if(e.sameState(s)||e.buffer.length>500&&s.buffer.length>500){if(!((e.score-s.score||e.buffer.length-s.buffer.length)>0)){n.splice(t--,1);continue t}n.splice(i--,1)}}}n.length>12&&(n.sort((t,e)=>e.score-t.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let t=1;t<n.length;t++)n[t].pos<this.minStackPos&&(this.minStackPos=n[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,i){let n=t.pos,{parser:r}=this,o=$?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&n>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,i=e?t.curContext.hash:0;for(let l=this.fragments.nodeAt(n);l;){let n=this.parser.nodeSet.types[l.type.id]==l.type?r.getGoto(t.state,l.type.id):-1;if(n>-1&&l.length&&(!e||(l.prop(s.contextHash)||0)==i))return t.useNode(l,n),$&&console.log(o+this.stackID(t)+` (via reuse of ${r.getName(l.type.id)})`),!0;if(!(l instanceof u)||0==l.children.length||l.positions[0]>0)break;let a=l.children[0];if(!(a instanceof u&&0==l.positions[0]))break;l=a}}let l=r.stateSlot(t.state,4);if(l>0)return t.reduce(l),$&&console.log(o+this.stackID(t)+` (via always-reduce ${r.getName(65535&l)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let a=this.tokens.getActions(t);for(let s=0;s<a.length;){let l=a[s++],h=a[s++],c=a[s++],u=s==a.length||!i,f=u?t:t.split(),d=this.tokens.mainToken;if(f.apply(l,h,d?d.start:f.pos,c),$&&console.log(o+this.stackID(f)+` (via ${65536&l?`reduce of ${r.getName(65535&l)}`:"shift"} for ${r.getName(h)} @ ${n}${f==t?"":", split"})`),u)return!0;f.pos>n?e.push(f):i.push(f)}return!1}advanceFully(t,e){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return G(t,e),!0}}runRecovery(t,e,i){let s=null,n=!1;for(let r=0;r<t.length;r++){let o=t[r],l=e[r<<1],a=e[1+(r<<1)],h=$?this.stackID(o)+" -> ":"";if(o.deadEnd){if(n)continue;if(n=!0,o.restart(),$&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,i))continue}let c=o.split(),u=h;for(let t=0;t<10&&c.forceReduce();t++){if($&&console.log(u+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,i))break;$&&(u=this.stackID(c)+" -> ")}for(let t of o.recoverByInsert(l))$&&console.log(h+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,i);this.stream.end>o.pos?(a==o.pos&&(a++,l=0),o.recoverByDelete(l,a),$&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),G(o,i)):(!s||s.score<c.score)&&(s=c)}return s}stackToTree(t){return t.close(),u.build({buffer:N.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(j||(j=new WeakMap)).get(t);return e||j.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function G(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(s.pos==t.pos&&s.sameState(t))return void(e[i].score<t.score&&(e[i]=t))}e.push(t)}class X{constructor(t,e,i){this.source=t,this.flags=e,this.disabled=i}allows(t){return!this.disabled||0==this.disabled[t]}}class J extends R{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let i=e.nodeNames.split(" ");this.minRepeatTerm=i.length;for(let t=0;t<e.repeatNodeCount;t++)i.push("");let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let t=0;t<i.length;t++)r.push([]);function a(t,e,i){r[t].push([e,e.deserialize(String(i))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=s[e]);for(let i=1;i<t.length;){let s=t[i++];if(s>=0)a(s,e,t[i++]);else{let n=t[i+-s];for(let r=-s;r>0;r--)a(t[i++],e,n);i++}}}this.nodeSet=new l(i.map((t,i)=>o.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=t;let h=I(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(tt),this.states=I(e.states,Uint32Array),this.data=I(e.stateData),this.goto=I(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(t=>"number"==typeof t?new F(h,t):t),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,i){let s=new Y(this,t,e,i);for(let n of this.wrappers)s=n(s,t,e,i);return s}getGoto(t,e,i=!1){let s=this.goto;if(e>=s[0])return-1;for(let n=s[e+1];;){let e=s[n++],r=1&e,o=s[n++];if(r&&i)return o;for(let i=n+(e>>1);n<i;n++)if(s[n]==t)return o;if(r)return-1}}hasAction(t,e){let i=this.data;for(let s=0;s<2;s++)for(let n,r=this.stateSlot(t,s?2:1);;r+=3){if(65535==(n=i[r])){if(1!=i[r+1]){if(2==i[r+1])return Z(i,r+2);break}n=i[r=Z(i,r+2)]}if(n==e||0==n)return Z(i,r+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,t=>t==e||null)}allActions(t,e){let i=this.stateSlot(t,4),s=i?e(i):void 0;for(let i=this.stateSlot(t,1);null==s;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=Z(this.data,i+2)}s=e(Z(this.data,i+1))}return s}nextStates(t){let e=[];for(let i=this.stateSlot(t,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=Z(this.data,i+2)}if(!(1&this.data[i+2])){let t=this.data[i+1];e.some((e,i)=>1&i&&e==t)||e.push(this.data[i],t)}}return e}configure(t){let e=Object.assign(Object.create(J.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let i=this.topRules[t.top];if(!i)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=i}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(e=>{let i=t.tokenizers.find(t=>t.from==e);return i?i.to:e})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((i,s)=>{let n=t.specializers.find(t=>t.from==i.external);if(!n)return i;let r=Object.assign(Object.assign({},i),{external:n.to});return e.specializers[s]=tt(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),i=e.map(()=>!1);if(t)for(let s of t.split(" ")){let t=e.indexOf(s);t>=0&&(i[t]=!0)}let s=null;for(let t=0;t<e.length;t++)if(!i[t])for(let i,n=this.dialects[e[t]];65535!=(i=this.data[n++]);)(s||(s=new Uint8Array(this.maxTerm+1)))[i]=1;return new X(t,i,s)}static deserialize(t){return new J(t)}}function Z(t,e){return t[e]|t[e+1]<<16}function tt(t){if(t.external){let e=t.extend?1:0;return(i,s)=>t.external(i,s)<<1|e}return t.get}let et=0;class it{constructor(t,e,i,s){this.name=t,this.set=e,this.base=i,this.modified=s,this.id=et++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let i="string"==typeof t?t:"?";if(t instanceof it&&(e=t),null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let s=new it(i,[],null,[]);if(s.set.push(s),e)for(let t of e.set)s.set.push(t);return s}static defineModifier(t){let e=new nt(t);return t=>t.modified.indexOf(e)>-1?t:nt.get(t.base||t,t.modified.concat(e).sort((t,e)=>t.id-e.id))}}let st=0;class nt{constructor(t){this.name=t,this.instances=[],this.id=st++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find(i=>{return i.base==t&&(s=e,n=i.modified,s.length==n.length&&s.every((t,e)=>t==n[e]));var s,n});if(i)return i;let s=[],n=new it(t.name,s,t,e);for(let t of e)t.instances.push(n);let r=function(t){let e=[[]];for(let i=0;i<t.length;i++)for(let s=0,n=e.length;s<n;s++)e.push(e[s].concat(t[i]));return e.sort((t,e)=>e.length-t.length)}(e);for(let e of t.set)if(!e.modified.length)for(let t of r)s.push(nt.get(e,t));return n}}function rt(t){let e=Object.create(null);for(let i in t){let s=t[i];Array.isArray(s)||(s=[s]);for(let t of i.split(" "))if(t){let i=[],n=2,r=t;for(let e=0;;){if("..."==r&&e>0&&e+3==t.length){n=1;break}let s=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!s)throw new RangeError("Invalid path: "+t);if(i.push("*"==s[0]?"":'"'==s[0][0]?JSON.parse(s[0]):s[0]),e+=s[0].length,e==t.length)break;let o=t[e++];if(e==t.length&&"!"==o){n=0;break}if("/"!=o)throw new RangeError("Invalid path: "+t);r=t.slice(e)}let o=i.length-1,l=i[o];if(!l)throw new RangeError("Invalid path: "+t);let a=new lt(s,n,o>0?i.slice(0,o):null);e[l]=a.sort(e[l])}}return ot.add(e)}const ot=new s({combine(t,e){let i,s,n;for(;t||e;){if(!t||e&&t.depth>=e.depth?(n=e,e=e.next):(n=t,t=t.next),i&&i.mode==n.mode&&!n.context&&!i.context)continue;let r=new lt(n.tags,n.mode,n.context);i?i.next=r:s=r,i=r}return s}});class lt{constructor(t,e,i,s){this.tags=t,this.mode=e,this.context=i,this.next=s}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}function at(t,e){let i=Object.create(null);for(let e of t)if(Array.isArray(e.tag))for(let t of e.tag)i[t.id]=e.class;else i[e.tag.id]=e.class;let{scope:s,all:n=null}=e||{};return{style:t=>{let e=n;for(let s of t)for(let t of s.set){let s=i[t.id];if(s){e=e?e+" "+s:s;break}}return e},scope:s}}function ht(t,e,i,s=0,n=t.length){let r=new ct(s,Array.isArray(e)?e:[e],i);r.highlightRange(t.cursor(),s,n,"",r.highlighters),r.flush(n)}lt.empty=new lt([],2,null);class ct{constructor(t,e,i){this.at=t,this.highlighters=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,n,r){let{type:o,from:l,to:a}=t;if(l>=i||a<=e)return;o.isTop&&(r=this.highlighters.filter(t=>!t.scope||t.scope(o)));let h=n,c=function(t){let e=t.type.prop(ot);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||lt.empty,u=function(t,e){let i=null;for(let s of t){let t=s.style(e);t&&(i=i?i+" "+t:t)}return i}(r,c.tags);if(u&&(h&&(h+=" "),h+=u,1==c.mode&&(n+=(n?" ":"")+u)),this.startSpan(Math.max(e,l),h),c.opaque)return;let f=t.tree&&t.tree.prop(s.mounted);if(f&&f.overlay){let s=t.node.enter(f.overlay[0].from+l,1),o=this.highlighters.filter(t=>!t.scope||t.scope(f.tree.type)),c=t.firstChild();for(let u=0,d=l;;u++){let p=u<f.overlay.length?f.overlay[u]:null,m=p?p.from+l:a,g=Math.max(e,d),v=Math.min(i,m);if(g<v&&c)for(;t.from<v&&(this.highlightRange(t,g,v,n,r),this.startSpan(Math.min(v,t.to),h),!(t.to>=m)&&t.nextSibling()););if(!p||m>i)break;d=p.to+l,d>e&&(this.highlightRange(s.cursor(),Math.max(e,p.from+l),Math.min(i,d),"",o),this.startSpan(Math.min(i,d),h))}c&&t.parent()}else if(t.firstChild()){f&&(n="");do{if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,n,r),this.startSpan(Math.min(i,t.to),h)}}while(t.nextSibling());t.parent()}}}const ut=it.define,ft=ut(),dt=ut(),pt=ut(dt),mt=ut(dt),gt=ut(),vt=ut(gt),wt=ut(gt),bt=ut(),yt=ut(bt),xt=ut(),kt=ut(),St=ut(),Ct=ut(St),At=ut(),Mt={comment:ft,lineComment:ut(ft),blockComment:ut(ft),docComment:ut(ft),name:dt,variableName:ut(dt),typeName:pt,tagName:ut(pt),propertyName:mt,attributeName:ut(mt),className:ut(dt),labelName:ut(dt),namespace:ut(dt),macroName:ut(dt),literal:gt,string:vt,docString:ut(vt),character:ut(vt),attributeValue:ut(vt),number:wt,integer:ut(wt),float:ut(wt),bool:ut(gt),regexp:ut(gt),escape:ut(gt),color:ut(gt),url:ut(gt),keyword:xt,self:ut(xt),null:ut(xt),atom:ut(xt),unit:ut(xt),modifier:ut(xt),operatorKeyword:ut(xt),controlKeyword:ut(xt),definitionKeyword:ut(xt),moduleKeyword:ut(xt),operator:kt,derefOperator:ut(kt),arithmeticOperator:ut(kt),logicOperator:ut(kt),bitwiseOperator:ut(kt),compareOperator:ut(kt),updateOperator:ut(kt),definitionOperator:ut(kt),typeOperator:ut(kt),controlOperator:ut(kt),punctuation:St,separator:ut(St),bracket:Ct,angleBracket:ut(Ct),squareBracket:ut(Ct),paren:ut(Ct),brace:ut(Ct),content:bt,heading:yt,heading1:ut(yt),heading2:ut(yt),heading3:ut(yt),heading4:ut(yt),heading5:ut(yt),heading6:ut(yt),contentSeparator:ut(bt),list:ut(bt),quote:ut(bt),emphasis:ut(bt),strong:ut(bt),link:ut(bt),monospace:ut(bt),strikethrough:ut(bt),inserted:ut(),deleted:ut(),changed:ut(),invalid:ut(),meta:At,documentMeta:ut(At),annotation:ut(At),processingInstruction:ut(At),definition:it.defineModifier("definition"),constant:it.defineModifier("constant"),function:it.defineModifier("function"),standard:it.defineModifier("standard"),local:it.defineModifier("local"),special:it.defineModifier("special")};for(let t in Mt){let e=Mt[t];e instanceof it&&(e.name=t)}at([{tag:Mt.link,class:"tok-link"},{tag:Mt.heading,class:"tok-heading"},{tag:Mt.emphasis,class:"tok-emphasis"},{tag:Mt.strong,class:"tok-strong"},{tag:Mt.keyword,class:"tok-keyword"},{tag:Mt.atom,class:"tok-atom"},{tag:Mt.bool,class:"tok-bool"},{tag:Mt.url,class:"tok-url"},{tag:Mt.labelName,class:"tok-labelName"},{tag:Mt.inserted,class:"tok-inserted"},{tag:Mt.deleted,class:"tok-deleted"},{tag:Mt.literal,class:"tok-literal"},{tag:Mt.string,class:"tok-string"},{tag:Mt.number,class:"tok-number"},{tag:[Mt.regexp,Mt.escape,Mt.special(Mt.string)],class:"tok-string2"},{tag:Mt.variableName,class:"tok-variableName"},{tag:Mt.local(Mt.variableName),class:"tok-variableName tok-local"},{tag:Mt.definition(Mt.variableName),class:"tok-variableName tok-definition"},{tag:Mt.special(Mt.variableName),class:"tok-variableName2"},{tag:Mt.definition(Mt.propertyName),class:"tok-propertyName tok-definition"},{tag:Mt.typeName,class:"tok-typeName"},{tag:Mt.namespace,class:"tok-namespace"},{tag:Mt.className,class:"tok-className"},{tag:Mt.macroName,class:"tok-macroName"},{tag:Mt.propertyName,class:"tok-propertyName"},{tag:Mt.operator,class:"tok-operator"},{tag:Mt.comment,class:"tok-comment"},{tag:Mt.meta,class:"tok-meta"},{tag:Mt.invalid,class:"tok-invalid"},{tag:Mt.punctuation,class:"tok-punctuation"}]);const Ot=rt({String:Mt.string,Number:Mt.number,"True False":Mt.bool,PropertyName:Mt.propertyName,Null:Mt.null,", :":Mt.separator,"[ ]":Mt.squareBracket,"{ }":Mt.brace}),Tt=J.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[Ot],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let Dt=[],Rt=[];function Pt(t){if(t<768)return!1;for(let e=0,i=Dt.length;;){let s=e+i>>1;if(t<Dt[s])i=s;else{if(!(t>=Rt[s]))return!0;e=s+1}if(e==i)return!1}}function Bt(t){return t>=127462&&t<=127487}(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let e=0,i=0;e<t.length;e++)(e%2?Rt:Dt).push(i+=t[e])})();function Et(t,e,i=!0,s=!0){return(i?Lt:Nt)(t,e,s)}function Lt(t,e,i){if(e==t.length)return e;e&&Wt(t.charCodeAt(e))&&Vt(t.charCodeAt(e-1))&&e--;let s=It(t,e);for(e+=Ht(s);e<t.length;){let n=It(t,e);if(8205==s||8205==n||i&&Pt(n))e+=Ht(n),s=n;else{if(!Bt(n))break;{let i=0,s=e-2;for(;s>=0&&Bt(It(t,s));)i++,s-=2;if(i%2==0)break;e+=2}}}return e}function Nt(t,e,i){for(;e>0;){let s=Lt(t,e-2,i);if(s<e)return s;e--}return 0}function It(t,e){let i=t.charCodeAt(e);if(!Vt(i)||e+1==t.length)return i;let s=t.charCodeAt(e+1);return Wt(s)?s-56320+(i-55296<<10)+65536:i}function Wt(t){return t>=56320&&t<57344}function Vt(t){return t>=55296&&t<56320}function Ht(t){return t<65536?1:2}class Ft{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=Yt(this,t,e);let s=[];return this.decompose(0,t,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(e,this.length,s,1),qt.from(s,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=Yt(this,t,e);let i=[];return this.decompose(t,e,i,0),qt.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),s=new jt(this),n=new jt(t);for(let t=e,r=e;;){if(s.next(t),n.next(t),t=0,s.lineBreak!=n.lineBreak||s.done!=n.done||s.value!=n.value)return!1;if(r+=s.value.length,s.done||r>=i)return!0}}iter(t=1){return new jt(this,t)}iterRange(t,e=this.length){return new Kt(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let s=this.line(t).from;i=this.iterRange(s,Math.max(s,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new Ut(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new zt(t):qt.from(zt.split(t,[])):Ft.empty}}class zt extends Ft{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,s){for(let n=0;;n++){let r=this.text[n],o=s+r.length;if((e?i:o)>=t)return new Qt(s,o,i,r);s=o+1,i++}}decompose(t,e,i,s){let n=t<=0&&e>=this.length?this:new zt($t(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&s){let t=i.pop(),e=_t(n.text,t.text.slice(),0,n.length);if(e.length<=32)i.push(new zt(e,t.length+n.length));else{let t=e.length>>1;i.push(new zt(e.slice(0,t)),new zt(e.slice(t)))}}else i.push(n)}replace(t,e,i){if(!(i instanceof zt))return super.replace(t,e,i);[t,e]=Yt(this,t,e);let s=_t(this.text,_t(i.text,$t(this.text,0,t)),e),n=this.length+i.length-(e-t);return s.length<=32?new zt(s,n):qt.from(zt.split(s,[]),n)}sliceString(t,e=this.length,i="\n"){[t,e]=Yt(this,t,e);let s="";for(let n=0,r=0;n<=e&&r<this.text.length;r++){let o=this.text[r],l=n+o.length;n>t&&r&&(s+=i),t<l&&e>n&&(s+=o.slice(Math.max(0,t-n),e-n)),n=l+1}return s}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],s=-1;for(let n of t)i.push(n),s+=n.length+1,32==i.length&&(e.push(new zt(i,s)),i=[],s=-1);return s>-1&&e.push(new zt(i,s)),e}}class qt extends Ft{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,s){for(let n=0;;n++){let r=this.children[n],o=s+r.length,l=i+r.lines-1;if((e?l:o)>=t)return r.lineInner(t,e,i,s);s=o+1,i=l+1}}decompose(t,e,i,s){for(let n=0,r=0;r<=e&&n<this.children.length;n++){let o=this.children[n],l=r+o.length;if(t<=l&&e>=r){let n=s&((r<=t?1:0)|(l>=e?2:0));r>=t&&l<=e&&!n?i.push(o):o.decompose(t-r,e-r,i,n)}r=l+1}}replace(t,e,i){if([t,e]=Yt(this,t,e),i.lines<this.lines)for(let s=0,n=0;s<this.children.length;s++){let r=this.children[s],o=n+r.length;if(t>=n&&e<=o){let l=r.replace(t-n,e-n,i),a=this.lines-r.lines+l.lines;if(l.lines<a>>4&&l.lines>a>>6){let n=this.children.slice();return n[s]=l,new qt(n,this.length-(e-t)+i.length)}return super.replace(n,o,l)}n=o+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){[t,e]=Yt(this,t,e);let s="";for(let n=0,r=0;n<this.children.length&&r<=e;n++){let o=this.children[n],l=r+o.length;r>t&&n&&(s+=i),t<l&&e>r&&(s+=o.sliceString(t-r,e-r,i)),r=l+1}return s}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof qt))return 0;let i=0,[s,n,r,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=e,n+=e){if(s==r||n==o)return i;let l=this.children[s],a=t.children[n];if(l!=a)return i+l.scanIdentical(a,e);i+=l.length+1}}static from(t,e=t.reduce((t,e)=>t+e.length+1,-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new zt(i,e)}let s=Math.max(32,i>>5),n=s<<1,r=s>>1,o=[],l=0,a=-1,h=[];function c(t){let e;if(t.lines>n&&t instanceof qt)for(let e of t.children)c(e);else t.lines>r&&(l>r||!l)?(u(),o.push(t)):t instanceof zt&&l&&(e=h[h.length-1])instanceof zt&&t.lines+e.lines<=32?(l+=t.lines,a+=t.length+1,h[h.length-1]=new zt(e.text.concat(t.text),e.length+1+t.length)):(l+t.lines>s&&u(),l+=t.lines,a+=t.length+1,h.push(t))}function u(){0!=l&&(o.push(1==h.length?h[0]:qt.from(h,a)),a=-1,l=h.length=0)}for(let e of t)c(e);return u(),1==o.length?o[0]:new qt(o,e)}}function _t(t,e,i=0,s=1e9){for(let n=0,r=0,o=!0;r<t.length&&n<=s;r++){let l=t[r],a=n+l.length;a>=i&&(a>s&&(l=l.slice(0,s-n)),n<i&&(l=l.slice(i-n)),o?(e[e.length-1]+=l,o=!1):e.push(l)),n=a+1}return e}function $t(t,e,i){return _t(t,[""],e,i)}Ft.empty=new zt([""],0);class jt{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof zt?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],n=this.offsets[i],r=n>>1,o=s instanceof zt?s.text.length:s.children.length;if(r==(e>0?o:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&n)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(s instanceof zt){let n=s.text[r+(e<0?-1:0)];if(this.offsets[i]+=e,n.length>Math.max(0,t))return this.value=0==t?n:e>0?n.slice(t):n.slice(0,n.length-t),this;t-=n.length}else{let n=s.children[r+(e<0?-1:0)];t>n.length?(t-=n.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(n),this.offsets.push(e>0?1:(n instanceof zt?n.text.length:n.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class Kt{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new jt(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:s}=this.cursor.next(t);return this.pos+=(s.length+t)*e,this.value=s.length<=i?s:e<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class Ut{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:s}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Ft.prototype[Symbol.iterator]=function(){return this.iter()},jt.prototype[Symbol.iterator]=Kt.prototype[Symbol.iterator]=Ut.prototype[Symbol.iterator]=function(){return this});class Qt{constructor(t,e,i,s){this.from=t,this.to=e,this.number=i,this.text=s}get length(){return this.to-this.from}}function Yt(t,e,i){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,i))]}function Gt(t,e,i=!0,s=!0){return Et(t,e,i,s)}function Xt(t,e){let i=t.charCodeAt(e);if(!(s=i,s>=55296&&s<56320&&e+1!=t.length))return i;var s;let n=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(n)?n-56320+(i-55296<<10)+65536:i}function Jt(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function Zt(t){return t<65536?1:2}const te=/\r\n?|\n/;var ee=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(ee||(ee={}));class ie{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e+1];t+=i<0?this.sections[e]:i}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,i=0,s=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?(t(i,s,n),s+=n):s+=r,i+=n}}iterChangedRanges(t,e=!1){oe(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let i=this.sections[e++],s=this.sections[e++];s<0?t.push(i,s):t.push(s,i)}return new ie(t)}composeDesc(t){return this.empty?t:t.empty?this:ae(this,t)}mapDesc(t,e=!1){return t.empty?this:le(this,t,e)}mapPos(t,e=-1,i=ee.Simple){let s=0,n=0;for(let r=0;r<this.sections.length;){let o=this.sections[r++],l=this.sections[r++],a=s+o;if(l<0){if(a>t)return n+(t-s);n+=o}else{if(i!=ee.Simple&&a>=t&&(i==ee.TrackDel&&s<t&&a>t||i==ee.TrackBefore&&s<t||i==ee.TrackAfter&&a>t))return null;if(a>t||a==t&&e<0&&!o)return t==s||e<0?n:n+l;n+=l}s=a}if(t>s)throw new RangeError(`Position ${t} is out of range for changeset of length ${s}`);return n}touchesRange(t,e=t){for(let i=0,s=0;i<this.sections.length&&s<=e;){let n=s+this.sections[i++];if(this.sections[i++]>=0&&s<=e&&n>=t)return!(s<t&&n>e)||"cover";s=n}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let i=this.sections[e++],s=this.sections[e++];t+=(t?" ":"")+i+(s>=0?":"+s:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(t=>"number"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ie(t)}static create(t){return new ie(t)}}class se extends ie{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return oe(this,(e,i,s,n,r)=>t=t.replace(s,s+(i-e),r),!1),t}mapDesc(t,e=!1){return le(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let s=0,n=0;s<e.length;s+=2){let r=e[s],o=e[s+1];if(o>=0){e[s]=o,e[s+1]=r;let l=s>>1;for(;i.length<l;)i.push(Ft.empty);i.push(r?t.slice(n,n+r):Ft.empty)}n+=r}return new se(e,i)}compose(t){return this.empty?t:t.empty?this:ae(this,t,!0)}map(t,e=!1){return t.empty?this:le(this,t,e,!0)}iterChanges(t,e=!1){oe(this,t,e)}get desc(){return ie.create(this.sections)}filter(t){let e=[],i=[],s=[],n=new he(this);t:for(let r=0,o=0;;){let l=r==t.length?1e9:t[r++];for(;o<l||o==l&&0==n.len;){if(n.done)break t;let t=Math.min(n.len,l-o);ne(s,t,-1);let r=-1==n.ins?-1:0==n.off?n.ins:0;ne(e,t,r),r>0&&re(i,e,n.text),n.forward(t),o+=t}let a=t[r++];for(;o<a;){if(n.done)break t;let t=Math.min(n.len,a-o);ne(e,t,-1),ne(s,t,-1==n.ins?-1:0==n.off?n.ins:0),n.forward(t),o+=t}}return{changes:new se(e,i),filtered:ie.create(s)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e],s=this.sections[e+1];s<0?t.push(i):0==s?t.push([i]):t.push([i].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,i){let s=[],n=[],r=0,o=null;function l(t=!1){if(!t&&!s.length)return;r<e&&ne(s,e-r,-1);let i=new se(s,n);o=o?o.compose(i.map(o)):i,s=[],n=[],r=0}return function t(a){if(Array.isArray(a))for(let e of a)t(e);else if(a instanceof se){if(a.length!=e)throw new RangeError(`Mismatched change set length (got ${a.length}, expected ${e})`);l(),o=o?o.compose(a.map(o)):a}else{let{from:t,to:o=t,insert:h}=a;if(t>o||t<0||o>e)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${e})`);let c=h?"string"==typeof h?Ft.of(h.split(i||te)):h:Ft.empty,u=c.length;if(t==o&&0==u)return;t<r&&l(),t>r&&ne(s,t-r,-1),ne(s,o-t,u),re(n,s,c),r=o}}(t),l(!o),o}static empty(t){return new se(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let s=0;s<t.length;s++){let n=t[s];if("number"==typeof n)e.push(n,-1);else{if(!Array.isArray(n)||"number"!=typeof n[0]||n.some((t,e)=>e&&"string"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==n.length)e.push(n[0],0);else{for(;i.length<s;)i.push(Ft.empty);i[s]=Ft.of(n.slice(1)),e.push(n[0],i[s].length)}}}return new se(e,i)}static createSet(t,e){return new se(t,e)}}function ne(t,e,i,s=!1){if(0==e&&i<=0)return;let n=t.length-2;n>=0&&i<=0&&i==t[n+1]?t[n]+=e:n>=0&&0==e&&0==t[n]?t[n+1]+=i:s?(t[n]+=e,t[n+1]+=i):t.push(e,i)}function re(t,e,i){if(0==i.length)return;let s=e.length-2>>1;if(s<t.length)t[t.length-1]=t[t.length-1].append(i);else{for(;t.length<s;)t.push(Ft.empty);t.push(i)}}function oe(t,e,i){let s=t.inserted;for(let n=0,r=0,o=0;o<t.sections.length;){let l=t.sections[o++],a=t.sections[o++];if(a<0)n+=l,r+=l;else{let h=n,c=r,u=Ft.empty;for(;h+=l,c+=a,a&&s&&(u=u.append(s[o-2>>1])),!(i||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],a=t.sections[o++];e(n,h,r,c,u),n=h,r=c}}}function le(t,e,i,s=!1){let n=[],r=s?[]:null,o=new he(t),l=new he(e);for(let t=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(-1==o.ins&&-1==l.ins){let t=Math.min(o.len,l.len);ne(n,t,-1),o.forward(t),l.forward(t)}else if(l.ins>=0&&(o.ins<0||t==o.i||0==o.off&&(l.len<o.len||l.len==o.len&&!i))){let e=l.len;for(ne(n,l.ins,-1);e;){let i=Math.min(o.len,e);o.ins>=0&&t<o.i&&o.len<=i&&(ne(n,0,o.ins),r&&re(r,n,o.text),t=o.i),o.forward(i),e-=i}l.next()}else{if(!(o.ins>=0)){if(o.done&&l.done)return r?se.createSet(n,r):ie.create(n);throw new Error("Mismatched change set lengths")}{let e=0,i=o.len;for(;i;)if(-1==l.ins){let t=Math.min(i,l.len);e+=t,i-=t,l.forward(t)}else{if(!(0==l.ins&&l.len<i))break;i-=l.len,l.next()}ne(n,e,t<o.i?o.ins:0),r&&t<o.i&&re(r,n,o.text),t=o.i,o.forward(o.len-i)}}}}function ae(t,e,i=!1){let s=[],n=i?[]:null,r=new he(t),o=new he(e);for(let t=!1;;){if(r.done&&o.done)return n?se.createSet(s,n):ie.create(s);if(0==r.ins)ne(s,r.len,0,t),r.next();else if(0!=o.len||o.done){if(r.done||o.done)throw new Error("Mismatched change set lengths");{let e=Math.min(r.len2,o.len),i=s.length;if(-1==r.ins){let i=-1==o.ins?-1:o.off?0:o.ins;ne(s,e,i,t),n&&i&&re(n,s,o.text)}else-1==o.ins?(ne(s,r.off?0:r.len,e,t),n&&re(n,s,r.textBit(e))):(ne(s,r.off?0:r.len,o.off?0:o.ins,t),n&&!o.off&&re(n,s,o.text));t=(r.ins>e||o.ins>=0&&o.len>e)&&(t||s.length>i),r.forward2(e),o.forward(e)}}else ne(s,0,o.ins,t),n&&re(n,s,o.text),o.next()}}class he{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?Ft.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?Ft.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class ce{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let i,s;return this.empty?i=s=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),s=t.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new ce(i,s,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return ue.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return ue.range(this.anchor,i)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||this.goalColumn!=t.goalColumn||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return ue.range(t.anchor,t.head)}static create(t,e,i){return new ce(t,e,i)}}class ue{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:ue.create(this.ranges.map(i=>i.map(t,e)),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(t.ranges[i],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new ue([this.main],0)}addRange(t,e=!0){return ue.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let i=this.ranges.slice();return i[e]=t,ue.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ue(t.ranges.map(t=>ce.fromJSON(t)),t.main)}static single(t,e=t){return new ue([ue.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<t.length;s++){let n=t[s];if(n.empty?n.from<=i:n.from<i)return ue.normalized(t.slice(),e);i=n.to}return new ue(t,e)}static cursor(t,e=0,i,s){return ce.create(t,t,(0==e?0:e<0?8:16)|(null==i?7:Math.min(6,i))|(null!=s?s:16777215)<<6)}static range(t,e,i,s){let n=(null!=i?i:16777215)<<6|(null==s?7:Math.min(6,s));return e<t?ce.create(e,t,48|n):ce.create(t,e,(e>t?8:0)|n)}static normalized(t,e=0){let i=t[e];t.sort((t,e)=>t.from-e.from),e=t.indexOf(i);for(let i=1;i<t.length;i++){let s=t[i],n=t[i-1];if(s.empty?s.from<=n.to:s.from<n.to){let r=n.from,o=Math.max(s.to,n.to);i<=e&&e--,t.splice(--i,2,s.anchor>s.head?ue.range(o,r):ue.range(r,o))}}return new ue(t,e)}}function fe(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let de=0;class pe{constructor(t,e,i,s,n){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=s,this.id=de++,this.default=t([]),this.extensions="function"==typeof n?n(this):n}get reader(){return this}static define(t={}){return new pe(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:me),!!t.static,t.enables)}of(t){return new ge([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new ge(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new ge(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],i=>e(i.field(t)))}}function me(t,e){return t==e||t.length==e.length&&t.every((t,i)=>t===e[i])}class ge{constructor(t,e,i,s){this.dependencies=t,this.facet=e,this.type=i,this.value=s,this.id=de++}dynamicSlot(t){var e;let i=this.value,s=this.facet.compareInput,n=this.id,r=t[n]>>1,o=2==this.type,l=!1,a=!1,h=[];for(let i of this.dependencies)"doc"==i?l=!0:"selection"==i?a=!0:1&(null!==(e=t[i.id])&&void 0!==e?e:1)||h.push(t[i.id]);return{create:t=>(t.values[r]=i(t),1),update(t,e){if(l&&e.docChanged||a&&(e.docChanged||e.selection)||we(t,h)){let e=i(t);if(o?!ve(e,t.values[r],s):!s(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure:(t,e)=>{let l,a=e.config.address[n];if(null!=a){let n=Ee(e,a);if(this.dependencies.every(i=>i instanceof pe?e.facet(i)===t.facet(i):!(i instanceof xe)||e.field(i,!1)==t.field(i,!1))||(o?ve(l=i(t),n,s):s(l=i(t),n)))return t.values[r]=n,0}else l=i(t);return t.values[r]=l,1}}}}function ve(t,e,i){if(t.length!=e.length)return!1;for(let s=0;s<t.length;s++)if(!i(t[s],e[s]))return!1;return!0}function we(t,e){let i=!1;for(let s of e)1&Be(t,s)&&(i=!0);return i}function be(t,e,i){let s=i.map(e=>t[e.id]),n=i.map(t=>t.type),r=s.filter(t=>!(1&t)),o=t[e.id]>>1;function l(t){let i=[];for(let e=0;e<s.length;e++){let r=Ee(t,s[e]);if(2==n[e])for(let t of r)i.push(t);else i.push(r)}return e.combine(i)}return{create(t){for(let e of s)Be(t,e);return t.values[o]=l(t),1},update(t,i){if(!we(t,r))return 0;let s=l(t);return e.compare(s,t.values[o])?0:(t.values[o]=s,1)},reconfigure(t,n){let r=we(t,s),a=n.config.facets[e.id],h=n.facet(e);if(a&&!r&&me(i,a))return t.values[o]=h,0;let c=l(t);return e.compare(c,h)?(t.values[o]=h,0):(t.values[o]=c,1)}}}const ye=pe.define({static:!0});class xe{constructor(t,e,i,s,n){this.id=t,this.createF=e,this.updateF=i,this.compareF=s,this.spec=n,this.provides=void 0}static define(t){let e=new xe(de++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(ye).find(t=>t.field==this);return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let s=t.values[e],n=this.updateF(s,i);return this.compareF(s,n)?0:(t.values[e]=n,1)},reconfigure:(t,i)=>{let s,n=t.facet(ye),r=i.facet(ye);return(s=n.find(t=>t.field==this))&&s!=r.find(t=>t.field==this)?(t.values[e]=s.create(t),1):null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,ye.of({field:this,create:t})]}get extension(){return this}}const ke=4,Se=3,Ce=2,Ae=1;function Me(t){return e=>new Te(e,t)}const Oe={highest:Me(0),high:Me(Ae),default:Me(Ce),low:Me(Se),lowest:Me(ke)};class Te{constructor(t,e){this.inner=t,this.prec=e}}class De{of(t){return new Re(this,t)}reconfigure(t){return De.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Re{constructor(t,e){this.compartment=t,this.inner=e}}class Pe{constructor(t,e,i,s,n,r){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=s,this.staticValues=n,this.facets=r,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,i){let s=[],n=Object.create(null),r=new Map;for(let i of function(t,e,i){let s=[[],[],[],[],[]],n=new Map;function r(t,o){let l=n.get(t);if(null!=l){if(l<=o)return;let e=s[l].indexOf(t);e>-1&&s[l].splice(e,1),t instanceof Re&&i.delete(t.compartment)}if(n.set(t,o),Array.isArray(t))for(let e of t)r(e,o);else if(t instanceof Re){if(i.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let s=e.get(t.compartment)||t.inner;i.set(t.compartment,s),r(s,o)}else if(t instanceof Te)r(t.inner,t.prec);else if(t instanceof xe)s[o].push(t),t.provides&&r(t.provides,o);else if(t instanceof ge)s[o].push(t),t.facet.extensions&&r(t.facet.extensions,Ce);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,o)}}return r(t,Ce),s.reduce((t,e)=>t.concat(e))}(t,e,r))i instanceof xe?s.push(i):(n[i.facet.id]||(n[i.facet.id]=[])).push(i);let o=Object.create(null),l=[],a=[];for(let t of s)o[t.id]=a.length<<1,a.push(e=>t.slot(e));let h=null==i?void 0:i.config.facets;for(let t in n){let e=n[t],s=e[0].facet,r=h&&h[t]||[];if(e.every(t=>0==t.type))if(o[s.id]=l.length<<1|1,me(r,e))l.push(i.facet(s));else{let t=s.combine(e.map(t=>t.value));l.push(i&&s.compare(t,i.facet(s))?i.facet(s):t)}else{for(let t of e)0==t.type?(o[t.id]=l.length<<1|1,l.push(t.value)):(o[t.id]=a.length<<1,a.push(e=>t.dynamicSlot(e)));o[s.id]=a.length<<1,a.push(t=>be(t,s,e))}}let c=a.map(t=>t(o));return new Pe(t,r,c,o,l,n)}}function Be(t,e){if(1&e)return 2;let i=e>>1,s=t.status[i];if(4==s)throw new Error("Cyclic dependency between fields and/or facets");if(2&s)return s;t.status[i]=4;let n=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|n}function Ee(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const Le=pe.define(),Ne=pe.define({combine:t=>t.some(t=>t),static:!0}),Ie=pe.define({combine:t=>t.length?t[0]:void 0,static:!0}),We=pe.define(),Ve=pe.define(),He=pe.define(),Fe=pe.define({combine:t=>!!t.length&&t[0]});class ze{constructor(t,e){this.type=t,this.value=e}static define(){return new qe}}class qe{of(t){return new ze(this,t)}}class _e{constructor(t){this.map=t}of(t){return new $e(this,t)}}class $e{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new $e(this.type,e)}is(t){return this.type==t}static define(t={}){return new _e(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let s of t){let t=s.map(e);t&&i.push(t)}return i}}$e.reconfigure=$e.define(),$e.appendConfig=$e.define();class je{constructor(t,e,i,s,n,r){this.startState=t,this.changes=e,this.selection=i,this.effects=s,this.annotations=n,this.scrollIntoView=r,this._doc=null,this._state=null,i&&fe(i,e.newLength),n.some(t=>t.type==je.time)||(this.annotations=n.concat(je.time.of(Date.now())))}static create(t,e,i,s,n,r){return new je(t,e,i,s,n,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(je.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function Ke(t,e){let i=[];for(let s=0,n=0;;){let r,o;if(s<t.length&&(n==e.length||e[n]>=t[s]))r=t[s++],o=t[s++];else{if(!(n<e.length))return i;r=e[n++],o=e[n++]}!i.length||i[i.length-1]<r?i.push(r,o):i[i.length-1]<o&&(i[i.length-1]=o)}}function Ue(t,e,i){var s;let n,r,o;return i?(n=e.changes,r=se.empty(e.changes.length),o=t.changes.compose(e.changes)):(n=e.changes.map(t.changes),r=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(n)),{changes:o,selection:e.selection?e.selection.map(r):null===(s=t.selection)||void 0===s?void 0:s.map(n),effects:$e.mapEffects(t.effects,n).concat($e.mapEffects(e.effects,r)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Qe(t,e,i){let s=e.selection,n=Xe(e.annotations);return e.userEvent&&(n=n.concat(je.userEvent.of(e.userEvent))),{changes:e.changes instanceof se?e.changes:se.of(e.changes||[],i,t.facet(Ie)),selection:s&&(s instanceof ue?s:ue.single(s.anchor,s.head)),effects:Xe(e.effects),annotations:n,scrollIntoView:!!e.scrollIntoView}}function Ye(t,e,i){let s=Qe(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(i=!1);for(let n=1;n<e.length;n++){!1===e[n].filter&&(i=!1);let r=!!e[n].sequential;s=Ue(s,Qe(t,e[n],r?s.changes.newLength:t.doc.length),r)}let n=je.create(t,s.changes,s.selection,s.effects,s.annotations,s.scrollIntoView);return function(t){let e=t.startState,i=e.facet(He),s=t;for(let n=i.length-1;n>=0;n--){let r=i[n](t);r&&Object.keys(r).length&&(s=Ue(s,Qe(e,r,t.changes.newLength),!0))}return s==t?t:je.create(e,t.changes,t.selection,s.effects,s.annotations,s.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let s of e.facet(We)){let e=s(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:Ke(i,e))}if(!0!==i){let s,n;if(!1===i)n=t.changes.invertedDesc,s=se.empty(e.doc.length);else{let e=t.changes.filter(i);s=e.changes,n=e.filtered.mapDesc(e.changes).invertedDesc}t=je.create(e,s,t.selection&&t.selection.map(n),$e.mapEffects(t.effects,n),t.annotations,t.scrollIntoView)}let s=e.facet(Ve);for(let i=s.length-1;i>=0;i--){let n=s[i](t);t=n instanceof je?n:Array.isArray(n)&&1==n.length&&n[0]instanceof je?n[0]:Ye(e,Xe(n),!1)}return t}(n):n)}je.time=ze.define(),je.userEvent=ze.define(),je.addToHistory=ze.define(),je.remote=ze.define();const Ge=[];function Xe(t){return null==t?Ge:Array.isArray(t)?t:[t]}var Je=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Je||(Je={}));const Ze=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ti;try{ti=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function ei(t){return e=>{if(!/\S/.test(e))return Je.Space;if(function(t){if(ti)return ti.test(t);for(let e=0;e<t.length;e++){let i=t[e];if(/\w/.test(i)||i>""&&(i.toUpperCase()!=i.toLowerCase()||Ze.test(i)))return!0}return!1}(e))return Je.Word;for(let i=0;i<t.length;i++)if(e.indexOf(t[i])>-1)return Je.Word;return Je.Other}}class ii{constructor(t,e,i,s,n,r){this.config=t,this.doc=e,this.selection=i,this.values=s,this.status=t.statusTemplate.slice(),this.computeSlot=n,r&&(r._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)Be(this,t<<1);this.computeSlot=null}field(t,e=!0){let i=this.config.address[t.id];if(null!=i)return Be(this,i),Ee(this,i);if(e)throw new RangeError("Field is not present in this state")}update(...t){return Ye(this,t,!0)}applyTransaction(t){let e,i=this.config,{base:s,compartments:n}=i;for(let e of t.effects)e.is(De.reconfigure)?(i&&(n=new Map,i.compartments.forEach((t,e)=>n.set(e,t)),i=null),n.set(e.value.compartment,e.value.extension)):e.is($e.reconfigure)?(i=null,s=e.value):e.is($e.appendConfig)&&(i=null,s=Xe(s).concat(e.value));if(i)e=t.startState.values.slice();else{i=Pe.resolve(s,n,this),e=new ii(i,this.doc,this.selection,i.dynamicSlots.map(()=>null),(t,e)=>e.reconfigure(t,this),null).values}let r=t.startState.facet(Ne)?t.newSelection:t.newSelection.asSingle();new ii(i,t.newDoc,r,e,(e,i)=>i.update(e,t),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:ue.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),s=this.changes(i.changes),n=[i.range],r=Xe(i.effects);for(let i=1;i<e.ranges.length;i++){let o=t(e.ranges[i]),l=this.changes(o.changes),a=l.map(s);for(let t=0;t<i;t++)n[t]=n[t].map(a);let h=s.mapDesc(l,!0);n.push(o.range.map(h)),s=s.compose(a),r=$e.mapEffects(r,a).concat($e.mapEffects(Xe(o.effects),h))}return{changes:s,selection:ue.create(n,e.mainIndex),effects:r}}changes(t=[]){return t instanceof se?t:se.of(t,this.doc.length,this.facet(ii.lineSeparator))}toText(t){return Ft.of(t.split(this.facet(ii.lineSeparator)||te))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(Be(this,e),Ee(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let i in t){let s=t[i];s instanceof xe&&null!=this.config.address[s.id]&&(e[i]=s.spec.toJSON(this.field(t[i]),this))}return e}static fromJSON(t,e={},i){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i)for(let e in i)if(Object.prototype.hasOwnProperty.call(t,e)){let n=i[e],r=t[e];s.push(n.init(t=>n.spec.fromJSON(r,t)))}return ii.create({doc:t.doc,selection:ue.fromJSON(t.selection),extensions:e.extensions?s.concat([e.extensions]):s})}static create(t={}){let e=Pe.resolve(t.extensions||[],new Map),i=t.doc instanceof Ft?t.doc:Ft.of((t.doc||"").split(e.staticFacet(ii.lineSeparator)||te)),s=t.selection?t.selection instanceof ue?t.selection:ue.single(t.selection.anchor,t.selection.head):ue.single(0);return fe(s,i.length),e.staticFacet(Ne)||(s=s.asSingle()),new ii(e,i,s,e.dynamicSlots.map(()=>null),(t,e)=>e.create(t),null)}get tabSize(){return this.facet(ii.tabSize)}get lineBreak(){return this.facet(ii.lineSeparator)||"\n"}get readOnly(){return this.facet(Fe)}phrase(t,...e){for(let e of this.facet(ii.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,(t,i)=>{if("$"==i)return"$";let s=+(i||1);return!s||s>e.length?t:e[s-1]})),t}languageDataAt(t,e,i=-1){let s=[];for(let n of this.facet(Le))for(let r of n(this,e,i))Object.prototype.hasOwnProperty.call(r,t)&&s.push(r[t]);return s}charCategorizer(t){let e=this.languageDataAt("wordChars",t);return ei(e.length?e[0]:"")}wordAt(t){let{text:e,from:i,length:s}=this.doc.lineAt(t),n=this.charCategorizer(t),r=t-i,o=t-i;for(;r>0;){let t=Gt(e,r,!1);if(n(e.slice(t,r))!=Je.Word)break;r=t}for(;o<s;){let t=Gt(e,o);if(n(e.slice(o,t))!=Je.Word)break;o=t}return r==o?null:ue.range(r+i,o+i)}}function si(t,e,i={}){let s={};for(let e of t)for(let t of Object.keys(e)){let n=e[t],r=s[t];if(void 0===r)s[t]=n;else if(r===n||void 0===n);else{if(!Object.hasOwnProperty.call(i,t))throw new Error("Config merge conflict for field "+t);s[t]=i[t](r,n)}}for(let t in e)void 0===s[t]&&(s[t]=e[t]);return s}ii.allowMultipleSelections=Ne,ii.tabSize=pe.define({combine:t=>t.length?t[0]:4}),ii.lineSeparator=Ie,ii.readOnly=Fe,ii.phrases=pe.define({compare(t,e){let i=Object.keys(t),s=Object.keys(e);return i.length==s.length&&i.every(i=>t[i]==e[i])}}),ii.languageData=Le,ii.changeFilter=We,ii.transactionFilter=Ve,ii.transactionExtender=He,De.reconfigure=$e.define();class ni{eq(t){return this==t}range(t,e=t){return oi.create(t,e,this)}}function ri(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}ni.prototype.startSide=ni.prototype.endSide=0,ni.prototype.point=!1,ni.prototype.mapMode=ee.TrackDel;class oi{constructor(t,e,i){this.from=t,this.to=e,this.value=i}static create(t,e,i){return new oi(t,e,i)}}function li(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class ai{constructor(t,e,i,s){this.from=t,this.to=e,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,s=0){let n=i?this.to:this.from;for(let r=s,o=n.length;;){if(r==o)return r;let s=r+o>>1,l=n[s]-t||(i?this.value[s].endSide:this.value[s].startSide)-e;if(s==r)return l>=0?r:o;l>=0?o=s:r=s+1}}between(t,e,i,s){for(let n=this.findIndex(e,-1e9,!0),r=this.findIndex(i,1e9,!1,n);n<r;n++)if(!1===s(this.from[n]+t,this.to[n]+t,this.value[n]))return!1}map(t,e){let i=[],s=[],n=[],r=-1,o=-1;for(let l=0;l<this.value.length;l++){let a,h,c=this.value[l],u=this.from[l]+t,f=this.to[l]+t;if(u==f){let t=e.mapPos(u,c.startSide,c.mapMode);if(null==t)continue;if(a=h=t,c.startSide!=c.endSide&&(h=e.mapPos(u,c.endSide),h<a))continue}else if(a=e.mapPos(u,c.startSide),h=e.mapPos(f,c.endSide),a>h||a==h&&c.startSide>0&&c.endSide<=0)continue;(h-a||c.endSide-c.startSide)<0||(r<0&&(r=a),c.point&&(o=Math.max(o,h-a)),i.push(c),s.push(a-r),n.push(h-r))}return{mapped:i.length?new ai(s,n,i,o):null,pos:r}}}class hi{constructor(t,e,i,s){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=s}static create(t,e,i,s){return new hi(t,e,i,s)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:s=0,filterTo:n=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(i&&(e=e.slice().sort(li)),this.isEmpty)return e.length?hi.of(e):this;let o=new fi(this,null,-1).goto(0),l=0,a=[],h=new ci;for(;o.value||l<e.length;)if(l<e.length&&(o.from-e[l].from||o.startSide-e[l].value.startSide)>=0){let t=e[l++];h.addInner(t.from,t.to,t.value)||a.push(t)}else 1==o.rangeIndex&&o.chunkIndex<this.chunk.length&&(l==e.length||this.chunkEnd(o.chunkIndex)<e[l].from)&&(!r||s>this.chunkEnd(o.chunkIndex)||n<this.chunkPos[o.chunkIndex])&&h.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!r||s>o.to||n<o.from||r(o.from,o.to,o.value))&&(h.addInner(o.from,o.to,o.value)||a.push(oi.create(o.from,o.to,o.value))),o.next());return h.finishInner(this.nextLayer.isEmpty&&!a.length?hi.empty:this.nextLayer.update({add:a,filter:r,filterFrom:s,filterTo:n}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],i=[],s=-1;for(let n=0;n<this.chunk.length;n++){let r=this.chunkPos[n],o=this.chunk[n],l=t.touchesRange(r,r+o.length);if(!1===l)s=Math.max(s,o.maxPoint),e.push(o),i.push(t.mapPos(r));else if(!0===l){let{mapped:n,pos:l}=o.map(r,t);n&&(s=Math.max(s,n.maxPoint),e.push(n),i.push(l))}}let n=this.nextLayer.map(t);return 0==e.length?n:new hi(i,e,n||hi.empty,s)}between(t,e,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let n=this.chunkPos[s],r=this.chunk[s];if(e>=n&&t<=n+r.length&&!1===r.between(n,t-n,e-n,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return di.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return di.from(t).goto(e)}static compare(t,e,i,s,n=-1){let r=t.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=n),o=e.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=n),l=ui(r,o,i),a=new mi(r,l,n),h=new mi(o,l,n);i.iterGaps((t,e,i)=>gi(a,t,h,e,i,s)),i.empty&&0==i.length&&gi(a,0,h,0,0,s)}static eq(t,e,i=0,s){null==s&&(s=999999999);let n=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0),r=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0);if(n.length!=r.length)return!1;if(!n.length)return!0;let o=ui(n,r),l=new mi(n,o,0).goto(i),a=new mi(r,o,0).goto(i);for(;;){if(l.to!=a.to||!vi(l.active,a.active)||l.point&&(!a.point||!ri(l.point,a.point)))return!1;if(l.to>s)return!0;l.next(),a.next()}}static spans(t,e,i,s,n=-1){let r=new mi(t,null,n).goto(e),o=e,l=r.openStart;for(;;){let t=Math.min(r.to,i);if(r.point){let i=r.activeForPoint(r.to),n=r.pointFrom<e?i.length+1:r.point.startSide<0?i.length:Math.min(i.length,l);s.point(o,t,r.point,i,n,r.pointRank),l=Math.min(r.openEnd(t),i.length)}else t>o&&(s.span(o,t,r.active,l),l=r.openEnd(t));if(r.to>i)return l+(r.point&&r.to>i?1:0);o=r.to,r.next()}}static of(t,e=!1){let i=new ci;for(let s of t instanceof oi?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i<t.length;i++){let s=t[i];if(li(e,s)>0)return t.slice().sort(li);e=s}return t}(t):t)i.add(s.from,s.to,s.value);return i.finish()}static join(t){if(!t.length)return hi.empty;let e=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let s=t[i];s!=hi.empty;s=s.nextLayer)e=new hi(s.chunkPos,s.chunk,e,Math.max(s.maxPoint,e.maxPoint));return e}}hi.empty=new hi([],[],null,-1),hi.empty.nextLayer=hi.empty;class ci{finishChunk(t){this.chunks.push(new ai(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new ci)).add(t,e,i)}addInner(t,e,i){let s=t-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(s<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(hi.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=hi.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function ui(t,e,i){let s=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&s.set(e.chunk[t],e.chunkPos[t]);let n=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let r=s.get(t.chunk[e]);null==r||(i?i.mapPos(r):r)!=t.chunkPos[e]||(null==i?void 0:i.touchesRange(r,r+t.chunk[e].length))||n.add(t.chunk[e])}return n}class fi{constructor(t,e,i,s=0){this.layer=t,this.skip=e,this.minPoint=i,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,i){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!i||this.rangeIndex<s)&&this.setRangeIndex(s)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],i=t+e.from[this.rangeIndex];if(this.from=i,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class di{constructor(t){this.heap=t}static from(t,e=null,i=-1){let s=[];for(let n=0;n<t.length;n++)for(let r=t[n];!r.isEmpty;r=r.nextLayer)r.maxPoint>=i&&s.push(new fi(r,e,i,n));return 1==s.length?s[0]:new di(s)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)pi(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)pi(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),pi(this.heap,0)}}}function pi(t,e){for(let i=t[e];;){let s=1+(e<<1);if(s>=t.length)break;let n=t[s];if(s+1<t.length&&n.compare(t[s+1])>=0&&(n=t[s+1],s++),i.compare(n)<0)break;t[s]=i,t[e]=n,e=s}}class mi{constructor(t,e,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=di.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){wi(this.active,t),wi(this.activeTo,t),wi(this.activeRank,t),this.minActive=yi(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:s,rank:n}=this.cursor;for(;e<this.activeRank.length&&(n-this.activeRank[e]||s-this.activeTo[e])>0;)e++;bi(this.active,e,i),bi(this.activeTo,e,s),bi(this.activeRank,e,n),t&&bi(t,e,this.cursor.from),this.minActive=yi(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&wi(i,s)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(i),this.cursor.next()}}}if(i){this.openStart=0;for(let e=i.length-1;e>=0&&i[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function gi(t,e,i,s,n,r){t.goto(e),i.goto(s);let o=s+n,l=s,a=s-e,h=!!r.boundChange;for(let e=!1;;){let s=t.to+a-i.to,n=s||t.endSide-i.endSide,c=n<0?t.to+a:i.to,u=Math.min(c,o);if(t.point||i.point?(t.point&&i.point&&ri(t.point,i.point)&&vi(t.activeForPoint(t.to),i.activeForPoint(i.to))||r.comparePoint(l,u,t.point,i.point),e=!1):(e&&r.boundChange(l),u>l&&!vi(t.active,i.active)&&r.compareRange(l,u,t.active,i.active),h&&u<o&&(s||t.openEnd(c)!=i.openEnd(c))&&(e=!0)),c>o)break;l=c,n<=0&&t.next(),n>=0&&i.next()}}function vi(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(t[i]!=e[i]&&!ri(t[i],e[i]))return!1;return!0}function wi(t,e){for(let i=e,s=t.length-1;i<s;i++)t[i]=t[i+1];t.pop()}function bi(t,e,i){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=i}function yi(t,e){let i=-1,s=1e9;for(let n=0;n<e.length;n++)(e[n]-s||t[n].endSide-t[i].endSide)<0&&(i=n,s=e[n]);return i}function xi(t,e,i=t.length){let s=0;for(let n=0;n<i&&n<t.length;)9==t.charCodeAt(n)?(s+=e-s%e,n++):(s++,n=Gt(t,n));return s}function ki(t,e,i,s){for(let s=0,n=0;;){if(n>=e)return s;if(s==t.length)break;n+=9==t.charCodeAt(s)?i-n%i:1,s=Gt(t,s)}return!0===s?-1:t.length}const Si="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Ci="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Ai="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Mi{constructor(t,e){this.rules=[];let{finish:i}=e||{};function s(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function n(t,e,r,o){let l=[],a=/^@(\w+)\b/.exec(t[0]),h=a&&"keyframes"==a[1];if(a&&null==e)return r.push(t[0]+";");for(let i in e){let o=e[i];if(/&/.test(i))n(i.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((t,e)=>t.concat(e)),o,r);else if(o&&"object"==typeof o){if(!a)throw new RangeError("The value of a property ("+i+") should be a primitive value.");n(s(i),o,l,h)}else null!=o&&l.push(i.replace(/_.*/,"").replace(/[A-Z]/g,t=>"-"+t.toLowerCase())+": "+o+";")}(l.length||h)&&r.push((!i||a||o?t:t.map(i)).join(", ")+" {"+l.join(" ")+"}")}for(let e in t)n(s(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=Ai[Si]||1;return Ai[Si]=t+1,"ͼ"+t.toString(36)}static mount(t,e,i){let s=t[Ci],n=i&&i.nonce;s?n&&s.setNonce(n):s=new Ti(t,n),s.mount(Array.isArray(e)?e:[e],t)}}let Oi=new Map;class Ti{constructor(t,e){let i=t.ownerDocument||t,s=i.defaultView;if(!t.head&&t.adoptedStyleSheets&&s.CSSStyleSheet){let e=Oi.get(i);if(e)return t[Ci]=e;this.sheet=new s.CSSStyleSheet,Oi.set(i,this)}else this.styleTag=i.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[Ci]=this}mount(t,e){let i=this.sheet,s=0,n=0;for(let e=0;e<t.length;e++){let r=t[e],o=this.modules.indexOf(r);if(o<n&&o>-1&&(this.modules.splice(o,1),n--,o=-1),-1==o){if(this.modules.splice(n++,0,r),i)for(let t=0;t<r.rules.length;t++)i.insertRule(r.rules[t],s++)}else{for(;n<o;)s+=this.modules[n++].rules.length;s+=r.rules.length,n++}}if(i)e.adoptedStyleSheets.indexOf(this.sheet)<0&&(e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets]);else{let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t;let i=e.head||e;this.styleTag.parentNode!=i&&i.insertBefore(this.styleTag,i.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}for(var Di={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ri={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Pi="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Bi="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ei=0;Ei<10;Ei++)Di[48+Ei]=Di[96+Ei]=String(Ei);for(Ei=1;Ei<=24;Ei++)Di[Ei+111]="F"+Ei;for(Ei=65;Ei<=90;Ei++)Di[Ei]=String.fromCharCode(Ei+32),Ri[Ei]=String.fromCharCode(Ei);for(var Li in Di)Ri.hasOwnProperty(Li)||(Ri[Li]=Di[Li]);function Ni(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var n=i[s];"string"==typeof n?t.setAttribute(s,n):null!=n&&(t[s]=n)}e++}for(;e<arguments.length;e++)Ii(t,arguments[e]);return t}function Ii(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var i=0;i<e.length;i++)Ii(t,e[i])}}let Wi="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Vi="undefined"!=typeof document?document:{documentElement:{style:{}}};const Hi=/Edge\/(\d+)/.exec(Wi.userAgent),Fi=/MSIE \d/.test(Wi.userAgent),zi=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wi.userAgent),qi=!!(Fi||zi||Hi),_i=!qi&&/gecko\/(\d+)/i.test(Wi.userAgent),$i=!qi&&/Chrome\/(\d+)/.exec(Wi.userAgent),ji="webkitFontSmoothing"in Vi.documentElement.style,Ki=!qi&&/Apple Computer/.test(Wi.vendor),Ui=Ki&&(/Mobile\/\w+/.test(Wi.userAgent)||Wi.maxTouchPoints>2);var Qi={mac:Ui||/Mac/.test(Wi.platform),windows:/Win/.test(Wi.platform),linux:/Linux|X11/.test(Wi.platform),ie:qi,ie_version:Fi?Vi.documentMode||6:zi?+zi[1]:Hi?+Hi[1]:0,gecko:_i,gecko_version:_i?+(/Firefox\/(\d+)/.exec(Wi.userAgent)||[0,0])[1]:0,chrome:!!$i,chrome_version:$i?+$i[1]:0,ios:Ui,android:/Android\b/.test(Wi.userAgent),webkit:ji,webkit_version:ji?+(/\bAppleWebKit\/(\d+)/.exec(Wi.userAgent)||[0,0])[1]:0,safari:Ki,safari_version:Ki?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Wi.userAgent)||[0,0])[1]:0,tabSize:null!=Vi.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function Yi(t,e){for(let i in t)"class"==i&&e.class?e.class+=" "+t.class:"style"==i&&e.style?e.style+=";"+t.style:e[i]=t[i];return e}const Gi=Object.create(null);function Xi(t,e,i){if(t==e)return!0;t||(t=Gi),e||(e=Gi);let s=Object.keys(t),n=Object.keys(e);if(s.length-(i&&s.indexOf(i)>-1?1:0)!=n.length-(i&&n.indexOf(i)>-1?1:0))return!1;for(let r of s)if(r!=i&&(-1==n.indexOf(r)||t[r]!==e[r]))return!1;return!0}function Ji(t,e,i){let s=!1;if(e)for(let n in e)i&&n in i||(s=!0,"style"==n?t.style.cssText="":t.removeAttribute(n));if(i)for(let n in i)e&&e[n]==i[n]||(s=!0,"style"==n?t.style.cssText=i[n]:t.setAttribute(n,i[n]));return s}function Zi(t){let e=Object.create(null);for(let i=0;i<t.attributes.length;i++){let s=t.attributes[i];e[s.name]=s.value}return e}class ts{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var es=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(es||(es={}));class is extends ni{constructor(t,e,i,s){super(),this.startSide=t,this.endSide=e,this.widget=i,this.spec=s}get heightRelevant(){return!1}static mark(t){return new ss(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),i=!!t.block;return e+=i&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new rs(t,e,e,i,t.widget||null,!1)}static replace(t){let e,i,s=!!t.block;if(t.isBlockGap)e=-5e8,i=4e8;else{let{start:n,end:r}=os(t,s);e=(n?s?-3e8:-1:5e8)-1,i=1+(r?s?2e8:1:-6e8)}return new rs(t,e,i,s,t.widget||null,!0)}static line(t){return new ns(t)}static set(t,e=!1){return hi.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}is.none=hi.empty;class ss extends is{constructor(t){let{start:e,end:i}=os(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.attrs=t.class&&t.attributes?Yi(t.attributes,{class:t.class}):t.class?{class:t.class}:t.attributes||Gi}eq(t){return this==t||t instanceof ss&&this.tagName==t.tagName&&Xi(this.attrs,t.attrs)}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}ss.prototype.point=!1;class ns extends is{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof ns&&this.spec.class==t.spec.class&&Xi(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}ns.prototype.mapMode=ee.TrackBefore,ns.prototype.point=!0;class rs extends is{constructor(t,e,i,s,n,r){super(e,i,n,t),this.block=s,this.isReplace=r,this.mapMode=s?e<=0?ee.TrackBefore:ee.TrackAfter:ee.TrackDel}get type(){return this.startSide!=this.endSide?es.WidgetRange:this.startSide<=0?es.WidgetBefore:es.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof rs&&(e=this.widget,i=t.widget,e==i||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,i}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function os(t,e=!1){let{inclusiveStart:i,inclusiveEnd:s}=t;return null==i&&(i=t.inclusive),null==s&&(s=t.inclusive),{start:null!=i?i:e,end:null!=s?s:e}}function ls(t,e,i,s=0){let n=i.length-1;n>=0&&i[n]+s>=t?i[n]=Math.max(i[n],e):i.push(t,e)}rs.prototype.point=!0;class as extends ni{constructor(t,e){super(),this.tagName=t,this.attributes=e}eq(t){return t==this||t instanceof as&&this.tagName==t.tagName&&Xi(this.attributes,t.attributes)}static create(t){return new as(t.tagName,t.attributes||Gi)}static set(t,e=!1){return hi.of(t,e)}}function hs(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function cs(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function us(t,e){if(!e.anchorNode)return!1;try{return cs(t,e.anchorNode)}catch(t){return!1}}function fs(t){return 3==t.nodeType?As(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function ds(t,e,i,s){return!!i&&(gs(t,e,i,s,-1)||gs(t,e,i,s,1))}function ps(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function ms(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function gs(t,e,i,s,n){for(;;){if(t==i&&e==s)return!0;if(e==(n<0?0:vs(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=ps(t)+(n<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(n<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=n<0?vs(t):0}}}function vs(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function ws(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function bs(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function ys(t,e){let i=e.width/t.offsetWidth,s=e.height/t.offsetHeight;return(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.width-t.offsetWidth)<1)&&(i=1),(s>.995&&s<1.005||!isFinite(s)||Math.abs(e.height-t.offsetHeight)<1)&&(s=1),{scaleX:i,scaleY:s}}as.prototype.startSide=as.prototype.endSide=-1;class xs{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:i}=t;this.set(e,Math.min(t.anchorOffset,e?vs(e):0),i,Math.min(t.focusOffset,i?vs(i):0))}set(t,e,i,s){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=s}}let ks,Ss=null;function Cs(t){if(t.setActive)return t.setActive();if(Ss)return t.focus(Ss);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==Ss?{get preventScroll(){return Ss={preventScroll:!0},!0}}:void 0),!Ss){Ss=!1;for(let t=0;t<e.length;){let i=e[t++],s=e[t++],n=e[t++];i.scrollTop!=s&&(i.scrollTop=s),i.scrollLeft!=n&&(i.scrollLeft=n)}}}function As(t,e,i=e){let s=ks||(ks=document.createRange());return s.setEnd(t,i),s.setStart(t,e),s}function Ms(t,e,i,s){let n={key:e,code:e,keyCode:i,which:i,cancelable:!0};s&&({altKey:n.altKey,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,metaKey:n.metaKey}=s);let r=new KeyboardEvent("keydown",n);r.synthetic=!0,t.dispatchEvent(r);let o=new KeyboardEvent("keyup",n);return o.synthetic=!0,t.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function Os(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function Ts(t,e){for(let i=t,s=e;;){if(3==i.nodeType&&s>0)return{node:i,offset:s};if(1==i.nodeType&&s>0){if("false"==i.contentEditable)return null;i=i.childNodes[s-1],s=vs(i)}else{if(!i.parentNode||ms(i))return null;s=ps(i),i=i.parentNode}}}function Ds(t,e){for(let i=t,s=e;;){if(3==i.nodeType&&s<i.nodeValue.length)return{node:i,offset:s};if(1==i.nodeType&&s<i.childNodes.length){if("false"==i.contentEditable)return null;i=i.childNodes[s],s=0}else{if(!i.parentNode||ms(i))return null;s=ps(i)+1,i=i.parentNode}}}Qi.safari&&Qi.safari_version>=26&&(Ss=!1);class Rs{constructor(t,e,i=!0){this.node=t,this.offset=e,this.precise=i}static before(t,e){return new Rs(t.parentNode,ps(t),e)}static after(t,e){return new Rs(t.parentNode,ps(t)+1,e)}}var Ps=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Ps||(Ps={}));const Bs=Ps.LTR,Es=Ps.RTL;function Ls(t){let e=[];for(let i=0;i<t.length;i++)e.push(1<<+t[i]);return e}const Ns=Ls("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Is=Ls("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Ws=Object.create(null),Vs=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),i=t.charCodeAt(1);Ws[e]=i,Ws[i]=-e}function Hs(t){return t<=247?Ns[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?Is[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const Fs=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class zs{get dir(){return this.level%2?Es:Bs}constructor(t,e,i){this.from=t,this.to=e,this.level=i}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,i,s){let n=-1;for(let r=0;r<t.length;r++){let o=t[r];if(o.from<=e&&o.to>=e){if(o.level==i)return r;(n<0||(0!=s?s<0?o.from<e:o.to>e:t[n].level>o.level))&&(n=r)}}if(n<0)throw new RangeError("Index out of range");return n}}function qs(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++){let s=t[i],n=e[i];if(s.from!=n.from||s.to!=n.to||s.direction!=n.direction||!qs(s.inner,n.inner))return!1}return!0}const _s=[];function $s(t,e,i,s,n,r,o){let l=s%2?2:1;if(s%2==n%2)for(let a=e,h=0;a<i;){let e=!0,c=!1;if(h==r.length||a<r[h].from){let t=_s[a];t!=l&&(e=!1,c=16==t)}let u=e||1!=l?null:[],f=e?s:s+1,d=a;t:for(;;)if(h<r.length&&d==r[h].from){if(c)break t;let p=r[h];if(!e)for(let t=p.to,e=h+1;;){if(t==i)break t;if(!(e<r.length&&r[e].from==t)){if(_s[t]==l)break t;break}t=r[e++].to}if(h++,u)u.push(p);else{p.from>a&&o.push(new zs(a,p.from,f)),js(t,p.direction==Bs!=!(f%2)?s+1:s,n,p.inner,p.from,p.to,o),a=p.to}d=p.to}else{if(d==i||(e?_s[d]!=l:_s[d]==l))break;d++}u?$s(t,a,d,s+1,n,u,o):a<d&&o.push(new zs(a,d,f)),a=d}else for(let a=i,h=r.length;a>e;){let i=!0,c=!1;if(!h||a>r[h-1].to){let t=_s[a-1];t!=l&&(i=!1,c=16==t)}let u=i||1!=l?null:[],f=i?s:s+1,d=a;t:for(;;)if(h&&d==r[h-1].to){if(c)break t;let p=r[--h];if(!i)for(let t=p.from,i=h;;){if(t==e)break t;if(!i||r[i-1].to!=t){if(_s[t-1]==l)break t;break}t=r[--i].from}if(u)u.push(p);else{p.to<a&&o.push(new zs(p.to,a,f)),js(t,p.direction==Bs!=!(f%2)?s+1:s,n,p.inner,p.from,p.to,o),a=p.from}d=p.from}else{if(d==e||(i?_s[d-1]!=l:_s[d-1]==l))break;d--}u?$s(t,d,a,s+1,n,u,o):d<a&&o.push(new zs(d,a,f)),a=d}}function js(t,e,i,s,n,r,o){let l=e%2?2:1;!function(t,e,i,s,n){for(let r=0;r<=s.length;r++){let o=r?s[r-1].to:e,l=r<s.length?s[r].from:i,a=r?256:n;for(let e=o,i=a,s=a;e<l;e++){let n=Hs(t.charCodeAt(e));512==n?n=i:8==n&&4==s&&(n=16),_s[e]=4==n?2:n,7&n&&(s=n),i=n}for(let t=o,e=a,s=a;t<l;t++){let n=_s[t];if(128==n)t<l-1&&e==_s[t+1]&&24&e?n=_s[t]=e:_s[t]=256;else if(64==n){let n=t+1;for(;n<l&&64==_s[n];)n++;let r=t&&8==e||n<i&&8==_s[n]?1==s?1:8:256;for(let e=t;e<n;e++)_s[e]=r;t=n-1}else 8==n&&1==s&&(_s[t]=1);e=n,7&n&&(s=n)}}}(t,n,r,s,l),function(t,e,i,s,n){let r=1==n?2:1;for(let o=0,l=0,a=0;o<=s.length;o++){let h=o?s[o-1].to:e,c=o<s.length?s[o].from:i;for(let e,i,s,o=h;o<c;o++)if(i=Ws[e=t.charCodeAt(o)])if(i<0){for(let t=l-3;t>=0;t-=3)if(Vs[t+1]==-i){let e=Vs[t+2],i=2&e?n:4&e?1&e?r:n:0;i&&(_s[o]=_s[Vs[t]]=i),l=t;break}}else{if(189==Vs.length)break;Vs[l++]=o,Vs[l++]=e,Vs[l++]=a}else if(2==(s=_s[o])||1==s){let t=s==n;a=t?0:1;for(let e=l-3;e>=0;e-=3){let i=Vs[e+2];if(2&i)break;if(t)Vs[e+2]|=2;else{if(4&i)break;Vs[e+2]|=4}}}}}(t,n,r,s,l),function(t,e,i,s){for(let n=0,r=s;n<=i.length;n++){let o=n?i[n-1].to:t,l=n<i.length?i[n].from:e;for(let a=o;a<l;){let o=_s[a];if(256==o){let o=a+1;for(;;)if(o==l){if(n==i.length)break;o=i[n++].to,l=n<i.length?i[n].from:e}else{if(256!=_s[o])break;o++}let h=1==r,c=h==(1==(o<e?_s[o]:s))?h?1:2:s;for(let e=o,s=n,r=s?i[s-1].to:t;e>a;)e==r&&(e=i[--s].from,r=s?i[s-1].to:t),_s[--e]=c;a=o}else r=o,a++}}}(n,r,s,l),$s(t,n,r,e,i,s,o)}function Ks(t,e,i){if(!t)return[new zs(0,0,e==Es?1:0)];if(e==Bs&&!i.length&&!Fs.test(t))return Us(t.length);if(i.length)for(;t.length>_s.length;)_s[_s.length]=256;let s=[],n=e==Bs?0:1;return js(t,n,n,i,0,t.length,s),s}function Us(t){return[new zs(0,t,0)]}let Qs="";function Ys(t,e,i,s,n){var r;let o=s.head-t.from,l=zs.find(e,o,null!==(r=s.bidiLevel)&&void 0!==r?r:-1,s.assoc),a=e[l],h=a.side(n,i);if(o==h){let t=l+=n?1:-1;if(t<0||t>=e.length)return null;a=e[l=t],o=a.side(!n,i),h=a.side(n,i)}let c=Gt(t.text,o,a.forward(n,i));(c<a.from||c>a.to)&&(c=h),Qs=t.text.slice(Math.min(o,c),Math.max(o,c));let u=l==(n?e.length-1:0)?null:e[l+(n?1:-1)];return u&&c==h&&u.level+(n?0:1)<a.level?ue.cursor(u.side(!n,i)+t.from,u.forward(n,i)?1:-1,u.level):ue.cursor(c+t.from,a.forward(n,i)?-1:1,a.level)}function Gs(t,e,i){for(let s=e;s<i;s++){let e=Hs(t.charCodeAt(s));if(1==e)return Bs;if(2==e||4==e)return Es}return Bs}const Xs=pe.define(),Js=pe.define(),Zs=pe.define(),tn=pe.define(),en=pe.define(),sn=pe.define(),nn=pe.define(),rn=pe.define(),on=pe.define(),ln=pe.define({combine:t=>t.some(t=>t)}),an=pe.define({combine:t=>t.some(t=>t)}),hn=pe.define();class cn{constructor(t,e="nearest",i="nearest",s=5,n=5,r=!1){this.range=t,this.y=e,this.x=i,this.yMargin=s,this.xMargin=n,this.isSnapshot=r}map(t){return t.empty?this:new cn(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new cn(ue.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const un=$e.define({map:(t,e)=>t.map(e)}),fn=$e.define();function dn(t,e,i){let s=t.facet(tn);s.length?s[0](e):window.onerror&&window.onerror(String(e),i,void 0,void 0,e)||(i?console.error(i+":",e):console.error(e))}const pn=pe.define({combine:t=>!t.length||t[0]});let mn=0;const gn=pe.define({combine:t=>t.filter((e,i)=>{for(let s=0;s<i;s++)if(t[s].plugin==e.plugin)return!1;return!0})});class vn{constructor(t,e,i,s,n){this.id=t,this.create=e,this.domEventHandlers=i,this.domEventObservers=s,this.baseExtensions=n(this),this.extension=this.baseExtensions.concat(gn.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(gn.of({plugin:this,arg:t}))}static define(t,e){const{eventHandlers:i,eventObservers:s,provide:n,decorations:r}=e||{};return new vn(mn++,t,i,s,t=>{let e=[];return r&&e.push(xn.of(e=>{let i=e.plugin(t);return i?r(i):is.none})),n&&e.push(n(t)),e})}static fromClass(t,e){return vn.define((e,i)=>new t(e,i),e)}}class wn{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(dn(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(e){dn(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){dn(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const bn=pe.define(),yn=pe.define(),xn=pe.define(),kn=pe.define(),Sn=pe.define(),Cn=pe.define(),An=pe.define();function Mn(t,e){let i=t.state.facet(An);if(!i.length)return i;let s=i.map(e=>e instanceof Function?e(t):e),n=[];return hi.spans(s,e.from,e.to,{point(){},span(t,i,s,r){let o=t-e.from,l=i-e.from,a=n;for(let t=s.length-1;t>=0;t--,r--){let i,n=s[t].spec.bidiIsolate;if(null==n&&(n=Gs(e.text,o,l)),r>0&&a.length&&(i=a[a.length-1]).to==o&&i.direction==n)i.to=l,a=i.inner;else{let t={from:o,to:l,direction:n,inner:[]};a.push(t),a=t.inner}}}}),n}const On=pe.define();function Tn(t){let e=0,i=0,s=0,n=0;for(let r of t.state.facet(On)){let o=r(t);o&&(null!=o.left&&(e=Math.max(e,o.left)),null!=o.right&&(i=Math.max(i,o.right)),null!=o.top&&(s=Math.max(s,o.top)),null!=o.bottom&&(n=Math.max(n,o.bottom)))}return{left:e,right:i,top:s,bottom:n}}const Dn=pe.define();class Rn{constructor(t,e,i,s){this.fromA=t,this.toA=e,this.fromB=i,this.toB=s}join(t){return new Rn(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let s=t[e-1];if(!(s.fromA>i.toA)){if(s.toA<i.fromA)break;i=i.join(s),t.splice(e-1,1)}}return t.splice(e,0,i),t}static extendWithRanges(t,e){if(0==e.length)return t;let i=[];for(let s=0,n=0,r=0;;){let o=s<t.length?t[s].fromB:1e9,l=n<e.length?e[n]:1e9,a=Math.min(o,l);if(1e9==a)break;let h=a+r,c=a,u=h;for(;;)if(n<e.length&&e[n]<=c){let i=e[n+1];n+=2,c=Math.max(c,i);for(let e=s;e<t.length&&t[e].fromB<=c;e++)r=t[e].toA-t[e].toB;u=Math.max(u,i+r)}else{if(!(s<t.length&&t[s].fromB<=c))break;{let e=t[s++];c=Math.max(c,e.toB),u=Math.max(u,e.toA),r=e.toA-e.toB}}i.push(new Rn(h,u,a,c))}return i}}class Pn{constructor(t,e,i){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=se.empty(this.startState.doc.length);for(let t of i)this.changes=this.changes.compose(t.changes);let s=[];this.changes.iterChangedRanges((t,e,i,n)=>s.push(new Rn(t,e,i,n))),this.changedRanges=s}static create(t,e,i){return new Pn(t,e,i)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(t=>t.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}const Bn=[];class En{constructor(t,e,i=0){this.dom=t,this.length=e,this.flags=i,this.parent=null,t.cmTile=this}get breakAfter(){return 1&this.flags}get children(){return Bn}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(t){if(this.flags|=2,4&this.flags){this.flags&=-5;let t=this.domAttrs;t&&function(t,e){for(let i=t.attributes.length-1;i>=0;i--){let s=t.attributes[i].name;null==e[s]&&t.removeAttribute(s)}for(let i in e){let s=e[i];"style"==i?t.style.cssText=s:t.getAttribute(i)!=s&&t.setAttribute(i,s)}}(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(t){this.dom=t,t.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t,e=this.posAtStart){let i=e;for(let e of this.children){if(e==t)return i;i+=e.length+e.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}covers(t){return!0}coordsIn(t,e){return null}domPosFor(t,e){let i=ps(this.dom),s=this.length?t>0:e>0;return new Rs(this.parent.dom,i+(s?1:0),0==t||t==this.length)}markDirty(t){this.flags&=-3,t&&(this.flags|=4),this.parent&&2&this.parent.flags&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let t=this;t;t=t.parent)if(t instanceof In)return t;return null}static get(t){return t.cmTile}}class Ln extends En{constructor(t){super(t,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(t){this.children.push(t),t.parent=this}sync(t){if(2&this.flags)return;super.sync(t);let e,i=this.dom,s=null,n=(null==t?void 0:t.node)==i?t:null,r=0;for(let o of this.children){if(o.sync(t),r+=o.length+o.breakAfter,e=s?s.nextSibling:i.firstChild,n&&e!=o.dom&&(n.written=!0),o.dom.parentNode==i)for(;e&&e!=o.dom;)e=Nn(e);else i.insertBefore(o.dom,e);s=o.dom}for(e=s?s.nextSibling:i.firstChild,n&&e&&(n.written=!0);e;)e=Nn(e);this.length=r}}function Nn(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class In extends Ln{constructor(t,e){super(e),this.view=t}owns(t){for(;t;t=t.parent)if(t==this)return!0;return!1}isBlock(){return!0}nearest(t){for(;;){if(!t)return null;let e=En.get(t);if(e&&this.owns(e))return e;t=t.parentNode}}blockTiles(t){for(let e=[],i=this,s=0,n=0;;)if(s==i.children.length){if(!e.length)return;i=i.parent,i.breakAfter&&n++,s=e.pop()}else{let r=i.children[s++];if(r instanceof Wn)e.push(s),i=r,s=0;else{let e=n+r.length,i=t(r,n);if(void 0!==i)return i;n=e+r.breakAfter}}}resolveBlock(t,e){let i,s,n=-1,r=-1;if(this.blockTiles((o,l)=>{let a=l+o.length;if(t>=l&&t<=a){if(o.isWidget()&&e>=-1&&e<=1){if(32&o.flags)return!0;16&o.flags&&(i=void 0)}(l<t||t==a&&(e<-1?o.length:o.covers(1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,n=t-l),(a>t||t==l&&(e>1?o.length:o.covers(-1)))&&(!s||!o.isWidget()&&s.isWidget())&&(s=o,r=t-l)}}),!i&&!s)throw new Error("No tile at position "+t);return i&&e<0||!s?{tile:i,offset:n}:{tile:s,offset:r}}}class Wn extends Ln{constructor(t,e){super(t),this.wrapper=e}isBlock(){return!0}covers(t){return!!this.children.length&&(t<0?this.children[0].covers(-1):this.lastChild.covers(1))}get domAttrs(){return this.wrapper.attributes}static of(t,e){let i=new Wn(e||document.createElement(t.tagName),t);return e||(i.flags|=4),i}}class Vn extends Ln{constructor(t,e){super(t),this.attrs=e}isLine(){return!0}static start(t,e,i){let s=new Vn(e||document.createElement("div"),t);return e&&i||(s.flags|=4),s}get domAttrs(){return this.attrs}resolveInline(t,e,i){let s=null,n=-1,r=null,o=-1;!function t(l,a){for(let h=0,c=0;h<l.children.length&&c<=a;h++){let u=l.children[h],f=c+u.length;f>=a&&(u.isComposite()?t(u,a-c):(!r||r.isHidden&&(e>0||i&&Hn(r,u)))&&(f>a||32&u.flags)?(r=u,o=a-c):(c<a||16&u.flags&&!u.isHidden)&&(s=u,n=a-c)),c=f}}(this,t);let l=(e<0?s:r)||s||r;return l?{tile:l,offset:l==s?n:o}:null}coordsIn(t,e){let i=this.resolveInline(t,e,!0);return i?i.tile.coordsIn(Math.max(0,i.offset),e):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let i=fs(e);return i[i.length-1]||null}(this)}domIn(t,e){let i=this.resolveInline(t,e);if(i){let{tile:t,offset:s}=i;if(this.dom.contains(t.dom))return t.isText()?new Rs(t.dom,Math.min(t.dom.nodeValue.length,s)):t.domPosFor(s,16&t.flags?1:32&t.flags?-1:e);let n=i.tile.parent,r=!1;for(let t of n.children){if(r)return new Rs(t.dom,0);t==i.tile&&(r=!0)}}return new Rs(this.dom,0)}}function Hn(t,e){let i=t.coordsIn(0,1),s=e.coordsIn(0,1);return i&&s&&s.top<i.bottom}class Fn extends Ln{constructor(t,e){super(t),this.mark=e}get domAttrs(){return this.mark.attrs}static of(t,e){let i=new Fn(e||document.createElement(t.tagName),t);return e||(i.flags|=4),i}}class zn extends En{constructor(t,e){super(t,e.length),this.text=e}sync(t){2&this.flags||(super.sync(t),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(t,e){let i=this.dom.nodeValue.length;t>i&&(t=i);let s=t,n=t,r=0;0==t&&e<0||t==i&&e>=0?Qi.chrome||Qi.gecko||(t?(s--,r=1):n<i&&(n++,r=-1)):e<0?s--:n<i&&n++;let o=As(this.dom,s,n).getClientRects();if(!o.length)return null;let l=o[(r?r<0:e>=0)?0:o.length-1];return Qi.safari&&!r&&0==l.width&&(l=Array.prototype.find.call(o,t=>t.width)||l),r?ws(l,r<0):l||null}static of(t,e){let i=new zn(e||document.createTextNode(t),t);return e||(i.flags|=2),i}}class qn extends En{constructor(t,e,i,s){super(t,e,s),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(t){return!(48&this.flags)&&(this.flags&(t<0?64:128))>0}coordsIn(t,e){return this.coordsInWidget(t,e,!1)}coordsInWidget(t,e,i){let s=this.widget.coordsAt(this.dom,t,e);if(s)return s;if(i)return ws(this.dom.getBoundingClientRect(),this.length?0==t:e<=0);{let e=this.dom.getClientRects(),i=null;if(!e.length)return null;let s=!!(16&this.flags)||!(32&this.flags)&&t>0;for(let n=s?e.length-1:0;i=e[n],!(t>0?0==n:n==e.length-1||i.top<i.bottom);n+=s?-1:1);return ws(i,!s)}}get overrideDOMText(){if(!this.length)return Ft.empty;let{root:t}=this;if(!t)return Ft.empty;let e=this.posAtStart;return t.view.state.doc.slice(e,e+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,e,i,s,n){return n||(n=t.toDOM(e),t.editable||(n.contentEditable="false")),new qn(n,i,t,s)}}class _n extends En{constructor(t){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),super(e,0,t)}get isHidden(){return!0}get overrideDOMText(){return Ft.empty}coordsIn(t){return this.dom.getBoundingClientRect()}}class $n{constructor(t){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=t}advance(t,e,i){let{tile:s,index:n,beforeBreak:r,parents:o}=this;for(;t||e>0;)if(s.isComposite())if(r){if(!t)break;i&&i.break(),t--,r=!1}else if(n==s.children.length){if(!t&&!o.length)break;i&&i.leave(s),r=!!s.breakAfter,({tile:s,index:n}=o.pop()),n++}else{let l=s.children[n],a=l.breakAfter;!(e>0?l.length<=t:l.length<t)||i&&!1===i.skip(l,0,l.length)&&l.isComposite?(o.push({tile:s,index:n}),s=l,n=0,i&&l.isComposite()&&i.enter(l)):(r=!!a,n++,t-=l.length)}else if(n==s.length)r=!!s.breakAfter,({tile:s,index:n}=o.pop()),n++;else{if(!t)break;{let e=Math.min(t,s.length-n);i&&i.skip(s,n,n+e),t-=e,n+=e}}return this.tile=s,this.index=n,this.beforeBreak=r,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class jn{constructor(t,e,i,s){this.from=t,this.to=e,this.wrapper=i,this.rank=s}}class Kn{constructor(t,e,i){this.cache=t,this.root=e,this.blockWrappers=i,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(t,e,i,s){var n;this.flushBuffer();let r=this.ensureMarks(e,i),o=r.lastChild;if(o&&o.isText()&&!(8&o.flags)&&o.length+t.length<512){this.cache.reused.set(o,2),(r.children[r.children.length-1]=new zn(o.dom,o.text+t)).parent=r}else r.append(s||zn.of(t,null===(n=this.cache.find(zn))||void 0===n?void 0:n.dom));this.pos+=t.length,this.afterWidget=null}addComposition(t,e){let i=this.curLine;i.dom!=e.line.dom&&(i.setDOM(this.cache.reused.has(e.line)?Zn(e.line.dom):e.line.dom),this.cache.reused.set(e.line,2));let s=i;for(let t=e.marks.length-1;t>=0;t--){let i=e.marks[t],n=s.lastChild;if(n instanceof Fn&&n.mark.eq(i.mark))n.dom!=i.dom&&n.setDOM(Zn(i.dom)),s=n;else{if(this.cache.reused.get(i)){let t=En.get(i.dom);t&&t.setDOM(Zn(i.dom))}let t=Fn.of(i.mark,i.dom);s.append(t),s=t}this.cache.reused.set(i,2)}let n=En.get(t.text);n&&this.cache.reused.set(n,2);let r=new zn(t.text,t.text.nodeValue);r.flags|=8,s.append(r)}addInlineWidget(t,e,i){let s=this.afterWidget&&48&t.flags&&(48&this.afterWidget.flags)==(48&t.flags);s||this.flushBuffer();let n=this.ensureMarks(e,i);s||16&t.flags||n.append(this.getBuffer(1)),n.append(t),this.pos+=t.length,this.afterWidget=t}addMark(t,e,i){this.flushBuffer(),this.ensureMarks(e,i).append(t),this.pos+=t.length,this.afterWidget=null}addBlockWidget(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}continueWidget(t){(this.afterWidget||this.lastBlock).length+=t,this.pos+=t}addLineStart(t,e){var i;t||(t=Jn);let s=Vn.start(t,e||(null===(i=this.cache.find(Vn))||void 0===i?void 0:i.dom),!!e);this.getBlockPos().append(this.lastBlock=this.curLine=s)}addLine(t){this.getBlockPos().append(t),this.pos+=t.length,this.lastBlock=t,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(t){this.blockPosCovered()||this.addLineStart(t)}ensureLine(t){this.curLine||this.addLineStart(t)}ensureMarks(t,e){var i;let s=this.curLine;for(let n=t.length-1;n>=0;n--){let r,o=t[n];if(e>0&&(r=s.lastChild)&&r instanceof Fn&&r.mark.eq(o))s=r,e--;else{let t=Fn.of(o,null===(i=this.cache.find(Fn,t=>t.mark.eq(o)))||void 0===i?void 0:i.dom);s.append(t),s=t,e=0}}return s}endLine(){if(this.curLine){this.flushBuffer();let t=this.curLine.lastChild;t&&Xn(this.curLine,!1)&&("BR"==t.dom.nodeName||!t.isWidget()||Qi.ios&&Xn(this.curLine,!0))||this.curLine.append(this.cache.findWidget(er,0,32)||new qn(er.toDOM(),0,er,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let t=this.wrappers.length-1;t>=0;t--)this.wrappers[t].to<this.pos&&this.wrappers.splice(t,1);for(let t=this.blockWrappers;t.value&&t.from<=this.pos;t.next())if(t.to>=this.pos){let e=new jn(t.from,t.to,t.value,t.rank),i=this.wrappers.length;for(;i>0&&(this.wrappers[i-1].rank-e.rank||this.wrappers[i-1].to-e.to)<0;)i--;this.wrappers.splice(i,0,e)}this.wrapperPos=this.pos}getBlockPos(){var t;this.updateBlockWrappers();let e=this.root;for(let i of this.wrappers){let s=e.lastChild;if(i.from<this.pos&&s instanceof Wn&&s.wrapper.eq(i.wrapper))e=s;else{let s=Wn.of(i.wrapper,null===(t=this.cache.find(Wn,t=>t.wrapper.eq(i.wrapper)))||void 0===t?void 0:t.dom);e.append(s),e=s}}return e}blockPosCovered(){let t=this.lastBlock;return null!=t&&!t.breakAfter&&(!t.isWidget()||(160&t.flags)>0)}getBuffer(t){let e=2|(t<0?16:32),i=this.cache.find(_n,void 0,1);return i&&(i.flags=e),i||new _n(e)}flushBuffer(){!this.afterWidget||32&this.afterWidget.flags||(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class Un{constructor(t){this.skipCount=0,this.text="",this.textOff=0,this.cursor=t.iter()}skip(t){this.textOff+t<=this.text.length?this.textOff+=t:(this.skipCount+=t-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(t){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:s}=this.cursor.next(this.skipCount);if(this.skipCount=0,s)throw new Error("Ran out of text content when drawing inline views");this.text=e;let n=this.textOff=Math.min(t,e.length);return i?null:e.slice(0,n)}let e=Math.min(this.text.length,this.textOff+t),i=this.text.slice(this.textOff,e);return this.textOff=e,i}}const Qn=[qn,Vn,zn,Fn,_n,Wn,In];for(let t=0;t<Qn.length;t++)Qn[t].bucket=t;class Yn{constructor(t){this.view=t,this.buckets=Qn.map(()=>[]),this.index=Qn.map(()=>0),this.reused=new Map}add(t){let e=t.constructor.bucket,i=this.buckets[e];i.length<6?i.push(t):i[this.index[e]=(this.index[e]+1)%6]=t}find(t,e,i=2){let s=t.bucket,n=this.buckets[s],r=this.index[s];for(let t=n.length-1;t>=0;t--){let o=(t+r)%n.length,l=n[o];if((!e||e(l))&&!this.reused.has(l))return n.splice(o,1),o<r&&this.index[s]--,this.reused.set(l,i),l}return null}findWidget(t,e,i){let s=this.buckets[0];if(s.length)for(let n=0,r=0;;n++){if(n==s.length){if(r)return null;r=1,n=0}let o=s[n];if(!this.reused.has(o)&&(0==r?o.widget.compare(t):o.widget.constructor==t.constructor&&t.updateDOM(o.dom,this.view)))return s.splice(n,1),n<this.index[0]&&this.index[0]--,o.widget==t&&o.length==e&&(497&o.flags)==i?(this.reused.set(o,1),o):(this.reused.set(o,2),new qn(o.dom,e,t,-498&o.flags|i))}}reuse(t){return this.reused.set(t,1),t}maybeReuse(t,e=2){if(!this.reused.has(t))return this.reused.set(t,e),t.dom}clear(){for(let t=0;t<this.buckets.length;t++)this.buckets[t].length=this.index[t]=0}}class Gn{constructor(t,e,i,s,n){this.view=t,this.decorations=s,this.disallowBlockEffectsFor=n,this.openWidget=!1,this.openMarks=0,this.cache=new Yn(t),this.text=new Un(t.state.doc),this.builder=new Kn(this.cache,new In(t,t.contentDOM),hi.iter(i)),this.cache.reused.set(e,2),this.old=new $n(e),this.reuseWalker={skip:(t,e,i)=>{if(this.cache.add(t),t.isComposite())return!1},enter:t=>this.cache.add(t),leave:()=>{},break:()=>{}}}run(t,e){let i=e&&this.getCompositionContext(e.text);for(let s=0,n=0,r=0;;){let o=r<t.length?t[r++]:null,l=o?o.fromA:this.old.root.length;if(l>s){let t=l-s;this.preserve(t,!r,!o),s=l,n+=t}if(!o)break;e&&o.fromA<=e.range.fromA&&o.toA>=e.range.toA?(this.forward(o.fromA,e.range.fromA,e.range.fromA<e.range.toA?1:-1),this.emit(n,e.range.fromB),this.cache.clear(),this.builder.addComposition(e,i),this.text.skip(e.range.toB-e.range.fromB),this.forward(e.range.fromA,o.toA),this.emit(e.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(n,o.toB)),n=o.toB,s=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(t,e,i){let s=function(t){let e=[];for(let i=t.parents.length;i>1;i--){let s=i==t.parents.length?t.tile:t.parents[i].tile;s instanceof Fn&&e.push(s.mark)}return e}(this.old),n=this.openMarks;this.old.advance(t,i?1:-1,{skip:(t,e,i)=>{if(t.isWidget())if(this.openWidget)this.builder.continueWidget(i-e);else{let r=i>0||e<t.length?qn.of(t.widget,this.view,i-e,496&t.flags,this.cache.maybeReuse(t)):this.cache.reuse(t);256&r.flags?(r.flags&=-2,this.builder.addBlockWidget(r)):(this.builder.ensureLine(null),this.builder.addInlineWidget(r,s,n),n=s.length)}else if(t.isText())this.builder.ensureLine(null),e||i!=t.length?(this.cache.add(t),this.builder.addText(t.text.slice(e,i),s,n)):this.builder.addText(t.text,s,n,this.cache.reuse(t)),n=s.length;else if(t.isLine())t.flags&=-2,this.cache.reused.set(t,1),this.builder.addLine(t);else if(t instanceof _n)this.cache.add(t);else{if(!(t instanceof Fn))return!1;this.builder.ensureLine(null),this.builder.addMark(t,s,n),this.cache.reused.set(t,1),n=s.length}this.openWidget=!1},enter:t=>{t.isLine()?this.builder.addLineStart(t.attrs,this.cache.maybeReuse(t)):(this.cache.add(t),t instanceof Fn&&s.unshift(t.mark)),this.openWidget=!1},leave:t=>{t.isLine()?s.length&&(s.length=n=0):t instanceof Fn&&(s.shift(),n=Math.min(n,s.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(t)}emit(t,e){let i=null,s=this.builder,n=0,r=hi.spans(this.decorations,t,e,{point:(t,e,r,o,l,a)=>{if(r instanceof rs){if(this.disallowBlockEffectsFor[a]){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.view.state.doc.lineAt(t).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(n=o.length,l>o.length)s.continueWidget(e-t);else{let n=r.widget||(r.block?tr.block:tr.inline),a=function(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;t.block&&(e|=256);return e}(r),h=this.cache.findWidget(n,e-t,a)||qn.of(n,this.view,e-t,a);r.block?(r.startSide>0&&s.addLineStartIfNotCovered(i),s.addBlockWidget(h)):(s.ensureLine(i),s.addInlineWidget(h,o,l))}i=null}else i=function(t,e){let i=e.spec.attributes,s=e.spec.class;if(!i&&!s)return t;t||(t={class:"cm-line"});i&&Yi(i,t);s&&(t.class+=" "+s);return t}(i,r);e>t&&this.text.skip(e-t)},span:(t,e,n,r)=>{for(let o=t;o<e;){let l=this.text.next(Math.min(512,e-o));null==l?(s.addLineStartIfNotCovered(i),s.addBreak(),o++):(s.ensureLine(i),s.addText(l,n,o==t?r:n.length),o+=l.length),i=null}}});s.addLineStartIfNotCovered(i),this.openWidget=r>n,this.openMarks=r}forward(t,e,i=1){e-t<=10?this.old.advance(e-t,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(e-t-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(t){let e=[],i=null;for(let s=t.parentNode;;s=s.parentNode){let t=En.get(s);if(s==this.view.contentDOM)break;t instanceof Fn?e.push(t):(null==t?void 0:t.isLine())?i=t:t instanceof Wn||("DIV"!=s.nodeName||i||s==this.view.contentDOM?i||e.push(Fn.of(new ss({tagName:s.nodeName.toLowerCase(),attributes:Zi(s)}),s)):i=new Vn(s,Jn))}return{line:i,marks:e}}}function Xn(t,e){let i=t=>{for(let s of t.children)if((e?s.isText():s.length)||i(s))return!0;return!1};return i(t)}const Jn={class:"cm-line"};function Zn(t){let e=En.get(t);return e&&e.setDOM(t.cloneNode()),t}class tr extends ts{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}tr.inline=new tr("span"),tr.block=new tr("div");const er=new class extends ts{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class ir{constructor(t){this.view=t,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=is.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new In(t,t.contentDOM),this.updateInner([new Rn(0,0,0,t.state.doc.length)],null)}update(t){var e;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo)?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?s=this.domChanged.newSel.head:function(t,e){let i=!1;e&&t.iterChangedRanges((t,s)=>{t<e.to&&s>e.from&&(i=!0)});return i}(t.changes,this.hasComposition)||t.selectionSet||(s=t.state.selection.main.head));let n=s>-1?function(t,e,i){let s=nr(t,i);if(!s)return null;let{node:n,from:r,to:o}=s,l=n.nodeValue;if(/[\n\r]/.test(l))return null;if(t.state.doc.sliceString(s.from,s.to)!=l)return null;let a=e.invertedDesc;return{range:new Rn(a.mapPos(r),a.mapPos(o),r,o),text:n}}(this.view,t.changes,s):null;if(this.domChanged=null,this.hasComposition){let{from:e,to:s}=this.hasComposition;i=new Rn(e,s,t.changes.mapPos(e,-1),t.changes.mapPos(s,1)).addToSet(i.slice())}this.hasComposition=n?{from:n.range.fromB,to:n.range.toB}:null,(Qi.ie||Qi.chrome)&&!n&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let r=this.decorations,o=this.blockWrappers;this.updateDeco();let l=function(t,e,i){let s=new rr;return hi.compare(t,e,i,s),s.changes}(r,this.decorations,t.changes);l.length&&(i=Rn.extendWithRanges(i,l));let a=function(t,e,i){let s=new or;return hi.compare(t,e,i,s),s.changes}(o,this.blockWrappers,t.changes);return a.length&&(i=Rn.extendWithRanges(i,a)),n&&!i.some(t=>t.fromA<=n.range.fromA&&t.toA>=n.range.toA)&&(i=n.range.addToSet(i.slice())),!(2&this.tile.flags&&0==i.length)&&(this.updateInner(i,n),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(e||t.length){let i=this.tile,s=new Gn(this.view,i,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=s.run(t,e),sr(i,s.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Qi.chrome||Qi.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),!s||!s.written&&i.selectionRange.focusNode==s.node&&this.tile.dom.contains(s.node)||(this.forceSelection=!0),this.tile.dom.style.height=""});let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let t of this.tile.children)t.isWidget()&&t.widget instanceof lr&&s.push(t.dom);i.updateGaps(s)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(fn)&&(this.editContextFormatting=t.value)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let{dom:i}=this.tile,s=this.view.root.activeElement,n=s==i,r=!n&&!(this.view.state.facet(pn)||i.tabIndex>-1)&&us(i,this.view.observer.selectionRange)&&!(s&&i.contains(s));if(!(n||e||r))return;let o=this.forceSelection;this.forceSelection=!1;let l,a,h=this.view.state.selection.main;if(h.empty?a=l=this.inlineDOMNearPos(h.anchor,h.assoc||1):(a=this.inlineDOMNearPos(h.head,h.head==h.from?1:-1),l=this.inlineDOMNearPos(h.anchor,h.anchor==h.from?1:-1)),Qi.gecko&&h.empty&&!this.hasComposition&&(1==(c=l).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let t=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(t,l.node.childNodes[l.offset]||null)),l=a=new Rs(t,0),o=!0}var c;let u=this.view.observer.selectionRange;!o&&u.focusNode&&(ds(l.node,l.offset,u.anchorNode,u.anchorOffset)&&ds(a.node,a.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,h))||(this.view.observer.ignore(()=>{Qi.android&&Qi.chrome&&i.contains(u.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(u.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let t=hs(this.view.root);if(t)if(h.empty){if(Qi.gecko){let t=(e=l.node,n=l.offset,1!=e.nodeType?0:(n&&"false"==e.childNodes[n-1].contentEditable?1:0)|(n<e.childNodes.length&&"false"==e.childNodes[n].contentEditable?2:0));if(t&&3!=t){let e=(1==t?Ts:Ds)(l.node,l.offset);e&&(l=new Rs(e.node,e.offset))}}t.collapse(l.node,l.offset),null!=h.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=h.bidiLevel)}else if(t.extend){t.collapse(l.node,l.offset);try{t.extend(a.node,a.offset)}catch(t){}}else{let e=document.createRange();h.anchor>h.head&&([l,a]=[a,l]),e.setEnd(a.node,a.offset),e.setStart(l.node,l.offset),t.removeAllRanges(),t.addRange(e)}else;var e,n;r&&this.view.root.activeElement==i&&(i.blur(),s&&s.focus())}),this.view.observer.setSelectionRange(l,a)),this.impreciseAnchor=l.precise?null:new Rs(u.anchorNode,u.anchorOffset),this.impreciseHead=a.precise?null:new Rs(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&ds(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,i=hs(t.root),{anchorNode:s,anchorOffset:n}=t.observer.selectionRange;if(!(i&&e.empty&&e.assoc&&i.modify))return;let r=this.lineAt(e.head,e.assoc);if(!r)return;let o=r.posAtStart;if(e.head==o||e.head==o+r.length)return;let l=this.coordsAt(e.head,-1),a=this.coordsAt(e.head,1);if(!l||!a||l.bottom>a.top)return;let h=this.domAtPos(e.head+e.assoc,e.assoc);i.collapse(h.node,h.offset),i.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&i.collapse(s,n)}posFromDOM(t,e){let i=this.tile.nearest(t);if(!i)return 2&this.tile.dom.compareDocumentPosition(t)?0:this.view.state.doc.length;let s=i.posAtStart;if(!i.isComposite())return i.isText()?t==i.dom?s+e:s+(e?i.length:0):s;{let n;if(t==i.dom)n=i.dom.childNodes[e];else{let s=0==vs(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==i.dom)break;0==s&&e.firstChild!=e.lastChild&&(s=t==e.firstChild?-1:1),t=e}n=s<0?t:t.nextSibling}if(n==i.dom.firstChild)return s;for(;n&&!En.get(n);)n=n.nextSibling;if(!n)return s+i.length;for(let t=0,e=s;;t++){let s=i.children[t];if(s.dom==n)return e;e+=s.length+s.breakAfter}}}domAtPos(t,e){let{tile:i,offset:s}=this.tile.resolveBlock(t,e);return i.isWidget()?i.domPosFor(t,e):i.domIn(s,e)}inlineDOMNearPos(t,e){let i,s,n=-1,r=!1,o=-1,l=!1;return this.tile.blockTiles((e,a)=>{if(e.isWidget()){if(32&e.flags&&a>=t)return!0;16&e.flags&&(r=!0)}else{let h=a+e.length;if(a<=t&&(i=e,n=t-a,r=h<t),h>=t&&!s&&(s=e,o=t-a,l=a>t),a>t&&s)return!0}}),i||s?(r&&s?i=null:l&&i&&(s=null),i&&e<0||!s?i.domIn(n,e):s.domIn(o,e)):this.domAtPos(t,e)}coordsAt(t,e){let{tile:i,offset:s}=this.tile.resolveBlock(t,e);return i.isWidget()?i.widget instanceof lr?null:i.coordsInWidget(s,e,!0):i.coordsIn(s,e)}lineAt(t,e){let{tile:i}=this.tile.resolveBlock(t,e);return i.isLine()?i:null}coordsForChar(t){let{tile:e,offset:i}=this.tile.resolveBlock(t,1);if(!e.isLine())return null;return function t(e,i){if(e.isComposite())for(let s of e.children){if(s.length>=i){let e=t(s,i);if(e)return e}if((i-=s.length)<0)break}else if(e.isText()&&i<e.length){let t=Gt(e.text,i);if(t==i)return null;let s=As(e.dom,i,t).getClientRects();for(let t=0;t<s.length;t++){let e=s[t];if(t==s.length-1||e.top<e.bottom&&e.left<e.right)return e}}return null}(e,i)}measureVisibleLineHeights(t){let e=[],{from:i,to:s}=t,n=this.view.contentDOM.clientWidth,r=n>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,l=this.view.textDirection==Ps.LTR,a=0,h=(t,c,u)=>{for(let f=0;f<t.children.length&&!(c>s);f++){let s=t.children[f],d=c+s.length,p=s.dom.getBoundingClientRect(),{height:m}=p;if(u&&!f&&(a+=p.top-u.top),s instanceof Wn)d>i&&h(s,c,p);else if(c>=i&&(a>0&&e.push(-a),e.push(m+a),a=0,r)){let t=s.dom.lastChild,e=t?fs(t):[];if(e.length){let t=e[e.length-1],i=l?t.right-p.left:p.right-t.left;i>o&&(o=i,this.minWidth=n,this.minWidthFrom=c,this.minWidthTo=d)}}u&&f==t.children.length-1&&(a+=u.bottom-p.bottom),c=d+s.breakAfter}};return h(this.tile,0,null),e}textDirectionAt(t){let{tile:e}=this.tile.resolveBlock(t,1);return"rtl"==getComputedStyle(e.dom).direction?Ps.RTL:Ps.LTR}measureTextSize(){let t=this.tile.blockTiles(t=>{if(t.isLine()&&t.children.length&&t.length<=20){let e,i=0;for(let s of t.children){if(!s.isText()||/[^ -~]/.test(s.text))return;let t=fs(s.dom);if(1!=t.length)return;i+=t[0].width,e=t[0].height}if(i)return{lineHeight:t.dom.getBoundingClientRect().height,charWidth:i/t.length,textHeight:e}}});if(t)return t;let e,i,s,n=document.createElement("div");return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let t=fs(n.firstChild)[0];e=n.getBoundingClientRect().height,i=t&&t.width?t.width/27:7,s=t&&t.height?t.height:e,n.remove()}),{lineHeight:e,charWidth:i,textHeight:s}}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,s=0;;s++){let n=s==e.viewports.length?null:e.viewports[s],r=n?n.from-1:this.view.state.doc.length;if(r>i){let s=(e.lineBlockAt(r).bottom-e.lineBlockAt(i).top)/this.view.scaleY;t.push(is.replace({widget:new lr(s),block:!0,inclusive:!0,isBlockGap:!0}).range(i,r))}if(!n)break;i=n.to+1}return is.set(t)}updateDeco(){let t=1,e=this.view.state.facet(xn).map(e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e),i=!1,s=this.view.state.facet(Sn).map((t,e)=>{let s="function"==typeof t;return s&&(i=!0),s?t(this.view):t});for(s.length&&(this.dynamicDecorationMap[t++]=i,e.push(hi.join(s))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;this.blockWrappers=this.view.state.facet(kn).map(t=>"function"==typeof t?t(this.view):t)}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);return this.view.scrollDOM.scrollTop=e.top-t.yMargin,void(this.view.scrollDOM.scrollLeft=t.xMargin)}for(let e of this.view.state.facet(hn))try{if(e(this.view,t.range,t))return!0}catch(t){dn(this.view.state,t,"scroll handler")}let e,{range:i}=t,s=this.coordsAt(i.head,i.empty?i.assoc:i.head>i.anchor?-1:1);if(!s)return;!i.empty&&(e=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(s={left:Math.min(s.left,e.left),top:Math.min(s.top,e.top),right:Math.max(s.right,e.right),bottom:Math.max(s.bottom,e.bottom)});let n=Tn(this.view),r={left:s.left-n.left,top:s.top-n.top,right:s.right+n.right,bottom:s.bottom+n.bottom},{offsetWidth:o,offsetHeight:l}=this.view.scrollDOM;if(function(t,e,i,s,n,r,o,l){let a=t.ownerDocument,h=a.defaultView||window;for(let c=t,u=!1;c&&!u;)if(1==c.nodeType){let t,f=c==a.body,d=1,p=1;if(f)t=bs(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(u=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:d,scaleY:p}=ys(c,e)),t={left:e.left,right:e.left+c.clientWidth*d,top:e.top,bottom:e.top+c.clientHeight*p}}let m=0,g=0;if("nearest"==n)e.top<t.top?(g=e.top-(t.top+o),i>0&&e.bottom>t.bottom+g&&(g=e.bottom-t.bottom+o)):e.bottom>t.bottom&&(g=e.bottom-t.bottom+o,i<0&&e.top-g<t.top&&(g=e.top-(t.top+o)));else{let s=e.bottom-e.top,r=t.bottom-t.top;g=("center"==n&&s<=r?e.top+s/2-r/2:"start"==n||"center"==n&&i<0?e.top-o:e.bottom-r+o)-t.top}if("nearest"==s?e.left<t.left?(m=e.left-(t.left+r),i>0&&e.right>t.right+m&&(m=e.right-t.right+r)):e.right>t.right&&(m=e.right-t.right+r,i<0&&e.left<t.left+m&&(m=e.left-(t.left+r))):m=("center"==s?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==s==l?e.left-r:e.right-(t.right-t.left)+r)-t.left,m||g)if(f)h.scrollBy(m,g);else{let t=0,i=0;if(g){let t=c.scrollTop;c.scrollTop+=g/p,i=(c.scrollTop-t)*p}if(m){let e=c.scrollLeft;c.scrollLeft+=m/d,t=(c.scrollLeft-e)*d}e={left:e.left-t,top:e.top-i,right:e.right-t,bottom:e.bottom-i},t&&Math.abs(t-m)<1&&(s="nearest"),i&&Math.abs(i-g)<1&&(n="nearest")}if(f)break;(e.top<t.top||e.bottom>t.bottom||e.left<t.left||e.right>t.right)&&(e={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)}),c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,r,i.head<i.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,o),-o),Math.max(Math.min(t.yMargin,l),-l),this.view.textDirection==Ps.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(s.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||s.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let t=this.view.docView.lineAt(i.head,1);t&&t.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(t){let e=t=>t.isWidget()||t.children.some(e);return e(this.tile.resolveBlock(t,1).tile)}destroy(){sr(this.tile)}}function sr(t,e){let i=null==e?void 0:e.get(t);if(1!=i){null==i&&t.destroy();for(let i of t.children)sr(i,e)}}function nr(t,e){let i=t.observer.selectionRange;if(!i.focusNode)return null;let s=Ts(i.focusNode,i.focusOffset),n=Ds(i.focusNode,i.focusOffset),r=s||n;if(n&&s&&n.node!=s.node){let e=En.get(n.node);if(!e||e.isText()&&e.text!=n.node.nodeValue)r=n;else if(t.docView.lastCompositionAfterCursor){let t=En.get(s.node);!t||t.isText()&&t.text!=s.node.nodeValue||(r=n)}}if(t.docView.lastCompositionAfterCursor=r!=s,!r)return null;let o=e-r.offset;return{from:o,to:o+r.node.nodeValue.length,node:r.node}}let rr=class{constructor(){this.changes=[]}compareRange(t,e){ls(t,e,this.changes)}comparePoint(t,e){ls(t,e,this.changes)}boundChange(t){ls(t,t,this.changes)}};class or{constructor(){this.changes=[]}compareRange(t,e){ls(t,e,this.changes)}comparePoint(){}boundChange(t){ls(t,t,this.changes)}}class lr extends ts{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function ar(t,e,i){let s=t.lineBlockAt(e);if(Array.isArray(s.type)){let t;for(let n of s.type){if(n.from>e)break;if(!(n.to<e)){if(n.from<e&&n.to>e)return n;t&&(n.type!=es.Text||t.type==n.type&&!(i<0?n.from<e:n.to>e))||(t=n)}}return t||s}return s}function hr(t,e,i,s){let n=t.state.doc.lineAt(e.head),r=t.bidiSpans(n),o=t.textDirectionAt(n.from);for(let l=e,a=null;;){let e=Ys(n,r,o,l,i),h=Qs;if(!e){if(n.number==(i?t.state.doc.lines:1))return l;h="\n",n=t.state.doc.line(n.number+(i?1:-1)),r=t.bidiSpans(n),e=t.visualLineSide(n,!i)}if(a){if(!a(h))return l}else{if(!s)return e;a=s(h)}l=e}}function cr(t,e,i){for(;;){let s=0;for(let n of t)n.between(e-1,e+1,(t,n,r)=>{if(e>t&&e<n){let r=s||i||(e-t<n-e?-1:1);e=r<0?t:n,s=r}});if(!s)return e}}function ur(t,e){let i=null;for(let s=0;s<e.ranges.length;s++){let n=e.ranges[s],r=null;if(n.empty){let e=cr(t,n.from,0);e!=n.from&&(r=ue.cursor(e,-1))}else{let e=cr(t,n.from,-1),i=cr(t,n.to,1);e==n.from&&i==n.to||(r=ue.range(n.from==n.anchor?e:i,n.from==n.head?e:i))}r&&(i||(i=e.ranges.slice()),i[s]=r)}return i?ue.create(i,e.mainIndex):e}function fr(t,e,i){let s=cr(t.state.facet(Cn).map(e=>e(t)),i.from,e.head>i.from?-1:1);return s==i.from?i:ue.cursor(s,s<i.from?1:-1)}class dr{constructor(t,e){this.pos=t,this.assoc=e}}function pr(t,e,i,s){let n,r=t.contentDOM.getBoundingClientRect(),o=r.top+t.viewState.paddingTop,{x:l,y:a}=e,h=a-o;for(;;){if(h<0)return new dr(0,1);if(h>t.viewState.docHeight)return new dr(t.state.doc.length,-1);if(n=t.elementAtHeight(h),null==s)break;if(n.type==es.Text){if(s<0?n.to<t.viewport.from:n.from>t.viewport.to)break;let e=t.docView.coordsAt(s<0?n.from:n.to,s>0?-1:1);if(e&&(s<0?e.top<=h+o:e.bottom>=h+o))break}let e=t.viewState.heightOracle.textHeight/2;h=s>0?n.bottom+e:n.top-e}if(t.viewport.from>=n.to||t.viewport.to<=n.from){if(i)return null;if(n.type==es.Text){let e=function(t,e,i,s,n){let r=Math.round((s-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&i.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;r+=Math.floor((n-i.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(i.from,i.to);return i.from+ki(o,r,t.state.tabSize)}(t,r,n,l,a);return new dr(e,e==n.from?1:-1)}}if(n.type!=es.Text)return h<(n.top+n.bottom)/2?new dr(n.from,1):new dr(n.to,-1);let c=t.docView.lineAt(n.from,2);return c&&c.length==n.length||(c=t.docView.lineAt(n.from,-2)),new mr(t,l,a,t.textDirectionAt(n.from)).scanTile(c,n.from)}class mr{constructor(t,e,i,s){this.view=t,this.x=e,this.y=i,this.baseDir=s,this.line=null,this.spans=null}bidiSpansAt(t){return(!this.line||this.line.from>t||this.line.to<t)&&(this.line=this.view.state.doc.lineAt(t),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(t,e){let{line:i,spans:s}=this.bidiSpansAt(t);return s[zs.find(s,t-i.from,-1,e)].level==this.baseDir}dirAt(t,e){let{line:i,spans:s}=this.bidiSpansAt(t);return s[zs.find(s,t-i.from,-1,e)].dir}bidiIn(t,e){let{spans:i,line:s}=this.bidiSpansAt(t);return i.length>1||i.length&&(i[0].level!=this.baseDir||i[0].to+s.from<e)}scan(t,e){let i,s,n,r=0,o=t.length-1,l=new Set,a=this.bidiIn(t[0],t[o]),h=-1,c=1e9;t:for(;r<o;){let u=o-r,f=r+o>>1;e:if(l.has(f)){let t=r+Math.floor(Math.random()*u);for(let e=0;e<u;e++){if(!l.has(t)){f=t;break e}t++,t==o&&(t=r)}break t}l.add(f);let d=e(f);if(d)for(let e=0;e<d.length;e++){let l=d[e],u=0;if(l.bottom<this.y)(!i||i.bottom<l.bottom)&&(i=l),u=1;else if(l.top>this.y)(!s||s.top>l.top)&&(s=l),u=-1;else{let t=l.left>this.x?this.x-l.left:l.right<this.x?this.x-l.right:0,e=Math.abs(t);e<c&&(h=f,c=e,n=l),t&&(u=t<0==(this.baseDir==Ps.LTR)?-1:1)}-1!=u||a&&!this.baseDirAt(t[f],1)?1!=u||a&&!this.baseDirAt(t[f+1],-1)||(r=f+1):o=f}}if(!n){let n=i&&(!s||this.y-i.bottom<s.top-this.y)?i:s;return this.y=(n.top+n.bottom)/2,this.scan(t,e)}let u=(a?this.dirAt(t[h],1):this.baseDir)==Ps.LTR;return{i:h,after:this.x>(n.left+n.right)/2==u}}scanText(t,e){let i=[];for(let s=0;s<t.length;s=Gt(t.text,s))i.push(e+s);i.push(e+t.length);let s=this.scan(i,s=>{let n=i[s]-e,r=i[s+1]-e;return As(t.dom,n,r).getClientRects()});return s.after?new dr(i[s.i+1],-1):new dr(i[s.i],1)}scanTile(t,e){if(!t.length)return new dr(e,1);if(1==t.children.length){let i=t.children[0];if(i.isText())return this.scanText(i,e);if(i.isComposite())return this.scanTile(i,e)}let i=[e];for(let s=0,n=e;s<t.children.length;s++)i.push(n+=t.children[s].length);let s=this.scan(i,e=>{let i=t.children[e];return 48&i.flags?null:(1==i.dom.nodeType?i.dom:As(i.dom,0,i.length)).getClientRects()}),n=t.children[s.i],r=i[s.i];return n.isText()?this.scanText(n,r):n.isComposite()?this.scanTile(n,r):s.after?new dr(i[s.i+1],-1):new dr(r,1)}}const gr="";class vr{constructor(t,e){this.points=t,this.view=e,this.text="",this.lineSeparator=e.state.facet(ii.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=gr}readRange(t,e){if(!t)return this;let i=t.parentNode;for(let s=t;;){this.findPointBefore(i,s);let t=this.text.length;this.readNode(s);let n=En.get(s),r=s.nextSibling;if(r==e){(null==n?void 0:n.breakAfter)&&!r&&i!=this.view.contentDOM&&this.lineBreak();break}let o=En.get(r);(n&&o?n.breakAfter:(n?n.breakAfter:ms(s))||ms(r)&&("BR"!=s.nodeName||(null==n?void 0:n.isWidget()))&&this.text.length>t)&&!br(r,e)&&this.lineBreak(),s=r}return this.findPointBefore(i,e),this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let n,r=-1,o=1;if(this.lineSeparator?(r=e.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(n=s.exec(e))&&(r=n.index,o=n[0].length),this.append(e.slice(i,r<0?e.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=o-1);i=r+o}}readNode(t){let e=En.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(wr(t,i.node,i.offset)?e:0))}}function wr(t,e,i){for(;;){if(!e||i<vs(e))return!1;if(e==t)return!0;i=ps(e)+1,e=e.parentNode}}function br(t,e){let i;for(;t!=e&&t;t=t.nextSibling){let e=En.get(t);if(!(null==e?void 0:e.isWidget()))return!1;e&&(i||(i=[])).push(e)}if(i)for(let t of i){let e=t.overrideDOMText;if(null==e?void 0:e.length)return!1}return!0}class yr{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class xr{constructor(t,e,i,s){this.typeOver=s,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:n,impreciseAnchor:r}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=kr(t.docView.tile,e,i,0))){let e=n||r?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:s,focusNode:n,focusOffset:r}=t.observer.selectionRange;i&&(e.push(new yr(i,s)),n==i&&r==s||e.push(new yr(n,r)));return e}(t),i=new vr(e,t);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(t,e){if(0==t.length)return null;let i=t[0].pos,s=2==t.length?t[1].pos:i;return i>-1&&s>-1?ue.single(i+e,s+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,i=n&&n.node==e.focusNode&&n.offset==e.focusOffset||!cs(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),s=r&&r.node==e.anchorNode&&r.offset==e.anchorOffset||!cs(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),o=t.viewport;if((Qi.ios||Qi.chrome)&&t.state.selection.main.empty&&i!=s&&(o.from>0||o.to<t.state.doc.length)){let e=Math.min(i,s),n=Math.max(i,s),r=o.from-e,l=o.to-n;0!=r&&1!=r&&0!=e||0!=l&&-1!=l&&n!=t.state.doc.length||(i=0,s=t.state.doc.length)}t.inputState.composing>-1&&t.state.selection.ranges.length>1?this.newSel=t.state.selection.replaceRange(ue.range(s,i)):this.newSel=ue.single(s,i)}}}function kr(t,e,i,s){if(t.isComposite()){let n=-1,r=-1,o=-1,l=-1;for(let a=0,h=s,c=s;a<t.children.length;a++){let s=t.children[a],u=h+s.length;if(h<e&&u>i)return kr(s,e,i,h);if(u>=e&&-1==n&&(n=a,r=h),h>i&&s.dom.parentNode==t.dom){o=a,l=c;break}c=u,h=u+s.breakAfter}return{from:r,to:l<0?s+t.length:l,startDOM:(n?t.children[n-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o<t.children.length&&o>=0?t.children[o].dom:null}}return t.isText()?{from:s,to:s+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function Sr(t,e){let i,{newSel:s}=e,n=t.state.selection.main,r=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:o}=e.bounds,l=n.from,a=null;(8===r||Qi.android&&e.text.length<o-s)&&(l=n.to,a="end");let h=Ar(t.state.doc.sliceString(s,o,gr),e.text,l-s,a);h&&(Qi.chrome&&13==r&&h.toB==h.from+2&&e.text.slice(h.from,h.toB)==gr+gr&&h.toB--,i={from:s+h.from,to:s+h.toA,insert:Ft.of(e.text.slice(h.from,h.toB).split(gr))})}else s&&(!t.hasFocus&&t.state.facet(pn)||Mr(s,n))&&(s=null);if(!i&&!s)return!1;if(!i&&e.typeOver&&!n.empty&&s&&s.main.empty?i={from:n.from,to:n.to,insert:t.state.doc.slice(n.from,n.to)}:(Qi.mac||Qi.android)&&i&&i.from==i.to&&i.from==n.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(s&&2==i.insert.length&&(s=ue.single(s.main.anchor-1,s.main.head-1)),i={from:i.from,to:i.to,insert:Ft.of([i.insert.toString().replace("."," ")])}):i&&i.from>=n.from&&i.to<=n.to&&(i.from!=n.from||i.to!=n.to)&&n.to-n.from-(i.to-i.from)<=4?i={from:n.from,to:n.to,insert:t.state.doc.slice(n.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,n.to))}:t.state.doc.lineAt(n.from).to<n.to&&t.docView.lineHasWidget(n.to)&&t.inputState.insertingTextAt>Date.now()-50?i={from:n.from,to:n.to,insert:t.state.toText(t.inputState.insertingText)}:Qi.chrome&&i&&i.from==i.to&&i.from==n.head&&"\n "==i.insert.toString()&&t.lineWrapping&&(s&&(s=ue.single(s.main.anchor-1,s.main.head-1)),i={from:n.from,to:n.to,insert:Ft.of([" "])}),i)return Cr(t,i,s,r);if(s&&!Mr(s,n)){let e=!1,i="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin,"select.pointer"==i&&(s=ur(t.state.facet(Cn).map(e=>e(t)),s))),t.dispatch({selection:s,scrollIntoView:e,userEvent:i}),!0}return!1}function Cr(t,e,i,s=-1){if(Qi.ios&&t.inputState.flushIOSKey(e))return!0;let n=t.state.selection.main;if(Qi.android&&(e.to==n.to&&(e.from==n.from||e.from==n.from-1&&" "==t.state.sliceDoc(e.from,n.from))&&1==e.insert.length&&2==e.insert.lines&&Ms(t.contentDOM,"Enter",13)||(e.from==n.from-1&&e.to==n.to&&0==e.insert.length||8==s&&e.insert.length<e.to-e.from&&e.to>n.head)&&Ms(t.contentDOM,"Backspace",8)||e.from==n.from&&e.to==n.to+1&&0==e.insert.length&&Ms(t.contentDOM,"Delete",46)))return!0;let r,o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let l=()=>r||(r=function(t,e,i){let s,n=t.state,r=n.selection.main,o=-1;if(e.from==e.to&&e.from<r.from||e.from>r.to){let i=e.from<r.from?-1:1,s=i<0?r.from:r.to,l=cr(n.facet(Cn).map(e=>e(t)),s,i);e.from==l&&(o=l)}if(o>-1)s={changes:e,selection:ue.cursor(e.from+e.insert.length,-1)};else if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let i=r.from<e.from?n.sliceDoc(r.from,e.from):"",o=r.to>e.to?n.sliceDoc(e.to,r.to):"";s=n.replaceSelection(t.state.toText(i+e.insert.sliceString(0,void 0,t.state.lineBreak)+o))}else{let o=n.changes(e),l=i&&i.main.to<=o.newLength?i.main:void 0;if(n.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=r.to+10&&e.to>=r.to-10){let a,h=t.state.sliceDoc(e.from,e.to),c=i&&nr(t,i.main.head);if(c){let t=e.insert.length-(e.to-e.from);a={from:c.from,to:c.to-t}}else a=t.state.doc.lineAt(r.head);let u=r.to-e.to;s=n.changeByRange(i=>{if(i.from==r.from&&i.to==r.to)return{changes:o,range:l||i.map(o)};let s=i.to-u,c=s-h.length;if(t.state.sliceDoc(c,s)!=h||s>=a.from&&c<=a.to)return{range:i};let f=n.changes({from:c,to:s,insert:e.insert}),d=i.to-r.to;return{changes:f,range:l?ue.range(Math.max(0,l.anchor+d),Math.max(0,l.head+d)):i.map(f)}})}else s={changes:o,selection:l&&n.selection.replaceRange(l)}}let l="input.type";(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1));return n.update(s,{userEvent:l,scrollIntoView:!0})}(t,e,i));return t.state.facet(sn).some(i=>i(t,e.from,e.to,o,l))||t.dispatch(l()),!0}function Ar(t,e,i,s){let n=Math.min(t.length,e.length),r=0;for(;r<n&&t.charCodeAt(r)==e.charCodeAt(r);)r++;if(r==n&&t.length==e.length)return null;let o=t.length,l=e.length;for(;o>0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if("end"==s){i-=o+Math.max(0,r-Math.min(o,l))-r}if(o<r&&t.length<e.length){r-=i<=r&&i>=o?r-i:0,l=r+(l-o),o=r}else if(l<r){r-=i<=r&&i>=l?r-i:0,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Mr(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class Or{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,Qi.safari&&t.contentDOM.addEventListener("input",()=>null),Qi.gecko&&function(t){Xr.has(t)||(Xr.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,s=e.target;s!=t.contentDOM;s=s.parentNode)if(!s||11==s.nodeType||(i=En.get(s))&&i.isWidget()&&!i.isHidden&&i.widget.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(t.type,t)):this.runHandlers(t.type,t)))}runHandlers(t,e){let i=this.handlers[t];if(i){for(let t of i.observers)t(this.view,e);for(let t of i.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=Dr(t),i=this.handlers,s=this.view.contentDOM;for(let t in e)if("scroll"!=t){let n=!e[t].handlers.length,r=i[t];r&&n!=!r.handlers.length&&(s.removeEventListener(t,this.handleEvent),r=null),r||s.addEventListener(t,this.handleEvent,{passive:n})}for(let t in i)"scroll"==t||e[t]||s.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&Br.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),Qi.android&&Qi.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!Qi.ios||t.synthetic||t.altKey||t.metaKey||!((e=Rr.find(e=>e.keyCode==t.keyCode))&&!t.ctrlKey||Pr.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(!("Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,Ms(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0)))}ignoreDuringComposition(t){return!(!/^key/.test(t.type)||t.synthetic)&&(this.composing>0||!!(Qi.safari&&!Qi.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Tr(t,e){return(i,s)=>{try{return e.call(t,s,i)}catch(t){dn(i.state,t)}}}function Dr(t){let e=Object.create(null);function i(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec,s=t&&t.plugin.domEventHandlers,n=t&&t.plugin.domEventObservers;if(s)for(let t in s){let n=s[t];n&&i(t).handlers.push(Tr(e.value,n))}if(n)for(let t in n){let s=n[t];s&&i(t).observers.push(Tr(e.value,s))}}for(let t in Nr)i(t).handlers.push(Nr[t]);for(let t in Ir)i(t).observers.push(Ir[t]);return e}const Rr=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Pr="dthko",Br=[16,17,18,20,91,92,224,225];function Er(t){return.7*Math.max(0,t)+8}class Lr{constructor(t,e,i,s){this.view=t,this.startEvent=e,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,i,s=t.ownerDocument;for(let n=t.parentNode;n&&!(n==s.body||e&&i);)if(1==n.nodeType)!i&&n.scrollHeight>n.clientHeight&&(i=n),!e&&n.scrollWidth>n.clientWidth&&(e=n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}return{x:e,y:i}}(t.contentDOM),this.atoms=t.state.facet(Cn).map(e=>e(t));let n=t.contentDOM.ownerDocument;n.addEventListener("mousemove",this.move=this.move.bind(this)),n.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(ii.allowMultipleSelections)&&function(t,e){let i=t.state.facet(Xs);return i.length?i[0](e):Qi.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let s=hs(t.root);if(!s||0==s.rangeCount)return!0;let n=s.getRangeAt(0).getClientRects();for(let t=0;t<n.length;t++){let i=n[t];if(i.left<=e.clientX&&i.right>=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(t,e)||1!=jr(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(e=this.startEvent,i=t,Math.max(Math.abs(e.clientX-i.clientX),Math.abs(e.clientY-i.clientY))<10))return;var e,i;this.select(this.lastEvent=t);let s=0,n=0,r=0,o=0,l=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:l}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:a}=this.scrollParents.y.getBoundingClientRect());let h=Tn(this.view);t.clientX-h.left<=r+6?s=-Er(r-t.clientX):t.clientX+h.right>=l-6&&(s=Er(t.clientX-l)),t.clientY-h.top<=o+6?n=-Er(o-t.clientY):t.clientY+h.bottom>=a-6&&(n=Er(t.clientY-a)),this.setScrollSpeed(s,n)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}select(t){let{view:e}=this,i=ur(this.atoms,this.style.get(t,this.extend,this.multiple));!this.mustSelect&&i.eq(e.state.selection,!1===this.dragging)||this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(t)&&setTimeout(()=>this.select(this.lastEvent),20)}}const Nr=Object.create(null),Ir=Object.create(null),Wr=Qi.ie&&Qi.ie_version<15||Qi.ios&&Qi.webkit_version<604;function Vr(t,e,i){for(let s of t.facet(e))i=s(i,t);return i}function Hr(t,e){e=Vr(t.state,rn,e);let i,{state:s}=t,n=1,r=s.toText(e),o=r.lines==s.selection.ranges.length;if(null!=Ur&&s.selection.ranges.every(t=>t.empty)&&Ur==r.toString()){let t=-1;i=s.changeByRange(i=>{let l=s.doc.lineAt(i.from);if(l.from==t)return{range:i};t=l.from;let a=s.toText((o?r.line(n++).text:e)+s.lineBreak);return{changes:{from:l.from,insert:a},range:ue.cursor(i.from+a.length)}})}else i=o?s.changeByRange(t=>{let e=r.line(n++);return{changes:{from:t.from,to:t.to,insert:e.text},range:ue.cursor(t.from+e.length)}}):s.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function Fr(t,e,i,s){if(1==s)return ue.cursor(e,i);if(2==s)return function(t,e,i=1){let s=t.charCategorizer(e),n=t.doc.lineAt(e),r=e-n.from;if(0==n.length)return ue.cursor(e);0==r?i=1:r==n.length&&(i=-1);let o=r,l=r;i<0?o=Gt(n.text,r,!1):l=Gt(n.text,r);let a=s(n.text.slice(o,l));for(;o>0;){let t=Gt(n.text,o,!1);if(s(n.text.slice(t,o))!=a)break;o=t}for(;l<n.length;){let t=Gt(n.text,l);if(s(n.text.slice(l,t))!=a)break;l=t}return ue.range(o+n.from,l+n.from)}(t.state,e,i);{let s=t.docView.lineAt(e,i),n=t.state.doc.lineAt(s?s.posAtEnd:e),r=s?s.posAtStart:n.from,o=s?s.posAtEnd:n.to;return o<t.state.doc.length&&o==n.to&&o++,ue.range(r,o)}}Ir.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},Nr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),Ir.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Ir.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Nr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let i=null;for(let s of t.state.facet(Zs))if(i=s(t,e),i)break;if(i||0!=e.button||(i=function(t,e){let i=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),s=jr(e),n=t.state.selection;return{update(t){t.docChanged&&(i.pos=t.changes.mapPos(i.pos),n=n.map(t.changes))},get(e,r,o){let l,a=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),h=Fr(t,a.pos,a.assoc,s);if(i.pos!=a.pos&&!r){let e=Fr(t,i.pos,i.assoc,s),n=Math.min(e.from,h.from),r=Math.max(e.to,h.to);h=n<h.from?ue.range(n,r):ue.range(r,n)}return r?n.replaceRange(n.main.extend(h.from,h.to)):o&&1==s&&n.ranges.length>1&&(l=function(t,e){for(let i=0;i<t.ranges.length;i++){let{from:s,to:n}=t.ranges[i];if(s<=e&&n>=e)return ue.create(t.ranges.slice(0,i).concat(t.ranges.slice(i+1)),t.mainIndex==i?0:t.mainIndex-(t.mainIndex>i?1:0))}return null}(n,a.pos))?l:o?n.addRange(h):ue.create([h])}}}(t,e)),i){let s=!t.hasFocus;t.inputState.startMouseSelection(new Lr(t,e,i,s)),s&&t.observer.ignore(()=>{Cs(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()});let n=t.inputState.mouseSelection;if(n)return n.start(e),!1===n.dragging}else t.inputState.setSelectionOrigin("select.pointer");return!1};const zr=Qi.ie&&Qi.ie_version<=11;let qr=null,_r=0,$r=0;function jr(t){if(!zr)return t.detail;let e=qr,i=$r;return qr=t,$r=Date.now(),_r=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(_r+1)%3:1}function Kr(t,e,i,s){if(!(i=Vr(t.state,rn,i)))return;let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=t.inputState,o=s&&r&&function(t,e){let i=t.state.facet(Js);return i.length?i[0](e):Qi.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:r.from,to:r.to}:null,l={from:n,insert:i},a=t.state.changes(o?[o,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(n,-1),head:a.mapPos(n,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Nr.dragstart=(t,e)=>{let{selection:{main:i}}=t.state;if(e.target.draggable){let s=t.docView.tile.nearest(e.target);if(s&&s.isWidget()){let t=s.posAtStart,e=t+s.length;(t>=i.to||e<=i.from)&&(i=ue.range(t,e))}}let{inputState:s}=t;return s.mouseSelection&&(s.mouseSelection.dragging=!0),s.draggedContent=i,e.dataTransfer&&(e.dataTransfer.setData("Text",Vr(t.state,on,t.state.sliceDoc(i.from,i.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Nr.dragend=t=>(t.inputState.draggedContent=null,!1),Nr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let i=e.dataTransfer.files;if(i&&i.length){let s=Array(i.length),n=0,r=()=>{++n==i.length&&Kr(t,e,s.filter(t=>null!=t).join(t.state.lineBreak),!1)};for(let t=0;t<i.length;t++){let e=new FileReader;e.onerror=r,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(s[t]=e.result),r()},e.readAsText(i[t])}return!0}{let i=e.dataTransfer.getData("Text");if(i)return Kr(t,e,i,!0),!0}return!1},Nr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let i=Wr?null:e.clipboardData;return i?(Hr(t,i.getData("text/plain")||i.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{t.focus(),i.remove(),Hr(t,i.value)},50)}(t),!1)};let Ur=null;Nr.copy=Nr.cut=(t,e)=>{if(!us(t.contentDOM,t.observer.selectionRange))return!1;let{text:i,ranges:s,linewise:n}=function(t){let e=[],i=[],s=!1;for(let s of t.selection.ranges)s.empty||(e.push(t.sliceDoc(s.from,s.to)),i.push(s));if(!e.length){let n=-1;for(let{from:s}of t.selection.ranges){let r=t.doc.lineAt(s);r.number>n&&(e.push(r.text),i.push({from:r.from,to:Math.min(t.doc.length,r.to+1)})),n=r.number}s=!0}return{text:Vr(t,on,e.join(t.lineBreak)),ranges:i,linewise:s}}(t.state);if(!i&&!n)return!1;Ur=n?i:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:s,scrollIntoView:!0,userEvent:"delete.cut"});let r=Wr?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",i),!0):(function(t,e){let i=t.dom.parentNode;if(!i)return;let s=i.appendChild(document.createElement("textarea"));s.style.cssText="position: fixed; left: -10000px; top: 10px",s.value=e,s.focus(),s.selectionEnd=e.length,s.selectionStart=0,setTimeout(()=>{s.remove(),t.focus()},50)}(t,i),!1)};const Qr=ze.define();function Yr(t,e){let i=[];for(let s of t.facet(nn)){let n=s(t,e);n&&i.push(n)}return i.length?t.update({effects:i,annotations:Qr.of(!0)}):null}function Gr(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let i=Yr(t.state,e);i?t.dispatch(i):t.update([])}},10)}Ir.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Gr(t)},Ir.blur=t=>{t.observer.clearSelectionRange(),Gr(t)},Ir.compositionstart=Ir.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},Ir.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Qi.chrome&&Qi.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))},Ir.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Nr.beforeinput=(t,e)=>{var i,s;if("insertText"!=e.inputType&&"insertCompositionText"!=e.inputType||(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),"insertReplacementText"==e.inputType&&t.observer.editContext){let s=null===(i=e.dataTransfer)||void 0===i?void 0:i.getData("text/plain"),n=e.getTargetRanges();if(s&&n.length){let e=n[0],i=t.posAtDOM(e.startContainer,e.startOffset),r=t.posAtDOM(e.endContainer,e.endOffset);return Cr(t,{from:i,to:r,insert:t.state.toText(s)},null),!0}}let n;if(Qi.chrome&&Qi.android&&(n=Rr.find(t=>t.inputType==e.inputType))&&(t.observer.delayAndroidKey(n.key,n.keyCode),"Backspace"==n.key||"Delete"==n.key)){let e=(null===(s=window.visualViewport)||void 0===s?void 0:s.height)||0;setTimeout(()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Qi.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),Qi.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout(()=>Ir.compositionend(t,e),20),!1};const Xr=new Set;const Jr=["pre-wrap","normal","pre-line","break-spaces"];let Zr=!1;function to(){Zr=!1}class eo{constructor(t){this.lineWrapping=t,this.doc=Ft.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return Jr.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let i=0;i<t.length;i++){let s=t[i];s<0?i++:this.heightSamples[Math.floor(10*s)]||(e=!0,this.heightSamples[Math.floor(10*s)]=!0)}return e}refresh(t,e,i,s,n,r){let o=Jr.indexOf(t)>-1,l=Math.abs(e-this.lineHeight)>.3||this.lineWrapping!=o||Math.abs(i-this.charWidth)>.1;if(this.lineWrapping=o,this.lineHeight=e,this.charWidth=i,this.textHeight=s,this.lineLength=n,l){this.heightSamples={};for(let t=0;t<r.length;t++){let e=r[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return l}}class io{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class so{constructor(t,e,i,s,n){this.from=t,this.length=e,this.top=i,this.height=s,this._content=n}get type(){return"number"==typeof this._content?es.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof rs?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new so(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var no=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(no||(no={}));const ro=.001;class oo{constructor(t,e,i=2){this.length=t,this.height=e,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>ro&&(Zr=!0),this.height=t)}replace(t,e,i){return oo.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,s){let n=this,r=i.doc;for(let o=s.length-1;o>=0;o--){let{fromA:l,toA:a,fromB:h,toB:c}=s[o],u=n.lineAt(l,no.ByPosNoHeight,i.setDoc(e),0,0),f=u.to>=a?u:n.lineAt(a,no.ByPosNoHeight,i,0,0);for(c+=f.to-a,a=f.to;o>0&&u.from<=s[o-1].toA;)l=s[o-1].fromA,h=s[o-1].fromB,o--,l<u.from&&(u=n.lineAt(l,no.ByPosNoHeight,i,0,0));h+=u.from-l,l=u.from;let d=mo.build(i.setDoc(r),t,h,c);n=lo(n,n.replace(l,a,d))}return n.updateHeight(i,0)}static empty(){return new co(0,0,0)}static of(t){if(1==t.length)return t[0];let e=0,i=t.length,s=0,n=0;for(;;)if(e==i)if(s>2*n){let n=t[e-1];n.break?t.splice(--e,1,n.left,null,n.right):t.splice(--e,1,n.left,n.right),i+=1+n.break,s-=n.size}else{if(!(n>2*s))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,n-=e.size}}else if(s<n){let i=t[e++];i&&(s+=i.size)}else{let e=t[--i];e&&(n+=e.size)}let r=0;return null==t[e-1]?(r=1,e--):null==t[e]&&(r=1,i++),new fo(oo.of(t.slice(0,e)),r,oo.of(t.slice(i)))}}function lo(t,e){return t==e?t:(t.constructor!=e.constructor&&(Zr=!0),e)}oo.prototype.size=1;const ao=is.replace({});class ho extends oo{constructor(t,e,i){super(t,e),this.deco=i,this.spaceAbove=0}mainBlock(t,e){return new so(e,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(t,e,i,s){return this.spaceAbove&&t<i+this.spaceAbove?new so(s,0,i,this.spaceAbove,ao):this.mainBlock(i,s)}lineAt(t,e,i,s,n){let r=this.mainBlock(s,n);return this.spaceAbove?this.blockAt(0,i,s,n).join(r):r}forEachLine(t,e,i,s,n,r){t<=n+this.length&&e>=n&&r(this.lineAt(0,no.ByPos,i,s,n))}setMeasuredHeight(t){let e=t.heights[t.index++];e<0?(this.spaceAbove=-e,e=t.heights[t.index++]):this.spaceAbove=0,this.setHeight(e)}updateHeight(t,e=0,i=!1,s){return s&&s.from<=e&&s.more&&this.setMeasuredHeight(s),this.outdated=!1,this}toString(){return`block(${this.length})`}}class co extends ho{constructor(t,e,i){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(t,e){return new so(e,this.length,t+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,e,i){let s=i[0];return 1==i.length&&(s instanceof co||s instanceof uo&&4&s.flags)&&Math.abs(this.length-s.length)<10?(s instanceof uo?s=new co(s.length,this.height,this.spaceAbove):s.height=this.height,this.outdated||(s.outdated=!1),s):oo.of(i)}updateHeight(t,e=0,i=!1,s){return s&&s.from<=e&&s.more?this.setMeasuredHeight(s):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class uo extends oo{constructor(t){super(t,0)}heightMetrics(t,e){let i,s=t.doc.lineAt(e).number,n=t.doc.lineAt(e+this.length).number,r=n-s+1,o=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*r);i=e/r,this.length>r+1&&(o=(this.height-e)/(this.length-r-1))}else i=this.height/r;return{firstLine:s,lastLine:n,perLine:i,perChar:o}}blockAt(t,e,i,s){let{firstLine:n,lastLine:r,perLine:o,perChar:l}=this.heightMetrics(e,s);if(e.lineWrapping){let n=s+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-i)/this.height))*this.length)),r=e.doc.lineAt(n),a=o+r.length*l,h=Math.max(i,t-a/2);return new so(r.from,r.length,h,a,0)}{let s=Math.max(0,Math.min(r-n,Math.floor((t-i)/o))),{from:l,length:a}=e.doc.line(n+s);return new so(l,a,i+o*s,o,0)}}lineAt(t,e,i,s,n){if(e==no.ByHeight)return this.blockAt(t,i,s,n);if(e==no.ByPosNoHeight){let{from:e,to:s}=i.doc.lineAt(t);return new so(e,s-e,0,0,0)}let{firstLine:r,perLine:o,perChar:l}=this.heightMetrics(i,n),a=i.doc.lineAt(t),h=o+a.length*l,c=a.number-r,u=s+o*c+l*(a.from-n-c);return new so(a.from,a.length,Math.max(s,Math.min(u,s+this.height-h)),h,0)}forEachLine(t,e,i,s,n,r){t=Math.max(t,n),e=Math.min(e,n+this.length);let{firstLine:o,perLine:l,perChar:a}=this.heightMetrics(i,n);for(let h=t,c=s;h<=e;){let e=i.doc.lineAt(h);if(h==t){let i=e.number-o;c+=l*i+a*(t-n-i)}let s=l+a*e.length;r(new so(e.from,e.length,c,s,0)),c+=s,h=e.to+1}}replace(t,e,i){let s=this.length-e;if(s>0){let t=i[i.length-1];t instanceof uo?i[i.length-1]=new uo(t.length+s):i.push(null,new uo(s-1))}if(t>0){let e=i[0];e instanceof uo?i[0]=new uo(t+e.length):i.unshift(new uo(t-1),null)}return oo.of(i)}decomposeLeft(t,e){e.push(new uo(t-1),null)}decomposeRight(t,e){e.push(null,new uo(this.length-t-1))}updateHeight(t,e=0,i=!1,s){let n=e+this.length;if(s&&s.from<=e+this.length&&s.more){let i=[],r=Math.max(e,s.from),o=-1;for(s.from>e&&i.push(new uo(s.from-e-1).updateHeight(t,e));r<=n&&s.more;){let e=t.doc.lineAt(r).length;i.length&&i.push(null);let n=s.heights[s.index++],l=0;n<0&&(l=-n,n=s.heights[s.index++]),-1==o?o=n:Math.abs(n-o)>=ro&&(o=-2);let a=new co(e,n,l);a.outdated=!1,i.push(a),r+=e+1}r<=n&&i.push(null,new uo(n-r).updateHeight(t,r));let l=oo.of(i);return(o<0||Math.abs(l.height-this.height)>=ro||Math.abs(o-this.heightMetrics(t,e).perLine)>=ro)&&(Zr=!0),lo(this,l)}return(i||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class fo extends oo{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,s){let n=i+this.left.height;return t<n?this.left.blockAt(t,e,i,s):this.right.blockAt(t,e,n,s+this.left.length+this.break)}lineAt(t,e,i,s,n){let r=s+this.left.height,o=n+this.left.length+this.break,l=e==no.ByHeight?t<r:t<o,a=l?this.left.lineAt(t,e,i,s,n):this.right.lineAt(t,e,i,r,o);if(this.break||(l?a.to<o:a.from>o))return a;let h=e==no.ByPosNoHeight?no.ByPosNoHeight:no.ByPos;return l?a.join(this.right.lineAt(o,h,i,r,o)):this.left.lineAt(o,h,i,s,n).join(a)}forEachLine(t,e,i,s,n,r){let o=s+this.left.height,l=n+this.left.length+this.break;if(this.break)t<l&&this.left.forEachLine(t,e,i,s,n,r),e>=l&&this.right.forEachLine(t,e,i,o,l,r);else{let a=this.lineAt(l,no.ByPos,i,s,n);t<a.from&&this.left.forEachLine(t,a.from-1,i,s,n,r),a.to>=t&&a.from<=e&&r(a),e>a.to&&this.right.forEachLine(a.to+1,e,i,o,l,r)}}replace(t,e,i){let s=this.left.length+this.break;if(e<s)return this.balanced(this.left.replace(t,e,i),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-s,e-s,i));let n=[];t>0&&this.decomposeLeft(t,n);let r=n.length;for(let t of i)n.push(t);if(t>0&&po(n,r-1),e<this.length){let t=n.length;this.decomposeRight(e,n),po(n,t)}return oo.of(n)}decomposeLeft(t,e){let i=this.left.length;if(t<=i)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&(i++,t>=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,s=i+this.break;if(t>=s)return this.right.decomposeRight(t-s,e);t<i&&this.left.decomposeRight(t,e),this.break&&t<s&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?oo.of(this.break?[t,null,e]:[t,e]):(this.left=lo(this.left,t),this.right=lo(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,s){let{left:n,right:r}=this,o=e+n.length+this.break,l=null;return s&&s.from<=e+n.length&&s.more?l=n=n.updateHeight(t,e,i,s):n.updateHeight(t,e,i),s&&s.from<=o+r.length&&s.more?l=r=r.updateHeight(t,o,i,s):r.updateHeight(t,o,i),l?this.balanced(n,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function po(t,e){let i,s;null==t[e]&&(i=t[e-1])instanceof uo&&(s=t[e+1])instanceof uo&&t.splice(e-1,3,new uo(i.length+1+s.length))}class mo{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof co?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new co(t-this.pos,-1,0)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t<e||i.heightRelevant){let s=i.widget?i.widget.estimatedHeight:0,n=i.widget?i.widget.lineBreaks:0;s<0&&(s=this.oracle.lineHeight);let r=e-t;i.block?this.addBlock(new ho(r,s,i)):(r||n||s>=5)&&this.addLineDeco(s,n,r)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new co(this.pos-t,-1,0)),this.writtenTo=this.pos}blankContent(t,e){let i=new uo(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof co)return t;let e=new co(0,-1,0);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,i){let s=this.ensureLine();s.length+=i,s.collapsed+=i,s.widgetHeight=Math.max(s.widgetHeight,t),s.breaks+=e,this.writtenTo=this.pos=this.pos+i}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof co||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new co(0,-1,0));let i=t;for(let t of this.nodes)t instanceof co&&t.updateHeight(this.oracle,i),i+=t?t.length:1;return this.nodes}static build(t,e,i,s){let n=new mo(i,t);return hi.spans(e,i,s,n,0),n.finish(i)}}class go{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,i,s){(t<e||i&&i.heightRelevant||s&&s.heightRelevant)&&ls(t,e,this.changes,5)}}function vo(t,e){let i=t.getBoundingClientRect(),s=t.ownerDocument,n=s.defaultView||window,r=Math.max(0,i.left),o=Math.min(n.innerWidth,i.right),l=Math.max(0,i.top),a=Math.min(n.innerHeight,i.bottom);for(let e=t.parentNode;e&&e!=s.body;)if(1==e.nodeType){let i=e,s=window.getComputedStyle(i);if((i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=s.overflow){let s=i.getBoundingClientRect();r=Math.max(r,s.left),o=Math.min(o,s.right),l=Math.max(l,s.top),a=Math.min(e==t.parentNode?n.innerHeight:a,s.bottom)}e="absolute"==s.position||"fixed"==s.position?i.offsetParent:i.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:r-i.left,right:Math.max(r,o)-i.left,top:l-(i.top+e),bottom:Math.max(l,a)-(i.top+e)}}function wo(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class bo{constructor(t,e,i,s){this.from=t,this.to=e,this.size=i,this.displaySize=s}static same(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++){let s=t[i],n=e[i];if(s.from!=n.from||s.to!=n.to||s.size!=n.size)return!1}return!0}draw(t,e){return is.replace({widget:new yo(this.displaySize*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class yo extends ts{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class xo{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Ao,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ps.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(yn).some(t=>"function"!=typeof t&&"cm-lineWrapping"==t.class);this.heightOracle=new eo(e),this.stateDeco=Mo(t),this.heightMap=oo.empty().applyChanges(this.stateDeco,Ft.empty,this.heightOracle.setDoc(t.doc),[new Rn(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=is.set(this.lineGaps.map(t=>t.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let s=i?e.head:e.anchor;if(!t.some(({from:t,to:e})=>s>=t&&s<=e)){let{from:e,to:i}=this.lineBlockAt(s);t.push(new ko(e,i))}}return this.viewports=t.sort((t,e)=>t.from-e.from),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?Ao:new Oo(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,t=>{this.viewportLines.push(To(t,this.scaler))})}update(t,e=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=Mo(this.state);let s=t.changedRanges,n=Rn.extendWithRanges(s,function(t,e,i){let s=new go;return hi.compare(t,e,i,s,0),s.changes}(i,this.stateDeco,t?t.changes:se.empty(this.state.doc.length))),r=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);to(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),n),(this.heightMap.height!=r||Zr)&&(t.flags|=2),o?(this.scrollAnchorPos=t.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=r);let l=n.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<l.from||e.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,e));let a=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,t.flags|=this.updateForViewport(),(a||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&(t.selectionSet||t.focusChanged)&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(an)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),s=this.heightOracle,n=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?Ps.RTL:Ps.LTR;let r=this.heightOracle.mustRefreshForWrapping(n)||"refresh"===this.mustMeasureContent,o=e.getBoundingClientRect(),l=r||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let a=0,h=0;if(o.width&&o.height){let{scaleX:t,scaleY:i}=ys(e,o);(t>.005&&Math.abs(this.scaleX-t)>.005||i>.005&&Math.abs(this.scaleY-i)>.005)&&(this.scaleX=t,this.scaleY=i,a|=16,r=l=!0)}let c=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==u||(this.paddingTop=c,this.paddingBottom=u,a|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(s.lineWrapping&&(l=!0),this.editorWidth=t.scrollDOM.clientWidth,a|=16);let f=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=f&&(this.scrollAnchorHeight=-1,this.scrollTop=f),this.scrolledToBottom=Os(t.scrollDOM);let d=(this.printing?wo:vo)(e,this.paddingTop),p=d.top-this.pixelViewport.top,m=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget&&!function(t){let e=t.getBoundingClientRect(),i=t.ownerDocument.defaultView||window;return e.left<i.innerWidth&&e.right>0&&e.top<i.innerHeight&&e.bottom>0}(t.dom))return 0;let v=o.width;if(this.contentDOMWidth==v&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=o.width,this.editorHeight=t.scrollDOM.clientHeight,a|=16),l){let e=t.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(e)&&(r=!0),r||s.lineWrapping&&Math.abs(v-this.contentDOMWidth)>s.charWidth){let{lineHeight:i,charWidth:o,textHeight:l}=t.docView.measureTextSize();r=i>0&&s.refresh(n,i,o,l,Math.max(5,v/o),e),r&&(t.docView.minWidth=0,a|=16)}p>0&&m>0?h=Math.max(p,m):p<0&&m<0&&(h=Math.min(p,m)),to();for(let i of this.viewports){let n=i.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(i);this.heightMap=(r?oo.empty().applyChanges(this.stateDeco,Ft.empty,this.heightOracle,[new Rn(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(s,0,r,new io(i.from,n))}Zr&&(a|=2)}let w=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(2&a&&(a|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),a|=this.updateForViewport()),(2&a||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(r?[]:this.lineGaps,t)),a|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),a}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),s=this.heightMap,n=this.heightOracle,{visibleTop:r,visibleBottom:o}=this,l=new ko(s.lineAt(r-1e3*i,no.ByHeight,n,0,0).from,s.lineAt(o+1e3*(1-i),no.ByHeight,n,0,0).to);if(e){let{head:t}=e.range;if(t<l.from||t>l.to){let i,r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=s.lineAt(t,no.ByPos,n,0,0);i="center"==e.y?(o.top+o.bottom)/2-r/2:"start"==e.y||"nearest"==e.y&&t<l.from?o.top:o.bottom-r,l=new ko(s.lineAt(i-500,no.ByHeight,n,0,0).from,s.lineAt(i+r+500,no.ByHeight,n,0,0).to)}}return l}mapViewport(t,e){let i=e.mapPos(t.from,-1),s=e.mapPos(t.to,1);return new ko(this.heightMap.lineAt(i,no.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(s,no.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},i=0){if(!this.inView)return!0;let{top:s}=this.heightMap.lineAt(t,no.ByPos,this.heightOracle,0,0),{bottom:n}=this.heightMap.lineAt(e,no.ByPos,this.heightOracle,0,0),{visibleTop:r,visibleBottom:o}=this;return(0==t||s<=r-Math.max(10,Math.min(-i,250)))&&(e==this.state.doc.length||n>=o+Math.max(10,Math.min(i,250)))&&s>r-2e3&&n<o+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let i=[];for(let s of t)e.touchesRange(s.from,s.to)||i.push(new bo(e.mapPos(s.from),e.mapPos(s.to),s.size,s.displaySize));return i}ensureLineGaps(t,e){let i=this.heightOracle.lineWrapping,s=i?1e4:2e3,n=s>>1,r=s<<1;if(this.defaultTextDirection!=Ps.LTR&&!i)return[];let o=[],l=(s,r,a,h)=>{if(r-s<n)return;let c=this.state.selection.main,u=[c.from];c.empty||u.push(c.to);for(let t of u)if(t>s&&t<r)return l(s,t-10,a,h),void l(t+10,r,a,h);let f=function(t,e){for(let i of t)if(e(i))return i;return}(t,t=>t.from>=a.from&&t.to<=a.to&&Math.abs(t.from-s)<n&&Math.abs(t.to-r)<n&&!u.some(e=>t.from<e&&t.to>e));if(!f){if(r<a.to&&e&&i&&e.visibleRanges.some(t=>t.from<=r&&t.to>=r)){let t=e.moveToLineBoundary(ue.cursor(r),!1,!0).head;t>s&&(r=t)}let t=this.gapSize(a,s,r,h);f=new bo(s,r,t,i||t<2e6?t:2e6)}o.push(f)},a=e=>{if(e.length<r||e.type!=es.Text)return;let n=function(t,e,i){let s=[],n=t,r=0;hi.spans(i,t,e,{span(){},point(t,e){t>n&&(s.push({from:n,to:t}),r+=t-n),n=e}},20),n<e&&(s.push({from:n,to:e}),r+=e-n);return{total:r,ranges:s}}(e.from,e.to,this.stateDeco);if(n.total<r)return;let o,a,h=this.scrollTarget?this.scrollTarget.range.head:null;if(i){let t,i,r=s/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=h){let s=Co(n,h),o=((this.visibleBottom-this.visibleTop)/2+r)/e.height;t=s-o,i=s+o}else t=(this.visibleTop-e.top-r)/e.height,i=(this.visibleBottom-e.top+r)/e.height;o=So(n,t),a=So(n,i)}else{let i=n.total*this.heightOracle.charWidth,r=s*this.heightOracle.charWidth,l=0;if(i>2e6)for(let i of t)i.from>=e.from&&i.from<e.to&&i.size!=i.displaySize&&i.from*this.heightOracle.charWidth+l<this.pixelViewport.left&&(l=i.size-i.displaySize);let c,u,f=this.pixelViewport.left+l,d=this.pixelViewport.right+l;if(null!=h){let t=Co(n,h),e=((d-f)/2+r)/i;c=t-e,u=t+e}else c=(f-r)/i,u=(d+r)/i;o=So(n,c),a=So(n,u)}o>e.from&&l(e.from,o,e,n),a<e.to&&l(a,e.to,e,n)};for(let t of this.viewportLines)Array.isArray(t.type)?t.type.forEach(a):a(t);return o}gapSize(t,e,i,s){let n=Co(s,i)-Co(s,e);return this.heightOracle.lineWrapping?t.height*n:s.total*this.heightOracle.charWidth*n}updateLineGaps(t){bo.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=is.set(t.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(t){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let i=[];hi.spans(e,this.viewport.from,this.viewport.to,{span(t,e){i.push({from:t,to:e})},point(){}},20);let s=0;if(i.length!=this.visibleRanges.length)s=12;else for(let e=0;e<i.length&&!(8&s);e++){let n=this.visibleRanges[e],r=i[e];n.from==r.from&&n.to==r.to||(s|=4,t&&t.mapPos(n.from,-1)==r.from&&t.mapPos(n.to,1)==r.to||(s|=8))}return this.visibleRanges=i,s}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find(e=>e.from<=t&&e.to>=t)||To(this.heightMap.lineAt(t,no.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(e=>e.top<=t&&e.bottom>=t)||To(this.heightMap.lineAt(this.scaler.fromDOM(t),no.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return To(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class ko{constructor(t,e){this.from=t,this.to=e}}function So({total:t,ranges:e},i){if(i<=0)return e[0].from;if(i>=1)return e[e.length-1].to;let s=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:n}=e[t],r=n-i;if(s<=r)return i+s;s-=r}}function Co(t,e){let i=0;for(let{from:s,to:n}of t.ranges){if(e<=n){i+=e-s;break}i+=n-s}return i/t.total}const Ao={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};function Mo(t){let e=t.facet(xn).filter(t=>"function"!=typeof t),i=t.facet(Sn).filter(t=>"function"!=typeof t);return i.length&&e.push(hi.join(i)),e}class Oo{constructor(t,e,i){let s=0,n=0,r=0;this.viewports=i.map(({from:i,to:n})=>{let r=e.lineAt(i,no.ByPos,t,0,0).top,o=e.lineAt(n,no.ByPos,t,0,0).bottom;return s+=o-r,{from:i,to:n,top:r,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-s)/(e.height-s);for(let t of this.viewports)t.domTop=r+(t.top-n)*this.scale,r=t.domBottom=t.domTop+(t.bottom-t.top),n=t.bottom}toDOM(t){for(let e=0,i=0,s=0;;e++){let n=e<this.viewports.length?this.viewports[e]:null;if(!n||t<n.top)return s+(t-i)*this.scale;if(t<=n.bottom)return n.domTop+(t-n.top);i=n.bottom,s=n.domBottom}}fromDOM(t){for(let e=0,i=0,s=0;;e++){let n=e<this.viewports.length?this.viewports[e]:null;if(!n||t<n.domTop)return i+(t-s)/this.scale;if(t<=n.domBottom)return n.top+(t-n.domTop);i=n.bottom,s=n.domBottom}}eq(t){return t instanceof Oo&&(this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,i)=>e.from==t.viewports[i].from&&e.to==t.viewports[i].to))}}function To(t,e){if(1==e.scale)return t;let i=e.toDOM(t.top),s=e.toDOM(t.bottom);return new so(t.from,t.length,i,s-i,Array.isArray(t._content)?t._content.map(t=>To(t,e)):t._content)}const Do=pe.define({combine:t=>t.join(" ")}),Ro=pe.define({combine:t=>t.indexOf(!0)>-1}),Po=Mi.newName(),Bo=Mi.newName(),Eo=Mi.newName(),Lo={"&light":"."+Bo,"&dark":"."+Eo};function No(t,e,i){return new Mi(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]}):t+" "+e})}const Io=No("."+Po,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Lo),Wo={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Vo=Qi.ie&&Qi.ie_version<=11;class Ho{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new xs,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver(e=>{for(let t of e)this.queue.push(t);(Qi.ie&&Qi.ie_version<=11||Qi.ios&&t.composing)&&e.some(t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():this.flush()}),!window.EditContext||!Qi.android||!1===t.constructor.EDIT_CONTEXT||Qi.chrome&&Qi.chrome_version<126||(this.editContext=new qo(t),t.state.facet(pn)&&(t.contentDOM.editContext=this.editContext.editContext)),Vo&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some((e,i)=>e!=t[i]))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(pn)?i.root.activeElement!=this.dom:!us(this.dom,s))return;let n=s.anchorNode&&i.docView.tile.nearest(s.anchorNode);n&&n.isWidget()&&n.widget.ignoreEvent(t)?e||(this.selectionChanged=!1):(Qi.ie&&Qi.ie_version<=11||Qi.android&&Qi.chrome)&&!i.state.selection.main.empty&&s.focusNode&&ds(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=hs(t.root);if(!e)return!1;let i=Qi.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return zo(t,i)}let i=null;function s(t){t.preventDefault(),t.stopImmediatePropagation(),i=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",s,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",s,!0),i?zo(t,i):null}(this.view,e)||e;if(!i||this.selectionRange.eq(i))return!1;let s=us(this.dom,i);return s&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let i=e.focusNode,s=e.focusOffset;if(!i||e.anchorNode!=i||e.anchorOffset!=s)return!1;for(s=Math.min(s,vs(i));;)if(s){if(1!=i.nodeType)return!1;let t=i.childNodes[s-1];"false"==t.contentEditable?s--:(i=t,s=vs(i))}else{if(i==t)return!0;s=ps(i),i=i.parentNode}}(this.dom,i)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(i),s&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let i=this.dom;i;)if(1==i.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==i?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Wo),Vo&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Vo&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var i;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;if(t){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&Ms(this.dom,t.key,t.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null===(i=this.delayedAndroidKey)||void 0===i?void 0:i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,i=-1,s=!1;for(let n of t){let t=this.readMutation(n);t&&(t.typeOver&&(s=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:s}}readChange(){let{from:t,to:e,typeOver:i}=this.processRecords(),s=this.selectionChanged&&us(this.dom,this.selectionRange);if(t<0&&!s)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let n=new xr(this.view,t,e,i);return this.view.docView.domChanged={newSel:n.newSel?n.newSel.main:null},n}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let i=this.view.state,s=Sr(this.view,e);return this.view.state==i&&(e.domChanged||e.newSel&&!Mr(this.view.state.selection,e.newSel.main))&&this.view.update([]),s}readMutation(t){let e=this.view.docView.tile.nearest(t.target);if(!e||e.isWidget())return null;if(e.markDirty("attributes"==t.type),"childList"==t.type){let i=Fo(e,t.previousSibling||t.target.previousSibling,-1),s=Fo(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:s?e.posBefore(s):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(pn)!=t.state.facet(pn)&&(t.view.contentDOM.editContext=t.state.facet(pn)?this.editContext.editContext:null))}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Fo(t,e,i){for(;e;){let s=En.get(e);if(s&&s.parent==t)return s;let n=e.parentNode;e=n!=t.dom?n:i>0?e.nextSibling:e.previousSibling}return null}function zo(t,e){let i=e.startContainer,s=e.startOffset,n=e.endContainer,r=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return ds(o.node,o.offset,n,r)&&([i,s,n,r]=[n,r,i,s]),{anchorNode:i,anchorOffset:s,focusNode:n,focusOffset:r}}class qo{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=i=>{let s=t.state.selection.main,{anchor:n,head:r}=s,o=this.toEditorPos(i.updateRangeStart),l=this.toEditorPos(i.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:o,drifted:!1});let a=l-o>i.text.length;o==this.from&&n<this.from?o=n:l==this.to&&n>this.to&&(l=n);let h=Ar(t.state.sliceDoc(o,l),i.text,(a?s.from:s.to)-o,a?"end":null);if(!h){let e=ue.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));return void(Mr(e,s)||t.dispatch({selection:e,userEvent:"select"}))}let c={from:h.from+o,to:h.toA+o,insert:Ft.of(i.text.slice(h.from,h.toB).split("\n"))};if((Qi.mac||Qi.android)&&c.from==r-1&&/^\. ?$/.test(i.text)&&"off"==t.contentDOM.getAttribute("autocorrect")&&(c={from:o,to:l,insert:Ft.of([i.text.replace("."," ")])}),this.pendingContextChange=c,!t.state.readOnly){let e=this.to-this.from+(c.to-c.from+c.insert.length);Cr(t,c,ue.single(this.toEditorPos(i.selectionStart,e),this.toEditorPos(i.selectionEnd,e)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)),c.from<c.to&&!c.insert.length&&t.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(e.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(e.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let s=[],n=null;for(let e=this.toEditorPos(i.rangeStart),r=this.toEditorPos(i.rangeEnd);e<r;e++){let i=t.coordsForChar(e);n=i&&new DOMRect(i.left,i.top,i.right-i.left,i.bottom-i.top)||n||new DOMRect,s.push(n)}e.updateCharacterBounds(i.rangeStart,s)},this.handlers.textformatupdate=e=>{let i=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,s=t.underlineThickness;if(!/none/i.test(e)&&!/none/i.test(s)){let n=this.toEditorPos(t.rangeStart),r=this.toEditorPos(t.rangeEnd);if(n<r){let t=`text-decoration: underline ${/^[a-z]/.test(e)?e+" ":"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${/thin/i.test(s)?1:2}px`;i.push(is.mark({attributes:{style:t}}).range(n,r))}}}t.dispatch({effects:fn.of(is.set(i))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=hs(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,i=!1,s=this.pendingContextChange;return t.changes.iterChanges((n,r,o,l,a)=>{if(i)return;let h=a.length-(r-n);if(s&&r>=s.to){if(s.from==n&&s.to==r&&s.insert.eq(a))return s=this.pendingContextChange=null,e+=h,void(this.to+=h);s=null,this.revertPending(t.state)}if(n+=e,(r+=e)<=this.from)this.from+=h,this.to+=h;else if(n<this.to){if(n<this.from||r>this.to||this.to-this.from+a.length>3e4)return void(i=!0);this.editContext.updateText(this.toContextPos(n),this.toContextPos(r),a.toString()),this.to+=h}e+=h}),s&&!i&&this.revertPending(t.state),!i}update(t){let e=this.pendingContextChange,i=t.startState.selection.main;this.composing&&(this.composing.drifted||!t.changes.touchesRange(i.from,i.to)&&t.transactions.some(t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),s=this.toContextPos(e.head);this.editContext.selectionStart==i&&this.editContext.selectionEnd==s||this.editContext.updateSelection(i,s)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>3e4)}toEditorPos(t,e=this.to-this.from){t=Math.min(t,e);let i=this.composing;return i&&i.drifted?i.editorBase+(t-i.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class _o{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:i}=t;this.dispatchTransactions=t.dispatchTransactions||i&&(t=>t.forEach(t=>i(t,this)))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new xo(t.state||ii.create(t)),t.scrollTo&&t.scrollTo.is(un)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(gn).map(t=>new wn(t));for(let t of this.plugins)t.update(this);this.observer=new Ho(this),this.inputState=new Or(this),this.inputState.ensureHandlers(this.plugins),this.docView=new ir(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...t){let e=1==t.length&&t[0]instanceof je?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,s=!1,n=this.state;for(let e of t){if(e.startState!=n)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");n=e.state}if(this.destroyed)return void(this.viewState.state=n);let r=this.hasFocus,o=0,l=null;t.some(t=>t.annotation(Qr))?(this.inputState.notifiedFocused=r,o=1):r!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=r,l=Yr(n,r),l||(o=1));let a=this.observer.delayedAndroidKey,h=null;if(a?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(n.doc)||!this.state.selection.eq(n.selection))&&(h=null)):this.observer.clear(),n.facet(ii.phrases)!=this.state.facet(ii.phrases))return this.setState(n);e=Pn.create(this,n,t),e.flags|=o;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new cn(t.empty?t:ue.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(un)&&(c=t.value.clip(this.state))}this.viewState.update(e,c),this.bidiCache=Ko.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(Dn)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some(t=>t.isUserEvent("select.pointer")))}finally{this.updateState=0}if(e.startState.facet(Do)!=e.state.facet(Do)&&(this.viewState.mustMeasureContent=!0),(i||s||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),i&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(en))try{t(e)}catch(t){dn(this.state,t,"update listener")}(l||h)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),h&&!Sr(this,h)&&a.force&&Ms(this.contentDOM,a.key,a.keyCode)})}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new xo(t),this.plugins=t.facet(gn).map(t=>new wn(t)),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new ir(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(gn),i=t.state.facet(gn);if(e!=i){let s=[];for(let n of i){let i=e.indexOf(n);if(i<0)s.push(new wn(n));else{let e=this.plugins[i];e.mustUpdate=t,s.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=s,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t<this.plugins.length;t++)this.plugins[t].update(this);e!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let e=t.value;if(e&&e.docViewUpdate)try{e.docViewUpdate(this)}catch(t){dn(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,i=this.scrollDOM,s=i.scrollTop*this.scaleY,{scrollAnchorPos:n,scrollAnchorHeight:r}=this.viewState;Math.abs(s-this.viewState.scrollTop)>1&&(r=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(r<0)if(Os(i))n=-1,r=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(s);n=t.from,r=t.top}this.updateState=1;let o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&o||([this.measureRequests,l]=[l,this.measureRequests]);let a=l.map(t=>{try{return t.read(this)}catch(t){return dn(this.state,t),jo}}),h=Pn.create(this,this.state,[]),c=!1;h.flags|=o,e?e.flags|=o:e=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),c=this.docView.update(h),c&&this.docViewUpdate());for(let t=0;t<l.length;t++)if(a[t]!=jo)try{let e=l[t];e.write&&e.write(a[t],this)}catch(t){dn(this.state,t)}if(c&&this.docView.updateSelection(!0),!h.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,r=-1;continue}{let t=(n<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(n).top)-r;if(t>1||t<-1){s+=t,i.scrollTop=s/this.scaleY,r=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(en))t(e)}get themeClasses(){return Po+" "+(this.state.facet(Ro)?Eo:Bo)+" "+this.state.facet(Do)}updateAttrs(){let t=Uo(this,bn,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(pn)?"true":"false",class:"cm-content",style:`${Qi.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),Uo(this,yn,e);let i=this.observer.ignore(()=>{let i=Ji(this.contentDOM,this.contentAttrs,e),s=Ji(this.dom,this.editorAttrs,t);return i||s});return this.editorAttrs=t,this.contentAttrs=e,i}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)if(t.is(_o.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Dn);let t=this.state.facet(_o.cspNonce);Mi.mount(this.root,this.styleModules.concat(Io).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key)return void(this.measureRequests[e]=t);this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.plugin!=t)&&this.pluginMap.set(t,e=this.plugins.find(e=>e.plugin==t)||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return fr(this,t,hr(this,t,e,i))}moveByGroup(t,e){return fr(this,t,hr(this,t,e,e=>function(t,e,i){let s=t.state.charCategorizer(e),n=s(i);return t=>{let e=s(t);return n==Je.Space&&(n=e),n==e}}(this,t.head,e)))}visualLineSide(t,e){let i=this.bidiSpans(t),s=this.textDirectionAt(t.from),n=i[e?i.length-1:0];return ue.cursor(n.side(e,s)+t.from,n.forward(!e,s)?1:-1)}moveToLineBoundary(t,e,i=!0){return function(t,e,i,s){let n=ar(t,e.head,e.assoc||-1),r=s&&n.type==es.Text&&(t.lineWrapping||n.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>n.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),s=t.textDirectionAt(n.from),o=t.posAtCoords({x:i==(s==Ps.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=o)return ue.cursor(o,i?-1:1)}return ue.cursor(i?n.to:n.from,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return fr(this,t,function(t,e,i,s){let n=e.head,r=i?1:-1;if(n==(i?t.state.doc.length:0))return ue.cursor(n,e.assoc);let o,l=e.goalColumn,a=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(n,(e.empty?e.assoc:0)||(i?1:-1)),c=t.documentTop;if(h)null==l&&(l=h.left-a.left),o=r<0?h.top:h.bottom;else{let e=t.viewState.lineBlockAt(n);null==l&&(l=Math.min(a.right-a.left,t.defaultCharacterWidth*(n-e.from))),o=(r<0?e.top:e.bottom)+c}let u=pr(t,{x:a.left+l,y:o+(null!=s?s:t.viewState.heightOracle.textHeight>>1)*r},!1,r);return ue.cursor(u.pos,u.assoc,void 0,l)}(this,t,e,i))}domAtPos(t,e=1){return this.docView.domAtPos(t,e)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){this.readMeasured();let i=pr(this,t,e);return i&&i.pos}posAndSideAtCoords(t,e=!0){return this.readMeasured(),pr(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let i=this.docView.coordsAt(t,e);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(t),n=this.bidiSpans(s);return ws(i,n[zs.find(n,t-s.from,-1,e)].dir==Ps.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(ln)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>$o)return Us(t.length);let e,i=this.textDirectionAt(t.from);for(let s of this.bidiCache)if(s.from==t.from&&s.dir==i&&(s.fresh||qs(s.isolates,e=Mn(this,t))))return s.order;e||(e=Mn(this,t));let s=Ks(t.text,i,e);return this.bidiCache.push(new Ko(t.from,t.to,i,e,!0,s)),s}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||Qi.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Cs(this.contentDOM),this.docView.updateSelection()})}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return un.of(new cn("number"==typeof t?ue.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,i=this.viewState.scrollAnchorAt(t);return un.of(new cn(ue.cursor(i.from),"start","start",i.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return vn.define(()=>({}),{eventHandlers:t})}static domEventObservers(t){return vn.define(()=>({}),{eventObservers:t})}static theme(t,e){let i=Mi.newName(),s=[Do.of(i),Dn.of(No(`.${i}`,t))];return e&&e.dark&&s.push(Ro.of(!0)),s}static baseTheme(t){return Oe.lowest(Dn.of(No("."+Po,t,Lo)))}static findFromDOM(t){var e;let i=t.querySelector(".cm-content"),s=i&&En.get(i)||En.get(t);return(null===(e=null==s?void 0:s.root)||void 0===e?void 0:e.view)||null}}_o.styleModule=Dn,_o.inputHandler=sn,_o.clipboardInputFilter=rn,_o.clipboardOutputFilter=on,_o.scrollHandler=hn,_o.focusChangeEffect=nn,_o.perLineTextDirection=ln,_o.exceptionSink=tn,_o.updateListener=en,_o.editable=pn,_o.mouseSelectionStyle=Zs,_o.dragMovesSelection=Js,_o.clickAddsSelectionRange=Xs,_o.decorations=xn,_o.blockWrappers=kn,_o.outerDecorations=Sn,_o.atomicRanges=Cn,_o.bidiIsolatedRanges=An,_o.scrollMargins=On,_o.darkTheme=Ro,_o.cspNonce=pe.define({combine:t=>t.length?t[0]:""}),_o.contentAttributes=yn,_o.editorAttributes=bn,_o.lineWrapping=_o.contentAttributes.of({class:"cm-lineWrapping"}),_o.announce=$e.define();const $o=4096,jo={};class Ko{constructor(t,e,i,s,n,r){this.from=t,this.to=e,this.dir=i,this.isolates=s,this.fresh=n,this.order=r}static update(t,e){if(e.empty&&!t.some(t=>t.fresh))return t;let i=[],s=t.length?t[t.length-1].dir:Ps.LTR;for(let n=Math.max(0,t.length-10);n<t.length;n++){let r=t[n];r.dir!=s||e.touchesRange(r.from,r.to)||i.push(new Ko(e.mapPos(r.from,1),e.mapPos(r.to,-1),r.dir,r.isolates,!1,r.order))}return i}}function Uo(t,e,i){for(let s=t.state.facet(e),n=s.length-1;n>=0;n--){let e=s[n],r="function"==typeof e?e(t):e;r&&Yi(r,i)}return i}const Qo=Qi.mac?"mac":Qi.windows?"win":Qi.linux?"linux":"key";function Yo(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const Go=Oe.default(_o.domEventHandlers({keydown:(t,e)=>sl(Zo(e.state),t,e,"editor")})),Xo=pe.define({enables:Go}),Jo=new WeakMap;function Zo(t){let e=t.facet(Xo),i=Jo.get(e);return i||Jo.set(e,i=function(t,e=Qo){let i=Object.create(null),s=Object.create(null),n=(t,e)=>{let i=s[t];if(null==i)s[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},r=(t,s,r,o,l)=>{var a,h;let c=i[t]||(i[t]=Object.create(null)),u=s.split(/ (?!$)/).map(t=>function(t,e){const i=t.split(/-(?!$)/);let s,n,r,o,l=i[i.length-1];"Space"==l&&(l=" ");for(let t=0;t<i.length-1;++t){const l=i[t];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))s=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);"mac"==e?o=!0:n=!0}}return s&&(l="Alt-"+l),n&&(l="Ctrl-"+l),o&&(l="Meta-"+l),r&&(l="Shift-"+l),l}(t,e));for(let e=1;e<u.length;e++){let i=u.slice(0,e).join(" ");n(i,!0),c[i]||(c[i]={preventDefault:!0,stopPropagation:!1,run:[e=>{let s=tl={view:e,prefix:i,scope:t};return setTimeout(()=>{tl==s&&(tl=null)},el),!0}]})}let f=u.join(" ");n(f,!1);let d=c[f]||(c[f]={preventDefault:!1,stopPropagation:!1,run:(null===(h=null===(a=c._any)||void 0===a?void 0:a.run)||void 0===h?void 0:h.slice())||[]});r&&d.run.push(r),o&&(d.preventDefault=!0),l&&(d.stopPropagation=!0)};for(let s of t){let t=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let e of t){let t=i[e]||(i[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:n}=s;for(let e in t)t[e].run.push(t=>n(t,il))}let n=s[e]||s.key;if(n)for(let e of t)r(e,n,s.run,s.preventDefault,s.stopPropagation),s.shift&&r(e,"Shift-"+n,s.shift,s.preventDefault,s.stopPropagation)}return i}(e.reduce((t,e)=>t.concat(e),[]))),i}let tl=null;const el=4e3;let il=null;function sl(t,e,i,s){il=e;let n=function(t){var e=!(Pi&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Bi&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?Ri:Di)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),r=Zt(Xt(n,0))==n.length&&" "!=n,o="",l=!1,a=!1,h=!1;tl&&tl.view==i&&tl.scope==s&&(o=tl.prefix+" ",Br.indexOf(e.keyCode)<0&&(a=!0,tl=null));let c,u,f=new Set,d=t=>{if(t){for(let e of t.run)if(!f.has(e)&&(f.add(e),e(i)))return t.stopPropagation&&(h=!0),!0;t.preventDefault&&(t.stopPropagation&&(h=!0),a=!0)}return!1},p=t[s];return p&&(d(p[o+Yo(n,e,!r)])?l=!0:!r||!(e.altKey||e.metaKey||e.ctrlKey)||Qi.windows&&e.ctrlKey&&e.altKey||Qi.mac&&e.altKey&&!e.ctrlKey&&!e.metaKey||!(c=Di[e.keyCode])||c==n?r&&e.shiftKey&&d(p[o+Yo(n,e,!0)])&&(l=!0):(d(p[o+Yo(c,e,!0)])||e.shiftKey&&(u=Ri[e.keyCode])!=n&&u!=c&&d(p[o+Yo(u,e,!1)]))&&(l=!0),!l&&d(p._any)&&(l=!0)),a&&(l=!0),l&&h&&e.stopPropagation(),il=null,l}class nl{constructor(t,e,i,s,n){this.className=t,this.left=e,this.top=i,this.width=s,this.height=n}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,i){if(i.empty){let s=t.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let n=rl(t);return[new nl(e,s.left-n.left,s.top-n.top,null,s.bottom-s.top)]}return function(t,e,i){if(i.to<=t.viewport.from||i.from>=t.viewport.to)return[];let s=Math.max(i.from,t.viewport.from),n=Math.min(i.to,t.viewport.to),r=t.textDirection==Ps.LTR,o=t.contentDOM,l=o.getBoundingClientRect(),a=rl(t),h=o.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),u=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=l.right-(c?parseInt(c.paddingRight):0),d=ar(t,s,1),p=ar(t,n,-1),m=d.type==es.Text?d:null,g=p.type==es.Text?p:null;m&&(t.lineWrapping||d.widgetLineBreaks)&&(m=ol(t,s,1,m));g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=ol(t,n,-1,g));if(m&&g&&m.from==g.from&&m.to==g.to)return w(b(i.from,i.to,m));{let e=m?b(i.from,null,m):y(d,!1),s=g?b(null,i.to,g):y(p,!0),n=[];return(m||d).to<(g||p).from-(m&&g?1:0)||d.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<s.top?n.push(v(u,e.bottom,f,s.top)):e.bottom<s.top&&t.elementAtHeight((e.bottom+s.top)/2).type==es.Text&&(e.bottom=s.top=(e.bottom+s.top)/2),w(e).concat(n).concat(w(s))}function v(t,i,s,n){return new nl(e,t-a.left,i-a.top,Math.max(0,s-t),n-i)}function w({top:t,bottom:e,horizontal:i}){let s=[];for(let n=0;n<i.length;n+=2)s.push(v(i[n],t,i[n+1],e));return s}function b(e,i,s){let n=1e9,o=-1e9,l=[];function a(e,i,a,h,c){let d=t.coordsAtPos(e,e==s.to?-2:2),p=t.coordsAtPos(a,a==s.from?2:-2);d&&p&&(n=Math.min(d.top,p.top,n),o=Math.max(d.bottom,p.bottom,o),c==Ps.LTR?l.push(r&&i?u:d.left,r&&h?f:p.right):l.push(!r&&h?u:p.left,!r&&i?f:d.right))}let h=null!=e?e:s.from,c=null!=i?i:s.to;for(let s of t.visibleRanges)if(s.to>h&&s.from<c)for(let n=Math.max(s.from,h),r=Math.min(s.to,c);;){let s=t.state.doc.lineAt(n);for(let o of t.bidiSpans(s)){let t=o.from+s.from,l=o.to+s.from;if(t>=r)break;l>n&&a(Math.max(t,n),null==e&&t<=h,Math.min(l,r),null==i&&l>=c,o.dir)}if(n=s.to+1,n>=r)break}return 0==l.length&&a(h,null==e,c,null==i,t.textDirection),{top:n,bottom:o,horizontal:l}}function y(t,e){let i=l.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(t,e,i)}}function rl(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Ps.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function ol(t,e,i,s){let n=t.coordsAtPos(e,2*i);if(!n)return s;let r=t.dom.getBoundingClientRect(),o=(n.top+n.bottom)/2,l=t.posAtCoords({x:r.left+1,y:o}),a=t.posAtCoords({x:r.right-1,y:o});return null==l||null==a?s:{from:Math.max(s.from,Math.min(l,a)),to:Math.min(s.to,Math.max(l,a))}}class ll{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(al)!=t.state.facet(al)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,i=t.facet(al);for(;e<i.length&&i[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;t==this.scaleX&&e==this.scaleY||(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some((t,e)=>{return i=t,s=this.drawn[e],!(i.constructor==s.constructor&&i.eq(s));var i,s})){let e=this.dom.firstChild,i=0;for(let s of t)s.update&&e&&s.constructor&&this.drawn[i].constructor&&s.update(e,this.drawn[i])?(e=e.nextSibling,i++):this.dom.insertBefore(s.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t,Qi.safari&&Qi.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const al=pe.define();function hl(t){return[vn.define(e=>new ll(e,t)),al.of(t)]}const cl=pe.define({combine:t=>si(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function ul(t={}){return[cl.of(t),dl,ml,gl,an.of(!0)]}function fl(t){return t.startState.facet(cl)!=t.state.facet(cl)}const dl=hl({above:!0,markers(t){let{state:e}=t,i=e.facet(cl),s=[];for(let n of e.selection.ranges){let r=n==e.selection.main;if(n.empty||i.drawRangeCursor){let e=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=n.empty?n:ue.cursor(n.head,n.head>n.anchor?-1:1);for(let n of nl.forRange(t,e,i))s.push(n)}}return s},update(t,e){t.transactions.some(t=>t.selection)&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let i=fl(t);return i&&pl(t.state,e),t.docChanged||t.selectionSet||i},mount(t,e){pl(e.state,t)},class:"cm-cursorLayer"});function pl(t,e){e.style.animationDuration=t.facet(cl).cursorBlinkRate+"ms"}const ml=hl({above:!1,markers:t=>t.state.selection.ranges.map(e=>e.empty?[]:nl.forRange(t,"cm-selectionBackground",e)).reduce((t,e)=>t.concat(e)),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||fl(t),class:"cm-selectionLayer"}),gl=Oe.highest(_o.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),vl=$e.define({map:(t,e)=>null==t?null:e.mapPos(t)}),wl=xe.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce((t,e)=>e.is(vl)?e.value:t,t))}),bl=vn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let i=t.state.field(wl);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(wl)!=i||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(wl),i=null!=e&&t.coordsAtPos(e);if(!i)return null;let s=t.scrollDOM.getBoundingClientRect();return{left:i.left-s.left+t.scrollDOM.scrollLeft*t.scaleX,top:i.top-s.top+t.scrollDOM.scrollTop*t.scaleY,height:i.bottom-i.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:i}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/i+"px",this.cursor.style.height=t.height/i+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(wl)!=t&&this.view.dispatch({effects:vl.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function yl(t,e,i,s,n){e.lastIndex=0;for(let r,o=t.iterRange(i,s),l=i;!o.next().done;l+=o.value.length)if(!o.lineBreak)for(;r=e.exec(o.value);)n(l+r.index,r)}class xl{constructor(t){const{regexp:e,decoration:i,decorate:s,boundary:n,maxLength:r=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,s)this.addMatch=(t,e,i,n)=>s(n,i,i+t[0].length,t,e);else if("function"==typeof i)this.addMatch=(t,e,s,n)=>{let r=i(t,e,s);r&&n(s,s+t[0].length,r)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,s,n)=>n(s,s+t[0].length,i)}this.boundary=n,this.maxLength=r}createDeco(t){let e=new ci,i=e.add.bind(e);for(let{from:e,to:s}of function(t,e){let i=t.visibleRanges;if(1==i.length&&i[0].from==t.viewport.from&&i[0].to==t.viewport.to)return i;let s=[];for(let{from:n,to:r}of i)n=Math.max(t.state.doc.lineAt(n).from,n-e),r=Math.min(t.state.doc.lineAt(r).to,r+e),s.length&&s[s.length-1].to>=n?s[s.length-1].to=r:s.push({from:n,to:r});return s}(t,this.maxLength))yl(t.state.doc,this.regexp,e,s,(e,s)=>this.addMatch(s,t,e,i));return e.finish()}updateDeco(t,e){let i=1e9,s=-1;return t.docChanged&&t.changes.iterChanges((e,n,r,o)=>{o>=t.view.viewport.from&&r<=t.view.viewport.to&&(i=Math.min(r,i),s=Math.max(o,s))}),t.viewportMoved||s-i>1e3?this.createDeco(t.view):s>-1?this.updateRange(t.view,e.map(t.changes),i,s):e}updateRange(t,e,i,s){for(let n of t.visibleRanges){let r=Math.max(n.from,i),o=Math.min(n.to,s);if(o>=r){let i=t.state.doc.lineAt(r),s=i.to<o?t.state.doc.lineAt(o):i,l=Math.max(n.from,i.from),a=Math.min(n.to,s.to);if(this.boundary){for(;r>i.from;r--)if(this.boundary.test(i.text[r-1-i.from])){l=r;break}for(;o<s.to;o++)if(this.boundary.test(s.text[o-s.from])){a=o;break}}let h,c=[],u=(t,e,i)=>c.push(i.range(t,e));if(i==s)for(this.regexp.lastIndex=l-i.from;(h=this.regexp.exec(i.text))&&h.index<a-i.from;)this.addMatch(h,t,h.index+i.from,u);else yl(t.state.doc,this.regexp,l,a,(e,i)=>this.addMatch(i,t,e,u));e=e.update({filterFrom:l,filterTo:a,filter:(t,e)=>t<l||e>a,add:c})}}return e}}const kl=null!=/x/.unicode?"gu":"g",Sl=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",kl),Cl={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Al=null;const Ml=pe.define({combine(t){let e=si(t,{render:null,specialChars:Sl,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==Al&&"undefined"!=typeof document&&document.body){let e=document.body.style;Al=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return Al||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,kl)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,kl)),e}});function Ol(t={}){return[Ml.of(t),Tl||(Tl=vn.fromClass(class{constructor(t){this.view=t,this.decorations=is.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Ml)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new xl({regexp:t.specialChars,decoration:(e,i,s)=>{let{doc:n}=i.state,r=Xt(e[0],0);if(9==r){let t=n.lineAt(s),e=i.state.tabSize,r=xi(t.text,e,s-t.from);return is.replace({widget:new Rl((e-r%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=is.replace({widget:new Dl(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Ml);t.startState.facet(Ml)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let Tl=null;class Dl extends ts{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"":String.fromCharCode(9216+t)}(this.code),i=t.state.phrase("Control character")+" "+(Cl[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,e);if(s)return s;let n=document.createElement("span");return n.textContent=e,n.title=i,n.setAttribute("aria-label",i),n.className="cm-specialChar",n}ignoreEvent(){return!1}}class Rl extends ts{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const Pl=is.line({class:"cm-activeLine"}),Bl=vn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let s of t.state.selection.ranges){let n=t.lineBlockAt(s.head);n.from>e&&(i.push(Pl.range(n.from)),e=n.from)}return is.set(i)}},{decorations:t=>t.decorations});const El=2e3;function Ll(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),s=t.state.doc.lineAt(i),n=i-s.from,r=n>El?-1:n==s.length?function(t,e){let i=t.coordsAtPos(t.viewport.from);return i?Math.round(Math.abs((i.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):xi(s.text,t.state.tabSize,i-s.from);return{line:s.number,col:r,off:n}}function Nl(t,e){let i=Ll(t,e),s=t.state.selection;return i?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(i.line).from),n=t.state.doc.lineAt(e);i={line:n.number,col:i.col,off:Math.min(i.off,n.length)},s=s.map(t.changes)}},get(e,n,r){let o=Ll(t,e);if(!o)return s;let l=function(t,e,i){let s=Math.min(e.line,i.line),n=Math.max(e.line,i.line),r=[];if(e.off>El||i.off>El||e.col<0||i.col<0){let o=Math.min(e.off,i.off),l=Math.max(e.off,i.off);for(let e=s;e<=n;e++){let i=t.doc.line(e);i.length<=l&&r.push(ue.range(i.from+o,i.to+l))}}else{let o=Math.min(e.col,i.col),l=Math.max(e.col,i.col);for(let e=s;e<=n;e++){let i=t.doc.line(e),s=ki(i.text,o,t.tabSize,!0);if(s<0)r.push(ue.cursor(i.to));else{let e=ki(i.text,l,t.tabSize);r.push(ue.range(i.from+s,i.from+e))}}}return r}(t.state,i,o);return l.length?r?ue.create(l.concat(s.ranges)):ue.create(l):s}}:null}function Il(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return _o.mouseSelectionStyle.of((t,i)=>e(i)?Nl(t,i):null)}const Wl={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Vl={style:"cursor: crosshair"};function Hl(t={}){let[e,i]=Wl[t.key||"Alt"],s=vn.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||i(t))},keyup(t){t.keyCode!=e&&i(t)||this.set(!1)},mousemove(t){this.set(i(t))}}});return[s,_o.contentAttributes.of(t=>{var e;return(null===(e=t.plugin(s))||void 0===e?void 0:e.isDown)?Vl:null})]}const Fl="-10000px";class zl{constructor(t,e,i,s){this.facet=e,this.createTooltipView=i,this.removeTooltipView=s,this.input=t.state.facet(e),this.tooltips=this.input.filter(t=>t);let n=null;this.tooltipViews=this.tooltips.map(t=>n=i(t,n))}update(t,e){var i;let s=t.state.facet(this.facet),n=s.filter(t=>t);if(s===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let r=[],o=e?[]:null;for(let i=0;i<n.length;i++){let s=n[i],l=-1;if(s){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==s.create&&(l=t)}if(l<0)r[i]=this.createTooltipView(s,i?r[i-1]:null),o&&(o[i]=!!s.above);else{let s=r[i]=this.tooltipViews[l];o&&(o[i]=e[l]),s.update&&s.update(t)}}}for(let t of this.tooltipViews)r.indexOf(t)<0&&(this.removeTooltipView(t),null===(i=t.destroy)||void 0===i||i.call(t));return e&&(o.forEach((t,i)=>e[i]=t),e.length=o.length),this.input=s,this.tooltips=n,this.tooltipViews=r,!0}}function ql(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const _l=pe.define({combine:t=>{var e,i,s;return{position:Qi.ios?"absolute":(null===(e=t.find(t=>t.position))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find(t=>t.parent))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(s=t.find(t=>t.tooltipSpace))||void 0===s?void 0:s.tooltipSpace)||ql}}}),$l=new WeakMap,jl=vn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(_l);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new zl(t,Yl,(t,e)=>this.createTooltip(t,e),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let i=e||t.geometryChanged,s=t.state.facet(_l);if(s.position!=this.position&&!this.madeAbsolute){this.position=s.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(s.parent!=this.parent){this.parent&&this.container.remove(),this.parent=s.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t,e){let i=t.create(this.view),s=e?e.dom:null;if(i.dom.classList.add("cm-tooltip"),t.arrow&&!i.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",i.dom.appendChild(t)}return i.dom.style.position=this.position,i.dom.style.top=Fl,i.dom.style.left="0px",this.container.insertBefore(i.dom,s),i.mount&&i.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(i.dom),i}destroy(){var t,e,i;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(i=this.intersectionObserver)||void 0===i||i.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,i=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(Qi.safari){let e=t.getBoundingClientRect();i=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}else i=!!t.offsetParent&&t.offsetParent!=this.container.ownerDocument.body}if(i||"absolute"==this.position)if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(t=i.width/this.parent.offsetWidth,e=i.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let s=this.view.scrollDOM.getBoundingClientRect(),n=Tn(this.view);return{visible:{left:s.left+n.left,top:s.top+n.top,right:s.right-n.right,bottom:s.bottom-n.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)}),size:this.manager.tooltipViews.map(({dom:t})=>t.getBoundingClientRect()),space:this.view.state.facet(_l).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{visible:i,space:s,scaleX:n,scaleY:r}=t,o=[];for(let l=0;l<this.manager.tooltips.length;l++){let a=this.manager.tooltips[l],h=this.manager.tooltipViews[l],{dom:c}=h,u=t.pos[l],f=t.size[l];if(!u||!1!==a.clip&&(u.bottom<=Math.max(i.top,s.top)||u.top>=Math.min(i.bottom,s.bottom)||u.right<Math.max(i.left,s.left)-.1||u.left>Math.min(i.right,s.right)+.1)){c.style.top=Fl;continue}let d=a.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,m=f.right-f.left,g=null!==(e=$l.get(h))&&void 0!==e?e:f.bottom-f.top,v=h.offset||Ql,w=this.view.textDirection==Ps.LTR,b=f.width>s.right-s.left?w?s.left:s.right-f.width:w?Math.max(s.left,Math.min(u.left-(d?14:0)+v.x,s.right-m)):Math.min(Math.max(s.left,u.left-m+(d?14:0)-v.x),s.right-m),y=this.above[l];!a.strictSide&&(y?u.top-g-p-v.y<s.top:u.bottom+g+p+v.y>s.bottom)&&y==s.bottom-u.bottom>u.top-s.top&&(y=this.above[l]=!y);let x=(y?u.top-s.top:s.bottom-u.bottom)-p;if(x<g&&!1!==h.resize){if(x<this.view.defaultLineHeight){c.style.top=Fl;continue}$l.set(h,g),c.style.height=(g=x)/r+"px"}else c.style.height&&(c.style.height="");let k=y?u.top-g-p-v.y:u.bottom+p+v.y,S=b+m;if(!0!==h.overlap)for(let t of o)t.left<S&&t.right>b&&t.top<k+g&&t.bottom>k&&(k=y?t.top-g-2-p:t.bottom+p+2);if("absolute"==this.position?(c.style.top=(k-t.parent.top)/r+"px",Kl(c,(b-t.parent.left)/n)):(c.style.top=k/r+"px",Kl(c,b/n)),d){let t=u.left+(w?v.x:-v.x)-(b+14-7);d.style.left=t/n+"px"}!0!==h.overlap&&o.push({left:b,top:k,right:S,bottom:k+g}),c.classList.toggle("cm-tooltip-above",y),c.classList.toggle("cm-tooltip-below",!y),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Fl}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Kl(t,e){let i=parseInt(t.style.left,10);(isNaN(i)||Math.abs(e-i)>1)&&(t.style.left=e+"px")}const Ul=_o.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Ql={x:0,y:0},Yl=pe.define({enables:[jl,Ul]}),Gl=pe.define({combine:t=>t.reduce((t,e)=>t.concat(e),[])});class Xl{static create(t){return new Xl(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new zl(t,Gl,(t,e)=>this.createHostedView(t,e),t=>t.dom.remove())}createHostedView(t,e){let i=t.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let i of this.manager.tooltipViews){let s=i[t];if(void 0!==s)if(void 0===e)e=s;else if(e!==s)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Jl=Yl.compute([Gl],t=>{let e=t.facet(Gl);return 0===e.length?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos})),create:Xl.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Zl{constructor(t,e,i,s,n){this.view=t,this.source=e,this.field=i,this.setHover=s,this.hoverTime=n,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,i=t.docView.tile.nearest(e.target);if(!i)return;let s,n=1;if(i.isWidget())s=i.posAtStart;else{if(s=t.posAtCoords(e),null==s)return;let i=t.coordsAtPos(s);if(!i||e.y<i.top||e.y>i.bottom||e.x<i.left-t.defaultCharacterWidth||e.x>i.right+t.defaultCharacterWidth)return;let r=t.bidiSpans(t.state.doc.lineAt(s)).find(t=>t.from<=s&&t.to>=s),o=r&&r.dir==Ps.RTL?-1:1;n=e.x<i.left?-o:o}let r=this.source(t,s,n);if(null==r?void 0:r.then){let e=this.pending={pos:s};r.then(i=>{this.pending==e&&(this.pending=null,!i||Array.isArray(i)&&!i.length||t.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])}))},e=>dn(t.state,e,"hover tooltip"))}else!r||Array.isArray(r)&&!r.length||t.dispatch({effects:this.setHover.of(Array.isArray(r)?r:[r])})}get tooltip(){let t=this.view.plugin(jl),e=t?t.manager.tooltips.findIndex(t=>t.create==Xl.create):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,i;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:s,tooltip:n}=this;if(s.length&&n&&!function(t,e){let i,{left:s,right:n,top:r,bottom:o}=t.getBoundingClientRect();if(i=t.querySelector(".cm-tooltip-arrow")){let t=i.getBoundingClientRect();r=Math.min(t.top,r),o=Math.max(t.bottom,o)}return e.clientX>=s-ta&&e.clientX<=n+ta&&e.clientY>=r-ta&&e.clientY<=o+ta}(n.dom,t)||this.pending){let{pos:n}=s[0]||this.pending,r=null!==(i=null===(e=s[0])||void 0===e?void 0:e.end)&&void 0!==i?i:n;(n==r?this.view.posAtCoords(this.lastMove)==n:function(t,e,i,s,n){let r=t.scrollDOM.getBoundingClientRect(),o=t.documentTop+t.documentPadding.top+t.contentHeight;if(r.left>s||r.right<s||r.top>n||Math.min(r.bottom,o)<n)return!1;let l=t.posAtCoords({x:s,y:n},!1);return l>=e&&l<=i}(this.view,n,r,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=i=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const ta=4;function ea(t,e={}){let i=$e.define(),s=xe.define({create:()=>[],update(t,s){if(t.length&&(e.hideOnChange&&(s.docChanged||s.selection)?t=[]:e.hideOn&&(t=t.filter(t=>!e.hideOn(s,t))),s.docChanged)){let e=[];for(let i of t){let t=s.changes.mapPos(i.pos,-1,ee.TrackDel);if(null!=t){let n=Object.assign(Object.create(null),i);n.pos=t,null!=n.end&&(n.end=s.changes.mapPos(n.end)),e.push(n)}}t=e}for(let e of s.effects)e.is(i)&&(t=e.value),e.is(sa)&&(t=[]);return t},provide:t=>Gl.from(t)});return{active:s,extension:[s,vn.define(n=>new Zl(n,t,s,i,e.hoverTime||300)),Jl]}}function ia(t,e){let i=t.plugin(jl);if(!i)return null;let s=i.manager.tooltips.indexOf(e);return s<0?null:i.manager.tooltipViews[s]}const sa=$e.define();const na=pe.define({combine(t){let e,i;for(let s of t)e=e||s.topContainer,i=i||s.bottomContainer;return{topContainer:e,bottomContainer:i}}});function ra(t,e){let i=t.plugin(oa),s=i?i.specs.indexOf(e):-1;return s>-1?i.panels[s]:null}const oa=vn.fromClass(class{constructor(t){this.input=t.state.facet(ha),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(e=>e(t));let e=t.state.facet(na);this.top=new la(t,!0,e.topContainer),this.bottom=new la(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(na);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new la(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new la(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(ha);if(i!=this.input){let e=i.filter(t=>t),s=[],n=[],r=[],o=[];for(let i of e){let e,l=this.specs.indexOf(i);l<0?(e=i(t.view),o.push(e)):(e=this.panels[l],e.update&&e.update(t)),s.push(e),(e.top?n:r).push(e)}this.specs=e,this.panels=s,this.top.sync(n),this.bottom.sync(r);for(let t of o)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>_o.scrollMargins.of(e=>{let i=e.plugin(t);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}})});class la{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=aa(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=aa(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function aa(t){let e=t.nextSibling;return t.remove(),e}const ha=pe.define({enables:oa});function ca(t,e){let i,s=new Promise(t=>i=t),n=t=>function(t,e,i){let s=e.content?e.content(t,()=>o(null)):null;if(!s){if(s=Ni("form"),e.input){let t=Ni("input",e.input);/^(text|password|number|email|tel|url)$/.test(t.type)&&t.classList.add("cm-textfield"),t.name||(t.name="input"),s.appendChild(Ni("label",(e.label||"")+": ",t))}else s.appendChild(document.createTextNode(e.label||""));s.appendChild(document.createTextNode(" ")),s.appendChild(Ni("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let n="FORM"==s.nodeName?[s]:s.querySelectorAll("form");for(let t=0;t<n.length;t++){let e=n[t];e.addEventListener("keydown",t=>{27==t.keyCode?(t.preventDefault(),o(null)):13==t.keyCode&&(t.preventDefault(),o(e))}),e.addEventListener("submit",t=>{t.preventDefault(),o(e)})}let r=Ni("div",s,Ni("button",{onclick:()=>o(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(r.className=e.class);function o(e){r.contains(r.ownerDocument.activeElement)&&t.focus(),i(e)}return r.classList.add("cm-dialog"),{dom:r,top:e.top,mount:()=>{if(e.focus){let t;t="string"==typeof e.focus?s.querySelector(e.focus):s.querySelector("input")||s.querySelector("button"),t&&"select"in t?t.select():t&&"focus"in t&&t.focus()}}}}(t,e,i);t.state.field(ua,!1)?t.dispatch({effects:fa.of(n)}):t.dispatch({effects:$e.appendConfig.of(ua.init(()=>[n]))});let r=da.of(n);return{close:r,result:s.then(e=>((t.win.queueMicrotask||(e=>t.win.setTimeout(e,10)))(()=>{t.state.field(ua).indexOf(n)>-1&&t.dispatch({effects:r})}),e))}}const ua=xe.define({create:()=>[],update(t,e){for(let i of e.effects)i.is(fa)?t=[i.value].concat(t):i.is(da)&&(t=t.filter(t=>t!=i.value));return t},provide:t=>ha.computeN([t],e=>e.field(t))}),fa=$e.define(),da=$e.define();class pa extends ni{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}pa.prototype.elementClass="",pa.prototype.toDOM=void 0,pa.prototype.mapMode=ee.TrackBefore,pa.prototype.startSide=pa.prototype.endSide=-1,pa.prototype.point=!0;const ma=pe.define(),ga=pe.define(),va={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>hi.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},wa=pe.define();function ba(t){return[xa(),wa.of({...va,...t})]}const ya=pe.define({combine:t=>t.some(t=>t)});function xa(t){let e=[ka];return t&&!1===t.fixed&&e.push(ya.of(!0)),e}const ka=vn.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(wa).map(e=>new Ma(t,e)),this.fixed=!t.state.facet(ya);for(let t of this.gutters)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,s=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(s<.8*(i.to-i.from))}if(t.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(ya)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let i=hi.iter(this.view.state.facet(ma),this.view.viewport.from),s=[],n=this.gutters.map(t=>new Aa(t,this.view.viewport,-this.view.documentPadding.top));for(let t of this.view.viewportLineBlocks)if(s.length&&(s=[]),Array.isArray(t.type)){let e=!0;for(let r of t.type)if(r.type==es.Text&&e){Ca(i,s,r.from);for(let t of n)t.line(this.view,r,s);e=!1}else if(r.widget)for(let t of n)t.widget(this.view,r)}else if(t.type==es.Text){Ca(i,s,t.from);for(let e of n)e.line(this.view,t,s)}else if(t.widget)for(let e of n)e.widget(this.view,t);for(let t of n)t.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(wa),i=t.state.facet(wa),s=t.docChanged||t.heightChanged||t.viewportChanged||!hi.eq(t.startState.facet(ma),t.state.facet(ma),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let e of this.gutters)e.update(t)&&(s=!0);else{s=!0;let n=[];for(let s of i){let i=e.indexOf(s);i<0?n.push(new Ma(this.view,s)):(this.gutters[i].update(t),n.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),n.indexOf(t)<0&&t.destroy();for(let t of n)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.gutters=n}return s}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>_o.scrollMargins.of(e=>{let i=e.plugin(t);if(!i||0==i.gutters.length||!i.fixed)return null;let s=i.dom.offsetWidth*e.scaleX,n=i.domAfter?i.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Ps.LTR?{left:s,right:n}:{right:s,left:n}})});function Sa(t){return Array.isArray(t)?t:[t]}function Ca(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class Aa{constructor(t,e,i){this.gutter=t,this.height=i,this.i=0,this.cursor=hi.iter(t.markers,e.from)}addElement(t,e,i){let{gutter:s}=this,n=(e.top-this.height)/t.scaleY,r=e.height/t.scaleY;if(this.i==s.elements.length){let e=new Oa(t,r,n,i);s.elements.push(e),s.dom.appendChild(e.dom)}else s.elements[this.i].update(t,r,n,i);this.height=e.bottom,this.i++}line(t,e,i){let s=[];Ca(this.cursor,s,e.from),i.length&&(s=s.concat(i));let n=this.gutter.config.lineMarker(t,e,s);n&&s.unshift(n);let r=this.gutter;(0!=s.length||r.config.renderEmptyElements)&&this.addElement(t,e,s)}widget(t,e){let i=this.gutter.config.widgetMarker(t,e.widget,e),s=i?[i]:null;for(let i of t.state.facet(ga)){let n=i(t,e.widget,e);n&&(s||(s=[])).push(n)}s&&this.addElement(t,e,s)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class Ma{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,s=>{let n,r=s.target;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let t=r.getBoundingClientRect();n=(t.top+t.bottom)/2}else n=s.clientY;let o=t.lineBlockAtHeight(n-t.documentTop);e.domEventHandlers[i](t,o,s)&&s.preventDefault()});this.markers=Sa(e.markers(t)),e.initialSpacer&&(this.spacer=new Oa(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Sa(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!hi.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class Oa{constructor(t,e,i,s){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,i,s)}update(t,e,i,s){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].compare(e[i]))return!1;return!0}(this.markers,s)||this.setMarkers(t,s)}setMarkers(t,e){let i="cm-gutterElement",s=this.dom.firstChild;for(let n=0,r=0;;){let o=r,l=n<e.length?e[n++]:null,a=!1;if(l){let t=l.elementClass;t&&(i+=" "+t);for(let t=r;t<this.markers.length;t++)if(this.markers[t].compare(l)){o=t,a=!0;break}}else o=this.markers.length;for(;r<o;){let t=this.markers[r++];if(t.toDOM){t.destroy(s);let e=s.nextSibling;s.remove(),s=e}}if(!l)break;l.toDOM&&(a?s=s.nextSibling:this.dom.insertBefore(l.toDOM(t),s)),a&&r++}this.dom.className=i,this.markers=e}destroy(){this.setMarkers(null,[])}}const Ta=pe.define(),Da=pe.define(),Ra=pe.define({combine:t=>si(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let t in e){let s=i[t],n=e[t];i[t]=s?(t,e,i)=>s(t,e,i)||n(t,e,i):n}return i}})});class Pa extends pa{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Ba(t,e){return t.state.facet(Ra).formatNumber(e,t.state)}const Ea=wa.compute([Ra],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Ta),lineMarker:(t,e,i)=>i.some(t=>t.toDOM)?null:new Pa(Ba(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,i)=>{for(let s of t.state.facet(Da)){let n=s(t,e,i);if(n)return n}return null},lineMarkerChange:t=>t.startState.facet(Ra)!=t.state.facet(Ra),initialSpacer:t=>new Pa(Ba(t,Na(t.state.doc.lines))),updateSpacer(t,e){let i=Ba(e.view,Na(e.view.state.doc.lines));return i==t.number?t:new Pa(i)},domEventHandlers:t.facet(Ra).domEventHandlers,side:"before"}));function La(t={}){return[Ra.of(t),xa(),Ea]}function Na(t){let e=9;for(;e<t;)e=10*e+9;return e}const Ia=new class extends pa{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Wa=ma.compute(["selection"],t=>{let e=[],i=-1;for(let s of t.selection.ranges){let n=t.doc.lineAt(s.head).from;n>i&&(i=n,e.push(Ia.range(n)))}return hi.of(e)});var Va;const Ha=new s;function Fa(t){return pe.define({combine:t?e=>e.concat(t):void 0})}const za=new s;class qa{constructor(t,e,i=[],s=""){this.data=t,this.name=s,ii.prototype.hasOwnProperty("tree")||Object.defineProperty(ii.prototype,"tree",{get(){return ja(this)}}),this.parser=e,this.extension=[th.of(this),ii.languageData.of((t,e,i)=>{let s=_a(t,e,i),n=s.type.prop(Ha);if(!n)return[];let r=t.facet(n),o=s.type.prop(za);if(o){let n=s.resolve(e-s.from,i);for(let e of o)if(e.test(n,t)){let i=t.facet(e.facet);return"replace"==e.type?i:i.concat(r)}}return r})].concat(i)}isActiveAt(t,e,i=-1){return _a(t,e,i).type.prop(Ha)==this.data}findRegions(t){let e=t.facet(th);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],n=(t,e)=>{if(t.prop(Ha)==this.data)return void i.push({from:e,to:e+t.length});let r=t.prop(s.mounted);if(r){if(r.tree.prop(Ha)==this.data){if(r.overlay)for(let t of r.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(r.overlay){let t=i.length;if(n(r.tree,r.overlay[0].from+e),i.length>t)return}}for(let i=0;i<t.children.length;i++){let s=t.children[i];s instanceof u&&n(s,t.positions[i]+e)}};return n(ja(t),0),i}get allowsNesting(){return!0}}function _a(t,e,i){let s=t.facet(th),n=ja(t).topNode;if(!s||s.allowsNesting)for(let t=n;t;t=t.enter(e,i,c.ExcludeBuffers|c.EnterBracketed))t.type.isTop&&(n=t);return n}qa.setState=$e.define();class $a extends qa{constructor(t,e,i){super(t,e,[],i),this.parser=e}static define(t){let e=Fa(t.languageData);return new $a(e,t.parser.configure({props:[Ha.add(t=>t.isTop?e:void 0)]}),t.name)}configure(t,e){return new $a(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ja(t){let e=t.field(qa.state,!1);return e?e.tree:u.empty}class Ka{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let i=this.cursorPos-this.string.length;return t<i||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let Ua=null;class Qa{constructor(t,e,i=[],s,n,r,o,l){this.parser=t,this.state=e,this.fragments=i,this.tree=s,this.treeLen=n,this.viewport=r,this.skipped=o,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(t,e,i){return new Qa(t,e,[],u.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Ka(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=u.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let s=this.parse.advance();if(s){if(this.fragments=this.withoutTempSkipped(D.addTree(s,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(i=this.parse.stoppedAt)&&void 0!==i?i:this.state.doc.length,this.tree=s,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}})}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(D.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=Ua;Ua=this;try{return t()}finally{Ua=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Ya(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:s,treeLen:n,viewport:r,skipped:o}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,i,s,n)=>e.push({fromA:t,toA:i,fromB:s,toB:n})),i=D.applyChanges(i,e),s=u.empty,n=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){o=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),s=t.mapPos(e.to,-1);i<s&&o.push({from:i,to:s})}}}return new Qa(this.parser,e,i,s,n,r,o,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:i,to:s}=this.skipped[e];i<t.to&&s>t.from&&(this.fragments=Ya(this.fragments,i,s),this.skipped.splice(e--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends R{createParse(e,i,s){let n=s[0].from,r=s[s.length-1].to;return{parsedPos:n,advance(){let e=Ua;if(e){for(let t of s)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new u(o.none,[],[],r-n)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return Ua}}function Ya(t,e,i){return D.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class Ga{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new Ga(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=Qa.create(t.facet(th).parser,t,{from:0,to:e});return i.work(20,e)||i.takeTree(),new Ga(i)}}qa.state=xe.define({create:Ga.init,update(t,e){for(let t of e.effects)if(t.is(qa.setState))return t.value;return e.startState.facet(th)!=e.state.facet(th)?Ga.init(e.state):t.apply(e)}});let Xa=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(Xa=t=>{let e=-1,i=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const Ja="undefined"!=typeof navigator&&(null===(Va=navigator.scheduling)||void 0===Va?void 0:Va.isInputPending)?()=>navigator.scheduling.isInputPending():null,Za=vn.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(qa.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(qa.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=Xa(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:s}}=this.view,n=i.field(qa.state);if(n.tree==n.context.tree&&n.context.isDone(s+1e5))return;let r=Date.now()+Math.min(this.chunkBudget,100,t&&!Ja?Math.max(25,t.timeRemaining()-5):1e9),o=n.context.treeLen<s&&i.doc.length>s+1e3,l=n.context.work(()=>Ja&&Ja()||Date.now()>r,s+(o?0:1e5));this.chunkBudget-=Date.now()-e,(l||this.chunkBudget<=0)&&(n.context.takeTree(),this.view.dispatch({effects:qa.setState.of(new Ga(n.context))})),this.chunkBudget>0&&(!l||o)&&this.scheduleWork(),this.checkAsyncSchedule(n.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(t=>dn(this.view.state,t)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),th=pe.define({combine:t=>t.length?t[0]:null,enables:t=>[qa.state,Za,_o.contentAttributes.compute([t],e=>{let i=e.facet(t);return i&&i.name?{"data-language":i.name}:{}})]});class eh{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const ih=pe.define(),sh=pe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function nh(t){let e=t.facet(sh);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function rh(t,e){let i="",s=t.tabSize,n=t.facet(sh)[0];if("\t"==n){for(;e>=s;)i+="\t",e-=s;n=" "}for(let t=0;t<e;t++)i+=n;return i}function oh(t,e){t instanceof ii&&(t=new lh(t));for(let i of t.state.facet(ih)){let s=i(t,e);if(void 0!==s)return s}let i=ja(t.state);return i.length>=e?function(t,e,i){let s=e.resolveStack(i),n=e.resolveInner(i,-1).resolve(i,0).enterUnfinishedNodesBefore(i);if(n!=s.node){let t=[];for(let e=n;e&&!(e.from<s.node.from||e.to>s.node.to||e.from==s.node.from&&e.type==s.node.type);e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)s={node:t[e],next:s}}return hh(s,t,i)}(t,i,e):null}class lh{constructor(t,e={}){this.state=t,this.options=e,this.unit=nh(t)}lineAt(t,e=1){let i=this.state.doc.lineAt(t),{simulateBreak:s,simulateDoubleBreak:n}=this.options;return null!=s&&s>=i.from&&s<=i.to?n&&s==t?{text:"",from:t}:(e<0?s<t:s<=t)?{text:i.text.slice(s-i.from),from:s}:{text:i.text.slice(0,s-i.from),from:i.from}:i}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:i,from:s}=this.lineAt(t,e);return i.slice(t-s,Math.min(i.length,t+100-s))}column(t,e=1){let{text:i,from:s}=this.lineAt(t,e),n=this.countColumn(i,t-s),r=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return r>-1&&(n+=r-this.countColumn(i,i.search(/\S|$/))),n}countColumn(t,e=t.length){return xi(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:s}=this.lineAt(t,e),n=this.options.overrideIndentation;if(n){let t=n(s);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ah=new s;function hh(t,e,i){for(let s=t;s;s=s.next){let t=ch(s.node);if(t)return t(fh.create(e,i,s))}return 0}function ch(t){let e=t.type.prop(ah);if(e)return e;let i,n=t.firstChild;if(n&&(i=n.type.prop(s.closedBy))){let e=t.lastChild,s=e&&i.indexOf(e.name)>-1;return t=>ph(t,!0,1,void 0,s&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?uh:null}function uh(){return 0}class fh extends lh{constructor(t,e,i){super(t.state,t.options),this.base=t,this.pos=e,this.context=i}get node(){return this.context.node}static create(t,e,i){return new fh(t,e,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let i=t.resolve(e.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(dh(i,t))break;e=this.state.doc.lineAt(i.from)}return this.lineIndent(e.from)}continue(){return hh(this.context.next,this.base,this.pos)}}function dh(t,e){for(let i=e;i;i=i.parent)if(t==i)return!0;return!1}function ph(t,e,i,s,n){let r=t.textAfter,o=r.match(/^\s*/)[0].length,l=s&&r.slice(o,o+s.length)==s||n==t.pos+o,a=e?function(t){let e=t.node,i=e.childAfter(e.from),s=e.lastChild;if(!i)return null;let n=t.options.simulateBreak,r=t.state.doc.lineAt(i.from),o=null==n||n<=r.from?r.to:Math.min(r.to,n);for(let t=i.to;;){let n=e.childAfter(t);if(!n||n==s)return null;if(!n.type.isSkipped){if(n.from>=o)return null;let t=/^ */.exec(r.text.slice(i.to-r.from))[0].length;return{from:i.from,to:i.to+t}}t=n.to}}(t):null;return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*i)}function mh({except:t,units:e=1}={}){return i=>{let s=t&&t.test(i.textAfter);return i.baseIndent+(s?0:e*i.unit)}}const gh=pe.define(),vh=new s;function wh(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function bh(t,e,i){for(let s of t.facet(gh)){let n=s(t,e,i);if(n)return n}return function(t,e,i){let s=ja(t);if(s.length<i)return null;let n=null;for(let r=s.resolveStack(i,1);r;r=r.next){let o=r.node;if(o.to<=i||o.from>i)continue;if(n&&o.from<e)break;let l=o.type.prop(vh);if(l&&(o.to<s.length-50||s.length==t.doc.length||!wh(o))){let s=l(o,t);s&&s.from<=i&&s.from>=e&&s.to>i&&(n=s)}}return n}(t,e,i)}function yh(t,e){let i=e.mapPos(t.from,1),s=e.mapPos(t.to,-1);return i>=s?void 0:{from:i,to:s}}const xh=$e.define({map:yh}),kh=$e.define({map:yh});function Sh(t){let e=[];for(let{head:i}of t.state.selection.ranges)e.some(t=>t.from<=i&&t.to>=i)||e.push(t.lineBlockAt(i));return e}const Ch=xe.define({create:()=>is.none,update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((e,i)=>t=Ah(t,e,i)),t=t.map(e.changes);for(let i of e.effects)if(i.is(xh)&&!Oh(t,i.value.from,i.value.to)){let{preparePlaceholder:s}=e.state.facet(Bh),n=s?is.replace({widget:new Ih(s(e.state,i.value))}):Nh;t=t.update({add:[n.range(i.value.from,i.value.to)]})}else i.is(kh)&&(t=t.update({filter:(t,e)=>i.value.from!=t||i.value.to!=e,filterFrom:i.value.from,filterTo:i.value.to}));return e.selection&&(t=Ah(t,e.selection.main.head)),t},provide:t=>_o.decorations.from(t),toJSON(t,e){let i=[];return t.between(0,e.doc.length,(t,e)=>{i.push(t,e)}),i},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let i=0;i<t.length;){let s=t[i++],n=t[i++];if("number"!=typeof s||"number"!=typeof n)throw new RangeError("Invalid JSON for fold state");e.push(Nh.range(s,n))}return is.set(e,!0)}});function Ah(t,e,i=e){let s=!1;return t.between(e,i,(t,n)=>{t<i&&n>e&&(s=!0)}),s?t.update({filterFrom:e,filterTo:i,filter:(t,s)=>t>=i||s<=e}):t}function Mh(t,e,i){var s;let n=null;return null===(s=t.field(Ch,!1))||void 0===s||s.between(e,i,(t,e)=>{(!n||n.from>t)&&(n={from:t,to:e})}),n}function Oh(t,e,i){let s=!1;return t.between(e,e,(t,n)=>{t==e&&n==i&&(s=!0)}),s}function Th(t,e){return t.field(Ch,!1)?e:e.concat($e.appendConfig.of(Eh()))}function Dh(t,e,i=!0){let s=t.state.doc.lineAt(e.from).number,n=t.state.doc.lineAt(e.to).number;return _o.announce.of(`${t.state.phrase(i?"Folded lines":"Unfolded lines")} ${s} ${t.state.phrase("to")} ${n}.`)}const Rh=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of Sh(t)){let i=bh(t.state,e.from,e.to);if(i)return t.dispatch({effects:Th(t.state,[xh.of(i),Dh(t,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(Ch,!1))return!1;let e=[];for(let i of Sh(t)){let s=Mh(t.state,i.from,i.to);s&&e.push(kh.of(s),Dh(t,s,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,i=[];for(let s=0;s<e.doc.length;){let n=t.lineBlockAt(s),r=bh(e,n.from,n.to);r&&i.push(xh.of(r)),s=(r?t.lineBlockAt(r.to):n).to+1}return i.length&&t.dispatch({effects:Th(t.state,i)}),!!i.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(Ch,!1);if(!e||!e.size)return!1;let i=[];return e.between(0,t.state.doc.length,(t,e)=>{i.push(kh.of({from:t,to:e}))}),t.dispatch({effects:i}),!0}}],Ph={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Bh=pe.define({combine:t=>si(t,Ph)});function Eh(t){let e=[Ch,Fh];return t&&e.push(Bh.of(t)),e}function Lh(t,e){let{state:i}=t,s=i.facet(Bh),n=e=>{let i=t.lineBlockAt(t.posAtDOM(e.target)),s=Mh(t.state,i.from,i.to);s&&t.dispatch({effects:kh.of(s)}),e.preventDefault()};if(s.placeholderDOM)return s.placeholderDOM(t,n,e);let r=document.createElement("span");return r.textContent=s.placeholderText,r.setAttribute("aria-label",i.phrase("folded code")),r.title=i.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=n,r}const Nh=is.replace({widget:new class extends ts{toDOM(t){return Lh(t,null)}}});class Ih extends ts{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return Lh(t,this.value)}}const Wh={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Vh extends pa{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function Hh(t={}){let e={...Wh,...t},i=new Vh(e,!0),s=new Vh(e,!1),n=vn.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(th)!=t.state.facet(th)||t.startState.field(Ch,!1)!=t.state.field(Ch,!1)||ja(t.startState)!=ja(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new ci;for(let n of t.viewportLineBlocks){let r=Mh(t.state,n.from,n.to)?s:bh(t.state,n.from,n.to)?i:null;r&&e.add(n.from,n.from,r)}return e.finish()}}),{domEventHandlers:r}=e;return[n,ba({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(n))||void 0===e?void 0:e.markers)||hi.empty},initialSpacer:()=>new Vh(e,!1),domEventHandlers:{...r,click:(t,e,i)=>{if(r.click&&r.click(t,e,i))return!0;let s=Mh(t.state,e.from,e.to);if(s)return t.dispatch({effects:kh.of(s)}),!0;let n=bh(t.state,e.from,e.to);return!!n&&(t.dispatch({effects:xh.of(n)}),!0)}}}),Eh()]}const Fh=_o.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class zh{constructor(t,e){let i;function s(t){let e=Mi.newName();return(i||(i=Object.create(null)))["."+e]=t,e}this.specs=t;const n="string"==typeof e.all?e.all:e.all?s(e.all):void 0,r=e.scope;this.scope=r instanceof qa?t=>t.prop(Ha)==r.data:r?t=>t==r:void 0,this.style=at(t.map(t=>({tag:t.tag,class:t.class||s(Object.assign({},t,{tag:null}))})),{all:n}).style,this.module=i?new Mi(i):null,this.themeType=e.themeType}static define(t,e){return new zh(t,e||{})}}const qh=pe.define(),_h=pe.define({combine:t=>t.length?[t[0]]:null});function $h(t){let e=t.facet(qh);return e.length?e:t.facet(_h)}function jh(t,e){let i,s=[Uh];return t instanceof zh&&(t.module&&s.push(_o.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?s.push(_h.of(t)):i?s.push(qh.computeN([_o.darkTheme],e=>e.facet(_o.darkTheme)==("dark"==i)?[t]:[])):s.push(qh.of(t)),s}class Kh{constructor(t){this.markCache=Object.create(null),this.tree=ja(t.state),this.decorations=this.buildDeco(t,$h(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=ja(t.state),i=$h(t.state),s=i!=$h(t.startState),{viewport:n}=t.view,r=t.changes.mapPos(this.decoratedTo,1);e.length<n.to&&!s&&e.type==this.tree.type&&r>=n.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=r):(e!=this.tree||t.viewportChanged||s)&&(this.tree=e,this.decorations=this.buildDeco(t.view,i),this.decoratedTo=n.to)}buildDeco(t,e){if(!e||!this.tree.length)return is.none;let i=new ci;for(let{from:s,to:n}of t.visibleRanges)ht(this.tree,e,(t,e,s)=>{i.add(t,e,this.markCache[s]||(this.markCache[s]=is.mark({class:s})))},s,n);return i.finish()}}const Uh=Oe.high(vn.fromClass(Kh,{decorations:t=>t.decorations})),Qh=zh.define([{tag:Mt.meta,color:"#404740"},{tag:Mt.link,textDecoration:"underline"},{tag:Mt.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Mt.emphasis,fontStyle:"italic"},{tag:Mt.strong,fontWeight:"bold"},{tag:Mt.strikethrough,textDecoration:"line-through"},{tag:Mt.keyword,color:"#708"},{tag:[Mt.atom,Mt.bool,Mt.url,Mt.contentSeparator,Mt.labelName],color:"#219"},{tag:[Mt.literal,Mt.inserted],color:"#164"},{tag:[Mt.string,Mt.deleted],color:"#a11"},{tag:[Mt.regexp,Mt.escape,Mt.special(Mt.string)],color:"#e40"},{tag:Mt.definition(Mt.variableName),color:"#00f"},{tag:Mt.local(Mt.variableName),color:"#30a"},{tag:[Mt.typeName,Mt.namespace],color:"#085"},{tag:Mt.className,color:"#167"},{tag:[Mt.special(Mt.variableName),Mt.macroName],color:"#256"},{tag:Mt.definition(Mt.propertyName),color:"#00c"},{tag:Mt.comment,color:"#940"},{tag:Mt.invalid,color:"#f00"}]),Yh=_o.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Gh="()[]{}",Xh=pe.define({combine:t=>si(t,{afterCursor:!0,brackets:Gh,maxScanDistance:1e4,renderMatch:tc})}),Jh=is.mark({class:"cm-matchingBracket"}),Zh=is.mark({class:"cm-nonmatchingBracket"});function tc(t){let e=[],i=t.matched?Jh:Zh;return e.push(i.range(t.start.from,t.start.to)),t.end&&e.push(i.range(t.end.from,t.end.to)),e}const ec=xe.define({create:()=>is.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let i=[],s=e.state.facet(Xh);for(let t of e.state.selection.ranges){if(!t.empty)continue;let n=lc(e.state,t.head,-1,s)||t.head>0&&lc(e.state,t.head-1,1,s)||s.afterCursor&&(lc(e.state,t.head,1,s)||t.head<e.state.doc.length&&lc(e.state,t.head+1,-1,s));n&&(i=i.concat(s.renderMatch(n,e.state)))}return is.set(i,!0)},provide:t=>_o.decorations.from(t)}),ic=[ec,Yh];function sc(t={}){return[Xh.of(t),ic]}const nc=new s;function rc(t,e,i){let n=t.prop(e<0?s.openedBy:s.closedBy);if(n)return n;if(1==t.name.length){let s=i.indexOf(t.name);if(s>-1&&s%2==(e<0?1:0))return[i[s+e]]}return null}function oc(t){let e=t.type.prop(nc);return e?e(t.node):t}function lc(t,e,i,s={}){let n=s.maxScanDistance||1e4,r=s.brackets||Gh,o=ja(t),l=o.resolveInner(e,i);for(let s=l;s;s=s.parent){let n=rc(s.type,i,r);if(n&&s.from<s.to){let o=oc(s);if(o&&(i>0?e>=o.from&&e<o.to:e>o.from&&e<=o.to))return ac(t,e,i,s,o,n,r)}}return function(t,e,i,s,n,r,o){let l=i<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),a=o.indexOf(l);if(a<0||a%2==0!=i>0)return null;let h={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),u=0;for(let t=0;!c.next().done&&t<=r;){let r=c.value;i<0&&(t+=r.length);let l=e+t*i;for(let t=i>0?0:r.length-1,e=i>0?r.length:-1;t!=e;t+=i){let e=o.indexOf(r[t]);if(!(e<0||s.resolveInner(l+t,1).type!=n))if(e%2==0==i>0)u++;else{if(1==u)return{start:h,end:{from:l+t,to:l+t+1},matched:e>>1==a>>1};u--}}i>0&&(t+=r.length)}return c.done?{start:h,matched:!1}:null}(t,e,i,o,l.type,n,r)}function ac(t,e,i,s,n,r,o){let l=s.parent,a={from:n.from,to:n.to},h=0,c=null==l?void 0:l.cursor();if(c&&(i<0?c.childBefore(s.from):c.childAfter(s.to)))do{if(i<0?c.to<=s.from:c.from>=s.to){if(0==h&&r.indexOf(c.type.name)>-1&&c.from<c.to){let t=oc(c);return{start:a,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(rc(c.type,i,o))h++;else if(rc(c.type,-i,o)){if(0==h){let t=oc(c);return{start:a,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}h--}}}while(i<0?c.prevSibling():c.nextSibling());return{start:a,matched:!1}}const hc=Object.create(null),cc=[o.none],uc=[],fc=Object.create(null),dc=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])dc[t]=mc(hc,e);function pc(t,e){uc.indexOf(t)>-1||(uc.push(t),console.warn(e))}function mc(t,e){let i=[];for(let s of e.split(" ")){let e=[];for(let i of s.split(".")){let s=t[i]||Mt[i];s?"function"==typeof s?e.length?e=e.map(s):pc(i,`Modifier ${i} used at start of tag`):e.length?pc(i,`Tag ${i} used as modifier`):e=Array.isArray(s)?s:[s]:pc(i,`Unknown highlighting tag ${i}`)}for(let t of e)i.push(t)}if(!i.length)return 0;let s=e.replace(/ /g,"_"),n=s+" "+i.map(t=>t.id),r=fc[n];if(r)return r.id;let l=fc[n]=o.define({id:cc.length,name:s,props:[rt({[s]:i})]});return cc.push(l),l.id}Ps.RTL,Ps.LTR;const gc=$a.define({name:"json",parser:Tt.configure({props:[ah.add({Object:mh({except:/^\s*\}/}),Array:mh({except:/^\s*\]/})}),vh.add({"Object Array":function(t){let e=t.firstChild,i=t.lastChild;return e&&e.to<i.from?{from:e.to,to:i.type.isError?t.to:i.from}:null}})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});const vc="#e5c07b",wc="#e06c75",bc="#56b6c2",yc="#ffffff",xc="#abb2bf",kc="#7d8799",Sc="#61afef",Cc="#98c379",Ac="#d19a66",Mc="#c678dd",Oc="#21252b",Tc="#2c313a",Dc="#282c34",Rc="#353a42",Pc="#3E4451",Bc="#528bff",Ec=[_o.theme({"&":{color:xc,backgroundColor:Dc},".cm-content":{caretColor:Bc},".cm-cursor, .cm-dropCursor":{borderLeftColor:Bc},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Pc},".cm-panels":{backgroundColor:Oc,color:xc},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Dc,color:kc,border:"none"},".cm-activeLineGutter":{backgroundColor:Tc},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Rc},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Rc,borderBottomColor:Rc},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Tc,color:xc}}},{dark:!0}),jh(zh.define([{tag:Mt.keyword,color:Mc},{tag:[Mt.name,Mt.deleted,Mt.character,Mt.propertyName,Mt.macroName],color:wc},{tag:[Mt.function(Mt.variableName),Mt.labelName],color:Sc},{tag:[Mt.color,Mt.constant(Mt.name),Mt.standard(Mt.name)],color:Ac},{tag:[Mt.definition(Mt.name),Mt.separator],color:xc},{tag:[Mt.typeName,Mt.className,Mt.number,Mt.changed,Mt.annotation,Mt.modifier,Mt.self,Mt.namespace],color:vc},{tag:[Mt.operator,Mt.operatorKeyword,Mt.url,Mt.escape,Mt.regexp,Mt.link,Mt.special(Mt.string)],color:bc},{tag:[Mt.meta,Mt.comment],color:kc},{tag:Mt.strong,fontWeight:"bold"},{tag:Mt.emphasis,fontStyle:"italic"},{tag:Mt.strikethrough,textDecoration:"line-through"},{tag:Mt.link,color:kc,textDecoration:"underline"},{tag:Mt.heading,fontWeight:"bold",color:wc},{tag:[Mt.atom,Mt.bool,Mt.special(Mt.variableName)],color:Ac},{tag:[Mt.processingInstruction,Mt.string,Mt.inserted],color:Cc},{tag:Mt.invalid,color:yc}]))];function Lc(t,e){return({state:i,dispatch:s})=>{if(i.readOnly)return!1;let n=t(e,i);return!!n&&(s(i.update(n)),!0)}}const Nc=Lc(zc,0),Ic=Lc(Fc,0),Wc=Lc((t,e)=>Fc(t,e,function(t){let e=[];for(let i of t.selection.ranges){let s=t.doc.lineAt(i.from),n=i.to<=s.to?s:t.doc.lineAt(i.to);n.from>s.from&&n.from==i.to&&(n=i.to==s.to+1?s:t.doc.lineAt(i.to-1));let r=e.length-1;r>=0&&e[r].to>s.from?e[r].to=n.to:e.push({from:s.from+/^\s*/.exec(s.text)[0].length,to:n.to})}return e}(e)),0);function Vc(t,e){let i=t.languageDataAt("commentTokens",e,1);return i.length?i[0]:{}}const Hc=50;function Fc(t,e,i=e.selection.ranges){let s=i.map(t=>Vc(e,t.from).block);if(!s.every(t=>t))return null;let n=i.map((t,i)=>function(t,{open:e,close:i},s,n){let r,o,l=t.sliceDoc(s-Hc,s),a=t.sliceDoc(n,n+Hc),h=/\s*$/.exec(l)[0].length,c=/^\s*/.exec(a)[0].length,u=l.length-h;if(l.slice(u-e.length,u)==e&&a.slice(c,c+i.length)==i)return{open:{pos:s-h,margin:h&&1},close:{pos:n+c,margin:c&&1}};n-s<=2*Hc?r=o=t.sliceDoc(s,n):(r=t.sliceDoc(s,s+Hc),o=t.sliceDoc(n-Hc,n));let f=/^\s*/.exec(r)[0].length,d=/\s*$/.exec(o)[0].length,p=o.length-d-i.length;return r.slice(f,f+e.length)==e&&o.slice(p,p+i.length)==i?{open:{pos:s+f+e.length,margin:/\s/.test(r.charAt(f+e.length))?1:0},close:{pos:n-d-i.length,margin:/\s/.test(o.charAt(p-1))?1:0}}:null}(e,s[i],t.from,t.to));if(2!=t&&!n.every(t=>t))return{changes:e.changes(i.map((t,e)=>n[e]?[]:[{from:t.from,insert:s[e].open+" "},{from:t.to,insert:" "+s[e].close}]))};if(1!=t&&n.some(t=>t)){let t=[];for(let e,i=0;i<n.length;i++)if(e=n[i]){let n=s[i],{open:r,close:o}=e;t.push({from:r.pos-n.open.length,to:r.pos+r.margin},{from:o.pos-o.margin,to:o.pos+n.close.length})}return{changes:t}}return null}function zc(t,e,i=e.selection.ranges){let s=[],n=-1;t:for(let{from:t,to:r}of i){let i,o=s.length,l=1e9;for(let o=t;o<=r;){let a=e.doc.lineAt(o);if(null==i&&(i=Vc(e,a.from).line,!i))continue t;if(a.from>n&&(t==r||r>a.from)){n=a.from;let t=/^\s*/.exec(a.text)[0].length,e=t==a.length,r=a.text.slice(t,t+i.length)==i?t:-1;t<a.text.length&&t<l&&(l=t),s.push({line:a,comment:r,token:i,indent:t,empty:e,single:!1})}o=a.to+1}if(l<1e9)for(let t=o;t<s.length;t++)s[t].indent<s[t].line.text.length&&(s[t].indent=l);s.length==o+1&&(s[o].single=!0)}if(2!=t&&s.some(t=>t.comment<0&&(!t.empty||t.single))){let t=[];for(let{line:e,token:i,indent:n,empty:r,single:o}of s)!o&&r||t.push({from:e.from+n,insert:i+" "});let i=e.changes(t);return{changes:i,selection:e.selection.map(i,1)}}if(1!=t&&s.some(t=>t.comment>=0)){let t=[];for(let{line:e,comment:i,token:n}of s)if(i>=0){let s=e.from+i,r=s+n.length;" "==e.text[r-e.from]&&r++,t.push({from:s,to:r})}return{changes:t}}return null}const qc=ze.define(),_c=ze.define(),$c=pe.define(),jc=pe.define({combine:t=>si(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(i,s)=>t(i,s)||e(i,s)})}),Kc=xe.define({create:()=>hu.empty,update(t,e){let i=e.state.facet(jc),s=e.annotation(qc);if(s){let n=Zc.fromTransaction(e,s.selection),r=s.side,o=0==r?t.undone:t.done;return o=n?tu(o,o.length,i.minDepth,n):nu(o,e.startState.selection),new hu(0==r?s.rest:o,0==r?o:s.rest)}let n=e.annotation(_c);if("full"!=n&&"before"!=n||(t=t.isolate()),!1===e.annotation(je.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=Zc.fromTransaction(e),o=e.annotation(je.time),l=e.annotation(je.userEvent);return r?t=t.addChanges(r,o,l,i,e):e.selection&&(t=t.addSelection(e.startState.selection,o,l,i.newGroupDelay)),"full"!=n&&"after"!=n||(t=t.isolate()),t},toJSON:t=>({done:t.done.map(t=>t.toJSON()),undone:t.undone.map(t=>t.toJSON())}),fromJSON:t=>new hu(t.done.map(Zc.fromJSON),t.undone.map(Zc.fromJSON))});function Uc(t={}){return[Kc,jc.of(t),_o.domEventHandlers({beforeinput(t,e){let i="historyUndo"==t.inputType?Yc:"historyRedo"==t.inputType?Gc:null;return!!i&&(t.preventDefault(),i(e))}})]}function Qc(t,e){return function({state:i,dispatch:s}){if(!e&&i.readOnly)return!1;let n=i.field(Kc,!1);if(!n)return!1;let r=n.pop(t,i,e);return!!r&&(s(r),!0)}}const Yc=Qc(0,!1),Gc=Qc(1,!1),Xc=Qc(0,!0),Jc=Qc(1,!0);class Zc{constructor(t,e,i,s,n){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=s,this.selectionsAfter=n}setSelAfter(t){return new Zc(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(t=>t.toJSON())}}static fromJSON(t){return new Zc(t.changes&&se.fromJSON(t.changes),[],t.mapped&&ie.fromJSON(t.mapped),t.startSelection&&ue.fromJSON(t.startSelection),t.selectionsAfter.map(ue.fromJSON))}static fromTransaction(t,e){let i=iu;for(let e of t.startState.facet($c)){let s=e(t);s.length&&(i=i.concat(s))}return!i.length&&t.changes.empty?null:new Zc(t.changes.invert(t.startState.doc),i,void 0,e||t.startState.selection,iu)}static selection(t){return new Zc(void 0,iu,void 0,void 0,t)}}function tu(t,e,i,s){let n=e+1>i+20?e-i-1:0,r=t.slice(n,e);return r.push(s),r}function eu(t,e){return t.length?e.length?t.concat(e):t:e}const iu=[],su=200;function nu(t,e){if(t.length){let i=t[t.length-1],s=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-su));return s.length&&s[s.length-1].eq(e)?t:(s.push(e),tu(t,t.length-1,1e9,i.setSelAfter(s)))}return[Zc.selection([e])]}function ru(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function ou(t,e){if(!t.length)return t;let i=t.length,s=iu;for(;i;){let n=lu(t[i-1],e,s);if(n.changes&&!n.changes.empty||n.effects.length){let e=t.slice(0,i);return e[i-1]=n,e}e=n.mapped,i--,s=n.selectionsAfter}return s.length?[Zc.selection(s)]:iu}function lu(t,e,i){let s=eu(t.selectionsAfter.length?t.selectionsAfter.map(t=>t.map(e)):iu,i);if(!t.changes)return Zc.selection(s);let n=t.changes.map(e),r=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(r):r;return new Zc(n,$e.mapEffects(t.effects,e),o,t.startSelection.map(r),s)}const au=/^(input\.type|delete)($|\.)/;class hu{constructor(t,e,i=0,s=void 0){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=s}isolate(){return this.prevTime?new hu(this.done,this.undone):this}addChanges(t,e,i,s,n){let r=this.done,o=r[r.length-1];return r=o&&o.changes&&!o.changes.empty&&t.changes&&(!i||au.test(i))&&(!o.selectionsAfter.length&&e-this.prevTime<s.newGroupDelay&&s.joinToEvent(n,function(t,e){let i=[],s=!1;return t.iterChangedRanges((t,e)=>i.push(t,e)),e.iterChangedRanges((t,e,n,r)=>{for(let t=0;t<i.length;){let e=i[t++],o=i[t++];r>=e&&n<=o&&(s=!0)}}),s}(o.changes,t.changes))||"input.type.compose"==i)?tu(r,r.length-1,s.minDepth,new Zc(t.changes.compose(o.changes),eu($e.mapEffects(t.effects,o.changes),o.effects),o.mapped,o.startSelection,iu)):tu(r,r.length,s.minDepth,t),new hu(r,iu,e,i)}addSelection(t,e,i,s){let n=this.done.length?this.done[this.done.length-1].selectionsAfter:iu;return n.length>0&&e-this.prevTime<s&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&(r=n[n.length-1],o=t,r.ranges.length==o.ranges.length&&0===r.ranges.filter((t,e)=>t.empty!=o.ranges[e].empty).length)?this:new hu(nu(this.done,t),this.undone,e,i);var r,o}addMapping(t){return new hu(ou(this.done,t),ou(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let s=0==t?this.done:this.undone;if(0==s.length)return null;let n=s[s.length-1],r=n.selectionsAfter[0]||(n.startSelection?n.startSelection.map(n.changes.invertedDesc,1):e.selection);if(i&&n.selectionsAfter.length)return e.update({selection:n.selectionsAfter[n.selectionsAfter.length-1],annotations:qc.of({side:t,rest:ru(s),selection:r}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(n.changes){let i=1==s.length?iu:s.slice(0,s.length-1);return n.mapped&&(i=ou(i,n.mapped)),e.update({changes:n.changes,selection:n.startSelection,effects:n.effects,annotations:qc.of({side:t,rest:i,selection:r}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}hu.empty=new hu(iu,iu);const cu=[{key:"Mod-z",run:Yc,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Gc,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Gc,preventDefault:!0},{key:"Mod-u",run:Xc,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Jc,preventDefault:!0}];function uu(t,e){return ue.create(t.ranges.map(e),t.mainIndex)}function fu(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function du({state:t,dispatch:e},i){let s=uu(t.selection,i);return!s.eq(t.selection,!0)&&(e(fu(t,s)),!0)}function pu(t,e){return ue.cursor(e?t.to:t.from)}function mu(t,e){return du(t,i=>i.empty?t.moveByChar(i,e):pu(i,e))}function gu(t){return t.textDirectionAt(t.state.selection.main.head)==Ps.LTR}const vu=t=>mu(t,!gu(t)),wu=t=>mu(t,gu(t));function bu(t,e){return du(t,i=>i.empty?t.moveByGroup(i,e):pu(i,e))}"undefined"!=typeof Intl&&Intl.Segmenter;function yu(t,e,i){if(e.type.prop(i))return!0;let s=e.to-e.from;return s&&(s>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function xu(t,e,i){let n,r,o=ja(t).resolveInner(e.head),l=i?s.closedBy:s.openedBy;for(let s=e.head;;){let e=i?o.childAfter(s):o.childBefore(s);if(!e)break;yu(t,e,l)?o=e:s=i?e.to:e.from}return r=o.type.prop(l)&&(n=i?lc(t,o.from,1):lc(t,o.to,-1))&&n.matched?i?n.end.to:n.end.from:i?o.to:o.from,ue.cursor(r,i?-1:1)}function ku(t,e){return du(t,i=>{if(!i.empty)return pu(i,e);let s=t.moveVertically(i,e);return s.head!=i.head?s:t.moveToLineBoundary(i,e)})}const Su=t=>ku(t,!1),Cu=t=>ku(t,!0);function Au(t){let e,i=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,s=0,n=0;if(i){for(let e of t.state.facet(_o.scrollMargins)){let i=e(t);(null==i?void 0:i.top)&&(s=Math.max(null==i?void 0:i.top,s)),(null==i?void 0:i.bottom)&&(n=Math.max(null==i?void 0:i.bottom,n))}e=t.scrollDOM.clientHeight-s-n}else e=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:s,marginBottom:n,selfScroll:i,height:Math.max(t.defaultLineHeight,e-5)}}function Mu(t,e){let i,s=Au(t),{state:n}=t,r=uu(n.selection,i=>i.empty?t.moveVertically(i,e,s.height):pu(i,e));if(r.eq(n.selection))return!1;if(s.selfScroll){let e=t.coordsAtPos(n.selection.main.head),o=t.scrollDOM.getBoundingClientRect(),l=o.top+s.marginTop,a=o.bottom-s.marginBottom;e&&e.top>l&&e.bottom<a&&(i=_o.scrollIntoView(r.main.head,{y:"start",yMargin:e.top-l}))}return t.dispatch(fu(n,r),{effects:i}),!0}const Ou=t=>Mu(t,!1),Tu=t=>Mu(t,!0);function Du(t,e,i){let s=t.lineBlockAt(e.head),n=t.moveToLineBoundary(e,i);if(n.head==e.head&&n.head!=(i?s.to:s.from)&&(n=t.moveToLineBoundary(e,i,!1)),!i&&n.head==s.from&&s.length){let i=/^\s*/.exec(t.state.sliceDoc(s.from,Math.min(s.from+100,s.to)))[0].length;i&&e.head!=s.from+i&&(n=ue.cursor(s.from+i))}return n}function Ru(t,e,i){let s=!1,n=uu(t.selection,e=>{let n=lc(t,e.head,-1)||lc(t,e.head,1)||e.head>0&&lc(t,e.head-1,1)||e.head<t.doc.length&&lc(t,e.head+1,-1);if(!n||!n.end)return e;s=!0;let r=n.start.from==e.head?n.end.to:n.end.from;return i?ue.range(e.anchor,r):ue.cursor(r)});return!!s&&(e(fu(t,n)),!0)}function Pu(t,e){let i=uu(t.state.selection,t=>{let i=e(t);return ue.range(t.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return!i.eq(t.state.selection)&&(t.dispatch(fu(t.state,i)),!0)}function Bu(t,e){return Pu(t,i=>t.moveByChar(i,e))}const Eu=t=>Bu(t,!gu(t)),Lu=t=>Bu(t,gu(t));function Nu(t,e){return Pu(t,i=>t.moveByGroup(i,e))}function Iu(t,e){return Pu(t,i=>t.moveVertically(i,e))}const Wu=t=>Iu(t,!1),Vu=t=>Iu(t,!0);function Hu(t,e){return Pu(t,i=>t.moveVertically(i,e,Au(t).height))}const Fu=t=>Hu(t,!1),zu=t=>Hu(t,!0),qu=({state:t,dispatch:e})=>(e(fu(t,{anchor:0})),!0),_u=({state:t,dispatch:e})=>(e(fu(t,{anchor:t.doc.length})),!0),$u=({state:t,dispatch:e})=>(e(fu(t,{anchor:t.selection.main.anchor,head:0})),!0),ju=({state:t,dispatch:e})=>(e(fu(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function Ku(t,e){let{state:i}=t,s=i.selection,n=i.selection.ranges.slice();for(let s of i.selection.ranges){let r=i.doc.lineAt(s.head);if(e?r.to<t.state.doc.length:r.from>0)for(let i=s;;){let s=t.moveVertically(i,e);if(s.head<r.from||s.head>r.to){n.some(t=>t.head==s.head)||n.push(s);break}if(s.head==i.head)break;i=s}}return n.length!=s.ranges.length&&(t.dispatch(fu(i,ue.create(n,n.length-1))),!0)}function Uu(t,e){if(t.state.readOnly)return!1;let i="delete.selection",{state:s}=t,n=s.changeByRange(s=>{let{from:n,to:r}=s;if(n==r){let o=e(s);o<n?(i="delete.backward",o=Qu(t,o,!1)):o>n&&(i="delete.forward",o=Qu(t,o,!0)),n=Math.min(n,o),r=Math.max(r,o)}else n=Qu(t,n,!1),r=Qu(t,r,!0);return n==r?{range:s}:{changes:{from:n,to:r},range:ue.cursor(n,n<s.head?-1:1)}});return!n.changes.empty&&(t.dispatch(s.update(n,{scrollIntoView:!0,userEvent:i,effects:"delete.selection"==i?_o.announce.of(s.phrase("Selection deleted")):void 0})),!0)}function Qu(t,e,i){if(t instanceof _o)for(let s of t.state.facet(_o.atomicRanges).map(e=>e(t)))s.between(e,e,(t,s)=>{t<e&&s>e&&(e=i?s:t)});return e}const Yu=(t,e,i)=>Uu(t,s=>{let n,r,o=s.from,{state:l}=t,a=l.doc.lineAt(o);if(i&&!e&&o>a.from&&o<a.from+200&&!/[^ \t]/.test(n=a.text.slice(0,o-a.from))){if("\t"==n[n.length-1])return o-1;let t=xi(n,l.tabSize)%nh(l)||nh(l);for(let e=0;e<t&&" "==n[n.length-1-e];e++)o--;r=o}else r=Gt(a.text,o-a.from,e,e)+a.from,r==o&&a.number!=(e?l.doc.lines:1)?r+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(r-a.from,o-a.from))&&(r=Gt(a.text,r-a.from,!1,!1)+a.from);return r}),Gu=t=>Yu(t,!1,!0),Xu=t=>Yu(t,!0,!1),Ju=(t,e)=>Uu(t,i=>{let s=i.head,{state:n}=t,r=n.doc.lineAt(s),o=n.charCategorizer(s);for(let t=null;;){if(s==(e?r.to:r.from)){s==i.head&&r.number!=(e?n.doc.lines:1)&&(s+=e?1:-1);break}let l=Gt(r.text,s-r.from,e)+r.from,a=r.text.slice(Math.min(s,l)-r.from,Math.max(s,l)-r.from),h=o(a);if(null!=t&&h!=t)break;" "==a&&s==i.head||(t=h),s=l}return s}),Zu=t=>Ju(t,!1);function tf(t){let e=[],i=-1;for(let s of t.selection.ranges){let n=t.doc.lineAt(s.from),r=t.doc.lineAt(s.to);if(s.empty||s.to!=r.from||(r=t.doc.lineAt(s.to-1)),i>=n.number){let t=e[e.length-1];t.to=r.to,t.ranges.push(s)}else e.push({from:n.from,to:r.to,ranges:[s]});i=r.number+1}return e}function ef(t,e,i){if(t.readOnly)return!1;let s=[],n=[];for(let e of tf(t)){if(i?e.to==t.doc.length:0==e.from)continue;let r=t.doc.lineAt(i?e.to+1:e.from-1),o=r.length+1;if(i){s.push({from:e.to,to:r.to},{from:e.from,insert:r.text+t.lineBreak});for(let i of e.ranges)n.push(ue.range(Math.min(t.doc.length,i.anchor+o),Math.min(t.doc.length,i.head+o)))}else{s.push({from:r.from,to:e.from},{from:e.to,insert:t.lineBreak+r.text});for(let t of e.ranges)n.push(ue.range(t.anchor-o,t.head-o))}}return!!s.length&&(e(t.update({changes:s,scrollIntoView:!0,selection:ue.create(n,t.selection.mainIndex),userEvent:"move.line"})),!0)}function sf(t,e,i){if(t.readOnly)return!1;let s=[];for(let e of tf(t))i?s.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):s.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});let n=t.changes(s);return e(t.update({changes:n,selection:t.selection.map(n,i?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const nf=rf(!1);function rf(t){return({state:e,dispatch:i})=>{if(e.readOnly)return!1;let n=e.changeByRange(i=>{let{from:n,to:r}=i,o=e.doc.lineAt(n),l=!t&&n==r&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,n=ja(t).resolveInner(e),r=n.childBefore(e),o=n.childAfter(e);return r&&o&&r.to<=e&&o.from>=e&&(i=r.type.prop(s.closedBy))&&i.indexOf(o.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(o.from).from&&!/\S/.test(t.sliceDoc(r.to,o.from))?{from:r.to,to:o.from}:null}(e,n);t&&(n=r=(r<=o.to?o:e.doc.lineAt(r)).to);let a=new lh(e,{simulateBreak:n,simulateDoubleBreak:!!l}),h=oh(a,n);for(null==h&&(h=xi(/^\s*/.exec(e.doc.lineAt(n).text)[0],e.tabSize));r<o.to&&/\s/.test(o.text[r-o.from]);)r++;l?({from:n,to:r}=l):n>o.from&&n<o.from+100&&!/\S/.test(o.text.slice(0,n))&&(n=o.from);let c=["",rh(e,h)];return l&&c.push(rh(e,a.lineIndent(o.from,-1))),{changes:{from:n,to:r,insert:Ft.of(c)},range:ue.cursor(n+1+c[1].length)}});return i(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function of(t,e){let i=-1;return t.changeByRange(s=>{let n=[];for(let r=s.from;r<=s.to;){let o=t.doc.lineAt(r);o.number>i&&(s.empty||s.to>o.from)&&(e(o,n,s),i=o.number),r=o.to+1}let r=t.changes(n);return{changes:n,range:ue.range(r.mapPos(s.anchor,1),r.mapPos(s.head,1))}})}const lf=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(of(t,(e,i)=>{i.push({from:e.from,insert:t.facet(sh)})}),{userEvent:"input.indent"})),!0),af=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(of(t,(e,i)=>{let s=/^\s*/.exec(e.text)[0];if(!s)return;let n=xi(s,t.tabSize),r=0,o=rh(t,Math.max(0,n-nh(t)));for(;r<s.length&&r<o.length&&s.charCodeAt(r)==o.charCodeAt(r);)r++;i.push({from:e.from+r,to:e.from+s.length,insert:o.slice(r)})}),{userEvent:"delete.dedent"})),!0),hf=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>du(t,e=>xu(t.state,e,!gu(t))),shift:t=>Pu(t,e=>xu(t.state,e,!gu(t)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>du(t,e=>xu(t.state,e,gu(t))),shift:t=>Pu(t,e=>xu(t.state,e,gu(t)))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>ef(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>sf(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>ef(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>sf(t,e,!0)},{key:"Mod-Alt-ArrowUp",run:t=>Ku(t,!1)},{key:"Mod-Alt-ArrowDown",run:t=>Ku(t,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let i=t.selection,s=null;return i.ranges.length>1?s=ue.create([i.main]):i.main.empty||(s=ue.create([ue.cursor(i.main.head)])),!!s&&(e(fu(t,s)),!0)}},{key:"Mod-Enter",run:rf(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let i=tf(t).map(({from:e,to:i})=>ue.range(e,Math.min(i+1,t.doc.length)));return e(t.update({selection:ue.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let i=uu(t.selection,e=>{let i=ja(t),s=i.resolveStack(e.from,1);if(e.empty){let t=i.resolveStack(e.from,-1);t.node.from>=s.node.from&&t.node.to<=s.node.to&&(s=t)}for(let t=s;t;t=t.next){let{node:i}=t;if((i.from<e.from&&i.to>=e.to||i.to>e.to&&i.from<=e.from)&&t.next)return ue.range(i.to,i.from)}return e});return!i.eq(t.selection)&&(e(fu(t,i)),!0)},preventDefault:!0},{key:"Mod-[",run:af},{key:"Mod-]",run:lf},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Object.create(null),s=new lh(t,{overrideIndentation:t=>{let e=i[t];return null==e?-1:e}}),n=of(t,(e,n,r)=>{let o=oh(s,e.from);if(null==o)return;/\S/.test(e.text)||(o=0);let l=/^\s*/.exec(e.text)[0],a=rh(t,o);(l!=a||r.from<e.from+l.length)&&(i[e.from]=o,n.push({from:e.from,to:e.from+l.length,insert:a}))});return n.changes.empty||e(t.update(n,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,i=e.changes(tf(e).map(({from:t,to:i})=>(t>0?t--:i<e.doc.length&&i++,{from:t,to:i}))),s=uu(e.selection,e=>{let i;if(t.lineWrapping){let s=t.lineBlockAt(e.head),n=t.coordsAtPos(e.head,e.assoc||1);n&&(i=s.bottom+t.documentTop-n.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,i)}).map(i);return t.dispatch({changes:i,selection:s,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>Ru(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,i=e.doc.lineAt(e.selection.main.from),s=Vc(t.state,i.from);return s.line?Nc(t):!!s.block&&Wc(t)}},{key:"Alt-A",run:Ic},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:vu,shift:Eu,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>bu(t,!gu(t)),shift:t=>Nu(t,!gu(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>du(t,e=>Du(t,e,!gu(t))),shift:t=>Pu(t,e=>Du(t,e,!gu(t))),preventDefault:!0},{key:"ArrowRight",run:wu,shift:Lu,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>bu(t,gu(t)),shift:t=>Nu(t,gu(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>du(t,e=>Du(t,e,gu(t))),shift:t=>Pu(t,e=>Du(t,e,gu(t))),preventDefault:!0},{key:"ArrowUp",run:Su,shift:Wu,preventDefault:!0},{mac:"Cmd-ArrowUp",run:qu,shift:$u},{mac:"Ctrl-ArrowUp",run:Ou,shift:Fu},{key:"ArrowDown",run:Cu,shift:Vu,preventDefault:!0},{mac:"Cmd-ArrowDown",run:_u,shift:ju},{mac:"Ctrl-ArrowDown",run:Tu,shift:zu},{key:"PageUp",run:Ou,shift:Fu},{key:"PageDown",run:Tu,shift:zu},{key:"Home",run:t=>du(t,e=>Du(t,e,!1)),shift:t=>Pu(t,e=>Du(t,e,!1)),preventDefault:!0},{key:"Mod-Home",run:qu,shift:$u},{key:"End",run:t=>du(t,e=>Du(t,e,!0)),shift:t=>Pu(t,e=>Du(t,e,!0)),preventDefault:!0},{key:"Mod-End",run:_u,shift:ju},{key:"Enter",run:nf,shift:nf},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Gu,shift:Gu,preventDefault:!0},{key:"Delete",run:Xu,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Zu,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Ju(t,!0),preventDefault:!0},{mac:"Mod-Backspace",run:t=>Uu(t,e=>{let i=t.moveToLineBoundary(e,!1).head;return e.head>i?i:Math.max(0,e.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:t=>Uu(t,e=>{let i=t.moveToLineBoundary(e,!0).head;return e.head<i?i:Math.min(t.state.doc.length,e.head+1)}),preventDefault:!0}].concat([{key:"Ctrl-b",run:vu,shift:Eu,preventDefault:!0},{key:"Ctrl-f",run:wu,shift:Lu},{key:"Ctrl-p",run:Su,shift:Wu},{key:"Ctrl-n",run:Cu,shift:Vu},{key:"Ctrl-a",run:t=>du(t,e=>ue.cursor(t.lineBlockAt(e.head).from,1)),shift:t=>Pu(t,e=>ue.cursor(t.lineBlockAt(e.head).from))},{key:"Ctrl-e",run:t=>du(t,e=>ue.cursor(t.lineBlockAt(e.head).to,-1)),shift:t=>Pu(t,e=>ue.cursor(t.lineBlockAt(e.head).to))},{key:"Ctrl-d",run:Xu},{key:"Ctrl-h",run:Gu},{key:"Ctrl-k",run:t=>Uu(t,e=>{let i=t.lineBlockAt(e.head).to;return e.head<i?i:Math.min(t.state.doc.length,e.head+1)})},{key:"Ctrl-Alt-h",run:Zu},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:Ft.of(["",""])},range:ue.cursor(t.from)}));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange(e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,s=t.doc.lineAt(i),n=i==s.from?i-1:Gt(s.text,i-s.from,!1)+s.from,r=i==s.to?i+1:Gt(s.text,i-s.from,!0)+s.from;return{changes:{from:n,to:r,insert:t.doc.slice(i,r).append(t.doc.slice(n,i))},range:ue.cursor(r)}});return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Tu}].map(t=>({mac:t.key,run:t.run,shift:t.shift})))),cf="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class uf{constructor(t,e,i=0,s=t.length,n,r){this.test=r,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,s),this.bufferStart=i,this.normalize=n?t=>n(cf(t)):cf,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Xt(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=Jt(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=Zt(t);let s=this.normalize(e);if(s.length)for(let t=0,n=i;;t++){let r=s.charCodeAt(t),o=this.match(r,n,this.bufferPos+this.bufferStart);if(t==s.length-1){if(o)return this.value=o,this;break}n==i&&t<e.length&&e.charCodeAt(t)==r&&n++}}}match(t,e,i){let s=null;for(let e=0;e<this.matches.length;e+=2){let n=this.matches[e],r=!1;this.query.charCodeAt(n)==t&&(n==this.query.length-1?s={from:this.matches[e+1],to:i}:(this.matches[e]++,r=!0)),r||(this.matches.splice(e,2),e-=2)}return this.query.charCodeAt(0)==t&&(1==this.query.length?s={from:e,to:i}:this.matches.push(1,e)),s&&this.test&&!this.test(s.from,s.to,this.buffer,this.bufferStart)&&(s=null),s}}"undefined"!=typeof Symbol&&(uf.prototype[Symbol.iterator]=function(){return this});const ff={from:-1,to:-1,match:/.*/.exec("")},df="gm"+(null==/x/.unicode?"":"u");class pf{constructor(t,e,i,s=0,n=t.length){if(this.text=t,this.to=n,this.curLine="",this.done=!1,this.value=ff,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new vf(t,e,i,s,n);this.re=new RegExp(e,df+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.iter=t.iter();let r=t.lineAt(s);this.curLineStart=r.from,this.matchPos=wf(t,s),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,s=i+e[0].length;if(this.matchPos=wf(this.text,s+(i==s?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<s||i>this.value.to)&&(!this.test||this.test(i,s,e)))return this.value={from:i,to:s,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}const mf=new WeakMap;class gf{constructor(t,e){this.from=t,this.text=e}get to(){return this.from+this.text.length}static get(t,e,i){let s=mf.get(t);if(!s||s.from>=i||s.to<=e){let s=new gf(e,t.sliceString(e,i));return mf.set(t,s),s}if(s.from==e&&s.to==i)return s;let{text:n,from:r}=s;return r>e&&(n=t.sliceString(e,r)+n,r=e),s.to<i&&(n+=t.sliceString(s.to,i)),mf.set(t,new gf(r,n)),new gf(e,n.slice(e-r,i-r))}}class vf{constructor(t,e,i,s,n){this.text=t,this.to=n,this.done=!1,this.value=ff,this.matchPos=wf(t,s),this.re=new RegExp(e,df+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.flat=gf.get(t,s,this.chunkEnd(s+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,i=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,i,e)))return this.value={from:t,to:i,match:e},this.matchPos=wf(this.text,i+(t==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=gf.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function wf(t,e){if(e>=t.length)return e;let i,s=t.lineAt(e);for(;e<s.to&&(i=s.text.charCodeAt(e-s.from))>=56320&&i<57344;)e++;return e}"undefined"!=typeof Symbol&&(pf.prototype[Symbol.iterator]=vf.prototype[Symbol.iterator]=function(){return this});const bf={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},yf=pe.define({combine:t=>si(t,bf,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function xf(t){let e=[Mf,Af];return t&&e.push(yf.of(t)),e}const kf=is.mark({class:"cm-selectionMatch"}),Sf=is.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Cf(t,e,i,s){return!(0!=i&&t(e.sliceDoc(i-1,i))==Je.Word||s!=e.doc.length&&t(e.sliceDoc(s,s+1))==Je.Word)}const Af=vn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(yf),{state:i}=t,s=i.selection;if(s.ranges.length>1)return is.none;let n,r=s.main,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return is.none;let t=i.wordAt(r.head);if(!t)return is.none;o=i.charCategorizer(r.head),n=i.sliceDoc(t.from,t.to)}else{let t=r.to-r.from;if(t<e.minSelectionLength||t>200)return is.none;if(e.wholeWords){if(n=i.sliceDoc(r.from,r.to),o=i.charCategorizer(r.head),!Cf(o,i,r.from,r.to)||!function(t,e,i,s){return t(e.sliceDoc(i,i+1))==Je.Word&&t(e.sliceDoc(s-1,s))==Je.Word}(o,i,r.from,r.to))return is.none}else if(n=i.sliceDoc(r.from,r.to),!n)return is.none}let l=[];for(let s of t.visibleRanges){let t=new uf(i.doc,n,s.from,s.to);for(;!t.next().done;){let{from:s,to:n}=t.value;if((!o||Cf(o,i,s,n))&&(r.empty&&s<=r.from&&n>=r.to?l.push(Sf.range(s,n)):(s>=r.to||n<=r.from)&&l.push(kf.range(s,n)),l.length>e.maxMatches))return is.none}}return is.set(l)}},{decorations:t=>t.decorations}),Mf=_o.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const Of=pe.define({combine:t=>si(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new id(t),scrollToMatch:t=>_o.scrollIntoView(t)})});class Tf{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,df),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord,this.test=t.test}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord&&this.test==t.test}create(){return this.regexp?new Nf(this):new Pf(this)}getCursor(t,e=0,i){let s=t.doc?t:ii.create({doc:t});return null==i&&(i=s.doc.length),this.regexp?Bf(this,s,e,i):Rf(this,s,e,i)}}class Df{constructor(t){this.spec=t}}function Rf(t,e,i,s){let n;return t.wholeWord&&(n=function(t,e){return(i,s,n,r)=>((r>i||r+n.length<s)&&(r=Math.max(0,i-2),n=t.sliceString(r,Math.min(t.length,s+2))),!(e(Ef(n,i-r))==Je.Word&&e(Lf(n,i-r))==Je.Word||e(Lf(n,s-r))==Je.Word&&e(Ef(n,s-r))==Je.Word))}(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(n=function(t,e,i){return(s,n,r,o)=>{if(i&&!i(s,n,r,o))return!1;let l=s>=o&&n<=o+r.length?r.slice(s-o,n-o):e.doc.sliceString(s,n);return t(l,e,s,n)}}(t.test,e,n)),new uf(e.doc,t.unquoted,i,s,t.caseSensitive?void 0:t=>t.toLowerCase(),n)}class Pf extends Df{constructor(t){super(t)}nextMatch(t,e,i){let s=Rf(this.spec,t,i,t.doc.length).nextOverlapping();if(s.done){let i=Math.min(t.doc.length,e+this.spec.unquoted.length);s=Rf(this.spec,t,0,i).nextOverlapping()}return s.done||s.value.from==e&&s.value.to==i?null:s.value}prevMatchInRange(t,e,i){for(let s=i;;){let i=Math.max(e,s-1e4-this.spec.unquoted.length),n=Rf(this.spec,t,i,s),r=null;for(;!n.nextOverlapping().done;)r=n.value;if(r)return r;if(i==e)return null;s-=1e4}}prevMatch(t,e,i){let s=this.prevMatchInRange(t,0,e);return s||(s=this.prevMatchInRange(t,Math.max(0,i-this.spec.unquoted.length),t.doc.length)),!s||s.from==e&&s.to==i?null:s}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,e){let i=Rf(this.spec,t,0,t.doc.length),s=[];for(;!i.next().done;){if(s.length>=e)return null;s.push(i.value)}return s}highlight(t,e,i,s){let n=Rf(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!n.next().done;)s(n.value.from,n.value.to)}}function Bf(t,e,i,s){let n;var r;return t.wholeWord&&(r=e.charCategorizer(e.selection.main.head),n=(t,e,i)=>!i[0].length||(r(Ef(i.input,i.index))!=Je.Word||r(Lf(i.input,i.index))!=Je.Word)&&(r(Lf(i.input,i.index+i[0].length))!=Je.Word||r(Ef(i.input,i.index+i[0].length))!=Je.Word)),t.test&&(n=function(t,e,i){return(s,n,r)=>(!i||i(s,n,r))&&t(r[0],e,s,n)}(t.test,e,n)),new pf(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:n},i,s)}function Ef(t,e){return t.slice(Gt(t,e,!1),e)}function Lf(t,e){return t.slice(e,Gt(t,e))}class Nf extends Df{nextMatch(t,e,i){let s=Bf(this.spec,t,i,t.doc.length).next();return s.done&&(s=Bf(this.spec,t,0,e).next()),s.done?null:s.value}prevMatchInRange(t,e,i){for(let s=1;;s++){let n=Math.max(e,i-1e4*s),r=Bf(this.spec,t,n,i),o=null;for(;!r.next().done;)o=r.value;if(o&&(n==e||o.from>n+10))return o;if(n==e)return null}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(e,i)=>{if("&"==i)return t.match[0];if("$"==i)return"$";for(let e=i.length;e>0;e--){let s=+i.slice(0,e);if(s>0&&s<t.match.length)return t.match[s]+i.slice(e)}return e})}matchAll(t,e){let i=Bf(this.spec,t,0,t.doc.length),s=[];for(;!i.next().done;){if(s.length>=e)return null;s.push(i.value)}return s}highlight(t,e,i,s){let n=Bf(this.spec,t,Math.max(0,e-250),Math.min(i+250,t.doc.length));for(;!n.next().done;)s(n.value.from,n.value.to)}}const If=$e.define(),Wf=$e.define(),Vf=xe.define({create:t=>new Hf(Gf(t).create(),null),update(t,e){for(let i of e.effects)i.is(If)?t=new Hf(i.value.create(),t.panel):i.is(Wf)&&(t=new Hf(t.query,i.value?Yf:null));return t},provide:t=>ha.from(t,t=>t.panel)});class Hf{constructor(t,e){this.query=t,this.panel=e}}const Ff=is.mark({class:"cm-searchMatch"}),zf=is.mark({class:"cm-searchMatch cm-searchMatch-selected"}),qf=vn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Vf))}update(t){let e=t.state.field(Vf);(e!=t.startState.field(Vf)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return is.none;let{view:i}=this,s=new ci;for(let e=0,n=i.visibleRanges,r=n.length;e<r;e++){let{from:o,to:l}=n[e];for(;e<r-1&&l>n[e+1].from-500;)l=n[++e].to;t.highlight(i.state,o,l,(t,e)=>{let n=i.state.selection.ranges.some(i=>i.from==t&&i.to==e);s.add(t,e,n?zf:Ff)})}return s.finish()}},{decorations:t=>t.decorations});function _f(t){return e=>{let i=e.state.field(Vf,!1);return i&&i.query.spec.valid?t(e,i):Zf(e)}}const $f=_f((t,{query:e})=>{let{to:i}=t.state.selection.main,s=e.nextMatch(t.state,i,i);if(!s)return!1;let n=ue.single(s.from,s.to),r=t.state.facet(Of);return t.dispatch({selection:n,effects:[od(t,s),r.scrollToMatch(n.main,t)],userEvent:"select.search"}),Jf(t),!0}),jf=_f((t,{query:e})=>{let{state:i}=t,{from:s}=i.selection.main,n=e.prevMatch(i,s,s);if(!n)return!1;let r=ue.single(n.from,n.to),o=t.state.facet(Of);return t.dispatch({selection:r,effects:[od(t,n),o.scrollToMatch(r.main,t)],userEvent:"select.search"}),Jf(t),!0}),Kf=_f((t,{query:e})=>{let i=e.matchAll(t.state,1e3);return!(!i||!i.length)&&(t.dispatch({selection:ue.create(i.map(t=>ue.range(t.from,t.to))),userEvent:"select.search.matches"}),!0)}),Uf=_f((t,{query:e})=>{let{state:i}=t,{from:s,to:n}=i.selection.main;if(i.readOnly)return!1;let r=e.nextMatch(i,s,s);if(!r)return!1;let o,l,a=r,h=[],c=[];a.from==s&&a.to==n&&(l=i.toText(e.getReplacement(a)),h.push({from:a.from,to:a.to,insert:l}),a=e.nextMatch(i,a.from,a.to),c.push(_o.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(s).number)+".")));let u=t.state.changes(h);return a&&(o=ue.single(a.from,a.to).map(u),c.push(od(t,a)),c.push(i.facet(Of).scrollToMatch(o.main,t))),t.dispatch({changes:u,selection:o,effects:c,userEvent:"input.replace"}),!0}),Qf=_f((t,{query:e})=>{if(t.state.readOnly)return!1;let i=e.matchAll(t.state,1e9).map(t=>{let{from:i,to:s}=t;return{from:i,to:s,insert:e.getReplacement(t)}});if(!i.length)return!1;let s=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:_o.announce.of(s),userEvent:"input.replace.all"}),!0});function Yf(t){return t.state.facet(Of).createPanel(t)}function Gf(t,e){var i,s,n,r,o;let l=t.selection.main,a=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!a)return e;let h=t.facet(Of);return new Tf({search:(null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(s=null==e?void 0:e.caseSensitive)&&void 0!==s?s:h.caseSensitive,literal:null!==(n=null==e?void 0:e.literal)&&void 0!==n?n:h.literal,regexp:null!==(r=null==e?void 0:e.regexp)&&void 0!==r?r:h.regexp,wholeWord:null!==(o=null==e?void 0:e.wholeWord)&&void 0!==o?o:h.wholeWord})}function Xf(t){let e=ra(t,Yf);return e&&e.dom.querySelector("[main-field]")}function Jf(t){let e=Xf(t);e&&e==t.root.activeElement&&e.select()}const Zf=t=>{let e=t.state.field(Vf,!1);if(e&&e.panel){let i=Xf(t);if(i&&i!=t.root.activeElement){let s=Gf(t.state,e.query.spec);s.valid&&t.dispatch({effects:If.of(s)}),i.focus(),i.select()}}else t.dispatch({effects:[Wf.of(!0),e?If.of(Gf(t.state,e.query.spec)):$e.appendConfig.of(ad)]});return!0},td=t=>{let e=t.state.field(Vf,!1);if(!e||!e.panel)return!1;let i=ra(t,Yf);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Wf.of(!1)}),!0},ed=[{key:"Mod-f",run:Zf,scope:"editor search-panel"},{key:"F3",run:$f,shift:jf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:$f,shift:jf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:td,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:s,to:n}=i.main,r=[],o=0;for(let e=new uf(t.doc,t.sliceDoc(s,n));!e.next().done;){if(r.length>1e3)return!1;e.value.from==s&&(o=r.length),r.push(ue.range(e.value.from,e.value.to))}return e(t.update({selection:ue.create(r,o),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let{state:e}=t,i=String(e.doc.lineAt(t.state.selection.main.head).number),{close:s,result:n}=ca(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:i},focus:!0,submitLabel:e.phrase("go")});return n.then(i=>{let n=i&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(i.elements.line.value);if(!n)return void t.dispatch({effects:s});let r=e.doc.lineAt(e.selection.main.head),[,o,l,a,h]=n,c=a?+a.slice(1):0,u=l?+l:r.number;if(l&&h){let t=u/100;o&&(t=t*("-"==o?-1:1)+r.number/e.doc.lines),u=Math.round(e.doc.lines*t)}else l&&o&&(u=u*("-"==o?-1:1)+r.number);let f=e.doc.line(Math.max(1,Math.min(e.doc.lines,u))),d=ue.cursor(f.from+Math.max(0,Math.min(c,f.length)));t.dispatch({effects:[s,_o.scrollIntoView(d.from,{y:"center"})],selection:d})}),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:i}=t.selection;if(i.some(t=>t.from===t.to))return(({state:t,dispatch:e})=>{let{selection:i}=t,s=ue.create(i.ranges.map(e=>t.wordAt(e.head)||ue.cursor(e.head)),i.mainIndex);return!s.eq(i)&&(e(t.update({selection:s})),!0)})({state:t,dispatch:e});let s=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some(e=>t.sliceDoc(e.from,e.to)!=s))return!1;let n=function(t,e){let{main:i,ranges:s}=t.selection,n=t.wordAt(i.head),r=n&&n.from==i.from&&n.to==i.to;for(let i=!1,n=new uf(t.doc,e,s[s.length-1].to);;){if(n.next(),!n.done){if(i&&s.some(t=>t.from==n.value.from))continue;if(r){let e=t.wordAt(n.value.from);if(!e||e.from!=n.value.from||e.to!=n.value.to)continue}return n.value}if(i)return null;n=new uf(t.doc,e,0,Math.max(0,s[s.length-1].from-1)),i=!0}}(t,s);return!!n&&(e(t.update({selection:t.selection.addRange(ue.range(n.from,n.to),!1),effects:_o.scrollIntoView(n.to)})),!0)},preventDefault:!0}];class id{constructor(t){this.view=t;let e=this.query=t.state.field(Vf).query.spec;function i(t,e,i){return Ni("button",{class:"cm-button",name:t,onclick:e,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=Ni("input",{value:e.search,placeholder:sd(t,"Find"),"aria-label":sd(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ni("input",{value:e.replace,placeholder:sd(t,"Replace"),"aria-label":sd(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Ni("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=Ni("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=Ni("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=Ni("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,i("next",()=>$f(t),[sd(t,"next")]),i("prev",()=>jf(t),[sd(t,"previous")]),i("select",()=>Kf(t),[sd(t,"all")]),Ni("label",null,[this.caseField,sd(t,"match case")]),Ni("label",null,[this.reField,sd(t,"regexp")]),Ni("label",null,[this.wordField,sd(t,"by word")]),...t.state.readOnly?[]:[Ni("br"),this.replaceField,i("replace",()=>Uf(t),[sd(t,"replace")]),i("replaceAll",()=>Qf(t),[sd(t,"replace all")])],Ni("button",{name:"close",onclick:()=>td(t),"aria-label":sd(t,"close"),type:"button"},["×"])])}commit(){let t=new Tf({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:If.of(t)}))}keydown(t){var e,i,s;e=this.view,i=t,s="search-panel",sl(Zo(e.state),i,e,s)?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?jf:$f)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),Uf(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(If)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Of).top}}function sd(t,e){return t.state.phrase(e)}const nd=30,rd=/[\s\.,:;?!]/;function od(t,{from:e,to:i}){let s=t.state.doc.lineAt(e),n=t.state.doc.lineAt(i).to,r=Math.max(s.from,e-nd),o=Math.min(n,i+nd),l=t.state.sliceDoc(r,o);if(r!=s.from)for(let t=0;t<nd;t++)if(!rd.test(l[t+1])&&rd.test(l[t])){l=l.slice(t);break}if(o!=n)for(let t=l.length-1;t>l.length-nd;t--)if(!rd.test(l[t-1])&&rd.test(l[t])){l=l.slice(0,t);break}return _o.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${s.number}.`)}const ld=_o.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),ad=[Vf,Oe.low(qf),ld];class hd{constructor(t,e,i,s){this.state=t,this.pos=e,this.explicit=i,this.view=s,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=ja(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),s=e.text.slice(i-e.from,this.pos-e.from),n=s.search(pd(t,!1));return n<0?null:{from:i+n,to:this.pos,text:s.slice(n)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,i){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function cd(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function ud(t){let e=t.map(t=>"string"==typeof t?{label:t}:t),[i,s]=e.every(t=>/^\w+$/.test(t.label))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:s}of t){e[s[0]]=!0;for(let t=1;t<s.length;t++)i[s[t]]=!0}let s=cd(e)+cd(i)+"*$";return[new RegExp("^"+s),new RegExp(s)]}(e);return t=>{let n=t.matchBefore(s);return n||t.explicit?{from:n?n.from:t.pos,options:e,validFor:i}:null}}class fd{constructor(t,e,i,s){this.completion=t,this.source=e,this.match=i,this.score=s}}function dd(t){return t.selection.main.from}function pd(t,e){var i;let{source:s}=t,n=e&&"^"!=s[0],r="$"!=s[s.length-1];return n||r?new RegExp(`${n?"^":""}(?:${s})${r?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const md=ze.define();function gd(t,e,i,s){let{main:n}=t.selection,r=i-n.from,o=s-n.from;return{...t.changeByRange(l=>{if(l!=n&&i!=s&&t.sliceDoc(l.from+r,l.from+o)!=t.sliceDoc(i,s))return{range:l};let a=t.toText(e);return{changes:{from:l.from+r,to:s==n.from?l.to:l.from+o,insert:a},range:ue.cursor(l.from+r+a.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const vd=new WeakMap;function wd(t){if(!Array.isArray(t))return t;let e=vd.get(t);return e||vd.set(t,e=ud(t)),e}const bd=$e.define(),yd=$e.define();class xd{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let i=Xt(t,e),s=Zt(i);this.chars.push(i);let n=t.slice(e,e+s),r=n.toUpperCase();this.folded.push(Xt(r==n?n.toLowerCase():r,0)),e+=s}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:i,any:s,precise:n,byWord:r}=this;if(1==e.length){let s=Xt(t,0),n=Zt(s),r=n==t.length?0:-100;if(s==e[0]);else{if(s!=i[0])return null;r+=-200}return this.ret(r,[0,n])}let o=t.indexOf(this.pattern);if(0==o)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=e.length,a=0;if(o<0){for(let n=0,r=Math.min(t.length,200);n<r&&a<l;){let r=Xt(t,n);r!=e[a]&&r!=i[a]||(s[a++]=n),n+=Zt(r)}if(a<l)return null}let h=0,c=0,u=!1,f=0,d=-1,p=-1,m=/[a-z]/.test(t),g=!0;for(let s=0,a=Math.min(t.length,200),v=0;s<a&&c<l;){let a=Xt(t,s);o<0&&(h<l&&a==e[h]&&(n[h++]=s),f<l&&(a==e[f]||a==i[f]?(0==f&&(d=s),p=s+1,f++):f=0));let w,b=a<255?a>=48&&a<=57||a>=97&&a<=122?2:a>=65&&a<=90?1:0:(w=Jt(a))!=w.toLowerCase()?1:w!=w.toUpperCase()?2:0;(!s||1==b&&m||0==v&&0!=b)&&(e[c]==a||i[c]==a&&(u=!0)?r[c++]=s:r.length&&(g=!1)),v=b,s+=Zt(a)}return c==l&&0==r[0]&&g?this.result((u?-200:0)-100,r,t):f==l&&0==d?this.ret(-200-t.length+(p==t.length?0:-100),[0,p]):o>-1?this.ret(-700-t.length,[o,o+this.pattern.length]):f==l?this.ret(-900-t.length,[d,p]):c==l?this.result((u?-200:0)-100-700+(g?0:-1100),r,t):2==e.length?null:this.result((s[0]?-700:0)-200-1100,s,t)}result(t,e,i){let s=[],n=0;for(let t of e){let e=t+(this.astral?Zt(Xt(i,t)):1);n&&s[n-1]==t?s[n-1]=e:(s[n++]=t,s[n++]=e)}return this.ret(t-i.length,s)}}class kd{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),i=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==i?null:(this.matched=[0,e.length],this.score=i+(t.length==this.pattern.length?0:-100),this)}}const Sd=pe.define({combine:t=>si(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Ad,filterStrict:!1,compareCompletions:(t,e)=>(t.sortText||t.label).localeCompare(e.sortText||e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>i=>Cd(t(i),e(i)),optionClass:(t,e)=>i=>Cd(t(i),e(i)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function Cd(t,e){return t?e?t+" "+e:t:e}function Ad(t,e,i,s,n,r){let o,l,a=t.textDirection==Ps.RTL,h=a,c=!1,u="top",f=e.left-n.left,d=n.right-e.right,p=s.right-s.left,m=s.bottom-s.top;if(h&&f<Math.min(p,d)?h=!1:!h&&d<Math.min(p,f)&&(h=!0),p<=(h?f:d))o=Math.max(n.top,Math.min(i.top,n.bottom-m))-e.top,l=Math.min(400,h?f:d);else{c=!0,l=Math.min(400,(a?e.right:n.right-e.left)-30);let t=n.bottom-e.bottom;t>=m||t>e.top?o=i.bottom-e.top:(u="bottom",o=e.bottom-i.top)}return{style:`${u}: ${o/((e.bottom-e.top)/r.offsetHeight)}px; max-width: ${l/((e.right-e.left)/r.offsetWidth)}px`,class:"cm-completionInfo-"+(c?a?"left-narrow":"right-narrow":h?"left":"right")}}function Md(t,e,i){if(t<=i)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let s=Math.floor((t-e)/i);return{from:t-(s+1)*i,to:t-s*i}}class Od{constructor(t,e,i){this.view=t,this.stateField=e,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let s=t.state.field(e),{options:n,selected:r}=s.open,o=t.state.facet(Sd);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map(t=>"cm-completionIcon-"+t)),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i,s){let n=document.createElement("span");n.className="cm-completionLabel";let r=t.displayLabel||t.label,o=0;for(let t=0;t<s.length;){let e=s[t++],i=s[t++];e>o&&n.appendChild(document.createTextNode(r.slice(o,e)));let l=n.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(r.slice(e,i))),l.className="cm-completionMatchedText",o=i}return o<r.length&&n.appendChild(document.createTextNode(r.slice(o))),n},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort((t,e)=>t.position-e.position).map(t=>t.render)}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Md(n.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",i=>{let{options:s}=t.state.field(e).open;for(let e,n=i.target;n&&n!=this.dom;n=n.parentNode)if("LI"==n.nodeName&&(e=/-(\d+)$/.exec(n.id))&&+e[1]<s.length)return this.applyCompletion(t,s[+e[1]]),void i.preventDefault()}),this.dom.addEventListener("focusout",e=>{let i=t.state.field(this.stateField,!1);i&&i.tooltip&&t.state.facet(Sd).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:yd.of(null)})}),this.showOptions(n,s.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(t){var e;let i=t.state.field(this.stateField),s=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),i!=s){let{options:n,selected:r,disabled:o}=i.open;s.open&&s.open.options==n||(this.range=Md(n.length,r,t.state.facet(Sd).maxRenderedOptions),this.showOptions(n,i.id)),this.updateSel(),o!=(null===(e=s.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;(e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=Md(e.options.length,e.selected,this.view.state.facet(Sd).maxRenderedOptions),this.showOptions(e.options,t.id));let i=this.updateSelectedOption(e.selected);if(i){this.destroyInfo();let{completion:s}=e.options[e.selected],{info:n}=s;if(!n)return;let r="string"==typeof n?document.createTextNode(n):n(s);if(!r)return;"then"in r?r.then(e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,s)}).catch(t=>dn(this.view.state,t,"completion info")):(this.addInfoPane(r,s),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(t,e){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=t.nodeType)i.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:s}=t;i.appendChild(e),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,s=this.range.from;i;i=i.nextSibling,s++)"LI"==i.nodeName&&i.id?s==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&(i.removeAttribute("aria-selected"),i.removeAttribute("aria-describedby")):s--;return e&&function(t,e){let i=t.getBoundingClientRect(),s=e.getBoundingClientRect(),n=i.height/t.offsetHeight;s.top<i.top?t.scrollTop-=(i.top-s.top)/n:s.bottom>i.bottom&&(t.scrollTop+=(s.bottom-i.bottom)/n)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),s=t.getBoundingClientRect(),n=this.space;if(!n){let t=this.dom.ownerDocument.documentElement;n={left:0,top:0,right:t.clientWidth,bottom:t.clientHeight}}return s.top>Math.min(n.bottom,e.bottom)-10||s.bottom<Math.max(n.top,e.top)+10?null:this.view.state.facet(Sd).positionInfo(this.view,e,s,i,n,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,i){const s=document.createElement("ul");s.id=e,s.setAttribute("role","listbox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-label",this.view.state.phrase("Completions")),s.addEventListener("mousedown",t=>{t.target==s&&t.preventDefault()});let n=null;for(let r=i.from;r<i.to;r++){let{completion:o,match:l}=t[r],{section:a}=o;if(a){let t="string"==typeof a?a:a.name;if(t!=n&&(r>i.from||0==i.from))if(n=t,"string"!=typeof a&&a.header)s.appendChild(a.header(a));else{s.appendChild(document.createElement("completion-section")).textContent=t}}const h=s.appendChild(document.createElement("li"));h.id=e+"-"+r,h.setAttribute("role","option");let c=this.optionClass(o);c&&(h.className=c);for(let t of this.optionContent){let e=t(o,this.view.state,this.view,l);e&&h.appendChild(e)}}return i.from&&s.classList.add("cm-completionListIncompleteTop"),i.to<t.length&&s.classList.add("cm-completionListIncompleteBottom"),s}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Td(t,e){return i=>new Od(i,t,e)}function Dd(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class Rd{constructor(t,e,i,s,n,r){this.options=t,this.attrs=e,this.tooltip=i,this.timestamp=s,this.selected=n,this.disabled=r}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new Rd(this.options,Ld(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,i,s,n,r){if(s&&!r&&t.some(t=>t.isPending))return s.setDisabled();let o=function(t,e){let i=[],s=null,n=null,r=t=>{i.push(t);let{section:e}=t.completion;if(e){s||(s=[]);let t="string"==typeof e?e:e.name;s.some(e=>e.name==t)||s.push("string"==typeof e?{name:t}:e)}},o=e.facet(Sd);for(let s of t)if(s.hasResult()){let t=s.result.getMatch;if(!1===s.result.filter)for(let e of s.result.options)r(new fd(e,s.source,t?t(e):[],1e9-i.length));else{let i,l=e.sliceDoc(s.from,s.to),a=o.filterStrict?new kd(l):new xd(l);for(let e of s.result.options)if(i=a.match(e.label)){let o=e.displayLabel?t?t(e,i.matched):[]:i.matched,l=i.score+(e.boost||0);if(r(new fd(e,s.source,o,l)),"object"==typeof e.section&&"dynamic"===e.section.rank){let{name:t}=e.section;n||(n=Object.create(null)),n[t]=Math.max(l,n[t]||-1e9)}}}}if(s){let t=Object.create(null),e=0,r=(t,e)=>("dynamic"===t.rank&&"dynamic"===e.rank?n[e.name]-n[t.name]:0)||("number"==typeof t.rank?t.rank:1e9)-("number"==typeof e.rank?e.rank:1e9)||(t.name<e.name?-1:1);for(let i of s.sort(r))e-=1e5,t[i.name]=e;for(let e of i){let{section:i}=e.completion;i&&(e.score+=t["string"==typeof i?i:i.name])}}let l=[],a=null,h=o.compareCompletions;for(let t of i.sort((t,e)=>e.score-t.score||h(t.completion,e.completion))){let e=t.completion;!a||a.label!=e.label||a.detail!=e.detail||null!=a.type&&null!=e.type&&a.type!=e.type||a.apply!=e.apply||a.boost!=e.boost?l.push(t):Dd(t.completion)>Dd(a)&&(l[l.length-1]=t),a=t.completion}return l}(t,e);if(!o.length)return s&&t.some(t=>t.isPending)?s.setDisabled():null;let l=e.facet(Sd).selectOnOpen?0:-1;if(s&&s.selected!=l&&-1!=s.selected){let t=s.options[s.selected].completion;for(let e=0;e<o.length;e++)if(o[e].completion==t){l=e;break}}return new Rd(o,Ld(i,l),{pos:t.reduce((t,e)=>e.hasResult()?Math.min(t,e.from):t,1e8),create:_d,above:n.aboveCursor},s?s.timestamp:Date.now(),l,!1)}map(t){return new Rd(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new Rd(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Pd{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new Pd(Nd,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(Sd),s=(i.override||e.languageDataAt("autocomplete",dd(e)).map(wd)).map(e=>(this.active.find(t=>t.source==e)||new Wd(e,this.active.some(t=>0!=t.state)?1:0)).update(t,i));s.length==this.active.length&&s.every((t,e)=>t==this.active[e])&&(s=this.active);let n=this.open,r=t.effects.some(t=>t.is(Hd));n&&t.docChanged&&(n=n.map(t.changes)),t.selection||s.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!function(t,e){if(t==e)return!0;for(let i=0,s=0;;){for(;i<t.length&&!t[i].hasResult();)i++;for(;s<e.length&&!e[s].hasResult();)s++;let n=i==t.length,r=s==e.length;if(n||r)return n==r;if(t[i++].result!=e[s++].result)return!1}}(s,this.active)||r?n=Rd.build(s,e,this.id,n,i,r):n&&n.disabled&&!s.some(t=>t.isPending)&&(n=null),!n&&s.every(t=>!t.isPending)&&s.some(t=>t.hasResult())&&(s=s.map(t=>t.hasResult()?new Wd(t.source,0):t));for(let e of t.effects)e.is(Fd)&&(n=n&&n.setSelected(e.value,this.id));return s==this.active&&n==this.open?this:new Pd(s,this.id,n)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Bd:Ed}}const Bd={"aria-autocomplete":"list"},Ed={};function Ld(t,e){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(i["aria-activedescendant"]=t+"-"+e),i}const Nd=[];function Id(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(md);if(i&&e.activateOnCompletion(i))return 12}let i=t.isUserEvent("input.type");return i&&e.activateOnTyping?5:i?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Wd{constructor(t,e,i=!1){this.source=t,this.state=e,this.explicit=i}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let i=Id(t,e),s=this;(8&i||16&i&&this.touches(t))&&(s=new Wd(s.source,0)),4&i&&0==s.state&&(s=new Wd(this.source,1)),s=s.updateFor(t,i);for(let e of t.effects)if(e.is(bd))s=new Wd(s.source,1,e.value);else if(e.is(yd))s=new Wd(s.source,0);else if(e.is(Hd))for(let t of e.value)t.source==s.source&&(s=t);return s}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(dd(t.state))}}class Vd extends Wd{constructor(t,e,i,s,n,r){super(t,3,e),this.limit=i,this.result=s,this.from=n,this.to=r}hasResult(){return!0}updateFor(t,e){var i;if(!(3&e))return this.map(t.changes);let s=this.result;s.map&&!t.changes.empty&&(s=s.map(s,t.changes));let n=t.changes.mapPos(this.from),r=t.changes.mapPos(this.to,1),o=dd(t.state);if(o>r||!s||2&e&&(dd(t.startState)==this.from||o<this.limit))return new Wd(this.source,4&e?1:0);let l=t.changes.mapPos(this.limit);return function(t,e,i,s){if(!t)return!1;let n=e.sliceDoc(i,s);return"function"==typeof t?t(n,i,s,e):pd(t,!0).test(n)}(s.validFor,t.state,n,r)?new Vd(this.source,this.explicit,l,s,n,r):s.update&&(s=s.update(s,n,r,new hd(t.state,o,!1)))?new Vd(this.source,this.explicit,l,s,s.from,null!==(i=s.to)&&void 0!==i?i:dd(t.state)):new Wd(this.source,1,this.explicit)}map(t){if(t.empty)return this;return(this.result.map?this.result.map(this.result,t):this.result)?new Vd(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new Wd(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const Hd=$e.define({map:(t,e)=>t.map(t=>t.map(e))}),Fd=$e.define(),zd=xe.define({create:()=>Pd.start(),update:(t,e)=>t.update(e),provide:t=>[Yl.from(t,t=>t.tooltip),_o.contentAttributes.from(t,t=>t.attrs)]});function qd(t,e){const i=e.completion.apply||e.completion.label;let s=t.state.field(zd).active.find(t=>t.source==e.source);return s instanceof Vd&&("string"==typeof i?t.dispatch({...gd(t.state,i,s.from,s.to),annotations:md.of(e.completion)}):i(t,e.completion,s.from,s.to),!0)}const _d=Td(zd,qd);function $d(t,e="option"){return i=>{let s=i.state.field(zd,!1);if(!s||!s.open||s.open.disabled||Date.now()-s.open.timestamp<i.state.facet(Sd).interactionDelay)return!1;let n,r=1;"page"==e&&(n=ia(i,s.open.tooltip))&&(r=Math.max(2,Math.floor(n.dom.offsetHeight/n.dom.querySelector("li").offsetHeight)-1));let{length:o}=s.open.options,l=s.open.selected>-1?s.open.selected+r*(t?1:-1):t?0:o-1;return l<0?l="page"==e?0:o-1:l>=o&&(l="page"==e?o-1:0),i.dispatch({effects:Fd.of(l)}),!0}}const jd=t=>!!t.state.field(zd,!1)&&(t.dispatch({effects:bd.of(!0)}),!0);class Kd{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const Ud=vn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(zd).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(zd),i=t.state.facet(Sd);if(!t.selectionSet&&!t.docChanged&&t.startState.field(zd)==e)return;let s=t.transactions.some(t=>{let e=Id(t,i);return 8&e||(t.selection||t.docChanged)&&!(3&e)});for(let e=0;e<this.running.length;e++){let i=this.running[e];if(s||i.context.abortOnDocChange&&t.docChanged||i.updates.length+t.transactions.length>50&&Date.now()-i.time>1e3){for(let t of i.context.abortListeners)try{t()}catch(t){dn(this.view.state,t)}i.context.abortListeners=null,this.running.splice(e--,1)}else i.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(t=>t.effects.some(t=>t.is(bd)))&&(this.pendingStart=!0);let n=this.pendingStart?50:i.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(t=>t.isPending&&!this.running.some(e=>e.active.source==t.source))?setTimeout(()=>this.startUpdate(),n):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(zd);for(let t of e.active)t.isPending&&!this.running.some(e=>e.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Sd).updateSyncTime))}startQuery(t){let{state:e}=this.view,i=dd(e),s=new hd(e,i,t.explicit,this.view),n=new Kd(t,s);this.running.push(n),Promise.resolve(t.source(s)).then(t=>{n.context.aborted||(n.done=t||null,this.scheduleAccept())},t=>{this.view.dispatch({effects:yd.of(null)}),dn(this.view.state,t)})}scheduleAccept(){this.running.every(t=>void 0!==t.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Sd).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(Sd),s=this.view.state.field(zd);for(let n=0;n<this.running.length;n++){let r=this.running[n];if(void 0===r.done)continue;if(this.running.splice(n--,1),r.done){let s=dd(r.updates.length?r.updates[0].startState:this.view.state),n=Math.min(s,r.done.from+(r.active.explicit?0:1)),o=new Vd(r.active.source,r.active.explicit,n,r.done,r.done.from,null!==(t=r.done.to)&&void 0!==t?t:s);for(let t of r.updates)o=o.update(t,i);if(o.hasResult()){e.push(o);continue}}let o=s.active.find(t=>t.source==r.active.source);if(o&&o.isPending)if(null==r.done){let t=new Wd(r.active.source,0);for(let e of r.updates)t=t.update(e,i);t.isPending||e.push(t)}else this.startQuery(o)}(e.length||s.open&&s.open.disabled)&&this.view.dispatch({effects:Hd.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(zd,!1);if(e&&e.tooltip&&this.view.state.facet(Sd).closeOnBlur){let i=e.open&&ia(this.view,e.open.tooltip);i&&i.dom.contains(t.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:yd.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:bd.of(!1)}),20),this.composing=0}}}),Qd="object"==typeof navigator&&/Win/.test(navigator.platform),Yd=Oe.highest(_o.domEventHandlers({keydown(t,e){let i=e.state.field(zd,!1);if(!i||!i.open||i.open.disabled||i.open.selected<0||t.key.length>1||t.ctrlKey&&(!Qd||!t.altKey)||t.metaKey)return!1;let s=i.open.options[i.open.selected],n=i.active.find(t=>t.source==s.source),r=s.completion.commitCharacters||n.result.commitCharacters;return r&&r.indexOf(t.key)>-1&&qd(e,s),!1}})),Gd=_o.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});const Xd={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Jd=$e.define({map(t,e){let i=e.mapPos(t,-1,ee.TrackAfter);return null==i?void 0:i}}),Zd=new class extends ni{};Zd.startSide=1,Zd.endSide=-1;const tp=xe.define({create:()=>hi.empty,update(t,e){if(t=t.map(e.changes),e.selection){let i=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=i.from&&t<=i.to})}for(let i of e.effects)i.is(Jd)&&(t=t.update({add:[Zd.range(i.value,i.value+1)]}));return t}});const ep="()[]{}<>«»»«[]{}";function ip(t){for(let e=0;e<16;e+=2)if(ep.charCodeAt(e)==t)return ep.charAt(e+1);return Jt(t<128?t:t+1)}function sp(t,e){return t.languageDataAt("closeBrackets",e)[0]||Xd}const np="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),rp=_o.inputHandler.of((t,e,i,s)=>{if((np?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let n=t.state.selection.main;if(s.length>2||2==s.length&&1==Zt(Xt(s,0))||e!=n.from||i!=n.to)return!1;let r=function(t,e){let i=sp(t,t.selection.main.head),s=i.brackets||Xd.brackets;for(let n of s){let r=ip(Xt(n,0));if(e==n)return r==n?up(t,n,s.indexOf(n+n+n)>-1,i):hp(t,n,r,i.before||Xd.before);if(e==r&&lp(t,t.selection.main.from))return cp(t,n,r)}return null}(t.state,s);return!!r&&(t.dispatch(r),!0)}),op=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=sp(t,t.selection.main.head).brackets||Xd.brackets,s=null,n=t.changeByRange(e=>{if(e.empty){let s=function(t,e){let i=t.sliceString(e-2,e);return Zt(Xt(i,0))==i.length?i:i.slice(1)}(t.doc,e.head);for(let n of i)if(n==s&&ap(t.doc,e.head)==ip(Xt(n,0)))return{changes:{from:e.head-n.length,to:e.head+n.length},range:ue.cursor(e.head-n.length)}}return{range:s=e}});return s||e(t.update(n,{scrollIntoView:!0,userEvent:"delete.backward"})),!s}}];function lp(t,e){let i=!1;return t.field(tp).between(0,t.doc.length,t=>{t==e&&(i=!0)}),i}function ap(t,e){let i=t.sliceString(e,e+2);return i.slice(0,Zt(Xt(i,0)))}function hp(t,e,i,s){let n=null,r=t.changeByRange(r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:i,from:r.to}],effects:Jd.of(r.to+e.length),range:ue.range(r.anchor+e.length,r.head+e.length)};let o=ap(t.doc,r.head);return!o||/\s/.test(o)||s.indexOf(o)>-1?{changes:{insert:e+i,from:r.head},effects:Jd.of(r.head+e.length),range:ue.cursor(r.head+e.length)}:{range:n=r}});return n?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function cp(t,e,i){let s=null,n=t.changeByRange(e=>e.empty&&ap(t.doc,e.head)==i?{changes:{from:e.head,to:e.head+i.length,insert:i},range:ue.cursor(e.head+i.length)}:s={range:e});return s?null:t.update(n,{scrollIntoView:!0,userEvent:"input.type"})}function up(t,e,i,s){let n=s.stringPrefixes||Xd.stringPrefixes,r=null,o=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Jd.of(s.to+e.length),range:ue.range(s.anchor+e.length,s.head+e.length)};let o,l=s.head,a=ap(t.doc,l);if(a==e){if(fp(t,l))return{changes:{insert:e+e,from:l},effects:Jd.of(l+e.length),range:ue.cursor(l+e.length)};if(lp(t,l)){let s=i&&t.sliceDoc(l,l+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+s.length,insert:s},range:ue.cursor(l+s.length)}}}else{if(i&&t.sliceDoc(l-2*e.length,l)==e+e&&(o=dp(t,l-2*e.length,n))>-1&&fp(t,o))return{changes:{insert:e+e+e+e,from:l},effects:Jd.of(l+e.length),range:ue.cursor(l+e.length)};if(t.charCategorizer(l)(a)!=Je.Word&&dp(t,l,n)>-1&&!function(t,e,i,s){let n=ja(t).resolveInner(e,-1),r=s.reduce((t,e)=>Math.max(t,e.length),0);for(let o=0;o<5;o++){let o=t.sliceDoc(n.from,Math.min(n.to,n.from+i.length+r)),l=o.indexOf(i);if(!l||l>-1&&s.indexOf(o.slice(0,l))>-1){let e=n.firstChild;for(;e&&e.from==n.from&&e.to-e.from>i.length+l;){if(t.sliceDoc(e.to-i.length,e.to)==i)return!1;e=e.firstChild}return!0}let a=n.to==e&&n.parent;if(!a)break;n=a}return!1}(t,l,e,n))return{changes:{insert:e+e,from:l},effects:Jd.of(l+e.length),range:ue.cursor(l+e.length)}}return{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function fp(t,e){let i=ja(t).resolveInner(e+1);return i.parent&&i.from==e}function dp(t,e,i){let s=t.charCategorizer(e);if(s(t.sliceDoc(e-1,e))!=Je.Word)return e;for(let n of i){let i=e-n.length;if(t.sliceDoc(i,e)==n&&s(t.sliceDoc(i-1,i))!=Je.Word)return i}return-1}function pp(t={}){return[Yd,zd,Sd.of(t),Ud,gp,Gd]}const mp=[{key:"Ctrl-Space",run:jd},{mac:"Alt-`",run:jd},{mac:"Alt-i",run:jd},{key:"Escape",run:t=>{let e=t.state.field(zd,!1);return!(!e||!e.active.some(t=>0!=t.state))&&(t.dispatch({effects:yd.of(null)}),!0)}},{key:"ArrowDown",run:$d(!0)},{key:"ArrowUp",run:$d(!1)},{key:"PageDown",run:$d(!0,"page")},{key:"PageUp",run:$d(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(zd,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Sd).interactionDelay)&&qd(t,e.open.options[e.open.selected])}}],gp=Oe.highest(Xo.computeN([Sd],t=>t.facet(Sd).defaultKeymap?[mp]:[]));class vp{constructor(t,e,i){this.from=t,this.to=e,this.diagnostic=i}}class wp{constructor(t,e,i){this.diagnostics=t,this.panel=e,this.selected=i}static init(t,e,i){let s=i.facet(Pp).markerFilter;s&&(t=s(t,i));let n=t.slice().sort((t,e)=>t.from-e.from||t.to-e.to),r=new ci,o=[],l=0,a=i.doc.iter(),h=0,c=i.doc.length;for(let t=0;;){let e,i,s=t==n.length?null:n[t];if(!s&&!o.length)break;if(o.length)e=l,i=o.reduce((t,e)=>Math.min(t,e.to),s&&s.from>e?s.from:1e8);else{if(e=s.from,e>c)break;i=s.to,o.push(s),t++}for(;t<n.length;){let s=n[t];if(s.from!=e||!(s.to>s.from||s.to==e)){i=Math.min(s.from,i);break}o.push(s),t++,i=Math.min(s.to,i)}i=Math.min(i,c);let u=!1;if(o.some(t=>t.from==e&&(t.to==i||i==c))&&(u=e==i,!u&&i-e<10)){let t=e-(h+a.value.length);t>0&&(a.next(t),h=e);for(let t=e;;){if(t>=i){u=!0;break}if(!a.lineBreak&&h+a.value.length>t)break;t=h+a.value.length,h+=a.value.length,a.next()}}let f=qp(o);if(u)r.add(e,e,is.widget({widget:new Np(f),diagnostics:o.slice()}));else{let t=o.reduce((t,e)=>e.markClass?t+" "+e.markClass:t,"");r.add(e,i,is.mark({class:"cm-lintRange cm-lintRange-"+f+t,diagnostics:o.slice(),inclusiveEnd:o.some(t=>t.to>i)}))}if(l=i,l==c)break;for(let t=0;t<o.length;t++)o[t].to<=l&&o.splice(t--,1)}let u=r.finish();return new wp(u,e,bp(u))}}function bp(t,e=null,i=0){let s=null;return t.between(i,1e9,(t,i,{spec:n})=>{if(!(e&&n.diagnostics.indexOf(e)<0))if(s){if(n.diagnostics.indexOf(s.diagnostic)<0)return!1;s=new vp(s.from,i,s.diagnostic)}else s=new vp(t,i,e||n.diagnostics[0])}),s}function yp(t,e){let i=e.pos,s=e.end||i,n=t.state.facet(Pp).hideOn(t,i,s);if(null!=n)return n;let r=t.startState.doc.lineAt(e.pos);return!(!t.effects.some(t=>t.is(kp))&&!t.changes.touchesRange(r.from,Math.max(r.to,s)))}function xp(t,e){return t.field(Ap,!1)?e:e.concat($e.appendConfig.of(_p))}const kp=$e.define(),Sp=$e.define(),Cp=$e.define(),Ap=xe.define({create:()=>new wp(is.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let i=t.diagnostics.map(e.changes),s=null,n=t.panel;if(t.selected){let n=e.changes.mapPos(t.selected.from,1);s=bp(i,t.selected.diagnostic,n)||bp(i,null,n)}!i.size&&n&&e.state.facet(Pp).autoPanel&&(n=null),t=new wp(i,n,s)}for(let i of e.effects)if(i.is(kp)){let s=e.state.facet(Pp).autoPanel?i.value.length?Wp.open:null:t.panel;t=wp.init(i.value,s,e.state)}else i.is(Sp)?t=new wp(t.diagnostics,i.value?Wp.open:null,t.selected):i.is(Cp)&&(t=new wp(t.diagnostics,t.panel,i.value));return t},provide:t=>[ha.from(t,t=>t.panel),_o.decorations.from(t,t=>t.diagnostics)]});const Mp=is.mark({class:"cm-lintRange cm-lintRange-active"});function Op(t,e,i){let s,{diagnostics:n}=t.state.field(Ap),r=-1,o=-1;n.between(e-(i<0?1:0),e+(i>0?1:0),(t,n,{spec:l})=>{if(e>=t&&e<=n&&(t==n||(e>t||i>0)&&(e<n||i<0)))return s=l.diagnostics,r=t,o=n,!1});let l=t.state.facet(Pp).tooltipFilter;return s&&l&&(s=l(s,t.state)),s?{pos:r,end:o,above:t.state.doc.lineAt(r).to<o,create:()=>({dom:Tp(t,s)})}:null}function Tp(t,e){return Ni("ul",{class:"cm-tooltip-lint"},e.map(e=>Lp(t,e,!1)))}const Dp=t=>{let e=t.state.field(Ap,!1);return!(!e||!e.panel)&&(t.dispatch({effects:Sp.of(!1)}),!0)},Rp=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(Ap,!1);e&&e.panel||t.dispatch({effects:xp(t.state,[Sp.of(!0)])});let i=ra(t,Wp.open);return i&&i.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(Ap,!1);if(!e)return!1;let i=t.state.selection.main,s=bp(e.diagnostics,null,i.to+1);return!(!s&&(s=bp(e.diagnostics,null,0),!s||s.from==i.from&&s.to==i.to))&&(t.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0}),!0)}}];const Pp=pe.define({combine:t=>({sources:t.map(t=>t.source).filter(t=>null!=t),...si(t.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Bp,tooltipFilter:Bp,needsRefresh:(t,e)=>t?e?i=>t(i)||e(i):t:e,hideOn:(t,e)=>t?e?(i,s,n)=>t(i,s,n)||e(i,s,n):t:e,autoPanel:(t,e)=>t||e})})});function Bp(t,e){return t?e?(i,s)=>e(t(i,s),s):t:e}function Ep(t){let e=[];if(t)t:for(let{name:i}of t){for(let t=0;t<i.length;t++){let s=i[t];if(/[a-zA-Z]/.test(s)&&!e.some(t=>t.toLowerCase()==s.toLowerCase())){e.push(s);continue t}}e.push("")}return e}function Lp(t,e,i){var s;let n=i?Ep(e.actions):[];return Ni("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Ni("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(s=e.actions)||void 0===s?void 0:s.map((i,s)=>{let r=!1,o=s=>{if(s.preventDefault(),r)return;r=!0;let n=bp(t.state.field(Ap).diagnostics,e);n&&i.apply(t,n.from,n.to)},{name:l}=i,a=n[s]?l.indexOf(n[s]):-1,h=a<0?l:[l.slice(0,a),Ni("u",l.slice(a,a+1)),l.slice(a+1)];return Ni("button",{type:"button",class:"cm-diagnosticAction"+(i.markClass?" "+i.markClass:""),onclick:o,onmousedown:o,"aria-label":` Action: ${l}${a<0?"":` (access key "${n[s]})"`}.`},h)}),e.source&&Ni("div",{class:"cm-diagnosticSource"},e.source))}class Np extends ts{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return Ni("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Ip{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Lp(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Wp{constructor(t){this.view=t,this.items=[];this.list=Ni("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(!(e.ctrlKey||e.altKey||e.metaKey)){if(27==e.keyCode)Dp(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],s=Ep(i.actions);for(let n=0;n<s.length;n++)if(s[n].toUpperCase().charCodeAt(0)==e.keyCode){let e=bp(this.view.state.field(Ap).diagnostics,i);e&&i.actions[n].apply(t,e.from,e.to)}}}e.preventDefault()}},onclick:t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)}}),this.dom=Ni("div",{class:"cm-panel-lint"},this.list,Ni("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Dp(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Ap).selected;if(!t)return-1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return-1}update(){let{diagnostics:t,selected:e}=this.view.state.field(Ap),i=0,s=!1,n=null,r=new Set;for(t.between(0,this.view.state.doc.length,(t,o,{spec:l})=>{for(let t of l.diagnostics){if(r.has(t))continue;r.add(t);let o,l=-1;for(let e=i;e<this.items.length;e++)if(this.items[e].diagnostic==t){l=e;break}l<0?(o=new Ip(this.view,t),this.items.splice(i,0,o),s=!0):(o=this.items[l],l>i&&(this.items.splice(i,l-i),s=!0)),e&&o.diagnostic==e.diagnostic?o.dom.hasAttribute("aria-selected")||(o.dom.setAttribute("aria-selected","true"),n=o):o.dom.hasAttribute("aria-selected")&&o.dom.removeAttribute("aria-selected"),i++}});i<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)s=!0,this.items.pop();0==this.items.length&&(this.items.push(new Ip(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),s=!0),n?(this.list.setAttribute("aria-activedescendant",n.id),this.view.requestMeasure({key:this,read:()=>({sel:n.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let i=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/i:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/i)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)e();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=bp(this.view.state.field(Ap).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Cp.of(e)})}static open(t){return new Wp(t)}}function Vp(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function Hp(t){return Vp(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const Fp=_o.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Hp("#d11")},".cm-lintRange-warning":{backgroundImage:Hp("orange")},".cm-lintRange-info":{backgroundImage:Hp("#999")},".cm-lintRange-hint":{backgroundImage:Hp("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function zp(t){return"error"==t?4:"warning"==t?3:"info"==t?2:1}function qp(t){let e="hint",i=1;for(let s of t){let t=zp(s.severity);t>i&&(i=t,e=s.severity)}return e}const _p=[Ap,_o.decorations.compute([Ap],t=>{let{selected:e,panel:i}=t.field(Ap);return e&&i&&e.from!=e.to?is.set([Mp.range(e.from,e.to)]):is.none}),ea(Op,{hideOn:yp}),Fp];const $p=(()=>[La(),Wa,Ol(),Uc(),Hh(),ul(),[wl,bl],ii.allowMultipleSelections.of(!0),ii.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let i=t.newDoc,{head:s}=t.newSelection.main,n=i.lineAt(s);if(s>n.from+200)return t;let r=i.sliceString(n.from,s);if(!e.some(t=>t.test(r)))return t;let{state:o}=t,l=-1,a=[];for(let{head:t}of o.selection.ranges){let e=o.doc.lineAt(t);if(e.from==l)continue;l=e.from;let i=oh(o,e.from);if(null==i)continue;let s=/^\s*/.exec(e.text)[0],n=rh(o,i);s!=n&&a.push({from:e.from,to:e.from+s.length,insert:n})}return a.length?[t,{changes:a,sequential:!0}]:t}),jh(Qh,{fallback:!0}),sc(),[rp,tp],pp(),Il(),Hl(),Bl,xf(),Xo.of([...op,...hf,...ed,...cu,...Rh,...mp,...Rp])])(),jp={init(){const t=[$p,new eh(gc),ii.readOnly.of(!0),Ec,_o.theme({"&":{height:"600px"}})];document.addEventListener("DOMContentLoaded",function(){if(void 0===CLD_METADATA)return;const e=document.getElementById("meta-data"),i=JSON.stringify(CLD_METADATA,null," ");new _o({parent:e,doc:i,extensions:t})})}};jp.init()})(); 2 //# sourceMappingURL=syntax-highlight.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/terms-order.asset.php
r3201782 r3518458 1 <?php return array('dependencies' => array(), 'version' => ' e790e76b04c6884f87d1');1 <?php return array('dependencies' => array(), 'version' => '2f7f1b83c7516fc1c316'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/terms-order.js
r3201782 r3518458 1 !function(){"use strict";const t={template:"",tags:jQuery("#cld-tax-items"),tagDelimiter:window.tagsSuggestL10n&&window.tagsSuggestL10n.tagDelimiter||",",startId:null,_init(){if(!this.tags.length)return;const t=this;this._sortable(),"undefined"!=typeof wpAjax&&(wpAjax.procesParseAjaxResponse=wpAjax.parseAjaxResponse,wpAjax.parseAjaxResponse=function(e,a,s){const n=wpAjax.procesParseAjaxResponse(e,a,s);if(!n.errors&&n.responses[0]&&jQuery('[data-taxonomy="'+n.responses[0].what+'"]').length){const e=jQuery(n.responses[0].data).find("label").last().text().trim();t._pushItem(n.responses[0].what,e)}return n}),void 0!==window.tagBox&&(window.tagBox.processflushTags=window.tagBox.flushTags,window.tagBox.flushTags=function(e,a,s){if(void 0===s){const s=e.prop("id"),n=jQuery("input.newtag",e),i=(a=a||!1)?jQuery(a).text():n.val(),r=window.tagBox.clean(i).split(t.tagDelimiter);for(const e in r){const a=s+":"+r[e];jQuery('[data-item="'+a+'"]').length||t._pushItem(a,r[e])}}return this.processflushTags(e,a,s)},window.tagBox.processTags=window.tagBox.parseTags,window.tagBox.parseTags=function(e){const a=e.id,s=a.split("-check-num-")[1],n=a.split("-check-num-")[0],i=jQuery(e).closest(".tagsdiv").find(".the-tags"),r=window.tagBox.clean(i.val()).split(t.tagDelimiter)[s];(new wp.api.collections.Tags).fetch({data:{slug:r}}).done((a=>{const s=!!a.length&&jQuery('[data-item="'+n+":"+a[0].id+'"]');s.length?s.remove():(jQuery(`.cld-tax-order-list-item:contains(${r})`).remove(),--t.startId),this.processTags(e)}))}),jQuery("body").on("change",".selectit input",(function(){const e=jQuery(this),a=e.val(),s=e.is(":checked"),n=e.parent().text().trim();!0===s?t.tags.find(`[data-item="category:${a}"]`).length||t._pushItem(`category:${a}`,n):t.tags.find(`[data-item="category:${a}"]`).remove()}))},_createItem(t,e){const a=jQuery("<li/>"),s=jQuery("<span/>"),n=jQuery("<input/>");return a.addClass("cld-tax-order-list-item").attr("data-item",t),n.addClass("cld-tax-order-list-item-input").attr("type","hidden").attr("name","cld_tax_order[]").val(t),s.addClass("dashicons dashicons-menu cld-tax-order-list-item-handle"),a.append(s).append(e).append(n),a},_pushItem(t,e){const a=this._createItem(t,e);this.tags.append(a)},_sortable(){jQuery(".cld-tax-order-list").sortable({connectWith:".cld-tax-order",axis:"y",handle:".cld-tax-order-list-item-handle",placeholder:"cld-tax-order-list-item-placeholder",forcePlaceholderSize:!0,helper:"clone"})}};void 0!==window.CLDN&&(t._init(),jQuery("[data-wp-lists] .selectit input[checked]").each(((t,e)=>{jQuery(e).trigger("change")})))}(); 1 (()=>{"use strict";const e={template:"",tags:jQuery("#cld-tax-items"),tagDelimiter:wp.i18n._x(",","tag delimiter")||",",startId:null,_init(){if(!this.tags.length)return;const e=this;this._sortable(),"undefined"!=typeof wpAjax&&(wpAjax.procesParseAjaxResponse=wpAjax.parseAjaxResponse,wpAjax.parseAjaxResponse=function(t,a,s){const i=wpAjax.procesParseAjaxResponse(t,a,s);if(!i.errors&&i.responses[0]&&jQuery('[data-taxonomy="'+i.responses[0].what+'"]').length){const t=jQuery(i.responses[0].data).find("label").last().text().trim();e._pushItem(i.responses[0].what,t)}return i}),void 0!==window.tagBox&&(window.tagBox.processflushTags=window.tagBox.flushTags,window.tagBox.flushTags=function(t,a,s){if(void 0===s){const s=t.prop("id"),i=jQuery("input.newtag",t),n=(a=a||!1)?jQuery(a).text():i.val(),r=window.tagBox.clean(n).split(e.tagDelimiter);for(const t in r){const a=s+":"+r[t];jQuery('[data-item="'+a+'"]').length||e._pushItem(a,r[t])}}return this.processflushTags(t,a,s)},window.tagBox.processTags=window.tagBox.parseTags,window.tagBox.parseTags=function(t){const a=t.id,s=a.split("-check-num-")[1],i=a.split("-check-num-")[0],n=jQuery(t).closest(".tagsdiv").find(".the-tags"),r=window.tagBox.clean(n.val()).split(e.tagDelimiter)[s];(new wp.api.collections.Tags).fetch({data:{slug:r}}).done(a=>{const s=!!a.length&&jQuery('[data-item="'+i+":"+a[0].id+'"]');s.length?s.remove():(jQuery(`.cld-tax-order-list-item:contains(${r})`).remove(),--e.startId),this.processTags(t)})}),jQuery("body").on("change",".selectit input",function(){const t=jQuery(this),a=t.val(),s=t.is(":checked"),i=t.parent().text().trim();!0===s?e.tags.find(`[data-item="category:${a}"]`).length||e._pushItem(`category:${a}`,i):e.tags.find(`[data-item="category:${a}"]`).remove()})},_createItem(e,t){const a=jQuery("<li/>"),s=jQuery("<span/>"),i=jQuery("<input/>");return a.addClass("cld-tax-order-list-item").attr("data-item",e),i.addClass("cld-tax-order-list-item-input").attr("type","hidden").attr("name","cld_tax_order[]").val(e),s.addClass("dashicons dashicons-menu cld-tax-order-list-item-handle"),a.append(s).append(t).append(i),a},_pushItem(e,t){const a=this._createItem(e,t);this.tags.append(a)},_sortable(){jQuery(".cld-tax-order-list").sortable({connectWith:".cld-tax-order",axis:"y",handle:".cld-tax-order-list-item-handle",placeholder:"cld-tax-order-list-item-placeholder",forcePlaceholderSize:!0,helper:"clone"})}};void 0!==window.CLDN&&(e._init(),jQuery("[data-wp-lists] .selectit input[checked]").each((e,t)=>{jQuery(t).trigger("change")}))})(); 2 //# sourceMappingURL=terms-order.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/video-init.asset.php
r3201782 r3518458 1 <?php return array('dependencies' => array(), 'version' => ' aefe496c15539471a301');1 <?php return array('dependencies' => array(), 'version' => 'd6d2d0466119a6a1f919'); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/video-init.js
r3201782 r3518458 1 !function(){if("undefined"!=typeof cldVideos){cldVideos=JSON.parse(cldVideos);for(const e in cldVideos){const d=cldVideos[e],o="cloudinary-video-"+e;cld.videoPlayer(o,d)}window.addEventListener("load",(function(){for(const e in cldVideos){const d="cloudinary-video-"+e;let o=document.getElementById(d).getElementsByTagName("video");1===o.length&&(o=o[0],o.style.width="100%",videoFreeForm&&-1===o.src.indexOf(videoFreeForm)&&!cldVideos[e].overwrite_transformations&&(o.src=o.src.replace("upload/","upload/"+videoFreeForm+"/")))}}))}}(); 1 !function(){if("undefined"!=typeof cldVideos){cldVideos=JSON.parse(cldVideos);for(const e in cldVideos){const d=cldVideos[e],o="cloudinary-video-"+e;cld.videoPlayer(o,d)}window.addEventListener("load",function(){for(const e in cldVideos){const d="cloudinary-video-"+e;let o=document.getElementById(d).getElementsByTagName("video");1===o.length&&(o=o[0],o.style.width="100%",videoFreeForm&&-1===o.src.indexOf(videoFreeForm)&&!cldVideos[e].overwrite_transformations&&(o.src=o.src.replace("upload/","upload/"+videoFreeForm+"/")))}})}}(); 2 //# sourceMappingURL=video-init.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/js/wp-color-picker-alpha.js
r2869397 r3518458 1 !function(o,a){var t={version:300};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var r=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(r)&&r>=t.version)return}if(!Color.fn.hasOwnProperty("to_s")){Color.fn.to_s=function(o){"hex"===(o=o||"hex")&&this._alpha<1&&(o="rgba");var a="";return"hex"===o?a=this.toString():this.error||(a=this.toCSS(o).replace(/\(\s+/,"(").replace(/\s+\)/,")")),a},window.wpColorPickerAlpha=t;var i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==";o.widget("a8c.iris",o.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(o){return o===a&&(o=this._color),this.alphaOptions.alphaEnabled?(o=o.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(o=o.replace(/\s+/g,"")),o):o.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(o){}o.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1}),this._super()},_addInputListeners:function(o){var a=this,t=function(t){var r=o.val(),i=new Color(r),l=(r=r.replace(/^(#|(rgb|hsl)a?)/,""),a.alphaOptions.alphaColorType);o.removeClass("iris-error"),i.error?""!==r&&o.addClass("iris-error"):"hex"===l&&"keyup"===t.type&&r.match(/^[0-9a-fA-F]{3}$/)||i.toIEOctoHex()!==a._color.toIEOctoHex()&&a._setOption("color",a._getColor(i))};o.on("change",t).on("keyup",a._debounce(t,100)),a.options.hide&&o.one("focus",(function(){a.show()}))},_initControls:function(){if(this._super(),this.alphaOptions.alphaEnabled){var a=this,t=a.controls.strip.clone(!1,!1),r=t.find(".iris-slider-offset"),i={stripAlpha:t,stripAlphaSlider:r};t.addClass("iris-strip-alpha"),r.addClass("iris-slider-offset-alpha"),t.appendTo(a.picker.find(".iris-picker-inner")),o.each(i,(function(o,t){a.controls[o]=t})),a.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*a._color._alpha),slide:function(o,t){a.active="strip",a._color._alpha=parseFloat(t.value/100),a._change.apply(a,arguments)}})}},_dimensions:function(o){if(this._super(o),this.alphaOptions.alphaEnabled){var a,t,r,i,l,e=this,s=e.options,n=e.controls.square,p=e.picker.find(".iris-strip");for(a=Math.round(e.picker.outerWidth(!0)-(s.border?22:0)),t=Math.round(n.outerWidth()),r=Math.round((a-t)/2),i=Math.round(r/2),l=Math.round(t+2*r+2*i);l>a;)r=Math.round(r-2),i=Math.round(i-1),l=Math.round(t+2*r+2*i);n.css("margin","0"),p.width(r).css("margin-left",i+"px")}},_change:function(){var a=this,t=a.active;if(a._super(),a.alphaOptions.alphaEnabled){var r=a.controls,l=parseInt(100*a._color._alpha),e=a._color.toRgb(),s=["rgb("+e.r+","+e.g+","+e.b+") 0%","rgba("+e.r+","+e.g+","+e.b+", 0) 100%"];a.picker.closest(".wp-picker-container").find(".wp-color-result"),a.options.color=a._getColor(),r.stripAlpha.css({background:"linear-gradient(to bottom, "+s.join(", ")+"), url("+i+")"}),t&&r.stripAlphaSlider.slider("value",l),a._color.error||a.element.removeClass("iris-error").val(a.options.color),a.picker.find(".iris-palette-container").on("click.palette",".iris-palette",(function(){var t=o(this).data("color");a.alphaOptions.alphaReset&&(a._color._alpha=1,t=a._getColor()),a._setOption("color",t)}))}},_paintDimension:function(o,a){var t=this,r=!1;t.alphaOptions.alphaEnabled&&"strip"===a&&(r=t._color,t._color=new Color(r.toString()),t.hue=t._color.h()),t._super(o,a),r&&(t._color=r)},_setOption:function(o,a){var t=this;if("color"!==o||!t.alphaOptions.alphaEnabled)return t._super(o,a);a=""+a,newColor=new Color(a).setHSpace(t.options.mode),newColor.error||t._getColor(newColor)===t._getColor()||(t._color=newColor,t.options.color=t._getColor(),t.active="external",t._change())},color:function(o){return!0===o?this._color.clone():o===a?this._getColor():void this.option("color",o)}}),o.widget("wp.wpColorPicker",o.wp.wpColorPicker,{alphaOptions:{alphaEnabled:!1},_getAlphaOptions:function(){var a=this.element,t=a.data("type")||this.options.type,r=a.data("defaultColor")||a.val(),i={alphaEnabled:a.data("alphaEnabled")||!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"rgb",alphaColorWithSpace:!1};return i.alphaEnabled&&(i.alphaEnabled=a.is("input")&&"full"===t),i.alphaEnabled?(i.alphaColorWithSpace=r&&r.match(/\s/),o.each(i,(function(o,t){var l=a.data(o)||t;switch(o){case"alphaCustomWidth":l=l?parseInt(l,10):0,l=isNaN(l)?t:l;break;case"alphaColorType":l.match(/^(hex|(rgb|hsl)a?)$/)||(l=r&&r.match(/^#/)?"hex":r&&r.match(/^hsla?/)?"hsl":t);break;default:l=!!l}i[o]=l})),i):i},_create:function(){o.support.iris&&(this.alphaOptions=this._getAlphaOptions(),this._super())},_addListeners:function(){if(!this.alphaOptions.alphaEnabled)return this._super();var a=this,t=a.element,r=a.toggler.is("a");this.alphaOptions.defaultWidth=t.width(),this.alphaOptions.alphaCustomWidth&&t.width(parseInt(this.alphaOptions.defaultWidth+this.alphaOptions.alphaCustomWidth,10)),a.toggler.css({position:"relative","background-image":"url("+i+")"}),r?a.toggler.html('<span class="color-alpha" />'):a.toggler.append('<span class="color-alpha" />'),a.colorAlpha=a.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":t.val()}),"ltr"===a.colorAlpha.css("direction")?a.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):a.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),t.iris({change:function(t,r){a.colorAlpha.css({"background-color":r.color.to_s(a.alphaOptions.alphaColorType)}),o.isFunction(a.options.change)&&a.options.change.call(this,t,r)}}),a.wrap.on("click.wpcolorpicker",(function(o){o.stopPropagation()})),a.toggler.click((function(){a.toggler.hasClass("wp-picker-open")?a.close():a.open()})),t.change((function(i){var l=o(this).val();(t.hasClass("iris-error")||""===l||l.match(/^(#|(rgb|hsl)a?)$/))&&(r&&a.toggler.removeAttr("style"),a.colorAlpha.css("background-color",""),o.isFunction(a.options.clear)&&a.options.clear.call(this,i))})),a.button.click((function(i){o(this).hasClass("wp-picker-default")?t.val(a.options.defaultColor).change():o(this).hasClass("wp-picker-clear")&&(t.val(""),r&&a.toggler.removeAttr("style"),a.colorAlpha.css("background-color",""),o.isFunction(a.options.clear)&&a.options.clear.call(this,i),t.trigger("change"))}))}})}}(jQuery); 1 !function(o,a){var t={version:300};if("wpColorPickerAlpha"in window&&"version"in window.wpColorPickerAlpha){var r=parseInt(window.wpColorPickerAlpha.version,10);if(!isNaN(r)&&r>=t.version)return}if(!Color.fn.hasOwnProperty("to_s")){Color.fn.to_s=function(o){"hex"===(o=o||"hex")&&this._alpha<1&&(o="rgba");var a="";return"hex"===o?a=this.toString():this.error||(a=this.toCSS(o).replace(/\(\s+/,"(").replace(/\s+\)/,")")),a},window.wpColorPickerAlpha=t;var i="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==";o.widget("a8c.iris",o.a8c.iris,{alphaOptions:{alphaEnabled:!1},_getColor:function(o){return o===a&&(o=this._color),this.alphaOptions.alphaEnabled?(o=o.to_s(this.alphaOptions.alphaColorType),this.alphaOptions.alphaColorWithSpace||(o=o.replace(/\s+/g,"")),o):o.toString()},_create:function(){try{this.alphaOptions=this.element.wpColorPicker("instance").alphaOptions}catch(o){}o.extend({},this.alphaOptions,{alphaEnabled:!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"hex",alphaColorWithSpace:!1}),this._super()},_addInputListeners:function(o){var a=this,t=function(t){var r=o.val(),i=new Color(r),l=(r=r.replace(/^(#|(rgb|hsl)a?)/,""),a.alphaOptions.alphaColorType);o.removeClass("iris-error"),i.error?""!==r&&o.addClass("iris-error"):"hex"===l&&"keyup"===t.type&&r.match(/^[0-9a-fA-F]{3}$/)||i.toIEOctoHex()!==a._color.toIEOctoHex()&&a._setOption("color",a._getColor(i))};o.on("change",t).on("keyup",a._debounce(t,100)),a.options.hide&&o.one("focus",function(){a.show()})},_initControls:function(){if(this._super(),this.alphaOptions.alphaEnabled){var a=this,t=a.controls.strip.clone(!1,!1),r=t.find(".iris-slider-offset"),i={stripAlpha:t,stripAlphaSlider:r};t.addClass("iris-strip-alpha"),r.addClass("iris-slider-offset-alpha"),t.appendTo(a.picker.find(".iris-picker-inner")),o.each(i,function(o,t){a.controls[o]=t}),a.controls.stripAlphaSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*a._color._alpha),slide:function(o,t){a.active="strip",a._color._alpha=parseFloat(t.value/100),a._change.apply(a,arguments)}})}},_dimensions:function(o){if(this._super(o),this.alphaOptions.alphaEnabled){var a,t,r,i,l,e=this,s=e.options,n=e.controls.square,p=e.picker.find(".iris-strip");for(a=Math.round(e.picker.outerWidth(!0)-(s.border?22:0)),t=Math.round(n.outerWidth()),r=Math.round((a-t)/2),i=Math.round(r/2),l=Math.round(t+2*r+2*i);l>a;)r=Math.round(r-2),i=Math.round(i-1),l=Math.round(t+2*r+2*i);n.css("margin","0"),p.width(r).css("margin-left",i+"px")}},_change:function(){var a=this,t=a.active;if(a._super(),a.alphaOptions.alphaEnabled){var r=a.controls,l=parseInt(100*a._color._alpha),e=a._color.toRgb(),s=["rgb("+e.r+","+e.g+","+e.b+") 0%","rgba("+e.r+","+e.g+","+e.b+", 0) 100%"];a.picker.closest(".wp-picker-container").find(".wp-color-result"),a.options.color=a._getColor(),r.stripAlpha.css({background:"linear-gradient(to bottom, "+s.join(", ")+"), url("+i+")"}),t&&r.stripAlphaSlider.slider("value",l),a._color.error||a.element.removeClass("iris-error").val(a.options.color),a.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){var t=o(this).data("color");a.alphaOptions.alphaReset&&(a._color._alpha=1,t=a._getColor()),a._setOption("color",t)})}},_paintDimension:function(o,a){var t=this,r=!1;t.alphaOptions.alphaEnabled&&"strip"===a&&(r=t._color,t._color=new Color(r.toString()),t.hue=t._color.h()),t._super(o,a),r&&(t._color=r)},_setOption:function(o,a){var t=this;if("color"!==o||!t.alphaOptions.alphaEnabled)return t._super(o,a);a=""+a,newColor=new Color(a).setHSpace(t.options.mode),newColor.error||t._getColor(newColor)===t._getColor()||(t._color=newColor,t.options.color=t._getColor(),t.active="external",t._change())},color:function(o){return!0===o?this._color.clone():o===a?this._getColor():void this.option("color",o)}}),o.widget("wp.wpColorPicker",o.wp.wpColorPicker,{alphaOptions:{alphaEnabled:!1},_getAlphaOptions:function(){var a=this.element,t=a.data("type")||this.options.type,r=a.data("defaultColor")||a.val(),i={alphaEnabled:a.data("alphaEnabled")||!1,alphaCustomWidth:130,alphaReset:!1,alphaColorType:"rgb",alphaColorWithSpace:!1};return i.alphaEnabled&&(i.alphaEnabled=a.is("input")&&"full"===t),i.alphaEnabled?(i.alphaColorWithSpace=r&&r.match(/\s/),o.each(i,function(o,t){var l=a.data(o)||t;switch(o){case"alphaCustomWidth":l=l?parseInt(l,10):0,l=isNaN(l)?t:l;break;case"alphaColorType":l.match(/^(hex|(rgb|hsl)a?)$/)||(l=r&&r.match(/^#/)?"hex":r&&r.match(/^hsla?/)?"hsl":t);break;default:l=!!l}i[o]=l}),i):i},_create:function(){o.support.iris&&(this.alphaOptions=this._getAlphaOptions(),this._super())},_addListeners:function(){if(!this.alphaOptions.alphaEnabled)return this._super();var a=this,t=a.element,r=a.toggler.is("a");this.alphaOptions.defaultWidth=t.width(),this.alphaOptions.alphaCustomWidth&&t.width(parseInt(this.alphaOptions.defaultWidth+this.alphaOptions.alphaCustomWidth,10)),a.toggler.css({position:"relative","background-image":"url("+i+")"}),r?a.toggler.html('<span class="color-alpha" />'):a.toggler.append('<span class="color-alpha" />'),a.colorAlpha=a.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,"background-color":t.val()}),"ltr"===a.colorAlpha.css("direction")?a.colorAlpha.css({"border-bottom-left-radius":"2px","border-top-left-radius":"2px",left:0}):a.colorAlpha.css({"border-bottom-right-radius":"2px","border-top-right-radius":"2px",right:0}),t.iris({change:function(t,r){a.colorAlpha.css({"background-color":r.color.to_s(a.alphaOptions.alphaColorType)}),o.isFunction(a.options.change)&&a.options.change.call(this,t,r)}}),a.wrap.on("click.wpcolorpicker",function(o){o.stopPropagation()}),a.toggler.click(function(){a.toggler.hasClass("wp-picker-open")?a.close():a.open()}),t.change(function(i){var l=o(this).val();(t.hasClass("iris-error")||""===l||l.match(/^(#|(rgb|hsl)a?)$/))&&(r&&a.toggler.removeAttr("style"),a.colorAlpha.css("background-color",""),o.isFunction(a.options.clear)&&a.options.clear.call(this,i))}),a.button.click(function(i){o(this).hasClass("wp-picker-default")?t.val(a.options.defaultColor).change():o(this).hasClass("wp-picker-clear")&&(t.val(""),r&&a.toggler.removeAttr("style"),a.colorAlpha.css("background-color",""),o.isFunction(a.options.clear)&&a.options.clear.call(this,i),t.trigger("change"))})}})}}(jQuery); 2 //# sourceMappingURL=wp-color-picker-alpha.js.map -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/php/class-assets.php
r3454408 r3518458 495 495 } 496 496 } 497 498 $blog_id = get_current_blog_id(); 499 497 500 // Get the disabled items. 498 501 foreach ( $this->asset_parents as $url => $parent ) { 499 502 if ( isset( $this->active_parents[ $url ] ) ) { 503 continue; 504 } 505 506 // If the parent is from another site on a multisite instance, skip it. 507 if ( isset( $parent->blog_id ) && $parent->blog_id !== $blog_id ) { 500 508 continue; 501 509 } … … 576 584 $this->media->update_post_meta( $parent_id, Sync::META_KEYS['version'], $version ); 577 585 $this->media->update_post_meta( $parent_id, self::META_KEYS['excludes'], array() ); 578 $this->asset_parents[ $path ] = get_post( $parent_id ); 586 587 $this->add_asset_parent( get_post( $parent_id ) ); 579 588 } 580 589 … … 985 994 do { 986 995 foreach ( $query->get_posts() as $post ) { 987 $this->a sset_parents[ $post->post_title ] = $post;996 $this->add_asset_parent( $post ); 988 997 } 989 998 $args = $query->query_vars; … … 1774 1783 return $params; 1775 1784 } 1785 1786 /** 1787 * Assign a parent asset to the asset parents array. 1788 * If this is a multisite installation, also assign the current blog ID to the post object for later checks. 1789 * 1790 * @param \WP_Post $post The post to assign. 1791 * @return void 1792 */ 1793 protected function add_asset_parent( $post ) { 1794 if ( is_multisite() ) { 1795 $post->blog_id = get_current_blog_id(); 1796 } 1797 1798 $this->asset_parents[ $post->post_title ] = $post; 1799 } 1776 1800 } -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/php/class-delivery.php
r3439415 r3518458 1008 1008 1009 1009 /** 1010 * Get the image size dimensions from the tags if available. 1011 * 1012 * @param array $tags The media tags found in the content. 1013 * @param array $relation The relation data for the media item. 1014 * 1015 * @return array An array with width and height, or empty if not found. 1016 */ 1017 private function get_image_size_within_tags( $tags, $relation ) { 1018 // If we don't have a post ID, we can't find a size, so return empty. 1019 if ( empty( $relation['post_id'] ) ) { 1020 return array(); 1021 } 1022 $post_id = intval( $relation['post_id'] ); 1023 1024 // Look through the tags to find one that matches our post ID and has a size slug, then get the size from that slug. 1025 foreach ( $tags as $set ) { 1026 // If this set doesn't have a size slug, skip. 1027 if ( empty( $set['atts']['data-size-slug'] ) ) { 1028 continue; 1029 } 1030 1031 // If this tag's post ID matches our relation's post ID, get the size from the slug and return it. 1032 if ( $post_id === $set['id'] ) { 1033 $size = $this->media->get_size_from_slug( $set['atts']['data-size-slug'] ); 1034 return ( empty( $size ) ) ? array() : $size; // Return the size if found, otherwise return empty array. 1035 } 1036 } 1037 1038 return array(); 1039 } 1040 1041 /** 1010 1042 * Convert media tags from Local to Cloudinary, and register with String_Replace. 1011 1043 * … … 1026 1058 1027 1059 $tags = $this->get_media_tags( $content, 'img|video|article|source' ); 1028 $tags = array_map( array( $this, 'parse_element' ), $tags ); 1060 $tags = array_map( 1061 function ( $tag ) use ( $content ) { 1062 return $this->parse_element( $tag, $content ); 1063 }, 1064 $tags 1065 ); 1029 1066 $tags = array_filter( $tags ); 1030 1067 … … 1079 1116 } 1080 1117 1081 $base = $type . ':' . $url;1082 $public_id = ! is_admin() ? $relation['public_id'] . '.' . $relation['format'] : null;1118 $base = $type . ':' . $url; 1119 $public_id = ! is_admin() ? $relation['public_id'] . '.' . $relation['format'] : null; 1083 1120 // Get merged transformations including overlays. 1084 1121 $merged_transformations = Relate::get_transformations( $relation['post_id'], true ); 1085 $cloudinary_url = $this->media->cloudinary_url( $relation['post_id'], array(), $merged_transformations, $public_id ); 1122 1123 $size = $this->get_image_size_within_tags( $tags, $relation ); 1124 $cloudinary_url = $this->media->cloudinary_url( $relation['post_id'], $size, $merged_transformations, $public_id ); 1086 1125 if ( empty( $cloudinary_url ) ) { 1087 1126 continue; … … 1221 1260 } 1222 1261 } 1262 1263 // Retrieve size from the parent figure class of the image if it exists. 1264 if ( ! empty( $tag_element['atts']['data-size-slug'] ) && 'img' === $tag_element['tag'] ) { 1265 $slug_size = $this->media->get_size_from_slug( $tag_element['atts']['data-size-slug'] ); 1266 if ( ! empty( $slug_size ) ) { 1267 $size = $slug_size; 1268 } 1269 } 1270 1223 1271 // Unset srcset and sizes. 1224 1272 unset( $tag_element['atts']['srcset'], $tag_element['atts']['sizes'] ); … … 1351 1399 ); 1352 1400 1353 $tag_element['atts']['data-public-id'] = $this->plugin->get_component( 'connect' )->api->get_public_id( $tag_element['id'], $args );1401 $tag_element['atts']['data-public-id'] = $this->plugin->get_component( 'connect' )->api->get_public_id( $tag_element['id'], $args, $public_id ); 1354 1402 1355 1403 return $tag_element; … … 1438 1486 * 1439 1487 * @param string $element The HTML element. 1488 * @param string $content Optional full HTML content for parent context. 1440 1489 * 1441 1490 * @return array|null 1442 1491 */ 1443 public function parse_element( $element ) {1492 public function parse_element( $element, $content = '' ) { 1444 1493 /** 1445 1494 * Filter to skip parsing an element. … … 1552 1601 // Check if this is a crop or a scale. 1553 1602 $has_size = $this->media->get_size_from_url( $this->sanitize_url( $raw_url ) ); 1603 1604 // If no size found in URL, try to extract from parent figure element so we can apply cropping if needed. 1605 if ( empty( $has_size ) && $has_sized_transformation ) { 1606 $size_slug = $this->media->get_size_slug_from_parent_figure_class( $tag_element['original'], $content ); 1607 1608 if ( ! empty( $size_slug ) ) { 1609 $has_size = $this->media->get_size_from_slug( $size_slug ); 1610 if ( ! empty( $has_size ) ) { 1611 $attributes['data-size-slug'] = $size_slug; 1612 $tag_element['width'] = $has_size[0]; 1613 $tag_element['height'] = $has_size[1]; 1614 } 1615 } 1616 } 1617 1554 1618 if ( ! empty( $has_size ) && ! empty( $item['height'] ) ) { 1555 1619 $file_ratio = round( $has_size[0] / $has_size[1], 2 ); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/php/class-media.php
r3467487 r3518458 2059 2059 wp_enqueue_script( 'cloudinary-media-modal', $this->plugin->dir_url . '/js/media-modal.js', null, $this->plugin->version, true ); 2060 2060 wp_enqueue_script( 'cloudinary-media-library', CLOUDINARY_ENDPOINTS_MEDIA_LIBRARY, $deps, $this->plugin->version, true ); 2061 wp_enqueue_script( 'cloudinary-terms-order', $this->plugin->dir_url . '/js/terms-order.js', array( 'jquery' ), $this->plugin->version, true );2061 wp_enqueue_script( 'cloudinary-terms-order', $this->plugin->dir_url . '/js/terms-order.js', array( 'jquery', 'wp-i18n' ), $this->plugin->version, true ); 2062 2062 wp_enqueue_style( 'cloudinary' ); 2063 2063 $params = array( … … 3148 3148 $this->global_transformations = new Global_Transformations( $this ); 3149 3149 $this->gallery = $this->plugin->get_component( 'gallery' ); 3150 $this->woocommerce_gallery = new WooCommerceGallery( $this->gallery );3150 $this->woocommerce_gallery = new WooCommerceGallery( $this->gallery, $this ); 3151 3151 $this->filter = new Filter( $this ); 3152 3152 $this->upgrade = new Upgrade( $this ); … … 3268 3268 } 3269 3269 } 3270 3271 3272 /** 3273 * Get the size dimensions based on the size slug. 3274 * 3275 * Uses WordPress core API to retrieve registered image subsizes, which handles both 3276 * built-in sizes (thumbnail, medium, large, etc.) and custom registered sizes. 3277 * 3278 * @param string $size_slug The WordPress size slug (e.g., 'thumbnail', 'medium', 'large'). 3279 * 3280 * @return array|null An array with width and height, or null if not found. 3281 */ 3282 public function get_size_from_slug( $size_slug ) { 3283 // Use WordPress core API to get all registered image subsizes. 3284 $image_subsizes = wp_get_registered_image_subsizes(); 3285 3286 // Check if the requested size exists in registered subsizes. 3287 if ( ! isset( $image_subsizes[ $size_slug ] ) ) { 3288 return null; 3289 } 3290 3291 $size_data = $image_subsizes[ $size_slug ]; 3292 3293 // Return width and height if both are present and valid. 3294 if ( ! empty( $size_data['width'] ) && ! empty( $size_data['height'] ) ) { 3295 return array( (int) $size_data['width'], (int) $size_data['height'] ); 3296 } 3297 3298 return null; 3299 } 3300 3301 3302 /** 3303 * Extract WordPress image size from parent figure element. 3304 * 3305 * @param string $element The img tag element. 3306 * @param string $content The full HTML content. 3307 * 3308 * @return string|null The WordPress size slug (e.g., 'thumbnail', 'medium'), or null if not found. 3309 */ 3310 public function get_size_slug_from_parent_figure_class( $element, $content ) { 3311 // If content is empty, we can't find a parent figure, so return null. 3312 if ( empty( $content ) ) { 3313 return null; 3314 } 3315 3316 // Escape the element for use in regex. 3317 $escaped_element = preg_quote( $element, '#' ); 3318 3319 // Pattern: <figure class="...size-{size}...">...img element...[optional figcaption]</figure> . 3320 $pattern = '#<figure\s+[^>]*class="[^"]*\bsize-(\w+)\b[^"]*"[^>]*>.*?' . $escaped_element . '.*?</figure>#is'; 3321 3322 // Look for the parent figure tag that contains this img element. 3323 if ( preg_match( $pattern, $content, $matches ) ) { 3324 return $matches[1]; 3325 } 3326 3327 return null; 3328 } 3270 3329 } -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/php/class-utils.php
r3439415 r3518458 369 369 $upgrade_sequence = array(); 370 370 $sequences = array( 371 '3.0.0' => array(371 '3.0.0' => array( 372 372 'range' => array( '3.0.0' ), 373 373 'method' => array( 'Cloudinary\Utils', 'upgrade_3_0_1' ), 374 374 ), 375 '3.1.9' => array(375 '3.1.9' => array( 376 376 'range' => array( '3.0.1', '3.1.9' ), 377 377 'method' => array( 'Cloudinary\Utils', 'upgrade_3_1_9' ), … … 1089 1089 $media_context_query = apply_filters( 'cloudinary_media_context_query', 'media_context = %s' ); 1090 1090 1091 /** 1092 * Filter the media context things. 1093 * 1094 * @hook cloudinary_media_context_things 1095 * @since 3.2.0 1096 * @param $media_context_things {array} The default media context things. 1097 * @return {array} 1098 */ 1099 $media_context_things = apply_filters( 'cloudinary_media_context_things', array( 'default' ) ); 1091 $media_context_things = self::get_media_context_things(); 1100 1092 1101 1093 // Query for urls in chunks. … … 1263 1255 1264 1256 /** 1257 * Get the media context things. 1258 * 1259 * @param array $media_context_things The media context things to query for. Defaults to array( 'default' ). 1260 * 1261 * @return array 1262 */ 1263 public static function get_media_context_things( $media_context_things = array( 'default' ) ) { 1264 1265 /** 1266 * Filter the media context things. 1267 * 1268 * @hook cloudinary_media_context_things 1269 * @since 3.2.0 1270 * @param $media_context_things {array} The default media context things. 1271 * @return {array} 1272 */ 1273 $media_context_things = apply_filters( 'cloudinary_media_context_things', $media_context_things ); 1274 1275 return $media_context_things; 1276 } 1277 1278 /** 1265 1279 * Get the home URL. 1266 1280 * … … 1385 1399 * Get inline SVG content safely. 1386 1400 * 1387 * @param string $file_path The absolute or relative path to the SVG file.1388 * @param bool $ echoWhether to echo the SVG content or return it. Default true.1401 * @param string $file_path The absolute or relative path to the SVG file. 1402 * @param bool $output_content Whether to echo the SVG content or return it. Default true. 1389 1403 * 1390 1404 * @return string|void The SVG content if $echo is false, void otherwise. 1391 1405 */ 1392 public static function get_inline_svg( $file_path, $ echo= true ) {1406 public static function get_inline_svg( $file_path, $output_content = true ) { 1393 1407 // If relative path, make it absolute from plugin root. 1394 1408 if ( ! file_exists( $file_path ) ) { … … 1403 1417 1404 1418 // Get the SVG content. 1405 $svg_content = file_get_contents( $file_path ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents 1419 $svg_content = file_get_contents( $file_path ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents, WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsUnknown 1406 1420 1407 1421 if ( false === $svg_content ) { … … 1412 1426 $svg_content = self::sanitize_svg( $svg_content ); 1413 1427 1414 if ( $ echo) {1428 if ( $output_content ) { 1415 1429 echo $svg_content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Sanitized by sanitize_svg. 1416 1430 } else { -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/php/media/class-woocommercegallery.php
r2977662 r3518458 8 8 namespace Cloudinary\Media; 9 9 10 use Cloudinary\Media; 11 use WP_REST_Request; 12 use WP_REST_Response; 13 use WP_REST_Server; 14 10 15 /** 11 16 * Class WooCommerceGallery. … … 22 27 23 28 /** 29 * The media instance. 30 * 31 * @var Media 32 */ 33 private $media; 34 35 /** 24 36 * Init woo gallery. 25 37 * 26 38 * @param Gallery $gallery Gallery instance. 27 */ 28 public function __construct( Gallery $gallery ) { 39 * @param Media $media Media instance. 40 */ 41 public function __construct( Gallery $gallery, Media $media ) { 29 42 $this->gallery = $gallery; 30 31 if ( self::woocommerce_active() && $this->enabled() ) { 32 $this->setup_hooks(); 43 $this->media = $media; 44 45 if ( self::woocommerce_active() ) { 46 $this->setup_rest_hooks(); 47 48 if ( $this->enabled() ) { 49 $this->setup_hooks(); 50 } 33 51 } 34 52 } … … 88 106 89 107 /** 108 * Setup hooks for the REST API integration. 109 */ 110 public function setup_rest_hooks() { 111 add_filter( 'rest_request_before_callbacks', array( $this, 'pre_process_product_images' ), 10, 3 ); 112 } 113 114 /** 90 115 * Setup hooks for the gallery. 91 116 */ … … 106 131 add_filter( 'cloudinary_enqueue_gallery_script', array( $this, 'maybe_enqueue_scripts' ) ); 107 132 } 133 134 /** 135 * Pre-process product images in REST API requests to resolve Cloudinary URLs to existing 136 * media library attachment IDs, preventing unnecessary sideloads and duplicate assets. 137 * 138 * @param WP_REST_Response|null $response The response object or null. 139 * @param WP_REST_Server $handler The request handler. 140 * @param WP_REST_Request $request The request object. 141 * 142 * @return WP_REST_Response|null 143 */ 144 public function pre_process_product_images( $response, $handler, $request ) { 145 $route = $request->get_route(); 146 $method = $request->get_method(); 147 148 // Ignore requests to other API endpoints. 149 if ( 150 false === strpos( $route, '/wc/' ) 151 || false === strpos( $route, '/products' ) 152 || ! in_array( $method, array( 'POST', 'PUT', 'PATCH' ), true ) 153 ) { 154 return $response; 155 } 156 157 // We only care about requests that include images. 158 $images = $request->get_param( 'images' ); 159 if ( empty( $images ) || ! is_array( $images ) ) { 160 return $response; 161 } 162 163 $modified = false; 164 165 foreach ( $images as $index => $image ) { 166 // If the image ID is already passed, WooCommerce will be able to find the corresponding attachment from the Media Library. 167 if ( ! empty( $image['id'] ) ) { 168 continue; 169 } 170 171 $src = isset( $image['src'] ) ? esc_url_raw( $image['src'] ) : ''; 172 173 // We only care about images with a cloudinary URL. 174 if ( ! $src || ! $this->media->is_cloudinary_url( $src ) ) { 175 continue; 176 } 177 178 $attachment_id = $this->find_attachment_by_cloudinary_url( $src ); 179 180 // Apply the ID so that WooCommerce assigns the existing attachment. 181 if ( ! is_null( $attachment_id ) ) { 182 $images[ $index ]['id'] = $attachment_id; 183 $modified = true; 184 } 185 } 186 187 if ( $modified ) { 188 $request->set_param( 'images', $images ); 189 } 190 191 return $response; 192 } 193 194 /** 195 * Find an existing media library attachment that corresponds to a Cloudinary URL. 196 * 197 * The URL may include transformation segments, so the lookup proceeds in three steps: 198 * exact sync key match, bare public ID match, then base key match. 199 * 200 * @param string $url A Cloudinary asset URL. 201 * 202 * @return int|null Attachment ID, or null if not found. 203 */ 204 private function find_attachment_by_cloudinary_url( $url ) { 205 // Step 1: exact sync key — handles URLs that already exist verbatim in the library. 206 $attachment_id = $this->media->get_id_from_url( $url ); 207 if ( $attachment_id ) { 208 return $attachment_id; 209 } 210 211 $public_id = $this->media->get_public_id_from_url( $url ); 212 if ( ! $public_id ) { 213 return null; 214 } 215 216 // Step 2: bare public ID — matches assets uploaded from WordPress without transformations. 217 $linked = $this->media->get_linked_attachments( $public_id ); 218 if ( ! empty( $linked ) ) { 219 return array_shift( $linked ); 220 } 221 222 // Step 3: base key — matches assets imported from Cloudinary. 223 $base_id = $this->media->get_id_from_sync_key( 'base_' . $public_id ); 224 225 return $base_id ? $base_id : null; 226 } 108 227 } -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/php/relate/class-relationship.php
r3439415 r3518458 81 81 global $wpdb; 82 82 $table_name = Utils::get_relationship_table(); 83 84 $sql = $wpdb->prepare( "SELECT * FROM {$table_name} WHERE post_id = %d AND media_context = %s", $this->post_id, $this->context ); // phpcs:ignore WordPress.DB 83 // method_exists guard handles the case where Utils was autoloaded from the old plugin version during a plugin update request. 84 $default_contexts = method_exists( Utils::class, 'get_media_context_things' ) ? Utils::get_media_context_things() : array( 'default' ); 85 86 // If the context is in the default contexts, we want to query for all of them. 87 // This ensures that a media uploaded with a previous default context will still be found, even if the default context has changed since it was uploaded. 88 $contexts = in_array( $this->context, $default_contexts, true ) ? $default_contexts : array( $this->context ); 89 90 // Create the context query placeholders by filling an array with the correct number of %s placeholders and then imploding it into a string. 91 $context_query = implode( ', ', array_fill( 0, count( $contexts ), '%s' ) ); 92 93 // Prepare arguments for the SQL query. 94 $query_args = array_merge( 95 array( $this->post_id ), 96 $contexts, 97 array( $this->context ) 98 ); 99 100 // phpcs:ignore WordPress.DB 101 $sql = $wpdb->prepare( 102 "SELECT * FROM {$table_name} WHERE `post_id` = %d AND `media_context` IN ({$context_query}) ORDER BY FIELD(`media_context`, %s) DESC LIMIT 1", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQL.NotPrepared 103 $query_args 104 ); 85 105 $data = $wpdb->get_row( $sql, ARRAY_A ); // phpcs:ignore WordPress.DB 86 106 -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/php/traits/trait-params.php
r3382444 r3518458 147 147 */ 148 148 protected function sanitize_slug( $slug ) { 149 if ( ! $this->should_sanitize_slugs || ! str_contains( $slug, $this->separator ) ) {149 if ( ! $this->should_sanitize_slugs || false === strpos( $slug, $this->separator ) ) { 150 150 return $slug; 151 151 } -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/php/ui/component/class-crops.php
r3454408 r3518458 280 280 $control['children']['slider'] = $slider; 281 281 282 $label = $this->get_part( 'span' );282 $label = $this->get_part( 'span' ); 283 283 $label['attributes']['class'] = 'cld-input-on-off-control-label'; 284 284 $label['content'] = __( 'Disable', 'cloudinary' ); -
cloudinary-image-management-and-manipulation-in-the-cloud-cdn/trunk/readme.txt
r3467487 r3518458 2 2 Contributors: Cloudinary, XWP, Automattic 3 3 Tags: image-optimizer, core-web-vitals, video, resize, performance 4 Requires at least: 4.75 Tested up to: 6.9. 14 Requires at least: 5.6 5 Tested up to: 6.9.4 6 6 Requires PHP: 7.4 7 Stable tag: 3.3. 27 Stable tag: 3.3.3 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 146 146 147 147 == Changelog == 148 149 = 3.3.3 (29 April 2026) = 150 151 Fixes and Improvements: 152 153 * Minor bug fixes and performance improvements 148 154 149 155 = 3.3.2 (23 February 2026) =
Note: See TracChangeset
for help on using the changeset viewer.