File: /home/mobilech/alliancelaptoptraining.com.np/wp-content/plugins/tutor/assets/js/tutor-core.js
(()=>{"use strict";var e={34224:function(e,t,r){r.d(t,{P:()=>a,o:()=>o});/* import */var i=r(42792);var n={TOP:"top",TOP_START:"top-start",TOP_END:"top-end",BOTTOM:"bottom",BOTTOM_START:"bottom-start",BOTTOM_END:"bottom-end",LEFT:"left",LEFT_TOP:"left-top",LEFT_BOTTOM:"left-bottom",RIGHT:"right",RIGHT_TOP:"right-top",RIGHT_BOTTOM:"right-bottom"};var o=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var t;return{open:false,placement:e.placement||n.BOTTOM_START,offset:(t=e.offset)!==null&&t!==void 0?t:4,actualPlacement:"",$el:undefined,$refs:{},$nextTick:undefined,scrollHandler:null,resizeHandler:null,escapeHandler:null,init(){this.actualPlacement=this.getActualPlacement();this.setupEventListeners()},destroy(){this.removeEventListeners()},setupEventListeners(){this.scrollHandler=()=>{if(this.open){this.updatePosition()}};this.resizeHandler=()=>{if(this.open){this.updatePosition()}};this.escapeHandler=e=>{this.handleEscapeKeydown(e)};window.addEventListener("scroll",this.scrollHandler,true);window.addEventListener("resize",this.resizeHandler);document.addEventListener("keydown",this.escapeHandler)},removeEventListeners(){if(this.scrollHandler){window.removeEventListener("scroll",this.scrollHandler,true)}if(this.resizeHandler){window.removeEventListener("resize",this.resizeHandler)}if(this.escapeHandler){document.removeEventListener("keydown",this.escapeHandler);this.escapeHandler=null}},getActualPlacement(){if(!i/* .isRTL */.V)return this.placement;var e={[n.LEFT]:n.RIGHT,[n.LEFT_TOP]:n.RIGHT_TOP,[n.LEFT_BOTTOM]:n.RIGHT_BOTTOM,[n.RIGHT]:n.LEFT,[n.RIGHT_TOP]:n.LEFT_TOP,[n.RIGHT_BOTTOM]:n.LEFT_BOTTOM,[n.TOP_START]:n.TOP_END,[n.TOP_END]:n.TOP_START,[n.BOTTOM_START]:n.BOTTOM_END,[n.BOTTOM_END]:n.BOTTOM_START};return e[this.placement]||this.placement},show(){var t=this.$refs.content;if(t){t.style.visibility="hidden";// Initialize with off-screen position to avoid flashes if visibility fails
t.style.left="-9999px";t.style.top="-9999px"}this.open=true;var r=()=>{if(!this.open)return;var i=this.getContentDimensions(t);// If measurement failed (0 size), Safari might not have rendered it yet. Retry.
if(i.width===0&&i.height===0){requestAnimationFrame(r);return}this.updatePosition();if(t){t.style.visibility="visible"}if(e.onShow){e.onShow()}};if(this.$nextTick){this.$nextTick(r)}else{requestAnimationFrame(r)}},hide(){this.open=false;var t=this.$refs.content;if(t){t.style.visibility="hidden"}if(e.onHide){e.onHide()}},toggle(){if(this.open){this.hide()}else{this.show()}},handleClickOutside(){if(this.open){this.hide()}},handleEscapeKeydown(e){if(e.key==="Escape"&&this.open){e.preventDefault();e.stopPropagation();this.hide()}},isTriggerVisible(){var e=this.$refs.trigger;if(!e)return false;var t=e.getBoundingClientRect();var r=window.innerHeight;var i=window.innerWidth;// Check if trigger is within viewport bounds
var n=t.bottom>0&&t.top<r&&t.right>0&&t.left<i;if(!n||t.width===0||t.height===0){return false}// Check if trigger is obscured by elements like sticky headers
var o=t.left+t.width/2;var a=t.top+t.height/2;var s=document.elementFromPoint(o,a);if(s){var l=this.$refs.content;var u=e===s||e.contains(s);var c=l&&(l===s||l.contains(s));if(!u&&!c){return false}}return true},updatePosition(){var e=this.$refs.trigger;var t=this.$refs.content;if(!e||!t)return;if(this.open&&!this.isTriggerVisible()){this.hide();return}var r=e.getBoundingClientRect();var i=this.getContentDimensions(t);// If measurement failed (0 size), retry on next frame
if(this.open&&i.width===0&&i.height===0){requestAnimationFrame(()=>this.updatePosition());return}var n={width:window.innerWidth,height:window.innerHeight};var o=this.resolvePlacement(this.actualPlacement,r,i,n);var a=this.calculatePosition(r,i,o);var{top:s,left:l}=this.convertViewportPositionToContentPosition(t,a);// Apply positioning
t.style.position="fixed";t.style.top="".concat(s,"px");t.style.left="".concat(l,"px");t.style.zIndex="1060";// Update CSS classes for placement
this.updatePlacementClasses(t,o)},resolvePlacement(e,t,r,i){var n={top:t.top,bottom:i.height-t.bottom,left:t.left,right:i.width-t.right};var o={top:n.top<r.height+this.offset&&n.bottom>n.top,bottom:n.bottom<r.height+this.offset&&n.top>n.bottom};var a={left:n.left<r.width+this.offset&&n.right>n.left,right:n.right<r.width+this.offset&&n.left>n.right};if(e.startsWith("top")&&o.top){return e.replace("top","bottom")}if(e.startsWith("bottom")&&o.bottom){return e.replace("bottom","top")}if(e.startsWith("left")&&a.left){return e.replace("left","right")}if(e.startsWith("right")&&a.right){return e.replace("right","left")}return e},calculatePosition(e,t,r){var i=0;var o=0;switch(r){case n.TOP:i=e.top-t.height-this.offset;o=e.left+(e.width-t.width)/2;break;case n.TOP_START:i=e.top-t.height-this.offset;o=e.left;break;case n.TOP_END:i=e.top-t.height-this.offset;o=e.right-t.width;break;case n.BOTTOM:i=e.bottom+this.offset;o=e.left+(e.width-t.width)/2;break;case n.BOTTOM_START:i=e.bottom+this.offset;o=e.left;break;case n.BOTTOM_END:i=e.bottom+this.offset;o=e.right-t.width;break;case n.LEFT:i=e.top+(e.height-t.height)/2;o=e.left-t.width-this.offset;break;case n.LEFT_TOP:i=e.top;o=e.left-t.width-this.offset;break;case n.LEFT_BOTTOM:i=e.bottom-t.height;o=e.left-t.width-this.offset;break;case n.RIGHT:i=e.top+(e.height-t.height)/2;o=e.right+this.offset;break;case n.RIGHT_TOP:i=e.top;o=e.right+this.offset;break;case n.RIGHT_BOTTOM:i=e.bottom-t.height;o=e.right+this.offset;break}return{top:i,left:o}},getContentDimensions(e){// Temporarily reset transforms/transitions for accurate measurement
var t=e.style.transform;var r=e.style.transition;e.style.transform="none";e.style.transition="none";var i=e.getBoundingClientRect();var n={width:e.offsetWidth||i.width,height:e.offsetHeight||i.height};e.style.transform=t;e.style.transition=r;return n},convertViewportPositionToContentPosition(e,t){var r=this.getFixedContainingBlock(e);if(!r){return t}var i=r.getBoundingClientRect();var n=r.offsetWidth?i.width/r.offsetWidth||1:1;var o=r.offsetHeight?i.height/r.offsetHeight||1:1;return{top:(t.top-i.top)/o-r.clientTop,left:(t.left-i.left)/n-r.clientLeft}},getFixedContainingBlock(e){var t=e.parentElement;while(t&&t!==document.documentElement){if(this.createsFixedContainingBlock(t)){return t}t=t.parentElement}return null},createsFixedContainingBlock(e){var t=window.getComputedStyle(e);var r=t.willChange.split(",").map(e=>e.trim());var i=t.contain.split(" ");var n=t.getPropertyValue("backdrop-filter")||t.getPropertyValue("-webkit-backdrop-filter");var o=t.getPropertyValue("content-visibility");var a=t.getPropertyValue("container-type");return t.transform!=="none"||t.perspective!=="none"||t.filter!=="none"||n!==""&&n!=="none"||o==="auto"||a!==""&&a!=="normal"||r.some(e=>["transform","perspective","filter"].includes(e))||i.some(e=>["layout","paint","strict","content"].includes(e))},updatePlacementClasses(e,t){// Remove all placement classes
var r=["tutor-popover-top","tutor-popover-bottom","tutor-popover-left","tutor-popover-right"];e.classList.remove(...r);// Add current placement class
var i=t.split("-")[0];e.classList.add("tutor-popover-".concat(i))}}};var a={name:"popover",component:o}},9210:function(e,t,r){r.d(t,{T:()=>i});var i={TAB_CHANGE:"tutor-tab-change",MODAL_OPEN:"tutor-modal-open",MODAL_UPDATE:"tutor-modal-update",MODAL_CLOSE:"tutor-modal-close",MODAL_CLOSED:"tutor-modal-closed",TOAST_SHOW:"tutor-toast-show",TOAST_CLEAR:"tutor-toast-clear",FORM_REGISTER:"tutor-form-register",FORM_UNREGISTER:"tutor-form-unregister",FORM_STATE_CHANGE:"tutor-form-state-change",FORM_RESET:"tutor-form-reset",WP_EDITOR_FOCUS:"wp-editor-focus",TUTOR_PLAYER_READY:"tutor-player-ready",COMMENT_REPLIED:"tutor:comment:replied",LESSON_PLAYER_READY:"tutorLessonPlayerReady",QUIZ_TIME_EXPIRED:"tutor-quiz-time-expired",QUIZ_ABANDON_REQUESTED:"tutor-quiz-abandon-requested",QUIZ_ATTEMPT_COMPLETED:"tutor-quiz-attempt-completed"}},16131:function(e,t,r){r.d(t,{z:()=>o});/* import */var i=r(12470);/* import */var n=/*#__PURE__*/r.n(i);var o=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;if(!e||e<=1){return(0,i.__)("0 Bytes","tutor")}var r=1024;var n=Math.max(0,t);var o=[(0,i.__)("Bytes","tutor"),(0,i.__)("KB","tutor"),(0,i.__)("MB","tutor"),(0,i.__)("GB","tutor"),(0,i.__)("TB","tutor"),(0,i.__)("PB","tutor"),(0,i.__)("EB","tutor"),(0,i.__)("ZB","tutor"),(0,i.__)("YB","tutor")];var a=Math.floor(Math.log(e)/Math.log(r));return"".concat(Number.parseFloat((e/r**a).toFixed(n))," ").concat(o[a])}},4041:function(e,t,r){r.d(t,{T:()=>i});var i=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:false,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:false;return e.replace(r?t?/[^0-9-]/g:/[^0-9]/g:t?/[^0-9.-]/g:/[^0-9.]/g,"").replace(/(?!^)-/g,"").replace(r?/\./g:/(\..*)\./g,"$1")}},42792:function(e,t,r){r.d(t,{V:()=>n,X:()=>i});/**
* Check if the current device is a mobile device
*
* @returns {boolean} True if the device is a mobile device, false otherwise
*
* @since 4.0.0
*/function i(){return/Mobi|Android|iPhone|iPad|iPod/i.test(navigator.userAgent)}var n=document.dir==="rtl"},74412:function(e,t,r){r.d(t,{A:()=>l,P:()=>a});/* eslint-disable @typescript-eslint/no-explicit-any */var i,n;var o={ID:0,ajaxurl:"",site_url:"",home_url:"",site_title:"",base_path:"",tutor_url:"",tutor_pro_url:"",dashboard_url:"",nonce_key:"",_tutor_nonce:"",loading_icon_url:"",placeholder_img_src:"",enable_lesson_classic_editor:"",tutor_frontend_dashboard_url:"",backend_course_list_url:"",backend_bundle_list_url:"",frontend_course_list_url:"",frontend_bundle_list_url:"",wp_date_format:"",wp_rest_nonce:"",is_admin:"",is_admin_bar_showing:"",max_upload_size:"",content_change_event:"",is_tutor_course_edit:"",assignment_max_file_allowed:"",current_page:"",quiz_answer_display_time:"",is_ssl:"",course_list_page_url:"",course_post_type:"",local:"",tutor_pn_vapid_key:"",tutor_pn_client_id:"",tutor_pn_subscription_saved:"",difficulty_levels:[],supported_video_sources:[],edd_products:[],bp_groups:[],timezones:{},addons_data:[],kids_icons_registry:[],is_kids_mode:false,user_preferences:{auto_play_next:false,contrast:"",font_scale:1,learning_mood:"modern",motion_effects:"auto",theme:"light",vision:"normal"},is_legacy_learning_mode:false,current_user:{data:{id:"",user_login:"",user_pass:"",user_nicename:"",user_email:"",user_url:"",user_registered:"",user_activation_key:"",user_status:"",display_name:""},caps:{},cap_key:"",roles:[],allcaps:{},filter:null},settings:{learning_mode:"",monetize_by:"tutor",enable_course_marketplace:"off",course_permalink_base:"",supported_video_sources:"",enrollment_expiry_enabled:"off",enable_q_and_a_on_course:"off",instructor_can_delete_course:"off",instructor_can_change_course_author:"off",instructor_can_manage_co_instructors:"off",chatgpt_enable:"off",course_builder_logo_url:"",chatgpt_key_exist:false,hide_admin_bar_for_users:"off",enable_redirect_on_course_publish_from_frontend:"off",instructor_can_publish_course:"off",youtube_api_key_exist:false,membership_only_mode:false,enable_tax:false,enable_individual_tax_control:false,is_tax_included_in_price:false,pagination_per_page:10,has_active_membership_plans:false},tutor_currency:{symbol:"",currency:"",position:"",thousand_separator:"",decimal_separator:"",no_of_decimal:""},visibility_control:{course_builder:{}}};var a=window._tutorobject||o;window.ajaxurl=a.ajaxurl;var s={TUTOR_SITE_URL:a.site_url,WP_AJAX_BASE_URL:a.ajaxurl,WP_API_BASE_URL:"".concat(((i=window.wpApiSettings)===null||i===void 0?void 0:i.root)||"").concat(((n=window.wpApiSettings)===null||n===void 0?void 0:n.versionString)||""),VIDEO_SOURCES_SETTINGS_URL:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=course#field_supported_video_sources"),MONETIZATION_SETTINGS_URL:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=monetization"),TUTOR_PRICING_PAGE:"https://tutorlms.com/pricing/",TUTOR_ADDONS_PAGE:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor-addons"),CHATGPT_PLATFORM_URL:"https://platform.openai.com/account/api-keys",TUTOR_MY_COURSES_PAGE_URL:"".concat(a.tutor_frontend_dashboard_url,"/my-courses"),TUTOR_SUPPORT_PAGE_URL:"https://tutorlms.com/support",TUTOR_SUBSCRIPTIONS_PAGE:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor-subscriptions"),TUTOR_ENROLLMENTS_PAGE:"".concat(a.site_url,"/wp-admin/admin.php?page=enrollments"),TUTOR_COUPONS_PAGE:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor_coupons"),TUTOR_IMPORT_EXPORT_PAGE:"".concat(a.site_url,"/wp-admin/admin.php?page=tutor-tools&sub_page=import_export")};/* export default */const l=s},12470:function(e){e.exports=wp.i18n},93640:function(e,t,r){r.d(t,{_:()=>n});function i(e,t,r,i,n,o,a){try{var s=e[o](a);var l=s.value}catch(e){r(e);return}if(s.done)t(l);else Promise.resolve(l).then(i,n)}function n(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function s(e){i(a,n,o,s,l,"next",e)}function l(e){i(a,n,o,s,l,"throw",e)}s(undefined)})}}},38125:function(e,t,r){r.d(t,{_:()=>i});function i(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else e[t]=r;return e}},41147:function(e,t,r){r.d(t,{_:()=>n});/* import */var i=r(38125);function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};var n=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))}n.forEach(function(t){(0,i._)(e,t,r[t])})}return e}},14206:function(e,t,r){r.d(t,{_:()=>n});function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);if(t){i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}r.push.apply(r,i)}return r}function n(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors)Object.defineProperties(e,Object.getOwnPropertyDescriptors(t));else{i(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}},17900:function(e,t,r){// EXPORTS
r.d(t,{_:()=>/* binding */n});// CONCATENATED MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_without_properties_loose.js
function i(e,t){if(e==null)return{};var r={};var i=Object.keys(e);var n,o;for(o=0;o<i.length;o++){n=i[o];if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r};// CONCATENATED MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_without_properties.js
function n(e,t){if(e==null)return{};var r=i(e,t);var n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++){n=a[o];if(t.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;r[n]=e[n]}}return r}}};// The module cache
var t={};// The require function
function r(i){// Check if module is in cache
var n=t[i];if(n!==undefined){return n.exports}// Create a new module (and put it into the cache)
var o=t[i]={id:i,exports:{}};// Execute the module function
e[i].call(o.exports,o,o.exports,r);// Return the exports of the module
return o.exports}// expose the modules object (__webpack_modules__)
r.m=e;// webpack/runtime/compat_get_default_export
(()=>{// getDefaultExport function for compatibility with non-ESM modules
r.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;r.d(t,{a:t});return t}})();// webpack/runtime/define_property_getters
(()=>{r.d=(e,t)=>{for(var i in t){if(r.o(t,i)&&!r.o(e,i)){Object.defineProperty(e,i,{enumerable:true,get:t[i]})}}}})();// webpack/runtime/ensure_chunk
(()=>{r.f={};// This file contains only the entry chunk.
// The chunk loading function for additional chunks
r.e=e=>{return Promise.all(Object.keys(r.f).reduce((t,i)=>{r.f[i](e,t);return t},[]))}})();// webpack/runtime/get javascript chunk filename
(()=>{// This function allow to reference chunks
r.u=e=>{// return url for filenames not based on template
if(e==="809")return"js/lazy-chunks/tutor-calendar.js?ver=4.0.0";if(e==="353")return"js/lazy-chunks/tutor-form.js?ver=4.0.0";if(e==="756")return"js/lazy-chunks/tutor-file-uploader.js?ver=4.0.0";if(e==="855")return"js/lazy-chunks/tutor-select.js?ver=4.0.0";if(e==="691")return"js/lazy-chunks/tutor-time-input.js?ver=4.0.0";// return url for filenames based on template
return""+e+".javascript"}})();// webpack/runtime/get mini-css chunk filename
(()=>{// This function allow to reference chunks
r.miniCssF=e=>{// return url for filenames not based on template
// return url for filenames based on template
return""+e+".css"}})();// webpack/runtime/get_full_hash
(()=>{r.h=()=>"4627d878f4dec41b"})();// webpack/runtime/global
(()=>{r.g=(()=>{if(typeof globalThis==="object")return globalThis;try{return this||new Function("return this")()}catch(e){if(typeof window==="object")return window}})()})();// webpack/runtime/has_own_property
(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();// webpack/runtime/load_script
(()=>{var e={};var t="tutor:";// loadScript function to load a script via script tag
r.l=function(i,n,o,a){if(e[i]){e[i].push(n);return}var s,l;if(o!==undefined){var u=document.getElementsByTagName("script");for(var c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==i||d.getAttribute("data-webpack")==t+o){s=d;break}}}if(!s){l=true;s=document.createElement("script");s.timeout=120;if(r.nc){s.setAttribute("nonce",r.nc)}s.setAttribute("data-webpack",t+o);s.src=i}e[i]=[n];var f=function(t,r){s.onerror=s.onload=null;clearTimeout(h);var n=e[i];delete e[i];s.parentNode&&s.parentNode.removeChild(s);n&&n.forEach(function(e){return e(r)});if(t)return t(r)};var h=setTimeout(f.bind(null,undefined,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror);s.onload=f.bind(null,s.onload);l&&document.head.appendChild(s)}})();// webpack/runtime/nonce
(()=>{r.nc=undefined})();// webpack/runtime/rspack_version
(()=>{r.rv=()=>"1.6.5"})();// webpack/runtime/auto_public_path
(()=>{var e;if(r.g.importScripts)e=r.g.location+"";var t=r.g.document;if(!e&&t){// Technically we could use `document.currentScript instanceof window.HTMLScriptElement`,
// but an attacker could try to inject `<script>HTMLScriptElement = HTMLImageElement</script>`
// and use `<img name="currentScript" src="https://attacker.controlled.server/"></img>`
if(t.currentScript&&t.currentScript.tagName.toUpperCase()==="SCRIPT")e=t.currentScript.src;if(!e){var i=t.getElementsByTagName("script");if(i.length){var n=i.length-1;while(n>-1&&(!e||!/^http(s?):/.test(e)))e=i[n--].src}}}// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration",
// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.',
if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");r.p=e+"../"})();// webpack/runtime/jsonp_chunk_loading
(()=>{r.b=document.baseURI||self.location.href;// object to store loaded and loading chunks
// undefined = chunk not loaded, null = chunk preloaded/prefetched
// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
var e={"800":0};r.f.j=function(t,i){// JSONP chunk loading for javascript
var n=r.o(e,t)?e[t]:undefined;if(n!==0){// 0 means "already installed".
// a Promise means "currently loading".
if(n){i.push(n[2])}else{if(true){// setup Promise in chunk cache
var o=new Promise((r,i)=>n=e[t]=[r,i]);i.push(n[2]=o);// start chunk loading
var a=r.p+r.u(t);// create error before stack unwound to get useful stacktrace later
var s=new Error;var l=function(i){if(r.o(e,t)){n=e[t];if(n!==0)e[t]=undefined;if(n){var o=i&&(i.type==="load"?"missing":i.type);var a=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")";s.name="ChunkLoadError";s.type=o;s.request=a;n[1](s)}}};r.l(a,l,"chunk-"+t,t)}}}};// install a JSONP callback for chunk loading
var t=(t,i)=>{var[n,o,a]=i;// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var s,l,u=0;if(n.some(t=>e[t]!==0)){for(s in o){if(r.o(o,s)){r.m[s]=o[s]}}if(a)var c=a(r)}if(t)t(i);for(;u<n.length;u++){l=n[u];if(r.o(e,l)&&e[l]){e[l][0]()}e[l]=0}};var i=self["webpackChunktutor"]=self["webpackChunktutor"]||[];i.forEach(t.bind(null,0));i.push=t.bind(null,i.push.bind(i))})();// webpack/runtime/rspack_unique_id
(()=>{r.ruid="bundler=rspack@1.6.5"})();var i={};// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
(()=>{// UNUSED EXPORTS: Alpine, TutorComponentRegistry
// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_async_to_generator.js
var e=r(93640);// CONCATENATED MODULE: ./node_modules/.pnpm/@alpinejs+collapse@3.15.2/node_modules/@alpinejs/collapse/dist/module.esm.js
// packages/collapse/src/index.js
function t(e){e.directive("collapse",t);t.inline=(e,{modifiers:t})=>{if(!t.includes("min"))return;e._x_doShow=()=>{};e._x_doHide=()=>{}};function t(t,{modifiers:r}){let n=i(r,"duration",250)/1e3;let o=i(r,"min",0);let a=!r.includes("min");if(!t._x_isShown)t.style.height=`${o}px`;if(!t._x_isShown&&a)t.hidden=true;if(!t._x_isShown)t.style.overflow="hidden";let s=(t,r)=>{let i=e.setStyles(t,r);return r.height?()=>{}:i};let l={transitionProperty:"height",transitionDuration:`${n}s`,transitionTimingFunction:"cubic-bezier(0.4, 0.0, 0.2, 1)"};t._x_transition={in(r=()=>{},i=()=>{}){if(a)t.hidden=false;if(a)t.style.display=null;let n=t.getBoundingClientRect().height;t.style.height="auto";let s=t.getBoundingClientRect().height;if(n===s){n=o}e.transition(t,e.setStyles,{during:l,start:{height:n+"px"},end:{height:s+"px"}},()=>t._x_isShown=true,()=>{if(Math.abs(t.getBoundingClientRect().height-s)<1){t.style.overflow=null}})},out(r=()=>{},i=()=>{}){let n=t.getBoundingClientRect().height;e.transition(t,s,{during:l,start:{height:n+"px"},end:{height:o+"px"}},()=>t.style.overflow="hidden",()=>{t._x_isShown=false;if(t.style.height==`${o}px`&&a){t.style.display="none";t.hidden=true}})}}}}function i(e,t,r){if(e.indexOf(t)===-1)return r;const i=e[e.indexOf(t)+1];if(!i)return r;if(t==="duration"){let e=i.match(/([0-9]+)ms/);if(e)return e[1]}if(t==="min"){let e=i.match(/([0-9]+)px/);if(e)return e[1]}return i}// packages/collapse/builds/module.js
var n=t;// CONCATENATED MODULE: ./node_modules/.pnpm/@alpinejs+focus@3.15.2/node_modules/@alpinejs/focus/dist/module.esm.js
// node_modules/tabbable/dist/index.esm.js
var o=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"];var a=/* @__PURE__ */o.join(",");var s=typeof Element==="undefined";var l=s?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;var u=!s&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument};var c=function e(e,t,r){var i=Array.prototype.slice.apply(e.querySelectorAll(a));if(t&&l.call(e,a)){i.unshift(e)}i=i.filter(r);return i};var d=function e(t,r,i){var n=[];var o=Array.from(t);while(o.length){var s=o.shift();if(s.tagName==="SLOT"){var u=s.assignedElements();var c=u.length?u:s.children;var d=e(c,true,i);if(i.flatten){n.push.apply(n,d)}else{n.push({scope:s,candidates:d})}}else{var f=l.call(s,a);if(f&&i.filter(s)&&(r||!t.includes(s))){n.push(s)}var h=s.shadowRoot||// check for an undisclosed shadow
typeof i.getShadowRoot==="function"&&i.getShadowRoot(s);var _=!i.shadowRootFilter||i.shadowRootFilter(s);if(h&&_){var p=e(h===true?s.children:h.children,true,i);if(i.flatten){n.push.apply(n,p)}else{n.push({scope:s,candidates:p})}}else{o.unshift.apply(o,s.children)}}}return n};var f=function e(e,t){if(e.tabIndex<0){if((t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))){return 0}}return e.tabIndex};var h=function e(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex};var _=function e(e){return e.tagName==="INPUT"};var p=function e(e){return _(e)&&e.type==="hidden"};var v=function e(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName==="SUMMARY"});return t};var m=function e(e,t){for(var r=0;r<e.length;r++){if(e[r].checked&&e[r].form===t){return e[r]}}};var g=function e(e){if(!e.name){return true}var t=e.form||u(e);var r=function e(e){return t.querySelectorAll('input[type="radio"][name="'+e+'"]')};var i;if(typeof window!=="undefined"&&typeof window.CSS!=="undefined"&&typeof window.CSS.escape==="function"){i=r(window.CSS.escape(e.name))}else{try{i=r(e.name)}catch(e){console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message);return false}}var n=m(i,e.form);return!n||n===e};var y=function e(e){return _(e)&&e.type==="radio"};var E=function e(e){return y(e)&&!g(e)};var b=function e(e){var t=e.getBoundingClientRect(),r=t.width,i=t.height;return r===0&&i===0};var T=function e(e,t){var r=t.displayCheck,i=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden"){return true}var n=l.call(e,"details>summary:first-of-type");var o=n?e.parentElement:e;if(l.call(o,"details:not([open]) *")){return true}var a=u(e).host;var s=(a===null||a===void 0?void 0:a.ownerDocument.contains(a))||e.ownerDocument.contains(e);if(!r||r==="full"){if(typeof i==="function"){var c=e;while(e){var d=e.parentElement;var f=u(e);if(d&&!d.shadowRoot&&i(d)===true){return b(e)}else if(e.assignedSlot){e=e.assignedSlot}else if(!d&&f!==e.ownerDocument){e=f.host}else{e=d}}e=c}if(s){return!e.getClientRects().length}}else if(r==="non-zero-area"){return b(e)}return false};var w=function e(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)){var t=e.parentElement;while(t){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var i=t.children.item(r);if(i.tagName==="LEGEND"){return l.call(t,"fieldset[disabled] *")?true:!i.contains(e)}}return true}t=t.parentElement}}return false};var A=function e(e,t){if(t.disabled||p(t)||T(t,e)||// For a details element with a summary, the summary element gets the focus
v(t)||w(t)){return false}return true};var O=function e(e,t){if(E(t)||f(t)<0||!A(e,t)){return false}return true};var x=function e(e){var t=parseInt(e.getAttribute("tabindex"),10);if(isNaN(t)||t>=0){return true}return false};var S=function e(t){var r=[];var i=[];t.forEach(function(t,n){var o=!!t.scope;var a=o?t.scope:t;var s=f(a,o);var l=o?e(t.candidates):a;if(s===0){o?r.push.apply(r,l):r.push(a)}else{i.push({documentOrder:n,tabIndex:s,item:t,isScope:o,content:l})}});return i.sort(h).reduce(function(e,t){t.isScope?e.push.apply(e,t.content):e.push(t.content);return e},[]).concat(r)};var C=function e(e,t){t=t||{};var r;if(t.getShadowRoot){r=d([e],t.includeContainer,{filter:O.bind(null,t),flatten:false,getShadowRoot:t.getShadowRoot,shadowRootFilter:x})}else{r=c(e,t.includeContainer,O.bind(null,t))}return S(r)};var N=function e(e,t){t=t||{};var r;if(t.getShadowRoot){r=d([e],t.includeContainer,{filter:A.bind(null,t),flatten:true,getShadowRoot:t.getShadowRoot})}else{r=c(e,t.includeContainer,A.bind(null,t))}return r};var L=function e(e,t){t=t||{};if(!e){throw new Error("No node provided")}if(l.call(e,a)===false){return false}return O(t,e)};var P=/* @__PURE__ */o.concat("iframe").join(",");var k=function e(e,t){t=t||{};if(!e){throw new Error("No node provided")}if(l.call(e,P)===false){return false}return A(t,e)};// node_modules/focus-trap/dist/focus-trap.esm.js
function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),true).forEach(function(t){M(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function M(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}var D=function(){var e=[];return{activateTrap:function t(t){if(e.length>0){var r=e[e.length-1];if(r!==t){r.pause()}}var i=e.indexOf(t);if(i===-1){e.push(t)}else{e.splice(i,1);e.push(t)}},deactivateTrap:function t(t){var r=e.indexOf(t);if(r!==-1){e.splice(r,1)}if(e.length>0){e[e.length-1].unpause()}}}}();var B=function e(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var F=function e(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27};var U=function e(e){return e.key==="Tab"||e.keyCode===9};var G=function e(e){return setTimeout(e,0)};var $=function e(e,t){var r=-1;e.every(function(e,i){if(t(e)){r=i;return false}return true});return r};var H=function e(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++){r[i-1]=arguments[i]}return typeof e==="function"?e.apply(void 0,r):e};var j=function e(e){return e.target.shadowRoot&&typeof e.composedPath==="function"?e.composedPath()[0]:e.target};var z=function e(e,t){var r=(t===null||t===void 0?void 0:t.document)||document;var i=I({returnFocusOnDeactivate:true,escapeDeactivates:true,delayInitialFocus:true},t);var n={// containers given to createFocusTrap()
// @type {Array<HTMLElement>}
containers:[],// list of objects identifying tabbable nodes in `containers` in the trap
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
// is active, but the trap should never get to a state where there isn't at least one group
// with at least one tabbable node in it (that would lead to an error condition that would
// result in an error being thrown)
// @type {Array<{
// container: HTMLElement,
// tabbableNodes: Array<HTMLElement>, // empty if none
// focusableNodes: Array<HTMLElement>, // empty if none
// firstTabbableNode: HTMLElement|null,
// lastTabbableNode: HTMLElement|null,
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
// }>}
containerGroups:[],// same order/length as `containers` list
// references to objects in `containerGroups`, but only those that actually have
// tabbable nodes in them
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
// the same length
tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:false,paused:false,// timer ID for when delayInitialFocus is true and initial focus in this trap
// has been delayed during activation
delayInitialFocusTimer:void 0};var o;var a=function e(e,t,r){return e&&e[t]!==void 0?e[t]:i[r||t]};var s=function e(e){return n.containerGroups.findIndex(function(t){var r=t.container,i=t.tabbableNodes;return r.contains(e)||// fall back to explicit tabbable search which will take into consideration any
// web components if the `tabbableOptions.getShadowRoot` option was used for
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
// look inside web components even if open)
i.find(function(t){return t===e})})};var l=function e(e){var t=i[e];if(typeof t==="function"){for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++){o[a-1]=arguments[a]}t=t.apply(void 0,o)}if(t===true){t=void 0}if(!t){if(t===void 0||t===false){return t}throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=t;if(typeof t==="string"){s=r.querySelector(t);if(!s){throw new Error("`".concat(e,"` as selector refers to no known node"))}}return s};var u=function e(){var e=l("initialFocus");if(e===false){return false}if(e===void 0){if(s(r.activeElement)>=0){e=r.activeElement}else{var t=n.tabbableGroups[0];var i=t&&t.firstTabbableNode;e=i||l("fallbackFocus")}}if(!e){throw new Error("Your focus-trap needs to have at least one focusable element")}return e};var c=function e(){n.containerGroups=n.containers.map(function(e){var t=C(e,i.tabbableOptions);var r=N(e,i.tabbableOptions);return{container:e,tabbableNodes:t,focusableNodes:r,firstTabbableNode:t.length>0?t[0]:null,lastTabbableNode:t.length>0?t[t.length-1]:null,/**
* Finds the __tabbable__ node that follows the given node in the specified direction,
* in this container, if any.
* @param {HTMLElement} node
* @param {boolean} [forward] True if going in forward tab order; false if going
* in reverse.
* @returns {HTMLElement|undefined} The next tabbable node, if any.
*/nextTabbableNode:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:true;var n=r.findIndex(function(t){return t===e});if(n<0){return void 0}if(t){return r.slice(n+1).find(function(e){return L(e,i.tabbableOptions)})}return r.slice(0,n).reverse().find(function(e){return L(e,i.tabbableOptions)})}}});n.tabbableGroups=n.containerGroups.filter(function(e){return e.tabbableNodes.length>0});if(n.tabbableGroups.length<=0&&!l("fallbackFocus")){throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")}};var d=function e(t){if(t===false){return}if(t===r.activeElement){return}if(!t||!t.focus){e(u());return}t.focus({preventScroll:!!i.preventScroll});n.mostRecentlyFocusedNode=t;if(B(t)){t.select()}};var f=function e(e){var t=l("setReturnFocus",e);return t?t:t===false?false:e};var h=function e(e){var t=j(e);if(s(t)>=0){return}if(H(i.clickOutsideDeactivates,e)){o.deactivate({// if, on deactivation, we should return focus to the node originally-focused
// when the trap was activated (or the configured `setReturnFocus` node),
// then assume it's also OK to return focus to the outside node that was
// just clicked, causing deactivation, as long as that node is focusable;
// if it isn't focusable, then return focus to the original node focused
// on activation (or the configured `setReturnFocus` node)
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
// which will result in the outside click setting focus to the node
// that was clicked, whether it's focusable or not; by setting
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
// on activation (or the configured `setReturnFocus` node)
returnFocus:i.returnFocusOnDeactivate&&!k(t,i.tabbableOptions)});return}if(H(i.allowOutsideClick,e)){return}e.preventDefault()};var _=function e(e){var t=j(e);var r=s(t)>=0;if(r||t instanceof Document){if(r){n.mostRecentlyFocusedNode=t}}else{e.stopImmediatePropagation();d(n.mostRecentlyFocusedNode||u())}};var p=function e(e){var t=j(e);c();var r=null;if(n.tabbableGroups.length>0){var o=s(t);var a=o>=0?n.containerGroups[o]:void 0;if(o<0){if(e.shiftKey){r=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode}else{r=n.tabbableGroups[0].firstTabbableNode}}else if(e.shiftKey){var u=$(n.tabbableGroups,function(e){var r=e.firstTabbableNode;return t===r});if(u<0&&(a.container===t||k(t,i.tabbableOptions)&&!L(t,i.tabbableOptions)&&!a.nextTabbableNode(t,false))){u=o}if(u>=0){var f=u===0?n.tabbableGroups.length-1:u-1;var h=n.tabbableGroups[f];r=h.lastTabbableNode}}else{var _=$(n.tabbableGroups,function(e){var r=e.lastTabbableNode;return t===r});if(_<0&&(a.container===t||k(t,i.tabbableOptions)&&!L(t,i.tabbableOptions)&&!a.nextTabbableNode(t))){_=o}if(_>=0){var p=_===n.tabbableGroups.length-1?0:_+1;var v=n.tabbableGroups[p];r=v.firstTabbableNode}}}else{r=l("fallbackFocus")}if(r){e.preventDefault();d(r)}};var v=function e(e){if(F(e)&&H(i.escapeDeactivates,e)!==false){e.preventDefault();o.deactivate();return}if(U(e)){p(e);return}};var m=function e(e){var t=j(e);if(s(t)>=0){return}if(H(i.clickOutsideDeactivates,e)){return}if(H(i.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var g=function e(){if(!n.active){return}D.activateTrap(o);n.delayInitialFocusTimer=i.delayInitialFocus?G(function(){d(u())}):d(u());r.addEventListener("focusin",_,true);r.addEventListener("mousedown",h,{capture:true,passive:false});r.addEventListener("touchstart",h,{capture:true,passive:false});r.addEventListener("click",m,{capture:true,passive:false});r.addEventListener("keydown",v,{capture:true,passive:false});return o};var y=function e(){if(!n.active){return}r.removeEventListener("focusin",_,true);r.removeEventListener("mousedown",h,true);r.removeEventListener("touchstart",h,true);r.removeEventListener("click",m,true);r.removeEventListener("keydown",v,true);return o};o={get active(){return n.active},get paused(){return n.paused},activate:function e(e){if(n.active){return this}var t=a(e,"onActivate");var i=a(e,"onPostActivate");var o=a(e,"checkCanFocusTrap");if(!o){c()}n.active=true;n.paused=false;n.nodeFocusedBeforeActivation=r.activeElement;if(t){t()}var s=function e(){if(o){c()}g();if(i){i()}};if(o){o(n.containers.concat()).then(s,s);return this}s();return this},deactivate:function e(e){if(!n.active){return this}var t=I({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},e);clearTimeout(n.delayInitialFocusTimer);n.delayInitialFocusTimer=void 0;y();n.active=false;n.paused=false;D.deactivateTrap(o);var r=a(t,"onDeactivate");var s=a(t,"onPostDeactivate");var l=a(t,"checkCanReturnFocus");var u=a(t,"returnFocus","returnFocusOnDeactivate");if(r){r()}var c=function e(){G(function(){if(u){d(f(n.nodeFocusedBeforeActivation))}if(s){s()}})};if(u&&l){l(f(n.nodeFocusedBeforeActivation)).then(c,c);return this}c();return this},pause:function e(){if(n.paused||!n.active){return this}n.paused=true;y();return this},unpause:function e(){if(!n.paused||!n.active){return this}n.paused=false;c();g();return this},updateContainerElements:function e(e){var t=[].concat(e).filter(Boolean);n.containers=t.map(function(e){return typeof e==="string"?r.querySelector(e):e});if(n.active){c()}return this}};o.updateContainerElements(e);return o};// packages/focus/src/index.js
function V(e){let t;let r;window.addEventListener("focusin",()=>{t=r;r=document.activeElement});e.magic("focus",e=>{let i=e;return{__noscroll:false,__wrapAround:false,within(e){i=e;return this},withoutScrolling(){this.__noscroll=true;return this},noscroll(){this.__noscroll=true;return this},withWrapAround(){this.__wrapAround=true;return this},wrap(){return this.withWrapAround()},focusable(e){return k(e)},previouslyFocused(){return t},lastFocused(){return t},focused(){return r},focusables(){if(Array.isArray(i))return i;return N(i,{displayCheck:"none"})},all(){return this.focusables()},isFirst(e){let t=this.all();return t[0]&&t[0].isSameNode(e)},isLast(e){let t=this.all();return t.length&&t.slice(-1)[0].isSameNode(e)},getFirst(){return this.all()[0]},getLast(){return this.all().slice(-1)[0]},getNext(){let e=this.all();let t=document.activeElement;if(e.indexOf(t)===-1)return;if(this.__wrapAround&&e.indexOf(t)===e.length-1){return e[0]}return e[e.indexOf(t)+1]},getPrevious(){let e=this.all();let t=document.activeElement;if(e.indexOf(t)===-1)return;if(this.__wrapAround&&e.indexOf(t)===0){return e.slice(-1)[0]}return e[e.indexOf(t)-1]},first(){this.focus(this.getFirst())},last(){this.focus(this.getLast())},next(){this.focus(this.getNext())},previous(){this.focus(this.getPrevious())},prev(){return this.previous()},focus(e){if(!e)return;setTimeout(()=>{if(!e.hasAttribute("tabindex"))e.setAttribute("tabindex","0");e.focus({preventScroll:this.__noscroll})})}}});e.directive("trap",e.skipDuringClone((t,{expression:r,modifiers:i},{effect:n,evaluateLater:o,cleanup:a})=>{let s=o(r);let l=false;let u={escapeDeactivates:false,allowOutsideClick:true,fallbackFocus:()=>t};let c=()=>{};if(i.includes("noautofocus")){u.initialFocus=false}else{let e=t.querySelector("[autofocus]");if(e)u.initialFocus=e}if(i.includes("inert")){u.onPostActivate=()=>{e.nextTick(()=>{c=q(t)})}}let d=z(t,u);let f=()=>{};const h=()=>{c();c=()=>{};f();f=()=>{};d.deactivate({returnFocus:!i.includes("noreturn")})};n(()=>s(e=>{if(l===e)return;if(e&&!l){if(i.includes("noscroll"))f=K();setTimeout(()=>{d.activate()},15)}if(!e&&l){h()}l=!!e}));a(h)},// When cloning, we only want to add aria-hidden attributes to the
// DOM and not try to actually trap, as trapping can mess with the
// live DOM and isn't just isolated to the cloned DOM.
(e,{expression:t,modifiers:r},{evaluate:i})=>{if(r.includes("inert")&&i(t))q(e)}))}function q(e){let t=[];W(e,e=>{let r=e.hasAttribute("aria-hidden");e.setAttribute("aria-hidden","true");t.push(()=>r||e.removeAttribute("aria-hidden"))});return()=>{while(t.length)t.pop()()}}function W(e,t){if(e.isSameNode(document.body)||!e.parentNode)return;Array.from(e.parentNode.children).forEach(r=>{if(r.isSameNode(e)){W(e.parentNode,t)}else{t(r)}})}function K(){let e=document.documentElement.style.overflow;let t=document.documentElement.style.paddingRight;let r=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.overflow="hidden";document.documentElement.style.paddingRight=`${r}px`;return()=>{document.documentElement.style.overflow=e;document.documentElement.style.paddingRight=t}}// packages/focus/builds/module.js
var Y=V;/*! Bundled license information:
tabbable/dist/index.esm.js:
(*!
* tabbable 5.3.3
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*)
focus-trap/dist/focus-trap.esm.js:
(*!
* focus-trap 6.9.4
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
*)
*/;// CONCATENATED MODULE: ./node_modules/.pnpm/alpinejs@3.15.2/node_modules/alpinejs/dist/module.esm.js
// packages/alpinejs/src/scheduler.js
var Q=false;var Z=false;var X=[];var J=-1;function ee(e){et(e)}function et(e){if(!X.includes(e))X.push(e);ei()}function er(e){let t=X.indexOf(e);if(t!==-1&&t>J)X.splice(t,1)}function ei(){if(!Z&&!Q){Q=true;queueMicrotask(en)}}function en(){Q=false;Z=true;for(let e=0;e<X.length;e++){X[e]();J=e}X.length=0;J=-1;Z=false}// packages/alpinejs/src/reactivity.js
var eo;var ea;var es;var el;var eu=true;function ec(e){eu=false;e();eu=true}function ed(e){eo=e.reactive;es=e.release;ea=t=>e.effect(t,{scheduler:e=>{if(eu){ee(e)}else{e()}}});el=e.raw}function ef(e){ea=e}function eh(e){let t=()=>{};let r=r=>{let i=ea(r);if(!e._x_effects){e._x_effects=/* @__PURE__ */new Set;e._x_runEffects=()=>{e._x_effects.forEach(e=>e())}}e._x_effects.add(i);t=()=>{if(i===void 0)return;e._x_effects.delete(i);es(i)};return i};return[r,()=>{t()}]}function e_(e,t){let r=true;let i;let n=ea(()=>{let n=e();JSON.stringify(n);if(!r){queueMicrotask(()=>{t(n,i);i=n})}else{i=n}r=false});return()=>es(n)}// packages/alpinejs/src/mutation.js
var ep=[];var ev=[];var em=[];function eg(e){em.push(e)}function ey(e,t){if(typeof t==="function"){if(!e._x_cleanups)e._x_cleanups=[];e._x_cleanups.push(t)}else{t=e;ev.push(t)}}function eE(e){ep.push(e)}function eb(e,t,r){if(!e._x_attributeCleanups)e._x_attributeCleanups={};if(!e._x_attributeCleanups[t])e._x_attributeCleanups[t]=[];e._x_attributeCleanups[t].push(r)}function eT(e,t){if(!e._x_attributeCleanups)return;Object.entries(e._x_attributeCleanups).forEach(([r,i])=>{if(t===void 0||t.includes(r)){i.forEach(e=>e());delete e._x_attributeCleanups[r]}})}function ew(e){e._x_effects?.forEach(er);while(e._x_cleanups?.length)e._x_cleanups.pop()()}var eA=new MutationObserver(eM);var eO=false;function ex(){eA.observe(document,{subtree:true,childList:true,attributes:true,attributeOldValue:true});eO=true}function eS(){eN();eA.disconnect();eO=false}var eC=[];function eN(){let e=eA.takeRecords();eC.push(()=>e.length>0&&eM(e));let t=eC.length;queueMicrotask(()=>{if(eC.length===t){while(eC.length>0)eC.shift()()}})}function eL(e){if(!eO)return e();eS();let t=e();ex();return t}var eP=false;var ek=[];function eR(){eP=true}function eI(){eP=false;eM(ek);ek=[]}function eM(e){if(eP){ek=ek.concat(e);return}let t=[];let r=/* @__PURE__ */new Set;let i=/* @__PURE__ */new Map;let n=/* @__PURE__ */new Map;for(let o=0;o<e.length;o++){if(e[o].target._x_ignoreMutationObserver)continue;if(e[o].type==="childList"){e[o].removedNodes.forEach(e=>{if(e.nodeType!==1)return;if(!e._x_marker)return;r.add(e)});e[o].addedNodes.forEach(e=>{if(e.nodeType!==1)return;if(r.has(e)){r.delete(e);return}if(e._x_marker)return;t.push(e)})}if(e[o].type==="attributes"){let t=e[o].target;let r=e[o].attributeName;let a=e[o].oldValue;let s=()=>{if(!i.has(t))i.set(t,[]);i.get(t).push({name:r,value:t.getAttribute(r)})};let l=()=>{if(!n.has(t))n.set(t,[]);n.get(t).push(r)};if(t.hasAttribute(r)&&a===null){s()}else if(t.hasAttribute(r)){l();s()}else{l()}}}n.forEach((e,t)=>{eT(t,e)});i.forEach((e,t)=>{ep.forEach(r=>r(t,e))});for(let e of r){if(t.some(t=>t.contains(e)))continue;ev.forEach(t=>t(e))}for(let e of t){if(!e.isConnected)continue;em.forEach(t=>t(e))}t=null;r=null;i=null;n=null}// packages/alpinejs/src/scope.js
function eD(e){return eU(eF(e))}function eB(e,t,r){e._x_dataStack=[t,...eF(r||e)];return()=>{e._x_dataStack=e._x_dataStack.filter(e=>e!==t)}}function eF(e){if(e._x_dataStack)return e._x_dataStack;if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){return eF(e.host)}if(!e.parentNode){return[]}return eF(e.parentNode)}function eU(e){return new Proxy({objects:e},eG)}var eG={ownKeys({objects:e}){return Array.from(new Set(e.flatMap(e=>Object.keys(e))))},has({objects:e},t){if(t==Symbol.unscopables)return false;return e.some(e=>Object.prototype.hasOwnProperty.call(e,t)||Reflect.has(e,t))},get({objects:e},t,r){if(t=="toJSON")return e$;return Reflect.get(e.find(e=>Reflect.has(e,t))||{},t,r)},set({objects:e},t,r,i){const n=e.find(e=>Object.prototype.hasOwnProperty.call(e,t))||e[e.length-1];const o=Object.getOwnPropertyDescriptor(n,t);if(o?.set&&o?.get)return o.set.call(i,r)||true;return Reflect.set(n,t,r)}};function e$(){let e=Reflect.ownKeys(this);return e.reduce((e,t)=>{e[t]=Reflect.get(this,t);return e},{})}// packages/alpinejs/src/interceptor.js
function eH(e){let t=e=>typeof e==="object"&&!Array.isArray(e)&&e!==null;let r=(i,n="")=>{Object.entries(Object.getOwnPropertyDescriptors(i)).forEach(([o,{value:a,enumerable:s}])=>{if(s===false||a===void 0)return;if(typeof a==="object"&&a!==null&&a.__v_skip)return;let l=n===""?o:`${n}.${o}`;if(typeof a==="object"&&a!==null&&a._x_interceptor){i[o]=a.initialize(e,l,o)}else{if(t(a)&&a!==i&&!(a instanceof Element)){r(a,l)}}})};return r(e)}function ej(e,t=()=>{}){let r={initialValue:void 0,_x_interceptor:true,initialize(t,r,i){return e(this.initialValue,()=>ez(t,r),e=>eV(t,r,e),r,i)}};t(r);return e=>{if(typeof e==="object"&&e!==null&&e._x_interceptor){let t=r.initialize.bind(r);r.initialize=(i,n,o)=>{let a=e.initialize(i,n,o);r.initialValue=a;return t(i,n,o)}}else{r.initialValue=e}return r}}function ez(e,t){return t.split(".").reduce((e,t)=>e[t],e)}function eV(e,t,r){if(typeof t==="string")t=t.split(".");if(t.length===1)e[t[0]]=r;else if(t.length===0)throw error;else{if(e[t[0]])return eV(e[t[0]],t.slice(1),r);else{e[t[0]]={};return eV(e[t[0]],t.slice(1),r)}}}// packages/alpinejs/src/magics.js
var eq={};function eW(e,t){eq[e]=t}function eK(e,t){let r=eY(t);Object.entries(eq).forEach(([i,n])=>{Object.defineProperty(e,`$${i}`,{get(){return n(t,r)},enumerable:false})});return e}function eY(e){let[t,r]=tp(e);let i={interceptor:ej,...t};ey(e,r);return i}// packages/alpinejs/src/utils/error.js
function eQ(e,t,r,...i){try{return r(...i)}catch(r){eZ(r,e,t)}}function eZ(...e){return eX(...e)}var eX=e0;function eJ(e){eX=e}function e0(e,t,r=void 0){e=Object.assign(e??{message:"No error message given."},{el:t,expression:r});console.warn(`Alpine Expression Error: ${e.message}
${r?'Expression: "'+r+'"\n\n':""}`,t);setTimeout(()=>{throw e},0)}// packages/alpinejs/src/evaluator.js
var e1=true;function e2(e){let t=e1;e1=false;let r=e();e1=t;return r}function e4(e,t,r={}){let i;e3(e,t)(e=>i=e,r);return i}function e3(...e){return e8(...e)}var e8=e5;function e9(e){e8=e}function e5(e,t){let r={};eK(r,e);let i=[r,...eF(e)];let n=typeof t==="function"?e6(i,t):tt(i,t,e);return eQ.bind(null,e,t,n)}function e6(e,t){return(r=()=>{},{scope:i={},params:n=[],context:o}={})=>{let a=t.apply(eU([i,...e]),n);tr(r,a)}}var e7={};function te(e,t){if(e7[e]){return e7[e]}let r=Object.getPrototypeOf(async function(){}).constructor;let i=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e;const n=()=>{try{let t=new r(["__self","scope"],`with (scope) { __self.result = ${i} }; __self.finished = true; return __self.result;`);Object.defineProperty(t,"name",{value:`[Alpine] ${e}`});return t}catch(r){eZ(r,t,e);return Promise.resolve()}};let o=n();e7[e]=o;return o}function tt(e,t,r){let i=te(t,r);return(n=()=>{},{scope:o={},params:a=[],context:s}={})=>{i.result=void 0;i.finished=false;let l=eU([o,...e]);if(typeof i==="function"){let e=i.call(s,i,l).catch(e=>eZ(e,r,t));if(i.finished){tr(n,i.result,l,a,r);i.result=void 0}else{e.then(e=>{tr(n,e,l,a,r)}).catch(e=>eZ(e,r,t)).finally(()=>i.result=void 0)}}}}function tr(e,t,r,i,n){if(e1&&typeof t==="function"){let o=t.apply(r,i);if(o instanceof Promise){o.then(t=>tr(e,t,r,i)).catch(e=>eZ(e,n,t))}else{e(o)}}else if(typeof t==="object"&&t instanceof Promise){t.then(t=>e(t))}else{e(t)}}// packages/alpinejs/src/directives.js
var ti="x-";function tn(e=""){return ti+e}function to(e){ti=e}var ta={};function ts(e,t){ta[e]=t;return{before(t){if(!ta[t]){console.warn(String.raw`Cannot find directive \`${t}\`. \`${e}\` will use the default order of execution`);return}const r=tx.indexOf(t);tx.splice(r>=0?r:tx.indexOf("DEFAULT"),0,e)}}}function tl(e){return Object.keys(ta).includes(e)}function tu(e,t,r){t=Array.from(t);if(e._x_virtualDirectives){let r=Object.entries(e._x_virtualDirectives).map(([e,t])=>({name:e,value:t}));let i=tc(r);r=r.map(e=>{if(i.find(t=>t.name===e.name)){return{name:`x-bind:${e.name}`,value:`"${e.value}"`}}return e});t=t.concat(r)}let i={};let n=t.map(ty((e,t)=>i[e]=t)).filter(tT).map(tA(i,r)).sort(tS);return n.map(t=>{return tv(e,t)})}function tc(e){return Array.from(e).map(ty()).filter(e=>!tT(e))}var td=false;var tf=/* @__PURE__ */new Map;var th=Symbol();function t_(e){td=true;let t=Symbol();th=t;tf.set(t,[]);let r=()=>{while(tf.get(t).length)tf.get(t).shift()();tf.delete(t)};let i=()=>{td=false;r()};e(r);i()}function tp(e){let t=[];let r=e=>t.push(e);let[i,n]=eh(e);t.push(n);let o={Alpine:rZ,effect:i,cleanup:r,evaluateLater:e3.bind(e3,e),evaluate:e4.bind(e4,e)};let a=()=>t.forEach(e=>e());return[o,a]}function tv(e,t){let r=()=>{};let i=ta[t.type]||r;let[n,o]=tp(e);eb(e,t.original,o);let a=()=>{if(e._x_ignore||e._x_ignoreSelf)return;i.inline&&i.inline(e,t,n);i=i.bind(i,e,t,n);td?tf.get(th).push(i):i()};a.runCleanups=o;return a}var tm=(e,t)=>({name:r,value:i})=>{if(r.startsWith(e))r=r.replace(e,t);return{name:r,value:i}};var tg=e=>e;function ty(e=()=>{}){return({name:t,value:r})=>{let{name:i,value:n}=tE.reduce((e,t)=>{return t(e)},{name:t,value:r});if(i!==t)e(i,t);return{name:i,value:n}}}var tE=[];function tb(e){tE.push(e)}function tT({name:e}){return tw().test(e)}var tw=()=>new RegExp(`^${ti}([^:^.]+)\\b`);function tA(e,t){return({name:r,value:i})=>{let n=r.match(tw());let o=r.match(/:([a-zA-Z0-9\-_:]+)/);let a=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[];let s=t||e[r]||r;return{type:n?n[1]:null,value:o?o[1]:null,modifiers:a.map(e=>e.replace(".","")),expression:i,original:s}}}var tO="DEFAULT";var tx=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",tO,"teleport"];function tS(e,t){let r=tx.indexOf(e.type)===-1?tO:e.type;let i=tx.indexOf(t.type)===-1?tO:t.type;return tx.indexOf(r)-tx.indexOf(i)}// packages/alpinejs/src/utils/dispatch.js
function tC(e,t,r={}){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:true,// Allows events to pass the shadow DOM barrier.
composed:true,cancelable:true}))}// packages/alpinejs/src/utils/walk.js
function tN(e,t){if(typeof ShadowRoot==="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(e=>tN(e,t));return}let r=false;t(e,()=>r=true);if(r)return;let i=e.firstElementChild;while(i){tN(i,t,false);i=i.nextElementSibling}}// packages/alpinejs/src/utils/warn.js
function tL(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}// packages/alpinejs/src/lifecycle.js
var tP=false;function tk(){if(tP)tL("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems.");tP=true;if(!document.body)tL("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?");tC(document,"alpine:init");tC(document,"alpine:initializing");ex();eg(e=>tV(e,tN));ey(e=>tq(e));eE((e,t)=>{tu(e,t).forEach(e=>e())});let e=e=>!tU(e.parentElement,true);Array.from(document.querySelectorAll(tD().join(","))).filter(e).forEach(e=>{tV(e)});tC(document,"alpine:initialized");setTimeout(()=>{tW()})}var tR=[];var tI=[];function tM(){return tR.map(e=>e())}function tD(){return tR.concat(tI).map(e=>e())}function tB(e){tR.push(e)}function tF(e){tI.push(e)}function tU(e,t=false){return tG(e,e=>{const r=t?tD():tM();if(r.some(t=>e.matches(t)))return true})}function tG(e,t){if(!e)return;if(t(e))return e;if(e._x_teleportBack)e=e._x_teleportBack;if(!e.parentElement)return;return tG(e.parentElement,t)}function t$(e){return tM().some(t=>e.matches(t))}var tH=[];function tj(e){tH.push(e)}var tz=1;function tV(e,t=tN,r=()=>{}){if(tG(e,e=>e._x_ignore))return;t_(()=>{t(e,(e,t)=>{if(e._x_marker)return;r(e,t);tH.forEach(r=>r(e,t));tu(e,e.attributes).forEach(e=>e());if(!e._x_ignore)e._x_marker=tz++;e._x_ignore&&t()})})}function tq(e,t=tN){t(e,e=>{ew(e);eT(e);delete e._x_marker})}function tW(){let e=[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]];e.forEach(([e,t,r])=>{if(tl(t))return;r.some(t=>{if(document.querySelector(t)){tL(`found "${t}", but missing ${e} plugin`);return true}})})}// packages/alpinejs/src/nextTick.js
var tK=[];var tY=false;function tQ(e=()=>{}){queueMicrotask(()=>{tY||setTimeout(()=>{tZ()})});return new Promise(t=>{tK.push(()=>{e();t()})})}function tZ(){tY=false;while(tK.length)tK.shift()()}function tX(){tY=true}// packages/alpinejs/src/utils/classes.js
function tJ(e,t){if(Array.isArray(t)){return t0(e,t.join(" "))}else if(typeof t==="object"&&t!==null){return t1(e,t)}else if(typeof t==="function"){return tJ(e,t())}return t0(e,t)}function t0(e,t){let r=e=>e.split(" ").filter(Boolean);let i=t=>t.split(" ").filter(t=>!e.classList.contains(t)).filter(Boolean);let n=t=>{e.classList.add(...t);return()=>{e.classList.remove(...t)}};t=t===true?t="":t||"";return n(i(t))}function t1(e,t){let r=e=>e.split(" ").filter(Boolean);let i=Object.entries(t).flatMap(([e,t])=>t?r(e):false).filter(Boolean);let n=Object.entries(t).flatMap(([e,t])=>!t?r(e):false).filter(Boolean);let o=[];let a=[];n.forEach(t=>{if(e.classList.contains(t)){e.classList.remove(t);a.push(t)}});i.forEach(t=>{if(!e.classList.contains(t)){e.classList.add(t);o.push(t)}});return()=>{a.forEach(t=>e.classList.add(t));o.forEach(t=>e.classList.remove(t))}}// packages/alpinejs/src/utils/styles.js
function t2(e,t){if(typeof t==="object"&&t!==null){return t4(e,t)}return t3(e,t)}function t4(e,t){let r={};Object.entries(t).forEach(([t,i])=>{r[t]=e.style[t];if(!t.startsWith("--")){t=t8(t)}e.style.setProperty(t,i)});setTimeout(()=>{if(e.style.length===0){e.removeAttribute("style")}});return()=>{t2(e,r)}}function t3(e,t){let r=e.getAttribute("style",t);e.setAttribute("style",t);return()=>{e.setAttribute("style",r||"")}}function t8(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}// packages/alpinejs/src/utils/once.js
function t9(e,t=()=>{}){let r=false;return function(){if(!r){r=true;e.apply(this,arguments)}else{t.apply(this,arguments)}}}// packages/alpinejs/src/directives/x-transition.js
ts("transition",(e,{value:t,modifiers:r,expression:i},{evaluate:n})=>{if(typeof i==="function")i=n(i);if(i===false)return;if(!i||typeof i==="boolean"){t6(e,r,t)}else{t5(e,i,t)}});function t5(e,t,r){t7(e,tJ,"");let i={"enter":t=>{e._x_transition.enter.during=t},"enter-start":t=>{e._x_transition.enter.start=t},"enter-end":t=>{e._x_transition.enter.end=t},"leave":t=>{e._x_transition.leave.during=t},"leave-start":t=>{e._x_transition.leave.start=t},"leave-end":t=>{e._x_transition.leave.end=t}};i[r](t)}function t6(e,t,r){t7(e,t2);let i=!t.includes("in")&&!t.includes("out")&&!r;let n=i||t.includes("in")||["enter"].includes(r);let o=i||t.includes("out")||["leave"].includes(r);if(t.includes("in")&&!i){t=t.filter((e,r)=>r<t.indexOf("out"))}if(t.includes("out")&&!i){t=t.filter((e,r)=>r>t.indexOf("out"))}let a=!t.includes("opacity")&&!t.includes("scale");let s=a||t.includes("opacity");let l=a||t.includes("scale");let u=s?0:1;let c=l?ri(t,"scale",95)/100:1;let d=ri(t,"delay",0)/1e3;let f=ri(t,"origin","center");let h="opacity, transform";let _=ri(t,"duration",150)/1e3;let p=ri(t,"duration",75)/1e3;let v=`cubic-bezier(0.4, 0.0, 0.2, 1)`;if(n){e._x_transition.enter.during={transformOrigin:f,transitionDelay:`${d}s`,transitionProperty:h,transitionDuration:`${_}s`,transitionTimingFunction:v};e._x_transition.enter.start={opacity:u,transform:`scale(${c})`};e._x_transition.enter.end={opacity:1,transform:`scale(1)`}}if(o){e._x_transition.leave.during={transformOrigin:f,transitionDelay:`${d}s`,transitionProperty:h,transitionDuration:`${p}s`,transitionTimingFunction:v};e._x_transition.leave.start={opacity:1,transform:`scale(1)`};e._x_transition.leave.end={opacity:u,transform:`scale(${c})`}}}function t7(e,t,r={}){if(!e._x_transition)e._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(r=()=>{},i=()=>{}){rt(e,t,{during:this.enter.during,start:this.enter.start,end:this.enter.end},r,i)},out(r=()=>{},i=()=>{}){rt(e,t,{during:this.leave.during,start:this.leave.start,end:this.leave.end},r,i)}}}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(e,t,r,i){const n=document.visibilityState==="visible"?requestAnimationFrame:setTimeout;let o=()=>n(r);if(t){if(e._x_transition&&(e._x_transition.enter||e._x_transition.leave)){e._x_transition.enter&&(Object.entries(e._x_transition.enter.during).length||Object.entries(e._x_transition.enter.start).length||Object.entries(e._x_transition.enter.end).length)?e._x_transition.in(r):o()}else{e._x_transition?e._x_transition.in(r):o()}return}e._x_hidePromise=e._x_transition?new Promise((t,r)=>{e._x_transition.out(()=>{},()=>t(i));e._x_transitioning&&e._x_transitioning.beforeCancel(()=>r({isFromCancelledTransition:true}))}):Promise.resolve(i);queueMicrotask(()=>{let t=re(e);if(t){if(!t._x_hideChildren)t._x_hideChildren=[];t._x_hideChildren.push(e)}else{n(()=>{let t=e=>{let r=Promise.all([e._x_hidePromise,...(e._x_hideChildren||[]).map(t)]).then(([e])=>e?.());delete e._x_hidePromise;delete e._x_hideChildren;return r};t(e).catch(e=>{if(!e.isFromCancelledTransition)throw e})})}})};function re(e){let t=e.parentNode;if(!t)return;return t._x_hidePromise?t:re(t)}function rt(e,t,{during:r,start:i,end:n}={},o=()=>{},a=()=>{}){if(e._x_transitioning)e._x_transitioning.cancel();if(Object.keys(r).length===0&&Object.keys(i).length===0&&Object.keys(n).length===0){o();a();return}let s,l,u;rr(e,{start(){s=t(e,i)},during(){l=t(e,r)},before:o,end(){s();u=t(e,n)},after:a,cleanup(){l();u()}})}function rr(e,t){let r,i,n;let o=t9(()=>{eL(()=>{r=true;if(!i)t.before();if(!n){t.end();tZ()}t.after();if(e.isConnected)t.cleanup();delete e._x_transitioning})});e._x_transitioning={beforeCancels:[],beforeCancel(e){this.beforeCancels.push(e)},cancel:t9(function(){while(this.beforeCancels.length){this.beforeCancels.shift()()};o()}),finish:o};eL(()=>{t.start();t.during()});tX();requestAnimationFrame(()=>{if(r)return;let o=Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3;let a=Number(getComputedStyle(e).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;if(o===0)o=Number(getComputedStyle(e).animationDuration.replace("s",""))*1e3;eL(()=>{t.before()});i=true;requestAnimationFrame(()=>{if(r)return;eL(()=>{t.end()});tZ();setTimeout(e._x_transitioning.finish,o+a);n=true})})}function ri(e,t,r){if(e.indexOf(t)===-1)return r;const i=e[e.indexOf(t)+1];if(!i)return r;if(t==="scale"){if(isNaN(i))return r}if(t==="duration"||t==="delay"){let e=i.match(/([0-9]+)ms/);if(e)return e[1]}if(t==="origin"){if(["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])){return[i,e[e.indexOf(t)+2]].join(" ")}}return i}// packages/alpinejs/src/clone.js
var rn=false;function ro(e,t=()=>{}){return(...r)=>rn?t(...r):e(...r)}function ra(e){return(...t)=>rn&&e(...t)}var rs=[];function rl(e){rs.push(e)}function ru(e,t){rs.forEach(r=>r(e,t));rn=true;rh(()=>{tV(t,(e,t)=>{t(e,()=>{})})});rn=false}var rc=false;function rd(e,t){if(!t._x_dataStack)t._x_dataStack=e._x_dataStack;rn=true;rc=true;rh(()=>{rf(t)});rn=false;rc=false}function rf(e){let t=false;let r=(e,r)=>{tN(e,(e,i)=>{if(t&&t$(e))return i();t=true;r(e,i)})};tV(e,r)}function rh(e){let t=ea;ef((e,r)=>{let i=t(e);es(i);return()=>{}});e();ef(t)}// packages/alpinejs/src/utils/bind.js
function r_(e,t,r,i=[]){if(!e._x_bindings)e._x_bindings=eo({});e._x_bindings[t]=r;t=i.includes("camel")?rw(t):t;switch(t){case"value":rp(e,r);break;case"style":rm(e,r);break;case"class":rv(e,r);break;case"selected":case"checked":rg(e,t,r);break;default:ry(e,t,r);break}}function rp(e,t){if(rR(e)){if(e.attributes.value===void 0){e.value=t}if(window.fromModel){if(typeof t==="boolean"){e.checked=rO(e.value)===t}else{e.checked=rA(e.value,t)}}}else if(rk(e)){if(Number.isInteger(t)){e.value=t}else if(!Array.isArray(t)&&typeof t!=="boolean"&&![null,void 0].includes(t)){e.value=String(t)}else{if(Array.isArray(t)){e.checked=t.some(t=>rA(t,e.value))}else{e.checked=!!t}}}else if(e.tagName==="SELECT"){rT(e,t)}else{if(e.value===t)return;e.value=t===void 0?"":t}}function rv(e,t){if(e._x_undoAddedClasses)e._x_undoAddedClasses();e._x_undoAddedClasses=tJ(e,t)}function rm(e,t){if(e._x_undoAddedStyles)e._x_undoAddedStyles();e._x_undoAddedStyles=t2(e,t)}function rg(e,t,r){ry(e,t,r);rb(e,t,r)}function ry(e,t,r){if([null,void 0,false].includes(r)&&rC(t)){e.removeAttribute(t)}else{if(rS(t))r=t;rE(e,t,r)}}function rE(e,t,r){if(e.getAttribute(t)!=r){e.setAttribute(t,r)}}function rb(e,t,r){if(e[t]!==r){e[t]=r}}function rT(e,t){const r=[].concat(t).map(e=>{return e+""});Array.from(e.options).forEach(e=>{e.selected=r.includes(e.value)})}function rw(e){return e.toLowerCase().replace(/-(\w)/g,(e,t)=>t.toUpperCase())}function rA(e,t){return e==t}function rO(e){if([1,"1","true","on","yes",true].includes(e)){return true}if([0,"0","false","off","no",false].includes(e)){return false}return e?Boolean(e):null}var rx=/* @__PURE__ */new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);function rS(e){return rx.has(e)}function rC(e){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(e)}function rN(e,t,r){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];return rP(e,t,r)}function rL(e,t,r,i=true){if(e._x_bindings&&e._x_bindings[t]!==void 0)return e._x_bindings[t];if(e._x_inlineBindings&&e._x_inlineBindings[t]!==void 0){let r=e._x_inlineBindings[t];r.extract=i;return e2(()=>{return e4(e,r.expression)})}return rP(e,t,r)}function rP(e,t,r){let i=e.getAttribute(t);if(i===null)return typeof r==="function"?r():r;if(i==="")return true;if(rS(t)){return!![t,"true"].includes(i)}return i}function rk(e){return e.type==="checkbox"||e.localName==="ui-checkbox"||e.localName==="ui-switch"}function rR(e){return e.type==="radio"||e.localName==="ui-radio"}// packages/alpinejs/src/utils/debounce.js
function rI(e,t){let r;return function(){const i=this,n=arguments;const o=function(){r=null;e.apply(i,n)};clearTimeout(r);r=setTimeout(o,t)}}// packages/alpinejs/src/utils/throttle.js
function rM(e,t){let r;return function(){let i=this,n=arguments;if(!r){e.apply(i,n);r=true;setTimeout(()=>r=false,t)}}}// packages/alpinejs/src/entangle.js
function rD({get:e,set:t},{get:r,set:i}){let n=true;let o;let a;let s=ea(()=>{let s=e();let l=r();if(n){i(rB(s));n=false}else{let e=JSON.stringify(s);let r=JSON.stringify(l);if(e!==o){i(rB(s))}else if(e!==r){t(rB(l))}else{}}o=JSON.stringify(e());a=JSON.stringify(r())});return()=>{es(s)}}function rB(e){return typeof e==="object"?JSON.parse(JSON.stringify(e)):e}// packages/alpinejs/src/plugin.js
function rF(e){let t=Array.isArray(e)?e:[e];t.forEach(e=>e(rZ))}// packages/alpinejs/src/store.js
var rU={};var rG=false;function r$(e,t){if(!rG){rU=eo(rU);rG=true}if(t===void 0){return rU[e]}rU[e]=t;eH(rU[e]);if(typeof t==="object"&&t!==null&&t.hasOwnProperty("init")&&typeof t.init==="function"){rU[e].init()}}function rH(){return rU}// packages/alpinejs/src/binds.js
var rj={};function rz(e,t){let r=typeof t!=="function"?()=>t:t;if(e instanceof Element){return rq(e,r())}else{rj[e]=r}return()=>{}}function rV(e){Object.entries(rj).forEach(([t,r])=>{Object.defineProperty(e,t,{get(){return(...e)=>{return r(...e)}}})});return e}function rq(e,t,r){let i=[];while(i.length)i.pop()();let n=Object.entries(t).map(([e,t])=>({name:e,value:t}));let o=tc(n);n=n.map(e=>{if(o.find(t=>t.name===e.name)){return{name:`x-bind:${e.name}`,value:`"${e.value}"`}}return e});tu(e,n,r).map(e=>{i.push(e.runCleanups);e()});return()=>{while(i.length)i.pop()()}}// packages/alpinejs/src/datas.js
var rW={};function rK(e,t){rW[e]=t}function rY(e,t){Object.entries(rW).forEach(([r,i])=>{Object.defineProperty(e,r,{get(){return(...e)=>{return i.bind(t)(...e)}},enumerable:false})});return e}// packages/alpinejs/src/alpine.js
var rQ={get reactive(){return eo},get release(){return es},get effect(){return ea},get raw(){return el},version:"3.15.2",flushAndStopDeferringMutations:eI,dontAutoEvaluateFunctions:e2,disableEffectScheduling:ec,startObservingMutations:ex,stopObservingMutations:eS,setReactivityEngine:ed,onAttributeRemoved:eb,onAttributesAdded:eE,closestDataStack:eF,skipDuringClone:ro,onlyDuringClone:ra,addRootSelector:tB,addInitSelector:tF,setErrorHandler:eJ,interceptClone:rl,addScopeToNode:eB,deferMutations:eR,mapAttributes:tb,evaluateLater:e3,interceptInit:tj,setEvaluator:e9,mergeProxies:eU,extractProp:rL,findClosest:tG,onElRemoved:ey,closestRoot:tU,destroyTree:tq,interceptor:ej,// INTERNAL: not public API and is subject to change without major release.
transition:rt,// INTERNAL
setStyles:t2,// INTERNAL
mutateDom:eL,directive:ts,entangle:rD,throttle:rM,debounce:rI,evaluate:e4,initTree:tV,nextTick:tQ,prefixed:tn,prefix:to,plugin:rF,magic:eW,store:r$,start:tk,clone:rd,// INTERNAL
cloneNode:ru,// INTERNAL
bound:rN,$data:eD,watch:e_,walk:tN,data:rK,bind:rz};var rZ=rQ;// node_modules/@vue/shared/dist/shared.esm-bundler.js
function rX(e,t){const r=/* @__PURE__ */Object.create(null);const i=e.split(",");for(let e=0;e<i.length;e++){r[i[e]]=true}return t?e=>!!r[e.toLowerCase()]:e=>!!r[e]}var rJ=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;var r0=/* @__PURE__ */rX(rJ+`,async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);var r1=true?Object.freeze({}):0;var r2=true?Object.freeze([]):0;var r4=Object.prototype.hasOwnProperty;var r3=(e,t)=>r4.call(e,t);var r8=Array.isArray;var r9=e=>it(e)==="[object Map]";var r5=e=>typeof e==="string";var r6=e=>typeof e==="symbol";var r7=e=>e!==null&&typeof e==="object";var ie=Object.prototype.toString;var it=e=>ie.call(e);var ir=e=>{return it(e).slice(8,-1)};var ii=e=>r5(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e;var io=e=>{const t=/* @__PURE__ */Object.create(null);return r=>{const i=t[r];return i||(t[r]=e(r))}};var ia=/-(\w)/g;var is=io(e=>{return e.replace(ia,(e,t)=>t?t.toUpperCase():"")});var il=/\B([A-Z])/g;var iu=io(e=>e.replace(il,"-$1").toLowerCase());var ic=io(e=>e.charAt(0).toUpperCase()+e.slice(1));var id=io(e=>e?`on${ic(e)}`:``);var ih=(e,t)=>e!==t&&(e===e||t===t);// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
var i_=/* @__PURE__ */new WeakMap;var ip=[];var iv;var im=Symbol(true?"iterate":0);var ig=Symbol(true?"Map key iterate":0);function iy(e){return e&&e._isEffect===true}function iE(e,t=r1){if(iy(e)){e=e.raw}const r=iw(e,t);if(!t.lazy){r()}return r}function ib(e){if(e.active){iA(e);if(e.options.onStop){e.options.onStop()}e.active=false}}var iT=0;function iw(e,t){const r=function t(){if(!r.active){return e()}if(!ip.includes(r)){iA(r);try{iC();ip.push(r);iv=r;return e()}finally{ip.pop();iN();iv=ip[ip.length-1]}}};r.id=iT++;r.allowRecurse=!!t.allowRecurse;r._isEffect=true;r.active=true;r.raw=e;r.deps=[];r.options=t;return r}function iA(e){const{deps:t}=e;if(t.length){for(let r=0;r<t.length;r++){t[r].delete(e)}t.length=0}}var iO=true;var ix=[];function iS(){ix.push(iO);iO=false}function iC(){ix.push(iO);iO=true}function iN(){const e=ix.pop();iO=e===void 0?true:e}function iL(e,t,r){if(!iO||iv===void 0){return}let i=i_.get(e);if(!i){i_.set(e,i=/* @__PURE__ */new Map)}let n=i.get(r);if(!n){i.set(r,n=/* @__PURE__ */new Set)}if(!n.has(iv)){n.add(iv);iv.deps.push(n);if(iv.options.onTrack){iv.options.onTrack({effect:iv,target:e,type:t,key:r})}}}function iP(e,t,r,i,n,o){const a=i_.get(e);if(!a){return}const s=/* @__PURE__ */new Set;const l=e=>{if(e){e.forEach(e=>{if(e!==iv||e.allowRecurse){s.add(e)}})}};if(t==="clear"){a.forEach(l)}else if(r==="length"&&r8(e)){a.forEach((e,t)=>{if(t==="length"||t>=i){l(e)}})}else{if(r!==void 0){l(a.get(r))}switch(t){case"add":if(!r8(e)){l(a.get(im));if(r9(e)){l(a.get(ig))}}else if(ii(r)){l(a.get("length"))}break;case"delete":if(!r8(e)){l(a.get(im));if(r9(e)){l(a.get(ig))}}break;case"set":if(r9(e)){l(a.get(im))}break}}const u=a=>{if(a.options.onTrigger){a.options.onTrigger({effect:a,target:e,key:r,type:t,newValue:i,oldValue:n,oldTarget:o})}if(a.options.scheduler){a.options.scheduler(a)}else{a()}};s.forEach(u)}var ik=/* @__PURE__ */rX(`__proto__,__v_isRef,__isVue`);var iR=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(r6));var iI=/* @__PURE__ */iF();var iM=/* @__PURE__ */iF(true);var iD=/* @__PURE__ */iB();function iB(){const e={};["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const r=n_(this);for(let e=0,t=this.length;e<t;e++){iL(r,"get",e+"")}const i=r[t](...e);if(i===-1||i===false){return r[t](...e.map(n_))}else{return i}}});["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){iS();const r=n_(this)[t].apply(this,e);iN();return r}});return e}function iF(e=false,t=false){return function r(r,i,n){if(i==="__v_isReactive"){return!e}else if(i==="__v_isReadonly"){return e}else if(i==="__v_raw"&&n===(e?t?nl:ns:t?na:no).get(r)){return r}const o=r8(r);if(!e&&o&&r3(iD,i)){return Reflect.get(iD,i,n)}const a=Reflect.get(r,i,n);if(r6(i)?iR.has(i):ik(i)){return a}if(!e){iL(r,"get",i)}if(t){return a}if(np(a)){const e=!o||!ii(i);return e?a.value:a}if(r7(a)){return e?nf(a):nd(a)}return a}}var iU=/* @__PURE__ */iG();function iG(e=false){return function t(t,r,i,n){let o=t[r];if(!e){i=n_(i);o=n_(o);if(!r8(t)&&np(o)&&!np(i)){o.value=i;return true}}const a=r8(t)&&ii(r)?Number(r)<t.length:r3(t,r);const s=Reflect.set(t,r,i,n);if(t===n_(n)){if(!a){iP(t,"add",r,i)}else if(ih(i,o)){iP(t,"set",r,i,o)}}return s}}function i$(e,t){const r=r3(e,t);const i=e[t];const n=Reflect.deleteProperty(e,t);if(n&&r){iP(e,"delete",t,void 0,i)}return n}function iH(e,t){const r=Reflect.has(e,t);if(!r6(t)||!iR.has(t)){iL(e,"has",t)}return r}function ij(e){iL(e,"iterate",r8(e)?"length":im);return Reflect.ownKeys(e)}var iz={get:iI,set:iU,deleteProperty:i$,has:iH,ownKeys:ij};var iV={get:iM,set(e,t){if(true){console.warn(`Set operation on key "${String(t)}" failed: target is readonly.`,e)}return true},deleteProperty(e,t){if(true){console.warn(`Delete operation on key "${String(t)}" failed: target is readonly.`,e)}return true}};var iq=e=>r7(e)?nd(e):e;var iW=e=>r7(e)?nf(e):e;var iK=e=>e;var iY=e=>Reflect.getPrototypeOf(e);function iQ(e,t,r=false,i=false){e=e["__v_raw"];const n=n_(e);const o=n_(t);if(t!==o){!r&&iL(n,"get",t)}!r&&iL(n,"get",o);const{has:a}=iY(n);const s=i?iK:r?iW:iq;if(a.call(n,t)){return s(e.get(t))}else if(a.call(n,o)){return s(e.get(o))}else if(e!==n){e.get(t)}}function iZ(e,t=false){const r=this["__v_raw"];const i=n_(r);const n=n_(e);if(e!==n){!t&&iL(i,"has",e)}!t&&iL(i,"has",n);return e===n?r.has(e):r.has(e)||r.has(n)}function iX(e,t=false){e=e["__v_raw"];!t&&iL(n_(e),"iterate",im);return Reflect.get(e,"size",e)}function iJ(e){e=n_(e);const t=n_(this);const r=iY(t);const i=r.has.call(t,e);if(!i){t.add(e);iP(t,"add",e,e)}return this}function i0(e,t){t=n_(t);const r=n_(this);const{has:i,get:n}=iY(r);let o=i.call(r,e);if(!o){e=n_(e);o=i.call(r,e)}else if(true){nn(r,i,e)}const a=n.call(r,e);r.set(e,t);if(!o){iP(r,"add",e,t)}else if(ih(t,a)){iP(r,"set",e,t,a)}return this}function i1(e){const t=n_(this);const{has:r,get:i}=iY(t);let n=r.call(t,e);if(!n){e=n_(e);n=r.call(t,e)}else if(true){nn(t,r,e)}const o=i?i.call(t,e):void 0;const a=t.delete(e);if(n){iP(t,"delete",e,void 0,o)}return a}function i2(){const e=n_(this);const t=e.size!==0;const r=true?r9(e)?new Map(e):new Set(e):0;const i=e.clear();if(t){iP(e,"clear",void 0,void 0,r)}return i}function i4(e,t){return function r(r,i){const n=this;const o=n["__v_raw"];const a=n_(o);const s=t?iK:e?iW:iq;!e&&iL(a,"iterate",im);return o.forEach((e,t)=>{return r.call(i,s(e),s(t),n)})}}function i3(e,t,r){return function(...i){const n=this["__v_raw"];const o=n_(n);const a=r9(o);const s=e==="entries"||e===Symbol.iterator&&a;const l=e==="keys"&&a;const u=n[e](...i);const c=r?iK:t?iW:iq;!t&&iL(o,"iterate",l?ig:im);return{// iterator protocol
next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[c(e[0]),c(e[1])]:c(e),done:t}},// iterable protocol
[Symbol.iterator](){return this}}}}function i8(e){return function(...t){if(true){const r=t[0]?`on key "${t[0]}" `:``;console.warn(`${ic(e)} operation ${r}failed: target is readonly.`,n_(this))}return e==="delete"?false:this}}function i9(){const e={get(e){return iQ(this,e)},get size(){return iX(this)},has:iZ,add:iJ,set:i0,delete:i1,clear:i2,forEach:i4(false,false)};const t={get(e){return iQ(this,e,false,true)},get size(){return iX(this)},has:iZ,add:iJ,set:i0,delete:i1,clear:i2,forEach:i4(false,true)};const r={get(e){return iQ(this,e,true)},get size(){return iX(this,true)},has(e){return iZ.call(this,e,true)},add:i8("add"),set:i8("set"),delete:i8("delete"),clear:i8("clear"),forEach:i4(true,false)};const i={get(e){return iQ(this,e,true,true)},get size(){return iX(this,true)},has(e){return iZ.call(this,e,true)},add:i8("add"),set:i8("set"),delete:i8("delete"),clear:i8("clear"),forEach:i4(true,true)};const n=["keys","values","entries",Symbol.iterator];n.forEach(n=>{e[n]=i3(n,false,false);r[n]=i3(n,true,false);t[n]=i3(n,false,true);i[n]=i3(n,true,true)});return[e,r,t,i]}var[i5,i6,i7,ne]=/* @__PURE__ */i9();function nt(e,t){const r=t?e?ne:i7:e?i6:i5;return(t,i,n)=>{if(i==="__v_isReactive"){return!e}else if(i==="__v_isReadonly"){return e}else if(i==="__v_raw"){return t}return Reflect.get(r3(r,i)&&i in t?r:t,i,n)}}var nr={get:/* @__PURE__ */nt(false,false)};var ni={get:/* @__PURE__ */nt(true,false)};function nn(e,t,r){const i=n_(r);if(i!==r&&t.call(e,i)){const t=ir(e);console.warn(`Reactive ${t} contains both the raw and reactive versions of the same object${t===`Map`?` as keys`:``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var no=/* @__PURE__ */new WeakMap;var na=/* @__PURE__ */new WeakMap;var ns=/* @__PURE__ */new WeakMap;var nl=/* @__PURE__ */new WeakMap;function nu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function nc(e){return e["__v_skip"]||!Object.isExtensible(e)?0:nu(ir(e))}function nd(e){if(e&&e["__v_isReadonly"]){return e}return nh(e,false,iz,nr,no)}function nf(e){return nh(e,true,iV,ni,ns)}function nh(e,t,r,i,n){if(!r7(e)){if(true){console.warn(`value cannot be made reactive: ${String(e)}`)}return e}if(e["__v_raw"]&&!(t&&e["__v_isReactive"])){return e}const o=n.get(e);if(o){return o}const a=nc(e);if(a===0){return e}const s=new Proxy(e,a===2?i:r);n.set(e,s);return s}function n_(e){return e&&n_(e["__v_raw"])||e}function np(e){return Boolean(e&&e.__v_isRef===true)}// packages/alpinejs/src/magics/$nextTick.js
eW("nextTick",()=>tQ);// packages/alpinejs/src/magics/$dispatch.js
eW("dispatch",e=>tC.bind(tC,e));// packages/alpinejs/src/magics/$watch.js
eW("watch",(e,{evaluateLater:t,cleanup:r})=>(e,i)=>{let n=t(e);let o=()=>{let e;n(t=>e=t);return e};let a=e_(o,i);r(a)});// packages/alpinejs/src/magics/$store.js
eW("store",rH);// packages/alpinejs/src/magics/$data.js
eW("data",e=>eD(e));// packages/alpinejs/src/magics/$root.js
eW("root",e=>tU(e));// packages/alpinejs/src/magics/$refs.js
eW("refs",e=>{if(e._x_refs_proxy)return e._x_refs_proxy;e._x_refs_proxy=eU(nv(e));return e._x_refs_proxy});function nv(e){let t=[];tG(e,e=>{if(e._x_refs)t.push(e._x_refs)});return t}// packages/alpinejs/src/ids.js
var nm={};function ng(e){if(!nm[e])nm[e]=0;return++nm[e]}function ny(e,t){return tG(e,e=>{if(e._x_ids&&e._x_ids[t])return true})}function nE(e,t){if(!e._x_ids)e._x_ids={};if(!e._x_ids[t])e._x_ids[t]=ng(t)}// packages/alpinejs/src/magics/$id.js
eW("id",(e,{cleanup:t})=>(r,i=null)=>{let n=`${r}${i?`-${i}`:""}`;return nb(e,n,t,()=>{let t=ny(e,r);let n=t?t._x_ids[r]:ng(r);return i?`${r}-${n}-${i}`:`${r}-${n}`})});rl((e,t)=>{if(e._x_id){t._x_id=e._x_id}});function nb(e,t,r,i){if(!e._x_id)e._x_id={};if(e._x_id[t])return e._x_id[t];let n=i();e._x_id[t]=n;r(()=>{delete e._x_id[t]});return n}// packages/alpinejs/src/magics/$el.js
eW("el",e=>e);// packages/alpinejs/src/magics/index.js
nT("Focus","focus","focus");nT("Persist","persist","persist");function nT(e,t,r){eW(t,i=>tL(`You can't use [$${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,i))}// packages/alpinejs/src/directives/x-modelable.js
ts("modelable",(e,{expression:t},{effect:r,evaluateLater:i,cleanup:n})=>{let o=i(t);let a=()=>{let e;o(t=>e=t);return e};let s=i(`${t} = __placeholder`);let l=e=>s(()=>{},{scope:{"__placeholder":e}});let u=a();l(u);queueMicrotask(()=>{if(!e._x_model)return;e._x_removeModelListeners["default"]();let t=e._x_model.get;let r=e._x_model.set;let i=rD({get(){return t()},set(e){r(e)}},{get(){return a()},set(e){l(e)}});n(i)})});// packages/alpinejs/src/directives/x-teleport.js
ts("teleport",(e,{modifiers:t,expression:r},{cleanup:i})=>{if(e.tagName.toLowerCase()!=="template")tL("x-teleport can only be used on a <template> tag",e);let n=nA(r);let o=e.content.cloneNode(true).firstElementChild;e._x_teleport=o;o._x_teleportBack=e;e.setAttribute("data-teleport-template",true);o.setAttribute("data-teleport-target",true);if(e._x_forwardEvents){e._x_forwardEvents.forEach(t=>{o.addEventListener(t,t=>{t.stopPropagation();e.dispatchEvent(new t.constructor(t.type,t))})})}eB(o,{},e);let a=(e,t,r)=>{if(r.includes("prepend")){t.parentNode.insertBefore(e,t)}else if(r.includes("append")){t.parentNode.insertBefore(e,t.nextSibling)}else{t.appendChild(e)}};eL(()=>{a(o,n,t);ro(()=>{tV(o)})()});e._x_teleportPutBack=()=>{let i=nA(r);eL(()=>{a(e._x_teleport,i,t)})};i(()=>eL(()=>{o.remove();tq(o)}))});var nw=document.createElement("div");function nA(e){let t=ro(()=>{return document.querySelector(e)},()=>{return nw})();if(!t)tL(`Cannot find x-teleport element for selector: "${e}"`);return t}// packages/alpinejs/src/directives/x-ignore.js
var nO=()=>{};nO.inline=(e,{modifiers:t},{cleanup:r})=>{t.includes("self")?e._x_ignoreSelf=true:e._x_ignore=true;r(()=>{t.includes("self")?delete e._x_ignoreSelf:delete e._x_ignore})};ts("ignore",nO);// packages/alpinejs/src/directives/x-effect.js
ts("effect",ro((e,{expression:t},{effect:r})=>{r(e3(e,t))}));// packages/alpinejs/src/utils/on.js
function nx(e,t,r,i){let n=e;let o=e=>i(e);let a={};let s=(e,t)=>r=>t(e,r);if(r.includes("dot"))t=nS(t);if(r.includes("camel"))t=nC(t);if(r.includes("passive"))a.passive=true;if(r.includes("capture"))a.capture=true;if(r.includes("window"))n=window;if(r.includes("document"))n=document;if(r.includes("debounce")){let e=r[r.indexOf("debounce")+1]||"invalid-wait";let t=nN(e.split("ms")[0])?Number(e.split("ms")[0]):250;o=rI(o,t)}if(r.includes("throttle")){let e=r[r.indexOf("throttle")+1]||"invalid-wait";let t=nN(e.split("ms")[0])?Number(e.split("ms")[0]):250;o=rM(o,t)}if(r.includes("prevent"))o=s(o,(e,t)=>{t.preventDefault();e(t)});if(r.includes("stop"))o=s(o,(e,t)=>{t.stopPropagation();e(t)});if(r.includes("once")){o=s(o,(e,r)=>{e(r);n.removeEventListener(t,o,a)})}if(r.includes("away")||r.includes("outside")){n=document;o=s(o,(t,r)=>{if(e.contains(r.target))return;if(r.target.isConnected===false)return;if(e.offsetWidth<1&&e.offsetHeight<1)return;if(e._x_isShown===false)return;t(r)})}if(r.includes("self"))o=s(o,(t,r)=>{r.target===e&&t(r)});if(nP(t)||nk(t)){o=s(o,(e,t)=>{if(nR(t,r)){return}e(t)})}n.addEventListener(t,o,a);return()=>{n.removeEventListener(t,o,a)}}function nS(e){return e.replace(/-/g,".")}function nC(e){return e.toLowerCase().replace(/-(\w)/g,(e,t)=>t.toUpperCase())}function nN(e){return!Array.isArray(e)&&!isNaN(e)}function nL(e){if([" ","_"].includes(e))return e;return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function nP(e){return["keydown","keyup"].includes(e)}function nk(e){return["contextmenu","click","mouse"].some(t=>e.includes(t))}function nR(e,t){let r=t.filter(e=>{return!["window","document","prevent","stop","once","capture","self","away","outside","passive","preserve-scroll"].includes(e)});if(r.includes("debounce")){let e=r.indexOf("debounce");r.splice(e,nN((r[e+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let e=r.indexOf("throttle");r.splice(e,nN((r[e+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0)return false;if(r.length===1&&nI(e.key).includes(r[0]))return false;const i=["ctrl","shift","alt","meta","cmd","super"];const n=i.filter(e=>r.includes(e));r=r.filter(e=>!n.includes(e));if(n.length>0){const t=n.filter(t=>{if(t==="cmd"||t==="super")t="meta";return e[`${t}Key`]});if(t.length===n.length){if(nk(e.type))return false;if(nI(e.key).includes(r[0]))return false}}return true}function nI(e){if(!e)return[];e=nL(e);let t={"ctrl":"control","slash":"/","space":" ","spacebar":" ","cmd":"meta","esc":"escape","up":"arrow-up","down":"arrow-down","left":"arrow-left","right":"arrow-right","period":".","comma":",","equal":"=","minus":"-","underscore":"_"};t[e]=e;return Object.keys(t).map(r=>{if(t[r]===e)return r}).filter(e=>e)}// packages/alpinejs/src/directives/x-model.js
ts("model",(e,{modifiers:t,expression:r},{effect:i,cleanup:n})=>{let o=e;if(t.includes("parent")){o=e.parentNode}let a=e3(o,r);let s;if(typeof r==="string"){s=e3(o,`${r} = __placeholder`)}else if(typeof r==="function"&&typeof r()==="string"){s=e3(o,`${r()} = __placeholder`)}else{s=()=>{}}let l=()=>{let e;a(t=>e=t);return nU(e)?e.get():e};let u=e=>{let t;a(e=>t=e);if(nU(t)){t.set(e)}else{s(()=>{},{scope:{"__placeholder":e}})}};if(typeof r==="string"&&e.type==="radio"){eL(()=>{if(!e.hasAttribute("name"))e.setAttribute("name",r)})}let c=e.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(e.type)||t.includes("lazy")?"change":"input";let d=rn?()=>{}:nx(e,c,t,r=>{u(nM(e,t,r,l()))});if(t.includes("fill")){if([void 0,null,""].includes(l())||rk(e)&&Array.isArray(l())||e.tagName.toLowerCase()==="select"&&e.multiple){u(nM(e,t,{target:e},l()))}}if(!e._x_removeModelListeners)e._x_removeModelListeners={};e._x_removeModelListeners["default"]=d;n(()=>e._x_removeModelListeners["default"]());if(e.form){let r=nx(e.form,"reset",[],r=>{tQ(()=>e._x_model&&e._x_model.set(nM(e,t,{target:e},l())))});n(()=>r())}e._x_model={get(){return l()},set(e){u(e)}};e._x_forceModelUpdate=t=>{if(t===void 0&&typeof r==="string"&&r.match(/\./))t="";window.fromModel=true;eL(()=>r_(e,"value",t));delete window.fromModel};i(()=>{let r=l();if(t.includes("unintrusive")&&document.activeElement.isSameNode(e))return;e._x_forceModelUpdate(r)})});function nM(e,t,r,i){return eL(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;else if(rk(e)){if(Array.isArray(i)){let e=null;if(t.includes("number")){e=nD(r.target.value)}else if(t.includes("boolean")){e=rO(r.target.value)}else{e=r.target.value}return r.target.checked?i.includes(e)?i:i.concat([e]):i.filter(t=>!nB(t,e))}else{return r.target.checked}}else if(e.tagName.toLowerCase()==="select"&&e.multiple){if(t.includes("number")){return Array.from(r.target.selectedOptions).map(e=>{let t=e.value||e.text;return nD(t)})}else if(t.includes("boolean")){return Array.from(r.target.selectedOptions).map(e=>{let t=e.value||e.text;return rO(t)})}return Array.from(r.target.selectedOptions).map(e=>{return e.value||e.text})}else{let n;if(rR(e)){if(r.target.checked){n=r.target.value}else{n=i}}else{n=r.target.value}if(t.includes("number")){return nD(n)}else if(t.includes("boolean")){return rO(n)}else if(t.includes("trim")){return n.trim()}else{return n}}})}function nD(e){let t=e?parseFloat(e):null;return nF(t)?t:e}function nB(e,t){return e==t}function nF(e){return!Array.isArray(e)&&!isNaN(e)}function nU(e){return e!==null&&typeof e==="object"&&typeof e.get==="function"&&typeof e.set==="function"}// packages/alpinejs/src/directives/x-cloak.js
ts("cloak",e=>queueMicrotask(()=>eL(()=>e.removeAttribute(tn("cloak")))));// packages/alpinejs/src/directives/x-init.js
tF(()=>`[${tn("init")}]`);ts("init",ro((e,{expression:t},{evaluate:r})=>{if(typeof t==="string"){return!!t.trim()&&r(t,{},false)}return r(t,{},false)}));// packages/alpinejs/src/directives/x-text.js
ts("text",(e,{expression:t},{effect:r,evaluateLater:i})=>{let n=i(t);r(()=>{n(t=>{eL(()=>{e.textContent=t})})})});// packages/alpinejs/src/directives/x-html.js
ts("html",(e,{expression:t},{effect:r,evaluateLater:i})=>{let n=i(t);r(()=>{n(t=>{eL(()=>{e.innerHTML=t;e._x_ignoreSelf=true;tV(e);delete e._x_ignoreSelf})})})});// packages/alpinejs/src/directives/x-bind.js
tb(tm(":",tg(tn("bind:"))));var nG=(e,{value:t,modifiers:r,expression:i,original:n},{effect:o,cleanup:a})=>{if(!t){let t={};rV(t);let r=e3(e,i);r(t=>{rq(e,t,n)},{scope:t});return}if(t==="key")return n$(e,i);if(e._x_inlineBindings&&e._x_inlineBindings[t]&&e._x_inlineBindings[t].extract){return}let s=e3(e,i);o(()=>s(n=>{if(n===void 0&&typeof i==="string"&&i.match(/\./)){n=""}eL(()=>r_(e,t,n,r))}));a(()=>{e._x_undoAddedClasses&&e._x_undoAddedClasses();e._x_undoAddedStyles&&e._x_undoAddedStyles()})};nG.inline=(e,{value:t,modifiers:r,expression:i})=>{if(!t)return;if(!e._x_inlineBindings)e._x_inlineBindings={};e._x_inlineBindings[t]={expression:i,extract:false}};ts("bind",nG);function n$(e,t){e._x_keyExpression=t}// packages/alpinejs/src/directives/x-data.js
tB(()=>`[${tn("data")}]`);ts("data",(e,{expression:t},{cleanup:r})=>{if(nH(e))return;t=t===""?"{}":t;let i={};eK(i,e);let n={};rY(n,i);let o=e4(e,t,{scope:n});if(o===void 0||o===true)o={};eK(o,e);let a=eo(o);eH(a);let s=eB(e,a);a["init"]&&e4(e,a["init"]);r(()=>{a["destroy"]&&e4(e,a["destroy"]);s()})});rl((e,t)=>{if(e._x_dataStack){t._x_dataStack=e._x_dataStack;t.setAttribute("data-has-alpine-state",true)}});function nH(e){if(!rn)return false;if(rc)return true;return e.hasAttribute("data-has-alpine-state")}// packages/alpinejs/src/directives/x-show.js
ts("show",(e,{modifiers:t,expression:r},{effect:i})=>{let n=e3(e,r);if(!e._x_doHide)e._x_doHide=()=>{eL(()=>{e.style.setProperty("display","none",t.includes("important")?"important":void 0)})};if(!e._x_doShow)e._x_doShow=()=>{eL(()=>{if(e.style.length===1&&e.style.display==="none"){e.removeAttribute("style")}else{e.style.removeProperty("display")}})};let o=()=>{e._x_doHide();e._x_isShown=false};let a=()=>{e._x_doShow();e._x_isShown=true};let s=()=>setTimeout(a);let l=t9(e=>e?a():o(),t=>{if(typeof e._x_toggleAndCascadeWithTransitions==="function"){e._x_toggleAndCascadeWithTransitions(e,t,a,o)}else{t?s():o()}});let u;let c=true;i(()=>n(e=>{if(!c&&e===u)return;if(t.includes("immediate"))e?s():o();l(e);u=e;c=false}))});// packages/alpinejs/src/directives/x-for.js
ts("for",(e,{expression:t},{effect:r,cleanup:i})=>{let n=nz(t);let o=e3(e,n.items);let a=e3(e,// the x-bind:key expression is stored for our use instead of evaluated.
e._x_keyExpression||"index");e._x_prevKeys=[];e._x_lookup={};r(()=>nj(e,n,o,a));i(()=>{Object.values(e._x_lookup).forEach(e=>eL(()=>{tq(e);e.remove()}));delete e._x_prevKeys;delete e._x_lookup})});function nj(e,t,r,i){let n=e=>typeof e==="object"&&!Array.isArray(e);let o=e;r(r=>{if(nq(r)&&r>=0){r=Array.from(Array(r).keys(),e=>e+1)}if(r===void 0)r=[];let a=e._x_lookup;let s=e._x_prevKeys;let l=[];let u=[];if(n(r)){r=Object.entries(r).map(([n,o])=>{let a=nV(t,o,n,r);i(t=>{if(u.includes(t))tL("Duplicate key on x-for",e);u.push(t)},{scope:{index:n,...a}});l.push(a)})}else{for(let n=0;n<r.length;n++){let o=nV(t,r[n],n,r);i(t=>{if(u.includes(t))tL("Duplicate key on x-for",e);u.push(t)},{scope:{index:n,...o}});l.push(o)}}let c=[];let d=[];let f=[];let h=[];for(let e=0;e<s.length;e++){let t=s[e];if(u.indexOf(t)===-1)f.push(t)}s=s.filter(e=>!f.includes(e));let _="template";for(let e=0;e<u.length;e++){let t=u[e];let r=s.indexOf(t);if(r===-1){s.splice(e,0,t);c.push([_,e])}else if(r!==e){let t=s.splice(e,1)[0];let i=s.splice(r-1,1)[0];s.splice(e,0,i);s.splice(r,0,t);d.push([t,i])}else{h.push(t)}_=t}for(let e=0;e<f.length;e++){let t=f[e];if(!(t in a))continue;eL(()=>{tq(a[t]);a[t].remove()});delete a[t]}for(let e=0;e<d.length;e++){let[t,r]=d[e];let i=a[t];let n=a[r];let s=document.createElement("div");eL(()=>{if(!n)tL(`x-for ":key" is undefined or invalid`,o,r,a);n.after(s);i.after(n);n._x_currentIfEl&&n.after(n._x_currentIfEl);s.before(i);i._x_currentIfEl&&i.after(i._x_currentIfEl);s.remove()});n._x_refreshXForScope(l[u.indexOf(r)])}for(let e=0;e<c.length;e++){let[t,r]=c[e];let i=t==="template"?o:a[t];if(i._x_currentIfEl)i=i._x_currentIfEl;let n=l[r];let s=u[r];let d=document.importNode(o.content,true).firstElementChild;let f=eo(n);eB(d,f,o);d._x_refreshXForScope=e=>{Object.entries(e).forEach(([e,t])=>{f[e]=t})};eL(()=>{i.after(d);ro(()=>tV(d))()});if(typeof s==="object"){tL("x-for key cannot be an object, it must be a string or an integer",o)}a[s]=d}for(let e=0;e<h.length;e++){a[h[e]]._x_refreshXForScope(l[u.indexOf(h[e])])}o._x_prevKeys=u})}function nz(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/;let r=/^\s*\(|\)\s*$/g;let i=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;let n=e.match(i);if(!n)return;let o={};o.items=n[2].trim();let a=n[1].replace(r,"").trim();let s=a.match(t);if(s){o.item=a.replace(t,"").trim();o.index=s[1].trim();if(s[2]){o.collection=s[2].trim()}}else{o.item=a}return o}function nV(e,t,r,i){let n={};if(/^\[.*\]$/.test(e.item)&&Array.isArray(t)){let r=e.item.replace("[","").replace("]","").split(",").map(e=>e.trim());r.forEach((e,r)=>{n[e]=t[r]})}else if(/^\{.*\}$/.test(e.item)&&!Array.isArray(t)&&typeof t==="object"){let r=e.item.replace("{","").replace("}","").split(",").map(e=>e.trim());r.forEach(e=>{n[e]=t[e]})}else{n[e.item]=t}if(e.index)n[e.index]=r;if(e.collection)n[e.collection]=i;return n}function nq(e){return!Array.isArray(e)&&!isNaN(e)}// packages/alpinejs/src/directives/x-ref.js
function nW(){}nW.inline=(e,{expression:t},{cleanup:r})=>{let i=tU(e);if(!i._x_refs)i._x_refs={};i._x_refs[t]=e;r(()=>delete i._x_refs[t])};ts("ref",nW);// packages/alpinejs/src/directives/x-if.js
ts("if",(e,{expression:t},{effect:r,cleanup:i})=>{if(e.tagName.toLowerCase()!=="template")tL("x-if can only be used on a <template> tag",e);let n=e3(e,t);let o=()=>{if(e._x_currentIfEl)return e._x_currentIfEl;let t=e.content.cloneNode(true).firstElementChild;eB(t,{},e);eL(()=>{e.after(t);ro(()=>tV(t))()});e._x_currentIfEl=t;e._x_undoIf=()=>{eL(()=>{tq(t);t.remove()});delete e._x_currentIfEl};return t};let a=()=>{if(!e._x_undoIf)return;e._x_undoIf();delete e._x_undoIf};r(()=>n(e=>{e?o():a()}));i(()=>e._x_undoIf&&e._x_undoIf())});// packages/alpinejs/src/directives/x-id.js
ts("id",(e,{expression:t},{evaluate:r})=>{let i=r(t);i.forEach(t=>nE(e,t))});rl((e,t)=>{if(e._x_ids){t._x_ids=e._x_ids}});// packages/alpinejs/src/directives/x-on.js
tb(tm("@",tg(tn("on:"))));ts("on",ro((e,{value:t,modifiers:r,expression:i},{cleanup:n})=>{let o=i?e3(e,i):()=>{};if(e.tagName.toLowerCase()==="template"){if(!e._x_forwardEvents)e._x_forwardEvents=[];if(!e._x_forwardEvents.includes(t))e._x_forwardEvents.push(t)}let a=nx(e,t,r,e=>{o(()=>{},{scope:{"$event":e},params:[e]})});n(()=>a())}));// packages/alpinejs/src/directives/index.js
nK("Collapse","collapse","collapse");nK("Intersect","intersect","intersect");nK("Focus","trap","focus");nK("Mask","mask","mask");function nK(e,t,r){ts(t,i=>tL(`You can't use [x-${t}] without first installing the "${e}" plugin here: https://alpinejs.dev/plugins/${r}`,i))}// packages/alpinejs/src/index.js
rZ.setEvaluator(e5);rZ.setReactivityEngine({reactive:nd,effect:iE,release:ib,raw:n_});var nY=rZ;// packages/alpinejs/builds/module.js
var nQ=nY;// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_define_property.js
var nZ=r(38125);// CONCATENATED MODULE: ./assets/core/ts/utils/string.ts
var nX=e=>{if(!e)return e;var t=e.charAt(0).toUpperCase();var r=e.slice(1);return"".concat(t).concat(r)};// CONCATENATED MODULE: ./assets/core/ts/ComponentRegistry.ts
class nJ{register(e){var{type:t,meta:r}=e;if(t==="component"){var i=r;if(!this.components.has(i.name)){this.components.set(i.name,i)}}else{var n=r;if(!this.services.has(n.name)){this.services.set(n.name,n);this.exposeToWindow({type:"service",items:[n]})}}}registerLazy(e){Object.entries(e).forEach(e=>{var[t,r]=e;this.lazyComponents.set(t,r)})}registerAll(e){var{components:t=[],services:r=[]}=e;for(var i of t){this.register({type:"component",meta:i})}for(var n of r){this.register({type:"service",meta:n})}}get(e){var{name:t,type:r}=e;var i=r==="component"?this.components:this.services;var n=i.get(t);return r==="service"?n===null||n===void 0?void 0:n.instance:n}has(e){var{name:t,type:r}=e;return r==="component"?this.components.has(t):this.services.has(t)}loadComponent(t){return(0,e._)(function*(){// Already registered.
if(this.components.has(t)){return}// Already being loaded.
var r=this.loadingComponents.get(t);if(r){return r}var i=this.lazyComponents.get(t);if(!i){return}var n=(()=>(0,e._)(function*(){try{var e=yield i();this.register({type:"component",meta:e})}finally{this.loadingComponents.delete(t)}}).call(this))();this.loadingComponents.set(t,n);return n}).call(this)}loadComponents(t){return(0,e._)(function*(){yield Promise.all(t.map(e=>this.loadComponent(e)))}).call(this)}exposeToWindow(e){var{type:t,items:r}=e;if(typeof window==="undefined")return;var i=window.TutorCore||{};for(var n of r){if(t==="service"){i[n.name]=n.instance;continue}if(n.global){i[n.name]=n.component}}window.TutorCore=i}exposeComponents(e){var t=e?Array.from(this.components.values()).filter(t=>e.includes(t.name)):Array.from(this.components.values());this.exposeToWindow({type:"component",items:t})}initWithAlpine(e){for(var t of Array.from(this.components.values())){e.data("tutor".concat(nX(t.name)),t.component)}this.exposeToWindow({type:"component",items:Array.from(this.components.values())})}constructor(){(0,nZ._)(this,"components",new Map);(0,nZ._)(this,"lazyComponents",new Map);(0,nZ._)(this,"loadingComponents",new Map);(0,nZ._)(this,"services",new Map)}}var n0=new nJ;// CONCATENATED MODULE: ./assets/core/ts/components/accordion.ts
function n1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{openItems:e.defaultOpen||[],multiple:e.multiple!==false,$el:undefined,toggle(e){if(this.openItems.includes(e)){this.openItems=this.openItems.filter(t=>t!==e)}else{if(!this.multiple){this.openItems=[e]}else{this.openItems.push(e)}}},isOpen(e){return this.openItems.includes(e)},handleKeydown(e,t){switch(e.key){case"Enter":case" ":e.preventDefault();this.toggle(t);break;case"ArrowDown":e.preventDefault();this.focusNext(t);break;case"ArrowUp":e.preventDefault();this.focusPrevious(t);break;case"Home":e.preventDefault();this.focusFirst();break;case"End":e.preventDefault();this.focusLast();break}},focusNext(e){var t;var r=(t=this.$el)===null||t===void 0?void 0:t.querySelectorAll(".tutor-accordion-trigger");if(r){var i=e<r.length-1?e+1:0;r[i].focus()}},focusPrevious(e){var t;var r=(t=this.$el)===null||t===void 0?void 0:t.querySelectorAll(".tutor-accordion-trigger");if(r){var i=e>0?e-1:r.length-1;r[i].focus()}},focusFirst(){var e;var t=(e=this.$el)===null||e===void 0?void 0:e.querySelectorAll(".tutor-accordion-trigger");if(t&&t.length>0){t[0].focus()}},focusLast(){var e;var t=(e=this.$el)===null||e===void 0?void 0:e.querySelectorAll(".tutor-accordion-trigger");if(t&&t.length>0){t[t.length-1].focus()}}}}var n2={name:"accordion",component:n1};// EXTERNAL MODULE: external "wp.i18n"
var n4=r(12470);// CONCATENATED MODULE: ./assets/core/ts/components/copy-to-clipboard.ts
var n3=()=>{return{toast:window.TutorCore.toast,copied:false,timer:null,$el:null,copy(t){return(0,e._)(function*(){if(!t||!this.$el){return}try{if(window.isSecureContext&&navigator.clipboard){yield navigator.clipboard.writeText(t)}else{throw new Error((0,n4.__)("Clipboard API is not available","tutor"))}}catch(r){var e=document.createElement("textarea");e.value=t;e.style.position="fixed";e.style.left="-9999px";document.body.appendChild(e);e.focus();e.select();try{document.execCommand("copy")}catch(e){this.toast.error((0,n4.sprintf)((0,n4.__)("Failed to copy to clipboard: %s","tutor"),e));return}document.body.removeChild(e)}this.toast.success((0,n4.__)("Copied to clipboard","tutor"));this.copied=true;if(this.timer){clearTimeout(this.timer)}this.timer=window.setTimeout(()=>{this.copied=false},2e3)}).call(this)}}};var n8={name:"copyToClipboard",component:n3};// EXTERNAL MODULE: ./assets/src/js/v3/shared/config/config.ts
var n9=r(74412);// CONCATENATED MODULE: ./assets/core/ts/components/icon.ts
var n5={};var n6=e=>{var{width:t,height:r,viewBox:i,fill:n,content:o=""}=e;return'<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(t,'" height="').concat(r,'" viewBox="').concat(i||"0 0 "+t+" "+r,'" fill="').concat(n,'">').concat(o,"</svg>")};function n7(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"ts",n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:false;var o,a,s;var l=i==="php"?e:e.trim().replace(/[A-Z]/g,e=>"-"+e.toLowerCase());var u=!n&&n9/* .tutorConfig.is_kids_mode */.P.is_kids_mode&&((o=n9/* .tutorConfig.kids_icons_registry */.P.kids_icons_registry)===null||o===void 0?void 0:o.includes(l));var c=u?"assets/icons/kids/":"assets/icons/";var d="".concat(n9/* .tutorConfig.tutor_url */.P.tutor_url).concat(c).concat(l,".svg");var f="0 0 ".concat(t," ").concat(r);if((a=n5[d])===null||a===void 0?void 0:a.svg){return Promise.resolve(n5[d].svg)}if((s=n5[d])===null||s===void 0?void 0:s.promise){return n5[d].promise}var h=fetch(d).then(e=>{if(!e.ok){throw new Error("HTTP error! status: ".concat(e.status))}return e.text()}).then(e=>{var i=new DOMParser;var n=i.parseFromString(e,"image/svg+xml");var o=n.querySelector("svg");var a=(o===null||o===void 0?void 0:o.getAttribute("viewBox"))||f;var s=(o===null||o===void 0?void 0:o.getAttribute("fill"))||"none";var l=(o===null||o===void 0?void 0:o.innerHTML)||"";var u=n6({width:t,height:r,viewBox:a,fill:s,content:l});n5[d]={svg:u};return u}).catch(e=>{n5[d]={error:e};// eslint-disable-next-line no-console
console.error("Failed to load icon: ".concat(l),e);return n6({width:t,height:r})});n5[d]={loading:true,promise:h};return h}var oe=t=>({name:t.name,width:t.width||16,height:t.height||16,from:t.from||"php",ignoreKids:t.ignoreKids||false,init(){return(0,e._)(function*(){// eslint-disable-next-line @typescript-eslint/no-explicit-any
var e=this.$el;e.innerHTML=n6({width:this.width,height:this.height});e.classList.add("tutor-icon");if(!this.name){return}var t=yield n7(this.name,this.width,this.height,this.from,this.ignoreKids);e.innerHTML=t}).call(this)},updateIcon(t){return(0,e._)(function*(){// eslint-disable-next-line @typescript-eslint/no-explicit-any
var e=this.$el;this.name=t;e.innerHTML=n6({width:this.width,height:this.height});var r=yield n7(this.name,this.width,this.height,this.from,this.ignoreKids);e.innerHTML=r}).call(this)}});var ot={name:"icon",component:oe,global:true};// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread.js
var or=r(41147);// EXTERNAL MODULE: ./assets/core/ts/constant.ts
var oi=r(9210);// CONCATENATED MODULE: ./assets/core/ts/components/modal.ts
var on={id:"tutor-modal",isCloseable:true};var oo=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:(0,or._)({},on);var t,r;return{open:(t=e.initialOpen)!==null&&t!==void 0?t:false,payload:null,isCloseable:(r=e.isCloseable)!==null&&r!==void 0?r:on.isCloseable,id:e.id,cleanup:undefined,$el:undefined,init(){var e=e=>{var t;var r=e===null||e===void 0?void 0:(t=e.detail)===null||t===void 0?void 0:t.id;if(!r||r===this.id){var i;var n;this.payload=(n=e===null||e===void 0?void 0:(i=e.detail)===null||i===void 0?void 0:i.data)!==null&&n!==void 0?n:null;this.show()}};var t=e=>{var t;var r=e===null||e===void 0?void 0:(t=e.detail)===null||t===void 0?void 0:t.id;if(!r||r===this.id){this.close()}};document.addEventListener(oi/* .TUTOR_CUSTOM_EVENTS.MODAL_OPEN */.T.MODAL_OPEN,e);document.addEventListener(oi/* .TUTOR_CUSTOM_EVENTS.MODAL_CLOSE */.T.MODAL_CLOSE,t);this.cleanup=()=>{document.removeEventListener(oi/* .TUTOR_CUSTOM_EVENTS.MODAL_OPEN */.T.MODAL_OPEN,e);document.removeEventListener(oi/* .TUTOR_CUSTOM_EVENTS.MODAL_CLOSE */.T.MODAL_CLOSE,t)}},destroy(){var e,t;(e=(t=this).cleanup)===null||e===void 0?void 0:e.call(t)},show(){this.open=true},close(){this.open=false;this.payload=null;document.dispatchEvent(new CustomEvent(oi/* .TUTOR_CUSTOM_EVENTS.MODAL_CLOSED */.T.MODAL_CLOSED,{detail:{id:this.id}}))},getBackdropBindings(){var e=this.$el;e.classList.add("tutor-modal-backdrop");return{"x-show":"open","x-transition:enter":"tutor-modal-backdrop-enter","x-transition:enter-start":"tutor-modal-backdrop-transition","x-transition:enter-end":"tutor-modal-backdrop-transition-reset","x-transition:leave":"tutor-modal-backdrop-leave","x-transition:leave-start":"tutor-modal-backdrop-transition-reset","x-transition:leave-end":"tutor-modal-backdrop-transition"}},getModalBindings(){var e=this.$el;e.classList.add("tutor-modal");return{"x-show":"open","@keydown.escape.window":this.isCloseable?"close()":"",role:"dialog","aria-modal":"true"}},getModalContentBindings(){var e=this.$el;e.classList.add("tutor-modal-content");return{"x-trap.noscroll.inert":"open","@click.outside":this.isCloseable?"close()":"","x-show":"open","x-transition:enter":"tutor-modal-content-enter","x-transition:enter-start":"tutor-modal-content-transition","x-transition:enter-end":"tutor-modal-content-transition-reset","x-transition:leave":"tutor-modal-content-leave","x-transition:leave-start":"tutor-modal-content-transition-reset","x-transition:leave-end":"tutor-modal-content-transition"}},getCloseButtonBindings(){var e=this.$el;e.classList.add("tutor-modal-close");return{"x-show":"open","@click":"close()"}}}};var oa={name:"modal",component:oo};// CONCATENATED MODULE: ./assets/core/ts/components/password-input.ts
var os={showStrength:false,minStrength:3};var ol={0:(0,n4.__)("Very weak","tutor"),1:(0,n4.__)("Very weak","tutor"),2:(0,n4.__)("Weak","tutor"),3:(0,n4.__)("Medium","tutor"),4:(0,n4.__)("Strong","tutor"),5:(0,n4.__)("Very strong","tutor")};var ou={0:"var(--tutor-text-critical)",1:"var(--tutor-text-critical)",2:"var(--tutor-text-critical)",3:"var(--tutor-text-warning)",4:"var(--tutor-text-success)",5:"var(--tutor-text-success)"};var oc=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:os;var t,r;return{showPassword:false,strength:0,strengthLabel:"",strengthColor:"",showStrength:(t=e.showStrength)!==null&&t!==void 0?t:false,minStrength:(r=e.minStrength)!==null&&r!==void 0?r:3,password:"",init(){var e=this.$el.querySelector("input");if(e){e.addEventListener("input",e=>{this.password=e.target.value;if(this.showStrength){this.checkStrength()}})}},destroy(){var e=this.$el.querySelector("input");if(e){e.removeEventListener("input",e=>{this.password=e.target.value;if(this.showStrength){this.checkStrength()}})}},toggleVisibility(){this.showPassword=!this.showPassword;var e=this.$root;var t=e.querySelector("input");if(t){t.type=this.showPassword?"text":"password"}},checkStrength(){this.strength=this.calculateBasicStrength();this.strengthLabel=ol[this.strength]||"";this.strengthColor=ou[this.strength]||""},calculateBasicStrength(){var e=this.password;if(!e){return 0}var t=0;if(e.length>=8)t++;if(e.length>=12)t++;if(/[a-z]/.test(e)&&/[A-Z]/.test(e))t++;if(/\d/.test(e))t++;if(/[^a-zA-Z0-9]/.test(e))t++;return Math.min(t,5)},getToggleBindings(){return{"@click":"toggleVisibility()",class:"tutor-password-toggle",type:"button","aria-label":this.showPassword?(0,n4.__)("Hide password","tutor"):(0,n4.__)("Show password","tutor")}},getStrengthTextBindings(){return{"x-text":"strengthLabel",":style":"{color: strengthColor}"}}}};var od={name:"passwordInput",component:oc};// EXTERNAL MODULE: ./assets/core/ts/utils/util.ts
var of=r(42792);// CONCATENATED MODULE: ./assets/src/js/frontend/types/index.ts
function oh(e){return e.provider==="youtube"}function o_(e){return e.provider==="vimeo"};// CONCATENATED MODULE: ./assets/core/ts/components/player.ts
var op=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{plyr:null,$el:undefined,init(){if(typeof window.Plyr==="undefined"){// eslint-disable-next-line no-console
console.warn("Plyr is not defined. Ensure Plyr library is loaded.");return}if(!this.$el){return}this.plyr=new window.Plyr(this.$el,e.config);if(this.plyr){this.plyr.on("ready",()=>{var e,t,r;(r=this.$el)===null||r===void 0?void 0:(t=r.closest(".tutor-video-player"))===null||t===void 0?void 0:(e=t.querySelector(".loading-spinner"))===null||e===void 0?void 0:e.remove();/**
* Fix: Mobile Vimeo autoplay sound issue
* Always start muted on mobile to comply with autoplay policy.
*/if(this.plyr&&o_(this.plyr)&&(0,of/* .isMobileDevice */.X)()){try{this.plyr.muted=true;if(typeof this.plyr.mute==="function"){this.plyr.mute()}}catch(e){// eslint-disable-next-line no-console
console.warn("Vimeo mute init failed:",e)}}});this.plyr.on("play",()=>{/**
* Unmute automatically after first user interaction
* Mobile browsers allow audio only after gesture.
*/if(this.plyr&&o_(this.plyr)&&(0,of/* .isMobileDevice */.X)()){try{this.plyr.muted=false;if(typeof this.plyr.unmute==="function"){this.plyr.unmute()}}catch(e){// eslint-disable-next-line no-console
console.warn("Vimeo unmute on play failed:",e)}}})}// Dispatch custom event when player is ready
this.$el.dispatchEvent(new CustomEvent(oi/* .TUTOR_CUSTOM_EVENTS.TUTOR_PLAYER_READY */.T.TUTOR_PLAYER_READY,{detail:{plyr:this.plyr,component:this},bubbles:true}))}}};var ov={name:"player",component:op,global:true};// EXTERNAL MODULE: ./assets/core/ts/components/popover.ts
var om=r(34224);// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_spread_props.js
var og=r(14206);// CONCATENATED MODULE: ./assets/core/ts/components/preview-trigger.ts
// Preview Trigger Component
// Shows course/lesson preview card on hover
var oy=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var t;var r=(0,om/* .popover */.o)({placement:e.placement||"bottom-start",offset:(t=e.offset)!==null&&t!==void 0?t:4,onShow:e.onShow,onHide:e.onHide});return(0,og._)((0,or._)({},r),{previewData:e.data||null,isTouchDevice:false,hoverTimeout:null,hoverDelay:e.delay||300,$nextTick:undefined,init(){r.init.call(this);this.isTouchDevice="ontouchstart"in window||navigator.maxTouchPoints>0;this.setupPreviewTriggers()},setupPreviewTriggers(){var e=this.$refs.trigger;if(!e)return;// Get hover delay from data attribute
if(e.hasAttribute("data-tutor-preview-delay")){this.hoverDelay=parseInt(e.getAttribute("data-tutor-preview-delay")||"300",10)}if(this.isTouchDevice){// Mobile: tap to toggle
e.addEventListener("click",e=>this.handleTap(e));// Prevent clicks inside content from bubbling to trigger on mobile
// This ensures links inside content work and tapping content doesn't toggle the popover
var t=this.$refs.content;if(t){t.addEventListener("click",e=>{e.stopPropagation()})}}else{// Desktop: hover to show
e.addEventListener("mouseenter",()=>this.handleMouseEnter());e.addEventListener("mouseleave",()=>this.handleMouseLeave());e.addEventListener("keydown",e=>this.handleKeyDown(e));// Keep popover open when hovering over content
var r=this.$refs.content;if(r){r.addEventListener("mouseenter",()=>{if(this.hoverTimeout){clearTimeout(this.hoverTimeout);this.hoverTimeout=null}});r.addEventListener("mouseleave",()=>this.handleMouseLeave())}}},handleTap(e){var t=e.target;var r=this.$refs.content;// If the tap is inside the preview content, let it be handled there
// This is a fallback in case propagation wasn't stopped
if(r&&r.contains(t)){return}e.preventDefault();if(this.open){this.hide();return}this.showPreview()},handleMouseEnter(){// Clear any existing timeout
if(this.hoverTimeout){clearTimeout(this.hoverTimeout)}// Show after delay
this.hoverTimeout=window.setTimeout(()=>{this.showPreview()},this.hoverDelay)},handleMouseLeave(){// Clear timeout if user moves away before delay
if(this.hoverTimeout){clearTimeout(this.hoverTimeout);this.hoverTimeout=null}// Hide preview after a short delay
setTimeout(()=>{var e;var t=this.$refs.content;if(!(t===null||t===void 0?void 0:t.matches(":hover"))&&!((e=this.$refs.trigger)===null||e===void 0?void 0:e.matches(":hover"))){this.hide()}},100)},handleKeyDown(e){if(e.key==="Escape"){this.hide()}if(e.key==="Enter"||e.key===" "){var t=this.$refs.content;if(t&&t.contains(e.target)){return}e.preventDefault();if(this.open){this.hide()}else{this.showPreview()}}},showPreview(){if(!this.previewData)return;// Show popover
this.show();// Render content
this.renderPreview();// Reposition after content is rendered
if(this.$nextTick){this.updatePosition()}else{this.updatePosition()}},renderPreview(){var e=this.$refs.content;if(!e||!this.previewData)return;this.renderCoursePreview(e)},renderCoursePreview(e){if(!this.previewData)return;var t=this.previewData;var r=t.thumbnail?'<img src="'.concat(t.thumbnail,'" alt="').concat(this.escapeHtml(t.title),'" class="tutor-preview-card-thumbnail" />'):"";e.innerHTML='\n <div class="tutor-preview-card-content">\n '.concat(t.thumbnail?t.url?'<a tabindex="-1" href="'.concat(t.url,'">').concat(r,"</a>"):r:"",'\n <div class="tutor-preview-card-body">\n <h4 class="tutor-preview-card-title">').concat(t.url?'<a href="'.concat(t.url,'">').concat(this.escapeHtml(t.title),"</a>"):this.escapeHtml(t.title),"</h4>\n ").concat(t.instructor?'<div class="tutor-preview-card-instructor">'.concat((0,n4.sprintf)((0,n4.__)('by <a href="'.concat(t.instructor_url,'">%s</a>'),"tutor"),this.escapeHtml(t.instructor)),"</div>"):"","\n </div>\n </div>\n ")},escapeHtml(e){var t=document.createElement("div");t.textContent=e;return t.innerHTML},destroy(){if(this.hoverTimeout){clearTimeout(this.hoverTimeout)}r.destroy.call(this)}})};var oE={name:"previewTrigger",component:oy};// CONCATENATED MODULE: ./assets/core/ts/components/read-more.ts
var ob=4;var oT=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var t,r;return{expanded:(t=e.expanded)!==null&&t!==void 0?t:false,hasOverflow:false,lines:(r=e.lines)!==null&&r!==void 0?r:ob,collapsedHeightPx:0,$el:null,$refs:{},$watch:null,$nextTick:null,init(){var e,t,r,i;var n=this.$refs.content;if(!n){return}// Clear the inline line-clamp styles that prevented flash of full
// content (set in the PHP template) and switch to max-height.
n.style.display="";n.style.webkitLineClamp="";n.style.setProperty("-webkit-box-orient","");n.style.removeProperty("-webkit-line-clamp");n.style.removeProperty("-webkit-box-orient");n.style.removeProperty("display");this.computeCollapsedHeight(n);this.applyCollapsedStyles(n);(e=(t=this).$watch)===null||e===void 0?void 0:e.call(t,"expanded",()=>this.applyState());(r=(i=this).$nextTick)===null||r===void 0?void 0:r.call(i,()=>{this.sync()})},computeCollapsedHeight(e){var t=getComputedStyle(e);var r=parseFloat(t.lineHeight);// If lineHeight is 'normal', estimate from font-size × 1.2.
if(Number.isNaN(r)){r=parseFloat(t.fontSize)*1.2}this.collapsedHeightPx=Math.ceil(this.lines*r)},sync(){var e=this.$refs.content;if(!e){return}this.computeCollapsedHeight(e);var t=e.style.maxHeight;var r=e.style.overflow;e.style.maxHeight="".concat(this.collapsedHeightPx,"px");e.style.overflow="hidden";this.hasOverflow=e.scrollHeight>e.clientHeight+1;e.style.maxHeight=t;e.style.overflow=r;this.applyState()},applyCollapsedStyles(e){e.style.maxHeight="".concat(this.collapsedHeightPx,"px");e.style.overflow="hidden"},applyState(){var e=this.$el;var t=this.$refs.content;var r=this.$refs.readMore;if(!t||!e){return}// Root needs relative positioning for the absolute "read more" button.
e.style.position="relative";if(this.expanded||!this.hasOverflow){t.style.maxHeight="none";t.style.overflow="visible";this.styleReadMoreButton(r,false);return}t.style.maxHeight="".concat(this.collapsedHeightPx,"px");t.style.overflow="hidden";this.styleReadMoreButton(r,true)},styleReadMoreButton(e,t){if(!e){return}if(!t){e.style.position="";e.style.bottom="";e.style.right="";e.style.paddingLeft="";return}e.style.position="absolute";e.style.bottom="0";e.style.right="0";e.style.paddingLeft="4px"},toggle(){if(!this.hasOverflow&&!this.expanded){return}this.expanded=!this.expanded}}};var ow={name:"readMore",component:oT};// CONCATENATED MODULE: ./assets/core/ts/components/star-rating.ts
var oA=e=>({rating:e.initialRating||1,hoverRating:0,fieldName:e.fieldName,get effectiveRating(){return this.hoverRating>0?this.hoverRating:this.rating},get feedback(){var t=this.effectiveRating;if(t===0){return""}var r={1:(0,n4.__)("Poor","tutor"),2:(0,n4.__)("Fair","tutor"),3:(0,n4.__)("Okay","tutor"),4:(0,n4.__)("Good","tutor"),5:(0,n4.__)("Amazing","tutor")};if(Number.isInteger(t)){return r[t]||""}// Handle fractional ratings (e.g., 4.5 -> "Good / Amazing")
var i=Math.floor(t);var n=Math.ceil(t);var o=r[i];var a=r[n];if(o&&a){return"".concat(o," / ").concat(a)}return o||a||""},setRating(e,t){this.rating=e;t(this.rating)}});var oO={name:"starRatingInput",component:oA};// CONCATENATED MODULE: ./assets/core/ts/components/statics.ts
var ox={large:{dimension:144,strokeWidth:10.8,iconSizes:{check:80,lock:104}},medium:{dimension:56,strokeWidth:4.3,iconSizes:{check:24,lock:32}},small:{dimension:44,strokeWidth:3.3,iconSizes:{check:24,lock:32}},"x-small":{dimension:16,strokeWidth:2,iconSizes:{check:8,lock:12}}};var oS={value:0,type:"progress",size:"small",background:"none",strokeColor:"var(--tutor-actions-brand-secondary)",progressStrokeColor:"var(--tutor-actions-brand-primary)",showLabel:true,label:"",animated:false,duration:1e3};var oC=3;var oN=100;var oL=0;var oP=e=>{var t,r,i,n,o,a,s,l,u,c;return{value:0,targetValue:(t=e.value)!==null&&t!==void 0?t:oS.value,type:(r=e.type)!==null&&r!==void 0?r:oS.type,size:(i=e.size)!==null&&i!==void 0?i:oS.size,background:(n=e.background)!==null&&n!==void 0?n:oS.background,strokeColor:(o=e.strokeColor)!==null&&o!==void 0?o:oS.strokeColor,progressStrokeColor:(a=e.progressStrokeColor)!==null&&a!==void 0?a:oS.progressStrokeColor,showLabel:(s=e.showLabel)!==null&&s!==void 0?s:oS.showLabel,label:(l=e.label)!==null&&l!==void 0?l:oS.label,animated:(u=e.animated)!==null&&u!==void 0?u:oS.animated,duration:(c=e.duration)!==null&&c!==void 0?c:oS.duration,init(){this.initializeValue()},initializeValue(){if(this.animated&&this.type==="progress"){this.animateProgress()}else{this.value=this.targetValue}},animateProgress(){var e=Date.now();var t=this.value;var r=this.targetValue;var i=()=>{var n=Date.now()-e;var o=Math.min(n/this.duration,1);var a=this.easeOut(o);this.value=t+(r-t)*a;if(o<1){requestAnimationFrame(i)}else{this.value=r}};requestAnimationFrame(i)},easeOut(e){return 1-Math.pow(1-e,oC)},sizeConfig(){var e;var t=(e=this.size)!==null&&e!==void 0?e:oS.size;var r;return(r=ox[t])!==null&&r!==void 0?r:ox[oS.size]},sizeValue(){return this.sizeConfig().dimension},strokeWidth(){return this.sizeConfig().strokeWidth},radius(){return(this.sizeValue()-this.strokeWidth())/2},center(){return this.sizeValue()/2},viewBox(){return"0 0 ".concat(this.sizeValue()," ").concat(this.sizeValue())},circumference(){return 2*Math.PI*this.radius()},strokeDashoffset(){var e=Math.min(Math.max(this.value,oL),oN);return this.circumference()-e/oN*this.circumference()},displayValue(){return Math.round(this.value)},displayLabel(){return this.label||"".concat(this.displayValue(),"%")},get labelText(){if(!this.showLabel)return"";return this.displayValue()===0?"0":"".concat(this.displayValue(),"%")},get labelClass(){var d="tutor-statics-progress-label";var f=this.size==="large"?"tutor-statics-progress-label-large":"";return"".concat(d," ").concat(f).trim()},renderProgressCircle(){return'\n <svg class="tutor-statics-progress" viewBox="'.concat(this.viewBox(),'" width="').concat(this.sizeValue(),'" height="').concat(this.sizeValue(),'">\n ').concat(this.renderBackgroundCircle(),"\n ").concat(this.renderProgressArc(),"\n </svg>\n ").concat(this.renderLabel(),"\n ")},renderBackgroundCircle(){return'\n <circle \n cx="'.concat(this.center(),'" \n cy="').concat(this.center(),'" \n r="').concat(this.radius(),'"\n fill="').concat(this.background,'"\n stroke="').concat(this.strokeColor,'"\n stroke-width="').concat(this.strokeWidth(),'"\n ></circle>\n ')},renderProgressArc(){return'\n <circle \n cx="'.concat(this.center(),'" \n cy="').concat(this.center(),'" \n r="').concat(this.radius(),'"\n fill="none"\n stroke="').concat(this.progressStrokeColor,'"\n stroke-width="').concat(this.strokeWidth(),'"\n stroke-linecap="round"\n stroke-dasharray="').concat(this.circumference(),'"\n stroke-dashoffset="').concat(this.strokeDashoffset(),'"\n style="transition: stroke-dashoffset 0.6s ease;"\n ></circle>\n ')},renderLabel(){if(!this.showLabel)return"";return'<div class="'.concat(this.labelClass,'">').concat(this.labelText,"</div>")},renderCompleteCircle(){var e=this.sizeConfig().iconSizes.check;return this.renderIconContainer("tutor-statics-complete","checkStroke",e)},renderLockIcon(){var e=this.sizeConfig().iconSizes.lock;return this.renderIconContainer("tutor-statics-locked","circumLock",e)},renderIconContainer(e,t,r){return'\n <div class="'.concat(e,'" style="width: ').concat(this.sizeValue(),"px; height: ").concat(this.sizeValue(),'px;">\n <div x-data="tutorIcon({ name: \'').concat(t,"', width: ").concat(r,", height: ").concat(r,' })"></div>\n </div>\n ')},render(){// eslint-disable-next-line @typescript-eslint/no-explicit-any
var e=this.$el;e.classList.add("tutor-statics");switch(this.type){case"progress":return this.renderProgressCircle();case"complete":return this.renderCompleteCircle();case"locked":return this.renderLockIcon();default:return""}}}};var ok={name:"statics",component:oP};// CONCATENATED MODULE: ./assets/core/ts/utils/error.ts
var oR=e=>{if(e instanceof Error){return e.message||(0,n4.__)("Something went wrong","tutor")}return(0,n4.__)("Something went wrong","tutor")};// CONCATENATED MODULE: ./assets/core/ts/components/status-select.ts
var oI=t=>{return{selectedValue:t.selected,prevValue:t.selected,isLoading:false,variants:t.variants,get currentVariant(){return this.variants[this.selectedValue]||"default"},get variantClasses(){var r={};Object.values(this.variants).forEach(e=>{r["tutor-status-select-".concat(e)]=e===this.currentVariant});// Handle the default variant if not explicitly in variants list
if(!Object.values(this.variants).includes("default")){r["tutor-status-select-default"]=this.currentVariant==="default"}return r},updateStatus(){return(0,e._)(function*(){if(this.selectedValue===this.prevValue||!t.action){return}this.isLoading=true;try{var e=new FormData;// Add basic nonce and action
e.append(n9/* .tutorConfig.nonce_key */.P.nonce_key,n9/* .tutorConfig._tutor_nonce */.P._tutor_nonce);e.append("action",t.action);e.append("status",this.selectedValue);// Add additional data
for(var[r,i]of Object.entries(t.data)){e.append(r,i)}var n=yield fetch(n9/* .tutorConfig.ajaxurl */.P.ajaxurl,{method:"POST",body:e});var o=yield n.json();if(o.success){var a;this.prevValue=this.selectedValue;window.TutorCore.toast.success(((a=o.data)===null||a===void 0?void 0:a.message)||(0,n4.__)("Status updated successfully","tutor"))}else{this.selectedValue=this.prevValue;window.TutorCore.toast.error(oR(o))}}catch(e){this.selectedValue=this.prevValue;// eslint-disable-next-line no-console
console.error("Status update error:",e)}finally{this.isLoading=false}}).call(this)}}};var oM={name:"statusSelect",component:oI};// CONCATENATED MODULE: ./assets/core/ts/components/tabs.ts
var oD=t=>{var r,i,n;var o;return{tabs:t.tabs,activeTab:t.defaultTab||((r=t.tabs[0])===null||r===void 0?void 0:r.id)||"",orientation:t.orientation||"horizontal",size:t.size||"lg",urlParamsConfig:{enabled:(o=(i=t.urlParams)===null||i===void 0?void 0:i.enabled)!==null&&o!==void 0?o:true,paramName:((n=t.urlParams)===null||n===void 0?void 0:n.paramName)||"page_tab"},init(){return(0,e._)(function*(){// eslint-disable-next-line @typescript-eslint/no-explicit-any
var e=this.$el;var t=this.activeTab;// Only read from URL if URL params are enabled
if(this.urlParamsConfig.enabled){var r=new URL(window.location.href);var i=r.searchParams.get(this.urlParamsConfig.paramName);if(i){t=i}}this.selectTab(t);e.classList.add("tutor-tabs-"+this.orientation)}).call(this)},selectTab(e){// eslint-disable-next-line @typescript-eslint/no-explicit-any
var r=this.$dispatch;var i=this.tabs.find(t=>t.id===e);if(!i||i.disabled){return}if(i.href){window.location.href=i.href;return}this.activeTab=e;if(this.urlParamsConfig.enabled){var n=new URL(window.location.href);n.searchParams.set(this.urlParamsConfig.paramName,e);window.history.replaceState({},"",n.toString())}if(t.onChange){t.onChange(e)}// Dispatch custom event
r(oi/* .TUTOR_CUSTOM_EVENTS.TAB_CHANGE */.T.TAB_CHANGE,{tabId:e,tab:i})},isActive(e){return this.activeTab===e},getTabClass(e){var t=["tutor-tabs-tab"];if(this.size==="sm"){t.push("tutor-tabs-tab-sm")}if(this.size==="md"){t.push("tutor-tabs-tab-md")}if(this.isActive(e.id)){t.push("tutor-tabs-tab-active")}return t.join(" ")}}};var oB={name:"tabs",component:oD};// EXTERNAL MODULE: ./node_modules/.pnpm/@swc+helpers@0.5.17/node_modules/@swc/helpers/esm/_object_without_properties.js + 1 modules
var oF=r(17900);// CONCATENATED MODULE: ./assets/core/ts/services/toast/runtime.ts
var oU={position:"bottom-right",duration:5e3,closeButton:true,maxVisible:5,dir:"auto",offset:{x:20,y:20,mobile:{y:12},lg:{}},expandMode:"hover",richColors:false,theme:"auto"};var oG={gap:10,peek:10,scaleStep:.034,scaleFloor:.883,opacity1:.78,opacity2:.52,opacity3:0};var o$={liveRegion:"tutor-toast-aria-live"};var oH={srOnly:"tutor-toast-sr-only",container:"tutor-toast-container",stack:"tutor-toast-stack",card:"tutor-toast-card",icon:"tutor-toast-icon",content:"tutor-toast-content",title:"tutor-toast-title",description:"tutor-toast-description",closeButton:"tutor-toast-close",item:"tutor-toast-item"};var oj={card:".".concat(oH.card),icon:".".concat(oH.icon),content:".".concat(oH.content),title:".".concat(oH.title),description:".".concat(oH.description)};var oz={ariaLive:"aria-live",ariaAtomic:"aria-atomic",ariaLabel:"aria-label",ariaLabelledBy:"aria-labelledby",dataPositionX:"data-position-x",dataPositionY:"data-position-y",dataTutorTheme:"data-tutor-theme",dataRichColors:"data-rich-colors",dataType:"data-type",dataFront:"data-front",dataExpanded:"data-expanded",dataEntering:"data-entering",dataExiting:"data-exiting",dataSwiping:"data-swiping",dataSwipeOut:"data-swipe-out",dir:"dir",role:"role",tabIndex:"tabindex"};var oV={polite:"polite",assertive:"assertive",region:"region",list:"list",listItem:"listitem",alert:"alert",status:"status",true:"true",frontZIndex:"10"};var oq={left:"left",right:"right",center:"center",top:"top",bottom:"bottom"};var oW={offsetX:"--tutor-toast-offset-x",offsetY:"--tutor-toast-offset-y",y:"--tutor-toast-y",scale:"--tutor-toast-scale",opacity:"--tutor-toast-opacity",frontHeight:"--tutor-toast-front-height"};var oK="tutor-toast-title-";var oY={success:(0,n4.__)("Success","tutor"),error:(0,n4.__)("Error","tutor"),warning:(0,n4.__)("Warning","tutor"),info:(0,n4.__)("Info","tutor")};var oQ={success:'<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6L9 17l-5-5"/></svg>',error:'<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>',warning:'<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',info:'<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="8"/><path d="M12 11v6"/></svg>',default:'<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="8"/><path d="M12 11v6"/></svg>'};var oZ=()=>(0,og._)((0,or._)({},oU),{offset:(0,og._)((0,or._)({},oU.offset),{mobile:(0,or._)({},oU.offset.mobile),lg:(0,or._)({},oU.offset.lg)})});class oX{initFullscreenListener(){document.addEventListener("fullscreenchange",()=>{if(!this.container){return}var e=document.fullscreenElement||document.body;if(this.container.parentElement!==e){e.appendChild(this.container)}})}isBottom(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.config.position;return e.startsWith("bottom")}xPosition(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.config.position;if(e.endsWith("left")){return oq.left}if(e.endsWith("right")){return oq.right}return oq.center}yPosition(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.config.position;return this.isBottom(e)?oq.bottom:oq.top}ensureLiveRegion(){if(document.getElementById(o$.liveRegion)){return}var e=document.createElement("div");e.id=o$.liveRegion;e.className=oH.srOnly;e.setAttribute(oz.ariaLive,oV.polite);e.setAttribute(oz.ariaAtomic,"false");document.body.appendChild(e)}announce(e,t,r){this.ensureLiveRegion();var i=document.getElementById(o$.liveRegion);if(!i){return}i.setAttribute(oz.ariaLive,r==="error"?oV.assertive:oV.polite);i.textContent="";requestAnimationFrame(()=>{var r=t?"".concat(e,". ").concat(t):e;var n=document.createElement("div");n.innerHTML=r;i.textContent=n.textContent||""})}applyOffset(){if(!this.container){return}var e=this.config.offset;var t=window.matchMedia("(max-width: 639px)").matches;var r=window.matchMedia("(min-width: 1280px)").matches;var i;var n=(i=e.x)!==null&&i!==void 0?i:16;var o;var a=(o=e.y)!==null&&o!==void 0?o:16;if(t&&e.mobile){if(e.mobile.x!=null){n=e.mobile.x}if(e.mobile.y!=null){a=e.mobile.y}}if(r&&e.lg){if(e.lg.x!=null){n=e.lg.x}if(e.lg.y!=null){a=e.lg.y}}this.container.setAttribute(oz.dataPositionX,t?oq.center:this.xPosition());this.container.style.setProperty(oW.offsetX,"".concat(n,"px"));this.container.style.setProperty(oW.offsetY,"".concat(a,"px"))}syncContainerAttributes(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.config.position;if(!this.container){return}this.container.setAttribute(oz.dataPositionX,this.xPosition(e));this.container.setAttribute(oz.dataPositionY,this.yPosition(e));var t=this.config.theme;if(t==="auto"){this.container.removeAttribute(oz.dataTutorTheme)}else{this.container.setAttribute(oz.dataTutorTheme,t)}if(this.config.dir==="auto"){this.container.removeAttribute(oz.dir);return}this.container.setAttribute(oz.dir,this.config.dir)}boot(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.config.position;if(this.container&&this.stack){this.syncContainerAttributes(e);this.applyOffset();return}this.container=document.createElement("ol");this.container.className=oH.container;if(this.config.theme!=="auto"){this.container.setAttribute(oz.dataTutorTheme,this.config.theme)}this.container.setAttribute(oz.role,oV.region);this.container.setAttribute(oz.ariaLabel,(0,n4.__)("Notifications","tutor"));this.container.setAttribute(oz.tabIndex,"-1");this.stack=document.createElement("li");this.stack.className=oH.stack;this.stack.setAttribute(oz.role,oV.list);this.stack.addEventListener("mouseenter",()=>{this.hovered=true;if(this.config.expandMode==="hover"){this.setExpanded(true)}this.pauseAll()});this.stack.addEventListener("mouseleave",e=>{if(!this.stack){return}var t=this.stack.getBoundingClientRect();var r=e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom;if(r){return}this.hovered=false;if(this.config.expandMode==="hover"){this.setExpanded(false)}this.resumeAll()});this.stack.addEventListener("focusin",()=>{this.hovered=true;this.pauseAll();this.setExpanded(true)});this.stack.addEventListener("focusout",e=>{var t;if((t=this.stack)===null||t===void 0?void 0:t.contains(e.relatedTarget)){return}this.hovered=false;this.resumeAll();this.setExpanded(false)});this.container.appendChild(this.stack);var t=document.fullscreenElement||document.body;t.appendChild(this.container);this.syncContainerAttributes(e);this.applyOffset();if(this.config.expandMode==="always"){this.expanded=true}window.addEventListener("resize",()=>this.applyOffset())}setExpanded(e){if(this.config.expandMode==="always"){this.expanded=true}else if(this.config.expandMode==="never"){this.expanded=false}else{this.expanded=e}this.restack()}renderIcon(e,t,r){e.innerHTML="";var i;var n=(i=r!==null&&r!==void 0?r:oQ[t])!==null&&i!==void 0?i:oQ.default;if(n===null||n===void 0?void 0:n.trimStart().startsWith("<")){e.innerHTML=n;return}e.textContent=String(n)}buildCard(e,t,r){var i=document.createElement("div");i.className=oH.card;i.setAttribute(oz.dataType,r.type);i.setAttribute(oz.role,r.type==="error"?oV.alert:oV.status);i.setAttribute(oz.ariaAtomic,"false");if(r.dir){i.setAttribute(oz.dir,r.dir)}if(r.richColors){i.setAttribute(oz.dataRichColors,oV.true)}var n=document.createElement("div");n.className=oH.icon;this.renderIcon(n,r.type,r.icon);i.appendChild(n);var o=document.createElement("div");o.className=oH.content;var a=document.createElement("p");a.className=oH.title;a.id="".concat(oK).concat(e);a.textContent=t;o.appendChild(a);if(r.description){var s=document.createElement("p");s.className=oH.description;s.innerHTML=r.description;o.appendChild(s)}i.appendChild(o);if(r.closeButton){var l=document.createElement("button");l.className=oH.closeButton;l.type="button";l.setAttribute(oz.ariaLabel,(0,n4.__)("Close notification","tutor"));l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.402 3.6-8.8 8.8m0-8.8 8.8 8.8"/></svg>';l.addEventListener("click",t=>{t.stopPropagation();this.dismiss(e)});i.appendChild(l)}return i}restack(){var e;if(!this.stack){return}var t=Array.from(this.entries.values()).filter(e=>!e.exiting&&!e.swiping).reverse();var r=oG.gap;var i=oG.peek;var n=oG.scaleStep;var o=this.isBottom()?-1:1;t.forEach(e=>{var t=e.element.offsetHeight;if(t>0){e.height=t}});t.forEach((e,a)=>{var s=a===0;e.element.setAttribute(oz.dataFront,String(s));if(this.expanded){e.element.setAttribute(oz.dataExpanded,oV.true)}else{e.element.removeAttribute(oz.dataExpanded)}e.element.style.pointerEvents=s||this.expanded?"all":"none";if(!this.expanded){if(s){e.element.style.setProperty(oW.y,"0px");e.element.style.setProperty(oW.scale,"1");e.element.style.setProperty(oW.opacity,"1")}else{var l=a*i;var u=Math.max(oG.scaleFloor,1-a*n);var c=a===1?oG.opacity1:a===2?oG.opacity2:oG.opacity3;e.element.style.setProperty(oW.y,"".concat(o*l,"px"));e.element.style.setProperty(oW.scale,String(u));e.element.style.setProperty(oW.opacity,String(c))}}else{var d=0;for(var f=0;f<a;f+=1){d+=(t[f].height||72)+r}e.element.style.setProperty(oW.y,"".concat(o*d,"px"));e.element.style.setProperty(oW.scale,"1");e.element.style.setProperty(oW.opacity,"1")}e.element.style.zIndex=String(Number(oV.frontZIndex)-a);if(!e.element.hasAttribute(oz.dataEntering)){e.element.style.transform="translateY(var(".concat(oW.y,", 0px)) scale(var(").concat(oW.scale,", 1))");e.element.style.opacity="var(".concat(oW.opacity,", 1)")}});var a=((e=t[0])===null||e===void 0?void 0:e.height)||0;this.stack.style.setProperty(oW.frontHeight,"".concat(a,"px"));if(this.expanded&&t.length>0){var s=t.reduce((e,t)=>e+(t.height||72),0)+Math.max(0,t.length-1)*r;this.stack.style.height="".concat(s,"px")}else{this.stack.style.height="".concat(a,"px")}}clearTimer(e){var t=this.entries.get(e);if(t===null||t===void 0?void 0:t.timerId){clearTimeout(t.timerId);t.timerId=null}}pauseEntry(e){if(e.paused||e.exiting){return}this.clearTimer(e.id);e.remainingMs=Math.max(0,e.endsAt-Date.now());e.paused=true}resumeEntry(e){if(!e.paused||e.exiting){return}e.paused=false;if(e.remainingMs>0){e.endsAt=Date.now()+e.remainingMs;e.timerId=setTimeout(()=>this.dismiss(e.id),e.remainingMs)}else{this.dismiss(e.id)}}pauseAll(){this.entries.forEach(e=>this.pauseEntry(e))}resumeAll(){this.entries.forEach(e=>this.resumeEntry(e))}collapseAndRemove(e,t){this.entries.delete(t);var r=e.offsetHeight;e.style.pointerEvents="none";e.style.overflow="hidden";e.style.height="".concat(r,"px");void e.offsetHeight;e.style.transition="height 200ms ease";e.style.height="0px";setTimeout(()=>{e.remove();if(this.hovered){this.setExpanded(true)}else{this.restack()}},210)}evict(e){var t=this.entries.get(e);if(!t){return}this.clearTimer(e);this.entries.delete(e);t.element.remove()}enforceLimits(){var e=Array.from(this.entries.keys());if(e.length<=this.config.maxVisible){return}e.slice(0,e.length-this.config.maxVisible).forEach(e=>this.evict(e));this.restack()}attachSwipe(e,t){var r=e.querySelector(oj.card);if(!r){return}var i=0;var n=0;var o=false;e.addEventListener("mouseenter",()=>{var e=this.entries.get(t);if(e){this.pauseEntry(e)}});e.addEventListener("mouseleave",()=>{if(this.expanded){return}var e=this.entries.get(t);if(e){this.resumeEntry(e)}});var a=n=>{i="touches"in n?n.touches[0].clientX:n.clientX;o=true;r.style.transition="none";var a=this.entries.get(t);if(a){a.swiping=true;e.setAttribute(oz.dataSwiping,oV.true)}};var s=e=>{if(!o){return}n=("touches"in e?e.touches[0].clientX:e.clientX)-i;r.style.transform="translateX(".concat(n,"px)");r.style.opacity=String(Math.max(0,1-Math.abs(n)/180))};var l=()=>{if(!o){return}o=false;r.style.transition="";r.style.transform="";r.style.opacity="";var i=this.entries.get(t);if(i){i.swiping=false;e.removeAttribute(oz.dataSwiping)}if(Math.abs(n)>=60){var a=n>0?"right":"left";this.clearTimer(t);if(i){i.exiting=true}e.setAttribute(oz.dataSwipeOut,a);setTimeout(()=>this.collapseAndRemove(e,t),230)}n=0};e.addEventListener("touchstart",a,{passive:true});e.addEventListener("touchmove",s,{passive:true});e.addEventListener("touchend",l);e.addEventListener("mousedown",a);window.addEventListener("mousemove",s);window.addEventListener("mouseup",l)}dismissOne(e){var t=this.entries.get(e);if(!t||t.exiting){return}t.exiting=true;this.clearTimer(e);t.element.removeAttribute(oz.dataEntering);t.element.setAttribute(oz.dataExiting,oV.true);t.element.setAttribute(oz.dataPositionY,this.yPosition());setTimeout(()=>this.collapseAndRemove(t.element,e),280)}dismiss(e){if(e){this.dismissOne(e);return}Array.from(this.entries.keys()).forEach(e=>this.dismissOne(e))}show(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var r;var i;var n=(i=t.position)!==null&&i!==void 0?i:this.config.position;var o;var a=(o=t.theme)!==null&&o!==void 0?o:this.config.theme;if(a!==this.config.theme){this.config=(0,og._)((0,or._)({},this.config),{theme:a})}this.boot(n);var s=String(++this.idCounter);var l;var u=(l=t.type)!==null&&l!==void 0?l:"info";var c;var d=(c=t.duration)!==null&&c!==void 0?c:this.config.duration;var f;var h=(f=t.title)!==null&&f!==void 0?f:u==="default"?e:oY[u];var _;var p=(_=t.description)!==null&&_!==void 0?_:t.title?e:u==="default"?undefined:e;var v,m,g,y;var E={type:u,title:h,description:p,icon:(v=t.icon)!==null&&v!==void 0?v:null,duration:d,closeButton:(m=t.closeButton)!==null&&m!==void 0?m:this.config.closeButton,dir:(g=t.dir)!==null&&g!==void 0?g:this.config.dir!=="auto"?this.config.dir:"ltr",richColors:(y=t.richColors)!==null&&y!==void 0?y:this.config.richColors,position:n};var b=document.createElement("li");b.className=oH.item;b.setAttribute(oz.role,oV.listItem);b.setAttribute(oz.ariaLabelledBy,"".concat(oK).concat(s));b.setAttribute(oz.tabIndex,"0");b.setAttribute(oz.dataEntering,oV.true);b.setAttribute(oz.dataPositionY,this.yPosition(n));var T=this.buildCard(s,h,E);b.appendChild(T);this.attachSwipe(b,s);b.addEventListener("keydown",e=>{if(e.key==="Escape"){this.dismiss(s)}});if((r=this.stack)===null||r===void 0?void 0:r.firstChild){this.stack.insertBefore(b,this.stack.firstChild)}else{var w;(w=this.stack)===null||w===void 0?void 0:w.appendChild(b)}setTimeout(()=>{b.removeAttribute(oz.dataEntering);this.restack()},420);this.announce(h,p,u);var A=null;var O=0;if(d>0&&!this.hovered){O=Date.now()+d;A=setTimeout(()=>this.dismiss(s),d)}else if(d>0){O=Date.now()+d}this.entries.set(s,{id:s,element:b,card:T,timerId:A,type:u,endsAt:O,remainingMs:d,paused:this.hovered,exiting:false,swiping:false,height:0});this.restack();this.enforceLimits();return s}configure(e){var{offset:t}=e,r=(0,oF._)(e,["offset"]);if(t){this.config.offset=(0,og._)((0,or._)({},this.config.offset,t),{mobile:(0,or._)({},this.config.offset.mobile,t.mobile),lg:(0,or._)({},this.config.offset.lg,t.lg)})}this.config=(0,og._)((0,or._)({},this.config,r),{offset:this.config.offset});if(this.config.expandMode==="always"){this.expanded=true}else if(this.config.expandMode!=="hover"){this.expanded=false}if(this.container){this.syncContainerAttributes();this.applyOffset();this.restack()}}clear(){this.dismiss()}success(e,t){return this.show(e,(0,or._)({type:"success"},t!==undefined?{duration:t}:{}))}error(e,t){return this.show(e,(0,or._)({type:"error"},t!==undefined?{duration:t}:{}))}warning(e,t){return this.show(e,(0,or._)({type:"warning"},t!==undefined?{duration:t}:{}))}info(e,t){return this.show(e,(0,or._)({type:"info"},t!==undefined?{duration:t}:{}))}createContextBound(e){var t=(0,or._)({},e.dir!=null&&{dir:e.dir},e.theme!=null&&{theme:e.theme});var r=(e,r)=>this.show(e,(0,or._)({},t,r));return oJ(r,this,t)}constructor(){(0,nZ._)(this,"config",oZ());(0,nZ._)(this,"entries",new Map);(0,nZ._)(this,"idCounter",0);(0,nZ._)(this,"container",null);(0,nZ._)(this,"stack",null);(0,nZ._)(this,"expanded",false);(0,nZ._)(this,"hovered",false);this.initFullscreenListener()}}function oJ(e,t,r){var i=e=>(0,or._)({},r,e);var n=(t,r)=>e(t,r);n.success=(t,r)=>e(t,i((0,og._)((0,or._)({},r),{type:"success"})));n.error=(t,r)=>e(t,i((0,og._)((0,or._)({},r),{type:"error"})));n.warning=(t,r)=>e(t,i((0,og._)((0,or._)({},r),{type:"warning"})));n.info=(t,r)=>e(t,i((0,og._)((0,or._)({},r),{type:"info"})));n.dismiss=e=>t.dismiss(e);n.configure=e=>t.configure(e);return n}var o0=new oX;var o1=o0;var o2=/* unused pure expression or super */null&&oU;var o4=oJ((e,t)=>o0.show(e,t),o0);// CONCATENATED MODULE: ./assets/core/ts/services/toast/Toast.ts
class o3{show(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o1.show(e,t)}success(e,t){return o1.success(e,t)}error(e,t){return o1.error(e,t)}warning(e,t){return o1.warning(e,t)}info(e,t){return o1.info(e,t)}dismiss(e){o1.dismiss(e)}clear(){o1.clear()}configure(e){o1.configure(e)}}var o8={name:"toast",instance:new o3};// CONCATENATED MODULE: ./assets/core/ts/components/toast.ts
var o9=()=>{return{show(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o8.instance.show(e,t)},remove(e){o8.instance.dismiss(e)},clear(){o8.instance.clear()},dismiss(e){o8.instance.dismiss(e)},success(e,t){return o8.instance.success(e,t)},error(e,t){return o8.instance.error(e,t)},warning(e,t){return o8.instance.warning(e,t)},info(e,t){return o8.instance.info(e,t)}}};var o5={name:"toast",component:o9};// CONCATENATED MODULE: ./assets/core/ts/components/tooltip.ts
var o6={TOP:"top",BOTTOM:"bottom",START:"start",END:"end"};var o7={HOVER:"hover",FOCUS:"focus",CLICK:"click"};var ae={SMALL:"small",MEDIUM:"medium",LARGE:"large"};var at={START:"start",CENTER:"center",END:"end"};var ar=8;var ai={placement:o6.TOP,trigger:o7.HOVER,size:ae.SMALL,arrow:at.START,offset:ar,delay:{show:0,hide:0}};var an=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var t=(0,or._)({},ai,e);return{open:false,placement:t.placement,trigger:t.trigger,size:t.size,arrow:t.arrow,offset:t.offset,delay:t.delay,actualPlacement:"",$nextTick:undefined,$el:undefined,$refs:{},scrollHandler:null,resizeHandler:null,init(){this.actualPlacement=this.getActualPlacement();this.setupAccessibility();this.setupTriggers();this.setupEventListeners()},destroy(){this.removeEventListeners()},setupEventListeners(){this.scrollHandler=()=>{if(this.open){this.updatePosition()}};this.resizeHandler=()=>{if(this.open){this.updatePosition()}};window.addEventListener("scroll",this.scrollHandler,true);window.addEventListener("resize",this.resizeHandler)},removeEventListeners(){if(this.scrollHandler){window.removeEventListener("scroll",this.scrollHandler,true)}if(this.resizeHandler){window.removeEventListener("resize",this.resizeHandler)}},getActualPlacement(){return this.placement},setupTriggers(){// If trigger is not explicitly defined via x-ref, use $el as trigger
var e=this.$refs.trigger||this.$el;if(!e)return;if(this.trigger===o7.HOVER){e.addEventListener("mouseenter",()=>this.showWithDelay());e.addEventListener("mouseleave",()=>this.hideWithDelay())}else if(this.trigger===o7.FOCUS){e.addEventListener("focus",()=>this.show());e.addEventListener("blur",()=>this.hide())}else if(this.trigger===o7.CLICK){e.addEventListener("click",()=>this.toggle())}e.addEventListener("keydown",e=>{if(e.key==="Escape"&&this.open){this.hide()}})},showWithDelay(){var e=this.delay.show||0;if(e){setTimeout(()=>{if(!this.open)this.show()},e)}else{this.show()}},hideWithDelay(){var e=this.delay.hide||0;if(e){setTimeout(()=>{if(this.open)this.hide()},e)}else{this.hide()}},show(){var e=this.$refs.content;if(e){e.style.visibility="hidden"}this.open=true;var t=()=>{this.updatePosition();if(e){e.style.visibility="visible"}requestAnimationFrame(()=>this.updatePosition())};if(this.$nextTick){this.$nextTick(()=>{this.updatePosition();t()})}else{requestAnimationFrame(t)}},hide(){this.open=false;var e=this.$refs.content;if(e){e.style.visibility="hidden"}},toggle(){if(this.open){this.hide()}else{this.show()}},setupAccessibility(){var e=this.$refs.trigger||this.$el;var t=this.$refs.content;if(e&&t){var r="tooltip-".concat(Date.now());t.setAttribute("id",r);t.setAttribute("role","tooltip");e.setAttribute("aria-describedby",r)}},updatePosition(){var e=this.$refs.trigger||this.$el;var t=this.$refs.content;if(!e||!t)return;// Ensure fixed position before measurement to avoid container constraints
t.style.position="fixed";// Temporarily reset transforms/transitions for accurate measurement
var r=t.style.transform;var i=t.style.transition;t.style.transform="none";t.style.transition="none";// Force layout if display is none (though it should be open now)
var n=t.style.display;if(window.getComputedStyle(t).display==="none"){t.style.display="block"}var o=e.getBoundingClientRect();var a=t.offsetWidth;var s=t.offsetHeight;// Restore styles
t.style.display=n;t.style.transform=r;t.style.transition=i;// If measurement failed (0 size), retry on next frame
if(a===0&&s===0&&this.open){requestAnimationFrame(()=>this.updatePosition());return}var l={width:window.innerWidth,height:window.innerHeight};var u=0;var c=0;var d=this.placement;// Smart positioning with flipping
if(this.placement===o6.TOP){var f=o.top;var h=l.height-o.bottom;if(f<s+this.offset&&h>f){d=o6.BOTTOM}}else if(this.placement===o6.BOTTOM){var _=l.height-o.bottom;var p=o.top;if(_<s+this.offset&&p>_){d=o6.TOP}}else if(this.placement===o6.START){var v=of/* .isRTL */.V?l.width-o.right:o.left;var m=of/* .isRTL */.V?o.left:l.width-o.right;if(v<a+this.offset&&m>v){d=o6.END}}else if(this.placement===o6.END){var g=of/* .isRTL */.V?o.left:l.width-o.right;var y=of/* .isRTL */.V?l.width-o.right:o.left;if(g<a+this.offset&&y>g){d=o6.START}}this.actualPlacement=d;switch(d){case o6.TOP:u=o.top-s-this.offset;c=o.left+(o.width-a)/2;break;case o6.BOTTOM:u=o.bottom+this.offset;c=o.left+(o.width-a)/2;break;case o6.START:u=o.top+(o.height-s)/2;if(!of/* .isRTL */.V){c=o.left-a-this.offset}else{c=o.right+this.offset}break;case o6.END:u=o.top+(o.height-s)/2;if(!of/* .isRTL */.V){c=o.right+this.offset}else{c=o.left-a-this.offset}break}// Keep within viewport
u=Math.max(8,Math.min(u,l.height-s-8));c=Math.max(8,Math.min(c,l.width-a-8));t.style.position="fixed";t.style.top="".concat(u,"px");t.style.left="".concat(c,"px");t.style.zIndex="1070";this.updatePlacementClasses(t,d)},updatePlacementClasses(e,t){var r=["tutor-tooltip-top","tutor-tooltip-bottom","tutor-tooltip-start","tutor-tooltip-end"];var i=["tutor-tooltip-medium","tutor-tooltip-large"];var n=["tutor-tooltip-arrow-start","tutor-tooltip-arrow-center","tutor-tooltip-arrow-end"];e.classList.remove(...r,...i,...n);e.classList.add("tutor-tooltip-".concat(t));if(this.size===ae.MEDIUM){e.classList.add("tutor-tooltip-medium")}else if(this.size===ae.LARGE){e.classList.add("tutor-tooltip-large")}e.classList.add("tutor-tooltip-arrow-".concat(this.arrow))}}};var ao={name:"tooltip",component:an};// CONCATENATED MODULE: ./assets/core/ts/components/wp-editor.ts
var aa=e=>{var{name:t,editorId:r,placeholder:i=""}=e;return{name:t,editorId:r,placeholder:i,editorInstance:null,isVisualMode:true,initialized:false,init(){if(this.initialized){return}// Wait for TinyMCE to be ready
if(typeof window.tinymce!=="undefined"){this.setupTinyMCE()}else{// Fallback to textarea if TinyMCE is not available
this.setupTextarea()}// Setup QuickTags if available
if(typeof window.quicktags!=="undefined"){this.setupQuickTags()}// Listen for form reset events
this.setupFormResetListener();this.initialized=true},setupTinyMCE(){// TinyMCE might not be initialized immediately
var e=()=>{var t;// Use editorId instead of name to support multiple editors
var r=(t=window.tinymce)===null||t===void 0?void 0:t.get(this.editorId);if(r){this.editorInstance=r;this.isVisualMode=!r.isHidden();// Set placeholder if provided
if(this.placeholder){r.settings.placeholder=this.placeholder}// Sync editor content with form value on change
r.on("change keyup",()=>{this.syncEditorToForm()});// Sync on blur for validation
r.on("blur",()=>{this.syncEditorToForm();this.triggerBlur()});// Sync when switching between Visual/Text modes
r.on("hide",()=>{this.isVisualMode=false});r.on("show",()=>{this.isVisualMode=true;this.syncEditorToForm()});// Dispatch custom focus event
r.on("focus",()=>{this.$el.dispatchEvent(new CustomEvent(oi/* .TUTOR_CUSTOM_EVENTS.WP_EDITOR_FOCUS */.T.WP_EDITOR_FOCUS,{bubbles:true}))});// Handle Cmd/Ctrl + Enter for form submission
r.on("keydown",e=>{if((e.metaKey||e.ctrlKey)&&e.keyCode===13){e.preventDefault();this.syncEditorToForm();var t=this.$el.closest("form");if(t){t.requestSubmit()}}});// Sync theme to iframe
var i=()=>{var e=()=>{var e=r.getDoc&&r.getDoc();if(!e||!e.body)return;var t=document.documentElement.getAttribute("data-tutor-theme")||"light";e.documentElement.setAttribute("data-tutor-theme",t);var i=e.body;var n=window.getComputedStyle(document.body);var o=n.getPropertyValue("--tutor-text-primary").trim();i.style.backgroundColor="transparent";i.style.color=o};e();var t=new MutationObserver(t=>{t.forEach(t=>{if(t.attributeName==="data-tutor-theme"){e()}})});t.observe(document.documentElement,{attributes:true,attributeFilter:["data-tutor-theme"]})};if(r.initialized){i()}else{r.on("init",i)}}else{// Retry after a short delay
setTimeout(e,100)}};// Start checking for editor
e()},setupTextarea(){var e=document.getElementById(this.editorId);if(e){// Set placeholder
if(this.placeholder){e.placeholder=this.placeholder}// Sync textarea content with form value
e.addEventListener("input",()=>{this.syncTextareaToForm()});e.addEventListener("blur",()=>{this.syncTextareaToForm();this.triggerBlur()});// Dispatch custom focus event
e.addEventListener("focus",()=>{this.$el.dispatchEvent(new CustomEvent(oi/* .TUTOR_CUSTOM_EVENTS.WP_EDITOR_FOCUS */.T.WP_EDITOR_FOCUS,{bubbles:true}))})}},setupQuickTags(){// QuickTags buttons trigger changes in text mode
var e=document.getElementById(this.editorId);if(e){// Monitor for QuickTags button clicks
// QuickTags toolbars usually have ID "qt_{editorId}_toolbar"
var t="qt_".concat(this.editorId,"_toolbar");var r=document.getElementById(t);if(r){r.addEventListener("click",()=>{// Small delay to allow QuickTags to update the textarea
setTimeout(()=>{if(!this.isVisualMode){this.syncTextareaToForm()}},50)})}}},setupFormResetListener(){// Listen for form reset events from tutorForm
window.addEventListener(oi/* .TUTOR_CUSTOM_EVENTS.FORM_RESET */.T.FORM_RESET,e=>{var t;var r=e;var{formId:i,defaultValues:n}=r.detail||{};// Check if this reset event is for our form by checking if our element is inside the form
var o=this.$el.closest("form");if(o&&((t=o.getAttribute("x-data"))===null||t===void 0?void 0:t.includes("id: '".concat(i,"'")))){// Reset editor content to default value
var a=(n===null||n===void 0?void 0:n[this.name])||"";this.setContent(a)}})},syncEditorToForm(){if(this.editorInstance){var e=this.editorInstance.getContent();this.updateFormValue(e)}},syncTextareaToForm(){var e=document.getElementById(this.name);if(e){this.updateFormValue(e.value)}},updateFormValue(e){// Get the hidden input that's bound to the form
var t=this.$el.querySelector('input[name="'.concat(this.name,'"]'));if(t){// Update the hidden input value
t.value=e;// Trigger input event to update form state
t.dispatchEvent(new Event("input",{bubbles:true}))}},triggerBlur(){var e=this.$el.querySelector('input[name="'.concat(this.name,'"]'));if(e){e.dispatchEvent(new Event("blur",{bubbles:true}))}},getContent(){if(this.isVisualMode&&this.editorInstance){return this.editorInstance.getContent()}var e=document.getElementById(this.name);return e?e.value:""},setContent(e){if(this.isVisualMode&&this.editorInstance){this.editorInstance.setContent(e)}var t=document.getElementById(this.name);if(t){t.value=e}this.updateFormValue(e)}}};var as={name:"WPEditor",component:aa};// CONCATENATED MODULE: ./assets/core/ts/config/config.ts
/* eslint-disable @typescript-eslint/no-explicit-any */var al,au;var ac={ID:0,ajaxurl:"",site_url:"",home_url:"",site_title:"",base_path:"",tutor_url:"",tutor_pro_url:"",dashboard_url:"",nonce_key:"",_tutor_nonce:"",loading_icon_url:"",placeholder_img_src:"",enable_lesson_classic_editor:"",tutor_frontend_dashboard_url:"",backend_course_list_url:"",backend_bundle_list_url:"",frontend_course_list_url:"",frontend_bundle_list_url:"",wp_date_format:"",wp_rest_nonce:"",is_admin:"",is_admin_bar_showing:"",is_tour_completed:"",max_upload_size:"",content_change_event:"",is_tutor_course_edit:"",assignment_max_file_allowed:"",current_page:"",quiz_answer_display_time:"",is_ssl:"",course_list_page_url:"",course_post_type:"",local:"",tutor_pn_vapid_key:"",tutor_pn_client_id:"",tutor_pn_subscription_saved:"",difficulty_levels:[],supported_video_sources:[],edd_products:[],bp_groups:[],timezones:{},addons_data:[],kids_icons_registry:[],is_kids_mode:false,user_preferences:{auto_play_next:false,contrast:"",font_scale:1,learning_mood:"modern",motion_effects:"auto",theme:"light",vision:"normal"},is_legacy_learning_mode:false,current_user:{data:{id:"",user_login:"",user_pass:"",user_nicename:"",user_email:"",user_url:"",user_registered:"",user_activation_key:"",user_status:"",display_name:""},caps:{},cap_key:"",roles:[],allcaps:{},filter:null},settings:{learning_mode:"",monetize_by:"tutor",enable_course_marketplace:"off",course_permalink_base:"",supported_video_sources:"",enrollment_expiry_enabled:"off",enable_q_and_a_on_course:"off",instructor_can_delete_course:"off",instructor_can_change_course_author:"off",instructor_can_manage_co_instructors:"off",chatgpt_enable:"off",course_builder_logo_url:"",chatgpt_key_exist:false,hide_admin_bar_for_users:"off",enable_redirect_on_course_publish_from_frontend:"off",instructor_can_publish_course:"off",youtube_api_key_exist:false,membership_only_mode:false,enable_tax:false,enable_individual_tax_control:false,is_tax_included_in_price:false},tutor_currency:{symbol:"",currency:"",position:"",thousand_separator:"",decimal_separator:"",no_of_decimal:""},visibility_control:{course_builder:{}}};var ad=window._tutorobject||ac;window.ajaxurl=ad.ajaxurl;var af={TUTOR_SITE_URL:ad.site_url,WP_AJAX_BASE_URL:ad.ajaxurl,WP_API_BASE_URL:"".concat(((al=window.wpApiSettings)===null||al===void 0?void 0:al.root)||"").concat(((au=window.wpApiSettings)===null||au===void 0?void 0:au.versionString)||""),VIDEO_SOURCES_SETTINGS_URL:"".concat(ad.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=course#field_supported_video_sources"),MONETIZATION_SETTINGS_URL:"".concat(ad.site_url,"/wp-admin/admin.php?page=tutor_settings&tab_page=monetization"),TUTOR_PRICING_PAGE:"https://tutorlms.com/pricing/",TUTOR_ADDONS_PAGE:"".concat(ad.site_url,"/wp-admin/admin.php?page=tutor-addons"),CHATGPT_PLATFORM_URL:"https://platform.openai.com/account/api-keys",TUTOR_MY_COURSES_PAGE_URL:"".concat(ad.tutor_frontend_dashboard_url,"/my-courses"),TUTOR_SUPPORT_PAGE_URL:"https://tutorlms.com/support",TUTOR_SUBSCRIPTIONS_PAGE:"".concat(ad.site_url,"/wp-admin/admin.php?page=tutor-subscriptions"),TUTOR_ENROLLMENTS_PAGE:"".concat(ad.site_url,"/wp-admin/admin.php?page=enrollments"),TUTOR_COUPONS_PAGE:"".concat(ad.site_url,"/wp-admin/admin.php?page=tutor_coupons"),TUTOR_IMPORT_EXPORT_PAGE:"".concat(ad.site_url,"/wp-admin/admin.php?page=tutor-tools&sub_page=import_export")};/* export default */const ah=/* unused pure expression or super */null&⁡// CONCATENATED MODULE: ./assets/core/ts/utils/nonce.ts
/**
* WordPress nonce utilities for AJAX requests
*
* @since 4.0.0
*//**
* Get WordPress nonce data for AJAX requests
*
* @param sendKeyValue - If true, returns {key, value}, otherwise returns {[key]: value}
* @returns Nonce data object
*
* @since 4.0.0
*/function a_(e){var t=window._tutorobject||{};var r=t.nonce_key||"";var i=t[r]||"";if(e){return{key:r,value:i}}return{[r]:i}};// CONCATENATED MODULE: ./assets/core/ts/legacy/nonce.ts
/**
* Legacy nonce function wrapper for backward compatibility
*
* @since 4.0.0
*//**
* Legacy tutor_get_nonce_data wrapper
*
* @deprecated Use getNonceData from @Core/ts/utils/nonce instead
*
* @param sendKeyValue - If true, returns {key, value}, otherwise returns {[key]: value}
* @returns Nonce data object
*
* @since 4.0.0
*/function ap(e){return a_(e)};// CONCATENATED MODULE: ./assets/core/ts/utils/security.ts
/**
* Security utilities for escaping HTML and attributes
*
* @since 4.0.0
*//**
* Escape HTML and return safe HTML
*
* @param unsafeText - HTML string to escape
* @returns Escaped HTML string
*
* @since 4.0.0
*/function av(e){var t=document.createElement("div");/**
* When set an HTML string to an element's innerText
* the browser automatically escapes any HTML tags and
* treats the content as plain text.
*/t.innerText=e;var r=t.innerHTML;t.remove();return r}/**
* Escape attribute value for safe usage in HTML attributes
*
* @param str - String to escape
* @returns Escaped attribute string
*
* @since 4.0.0
*/function am(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")};// CONCATENATED MODULE: ./assets/core/ts/legacy/security.ts
/**
* Legacy security function wrappers for backward compatibility
*
* @since 4.0.0
*//**
* Legacy tutor_esc_html wrapper
*
* @deprecated Use escapeHtml from @Core/ts/utils/security instead
*
* @param unsafeText - HTML string to escape
* @returns Escaped HTML string
*
* @since 4.0.0
*/function ag(e){return av(e)}/**
* Legacy tutor_esc_attr wrapper
*
* @deprecated Use escapeAttr from @Core/ts/utils/security instead
*
* @param str - String to escape
* @returns Escaped attribute string
*
* @since 4.0.0
*/function ay(e){return am(e)};// CONCATENATED MODULE: ./assets/core/ts/legacy/toast.ts
/**
* Legacy tutor_toast wrapper for backward compatibility
*
* @since 4.0.0
*//**
* Legacy tutor_toast function that wraps the new core toast service
*
* This function maintains backward compatibility with the old API signature:
* tutor_toast(title, description, type, autoClose)
*
* @deprecated Use window.TutorCore.toast methods instead
*
* @param title - Toast title (used as message if description is empty)
* @param description - Toast description (becomes the main message)
* @param type - Toast type: 'success' | 'error' | 'warning' | 'info'
* @param autoClose - Whether to auto-dismiss (default: true)
*
* @example
* // Legacy usage (still works)
* tutor_toast('Success', 'Item saved successfully', 'success');
*
* // Translates to new API
* TutorCore.toast.show('Item saved successfully', { type: 'success', title: 'Success' });
*
* @since 4.0.0
*/function aE(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"info",i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:true;var n;// Determine message and title for new API
// If description exists, use it as message and title as custom title
// If no description, use title as message with default title
var o=t||e;var a=t?e:undefined;var s=i?5e3:0;// Use the new toast service
if((n=window.TutorCore)===null||n===void 0?void 0:n.toast){window.TutorCore.toast.show(o,(0,og._)((0,or._)({type:r},a&&{title:a}),{duration:s}))}else{// Fallback to console if core is not loaded
// eslint-disable-next-line no-console
console.warn("[Tutor Toast] Core toast service not available:",o)}};// CONCATENATED MODULE: ./assets/core/ts/legacy/index.ts
/**
* Legacy compatibility layer for old Tutor LMS window functions
*
* This module provides backward compatibility wrappers that translate
* old API calls to the new core system, ensuring zero breaking changes.
*
* @since 4.0.0
*//**
* Register legacy functions to the window object for backward compatibility
*
* This function should be called after the core system is initialized
* to ensure all services are available.
*
* @since 4.0.0
*/function ab(){// Nonce handling
window.tutor_get_nonce_data=ap;// Toast notifications
window.tutor_toast=aE;// Security utilities
window.tutor_esc_html=ag;window.tutor_esc_attr=ay;// Set default error message from WordPress i18n
if(typeof wp!=="undefined"&&wp.i18n){window.defaultErrorMessage=wp.i18n.__("Something went wrong","tutor")}}// Export all legacy functions for direct import if needed
;// CONCATENATED MODULE: ./assets/core/ts/services/Form.ts
/**
* FormService: programmatic API for interacting with form instances.
* Provides methods to access form state and control form behavior from outside Alpine components.
*/class aT{/** Setup event listeners for form events */setupEventListeners(){document.addEventListener(oi/* .TUTOR_CUSTOM_EVENTS.FORM_REGISTER */.T.FORM_REGISTER,e=>{var{id:t,instance:r}=e.detail;this.register(t,r)});document.addEventListener(oi/* .TUTOR_CUSTOM_EVENTS.FORM_UNREGISTER */.T.FORM_UNREGISTER,e=>{var{id:t}=e.detail;this.unregister(t)})}/**
* Register a form instance with the service
* @internal Called by form component during initialization
*/register(e,t){this.forms.set(e,t)}/**
* Unregister a form instance from the service
* @internal Called by form component during cleanup
*/unregister(e){this.forms.delete(e)}/**
* Get a form instance by ID
* @throws Error if form not found
*/getForm(e){var t=this.forms.get(e);if(!t){throw new Error('Form with id "'.concat(e,'" not found. Make sure the form is initialized with the correct id.'))}return t}/**
* Get all values from a form
* @param id - The form ID
* @returns Object containing all form values
*/getValues(e){return this.getForm(e).watch()}/**
* Get a specific field value from a form
* @param id - The form ID
* @param name - The field name
* @returns The field value
*/getValue(e,t){return this.getForm(e).getValue(t)}/**
* Set a field value in a form
* @param id - The form ID
* @param name - The field name
* @param value - The value to set
* @param options - Optional settings for validation, touch, and dirty state
*/setValue(e,t,r,i){this.getForm(e).setValue(t,r,i)}/**
* Set multiple field values in a form
* @param id - The form ID
* @param values - Object containing field names and values
* @param options - Optional settings for validation, touch, and dirty state
*/setValues(e,t,r){var i=this.getForm(e);for(var[n,o]of Object.entries(t)){i.setValue(n,o,r)}}/**
* Reset a form to its default values or provided values
* @param id - The form ID
* @param values - Optional values to reset to (defaults to initial values)
*/reset(e,t){this.getForm(e).reset(t)}/**
* Trigger validation for specific field(s) or all fields
* @param id - The form ID
* @param name - Optional field name or array of field names. Omit to validate all fields.
* @returns Promise resolving to true if valid, false otherwise
*/trigger(t,r){return(0,e._)(function*(){return this.getForm(t).trigger(r)}).call(this)}/**
* Clear errors for specific field(s) or all fields
* @param id - The form ID
* @param name - Optional field name or array of field names. Omit to clear all errors.
*/clearErrors(e,t){this.getForm(e).clearErrors(t)}/**
* Set an error for a specific field
* @param id - The form ID
* @param name - The field name
* @param error: { type: string; message: string }
*/setError(e,t,r){this.getForm(e).setError(t,r)}/**
* Set focus on a specific field
* @param id - The form ID
* @param name - The field name
* @param options - Optional settings for selection behavior
*/setFocus(e,t,r){this.getForm(e).setFocus(t,r)}/**
* Get the complete form state snapshot
* @param id - The form ID
* @returns Object containing all form state
*/getFormState(e){return this.getForm(e).getFormState()}/**
* Watch a specific field value
* @param id - The form ID
* @param name - The field name
* @returns The current field value
*/watch(e,t){return this.getForm(e).watch(t)}/**
* Check if a form exists
* @param id - The form ID
* @returns True if form exists, false otherwise
*/hasForm(e){return this.forms.has(e)}constructor(){(0,nZ._)(this,"forms",new Map);this.setupEventListeners()}}var aw={name:"form",instance:new aT};// CONCATENATED MODULE: ./assets/core/ts/services/Modal.ts
/**
* ModalService: programmatic API for opening/closing/updating modals.
* Emits DOM CustomEvents consumed by Alpine modal instances.
*/class aA{showModal(e,t){document.dispatchEvent(new CustomEvent(oi/* .TUTOR_CUSTOM_EVENTS.MODAL_OPEN */.T.MODAL_OPEN,{detail:{id:e,data:t}}))}updateModal(e,t){document.dispatchEvent(new CustomEvent(oi/* .TUTOR_CUSTOM_EVENTS.MODAL_UPDATE */.T.MODAL_UPDATE,{detail:{id:e,data:t}}))}/** Close a modal by optional `id`. If omitted, the active modal closes. */closeModal(e){document.dispatchEvent(new CustomEvent(oi/* .TUTOR_CUSTOM_EVENTS.MODAL_CLOSE */.T.MODAL_CLOSE,{detail:{id:e}}))}}var aO={name:"modal",instance:new aA};// CONCATENATED MODULE: ./assets/core/ts/services/Preference.ts
class ax{getWrapper(){return document.querySelector("[".concat(this.DATA_THEME_ATTR,"]"))||document.documentElement}inferBase(e){return(e===null||e===void 0?void 0:e.startsWith("dark"))?"dark":"light"}initialize(){var e=this.getWrapper();var t=e.getAttribute(this.DATA_THEME_ATTR);// If the saved preference is "system", re-apply to attach listener and compute correct attr.
if(t===this.THEME.SYSTEM)this.applyTheme(this.THEME.SYSTEM,false);var r;var i=(r=e.getAttribute(this.DATA_CONTRAST_ATTR))!==null&&r!==void 0?r:"";if(i){this.applyContrast(i)}var n;var o=(n=e.getAttribute(this.DATA_MOTION_ATTR))!==null&&n!==void 0?n:"";this.applyMotionEffects(o)}applyTheme(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:true;if(!e)return;var r=this.getWrapper();// Resolve what the new effective theme would be.
var i=e===this.THEME.SYSTEM?this.mediaQuery.matches?this.THEME.DARK:this.THEME.LIGHT:e;// Skip transition if the effective theme hasn't changed.
var n=r.getAttribute(this.DATA_THEME_ATTR);var o=this.inferBase(n);if(i===o&&e!==this.THEME.SYSTEM){return}if(this.systemThemeListener){this.mediaQuery.removeEventListener("change",this.systemThemeListener);this.systemThemeListener=undefined}var a=()=>{if(e===this.THEME.SYSTEM){var t=this.mediaQuery.matches?this.THEME.DARK:this.THEME.LIGHT;r.setAttribute(this.DATA_THEME_ATTR,t)}else{r.setAttribute(this.DATA_THEME_ATTR,e)}};var s=()=>{a();if(e===this.THEME.SYSTEM){this.systemThemeListener=()=>a();this.mediaQuery.addEventListener("change",this.systemThemeListener)}var t=r.getAttribute(this.DATA_THEME_ATTR);this.activeTheme=this.inferBase(t)};if(t&&document.startViewTransition){document.startViewTransition(()=>{s()})}else{s()}}applyContrast(e){var t=this.getWrapper();if(e==="high"){t.setAttribute(this.DATA_CONTRAST_ATTR,"high")}else{t.removeAttribute(this.DATA_CONTRAST_ATTR)}}applyVision(e){var t=this.getWrapper();var r=e==="protanopia"||e==="deuteranopia"||e==="deuteranomaly"?e:"normal";if(r==="normal"){t.removeAttribute(this.DATA_VISION_ATTR)}else{t.setAttribute(this.DATA_VISION_ATTR,r)}}applyMotionEffects(e){var t=this.getWrapper();if(e==="reduce"){t.setAttribute(this.DATA_MOTION_ATTR,"reduce")}else if(e==="auto"){t.setAttribute(this.DATA_MOTION_ATTR,"auto")}else{t.removeAttribute(this.DATA_MOTION_ATTR)}}applyFontScale(e){if(!e)return;var t=document.head;var r=document.getElementById(this.STYLE_ID);var i=typeof e==="string"?parseInt(e,10):Number(e);if(Number.isNaN(i)||i<=0)return;var n=this.BASE_FONT_SIZE*i/this.SCALE_PERCENTAGE_BASE;if(!r){r=document.createElement("style");r.id=this.STYLE_ID;t.appendChild(r)}r.textContent=":root { font-size: ".concat(n,"px; }")}constructor(){(0,nZ._)(this,"THEME",{DARK:"dark",LIGHT:"light",SYSTEM:"system"});(0,nZ._)(this,"activeTheme",void 0);(0,nZ._)(this,"mediaQuery",void 0);(0,nZ._)(this,"systemThemeListener",void 0);(0,nZ._)(this,"BASE_FONT_SIZE",16);(0,nZ._)(this,"SCALE_PERCENTAGE_BASE",100);(0,nZ._)(this,"STYLE_ID","tutor-font-scale");(0,nZ._)(this,"DATA_THEME_ATTR","data-tutor-theme");(0,nZ._)(this,"DATA_VISION_ATTR","data-tutor-vision");(0,nZ._)(this,"DATA_CONTRAST_ATTR","data-tutor-contrast");(0,nZ._)(this,"DATA_MOTION_ATTR","data-tutor-motion");this.mediaQuery=window.matchMedia("(prefers-color-scheme: dark)");this.activeTheme=this.mediaQuery.matches?this.THEME.DARK:this.THEME.LIGHT;this.initialize()}}var aS={name:"preference",instance:new ax};// CONCATENATED MODULE: ./assets/core/ts/services/Query.ts
/**
* QueryCache: Manages cached query data with timestamps
*/class aC{/**
* Generate a cache key from QueryKey
*/generateKey(e){if(typeof e==="string")return e;return JSON.stringify(e)}get(e){return this.cache.get(this.generateKey(e))}set(e,t){this.cache.set(this.generateKey(e),{data:t,timestamp:Date.now()})}invalidate(e){this.cache.delete(this.generateKey(e))}invalidatePattern(e){var t=Array.from(this.cache.keys());t.forEach(t=>{if(t.includes(e)){this.cache.delete(t)}})}clear(){this.cache.clear()}getInfo(e){var t=this.cache.get(this.generateKey(e));if(!t)return"No cache";var r=Math.round((Date.now()-t.timestamp)/1e3);return"Cached ".concat(r,"s ago")}constructor(){(0,nZ._)(this,"cache",new Map)}}/**
* QueryService: Provides TanStack Query-like functionality using Alpine.reactive
* Supports data fetching with caching, mutations, and cache invalidation
*/class aN{generateKey(e){if(typeof e==="string")return e;return JSON.stringify(e)}registerQueryInstance(e,t){var r;var i=this.generateKey(e);if(!this.queryInstances.has(i)){this.queryInstances.set(i,new Set)}(r=this.queryInstances.get(i))===null||r===void 0?void 0:r.add(t)}refetchQueryInstances(t){return(0,e._)(function*(){var e=this.generateKey(t);var r=this.queryInstances.get(e);if(!(r===null||r===void 0?void 0:r.size)){return}yield Promise.all(Array.from(r).map(e=>{if(!e||e.isFetching){return Promise.resolve()}return e.refetch()}))}).call(this)}refetchQueryInstancesByPattern(t){return(0,e._)(function*(){var e=Array.from(this.queryInstances.entries()).filter(e=>{var[r]=e;return r.includes(t)});if(!e.length){return}yield Promise.all(e.flatMap(e=>{var[,t]=e;return Array.from(t).map(e=>{if(!e||e.isFetching){return Promise.resolve()}return e.refetch()})}))}).call(this)}/**
* Create a query with automatic caching and refetching capabilities
* @param queryKey - Unique identifier for the query (string or array)
* @param queryFn - Function that returns a promise with the data
* @param options - Optional configuration for cache and stale time
* @returns Reactive query state object
*/useQuery(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=i.staleTime||0;var o=i.enabled!==undefined?i.enabled:true;var a=this.queryCache;// Create reactive state object
var s=nQ.reactive({data:null,error:null,isLoading:o,isFetching:false,isStale:false,fetchData(){return(0,e._)(function*(){this.isFetching=true;try{var e=yield r();this.data=e;this.error=null;this.isStale=false;a.set(t,e)}catch(e){this.error={message:e.message||"Failed to fetch data",code:e.code}}finally{this.isLoading=false;this.isFetching=false}}).call(this)},refetch(){return(0,e._)(function*(){this.isLoading=false;this.isFetching=true;yield this.fetchData()}).call(this)},init(){return(0,e._)(function*(){if(!o){this.isLoading=false;return}var e=a.get(t);if(e&&Date.now()-e.timestamp<n){this.data=e.data;this.isLoading=false;this.isStale=false;return}if(e){this.isStale=true}yield this.fetchData()}).call(this)}});// Auto-initialize
s.init();this.registerQueryInstance(t,s);return s}/**
* Create a mutation for data modification operations
* @param mutationFn - Function that performs the mutation
* @param options - Optional callbacks for success and error handling
* @returns Reactive mutation state object
*/useMutation(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};var i=nQ.reactive({data:null,error:null,isPending:false,isError:false,isSuccess:false,mutate(i){return(0,e._)(function*(){this.isPending=true;this.isError=false;this.isSuccess=false;this.error=null;try{// onMutate callback - for optimistic updates
if(r.onMutate){yield r.onMutate(i)}var e=yield t(i);this.data=e;this.isSuccess=true;if(r.onSuccess){yield r.onSuccess(e,i)}// onSettled callback - always called
if(r.onSettled){r.onSettled(e,null,i)}return e}catch(e){this.error=e;this.isError=true;if(r.onError){r.onError(e,i)}// onSettled callback - always called
if(r.onSettled){r.onSettled(null,e,i)}throw e}finally{this.isPending=false}}).call(this)},mutateAsync(t){return(0,e._)(function*(){return yield this.mutate(t)}).call(this)},reset(){this.data=null;this.error=null;this.isPending=false;this.isError=false;this.isSuccess=false}});return i}/**
* Invalidate a query cache entry
* @param queryKey - The query key to invalidate
*/invalidateQuery(e){this.queryCache.invalidate(e);void this.refetchQueryInstances(e)}/**
* Invalidate all queries matching a pattern
* @param pattern - Pattern to match against query keys
*/invalidateQueries(e){this.queryCache.invalidatePattern(e);void this.refetchQueryInstancesByPattern(e)}/**
* Get cache information for a query
* @param queryKey - The query key to get info for
* @returns String describing cache status
*/getCacheInfo(e){return this.queryCache.getInfo(e)}/**
* Clear all cached queries
*/clearCache(){this.queryCache.clear()}constructor(){(0,nZ._)(this,"queryCache",new aC);(0,nZ._)(this,"queryInstances",new Map)}}var aL={name:"query",instance:new aN};// CONCATENATED MODULE: ./assets/core/ts/services/WPMedia.ts
/**
* WPMediaService: Provides a clean API for WordPress media library interactions.
* This service wraps the native wp.media to provide type-safe, consistent behavior.
*/class aP{/**
* Check if WordPress media library is available.
*/isAvailable(){var e;return typeof((e=window.wp)===null||e===void 0?void 0:e.media)==="function"}/**
* Opens the WordPress media library modal.
* @param options - Configuration for the media modal
* @param onSelect - Callback invoked when files are selected
* @param existingIds - Optional array of attachment IDs to pre-select
* @returns Cleanup function to destroy the modal frame, or null if wp.media unavailable
*/open(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];var i;if(!this.isAvailable()){// eslint-disable-next-line no-console
console.error((0,n4.__)("WordPress media library is not available","tutor"));return null}var n,o,a;var s={title:(n=e.title)!==null&&n!==void 0?n:(0,n4.__)("Select File","tutor"),button:{text:(o=(i=e.button)===null||i===void 0?void 0:i.text)!==null&&o!==void 0?o:(0,n4.__)("Use this file","tutor")},multiple:e.multiple?"add":false,library:(a=e.library)!==null&&a!==void 0?a:{}};var l=window.wp.media(s);var u=()=>{var e;var t=l.state().get("selection");(e=l.$el)===null||e===void 0?void 0:e.attr("data-focus-trap","true");t.reset();// Pre-select existing attachments
r.forEach(e=>{var r=window.wp.media.attachment(e);if(r){r.fetch();t.add(r)}})};var c=()=>{var r=l.state().get("selection").toJSON();var i=r.reduce((t,r)=>{// File size validation
if(e.maxFileSize&&r.filesizeInBytes>e.maxFileSize){var i;(i=this.toastService)===null||i===void 0?void 0:i.error((0,n4.sprintf)((0,n4.__)("%s exceeds the maximum allowed file size","tutor"),r.title));return t}var n={id:r.id,title:r.title,url:r.url,name:r.filename,size:r.filesizeHumanReadable,size_bytes:r.filesizeInBytes,ext:r.filename.split(".").pop()||"",mime:r.mime};t.push(n);return t},[]);// Max files validation
if(e.maxFiles&&i.length>e.maxFiles){var n;(n=this.toastService)===null||n===void 0?void 0:n.warning((0,n4.sprintf)((0,n4.__)("Cannot select more than %d files","tutor"),e.maxFiles));return}t(i);l.close()};var d=()=>{if(l.$el){l.$el.parent().parent().remove()}};l.on("open",u);l.on("select",c);l.on("close",d);l.open();// Return cleanup function
return()=>{l.off("open",u);l.off("select",c);l.off("close",d)}}constructor(){var e;(0,nZ._)(this,"toastService",(e=window.TutorCore)===null||e===void 0?void 0:e.toast)}}var ak={name:"wpMedia",instance:new aP};// CONCATENATED MODULE: ./assets/src/js/v3/shared/utils/types.ts
var aR=(e,t)=>{return t in e};var aI=e=>{return e.isAxiosError};var aM=e=>{return e!==undefined&&e!==null};function aD(e){return typeof e==="string"||e instanceof String}function aB(e){return!!e&&Array.isArray(e)&&(!e.length||typeof e[0]!=="object")}function aF(e){return aB(e)&&(!e.length||typeof e[0]==="string"||e[0]instanceof String)}function aU(e){return typeof e==="number"||e instanceof Number}function aG(e){return typeof e==="boolean"||e instanceof Boolean}function a$(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var aH=e=>{return e instanceof Blob||e instanceof File};var aj=/* unused pure expression or super */null&&{NEW:"new",UPDATE:"update",NO_CHANGE:"no_change"};// CONCATENATED MODULE: ./assets/src/js/v3/shared/utils/form.ts
var az=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return Object.keys(e).reduce((r,i)=>{var n=e[i];if(typeof n==="object"&&!isPrimitivesArray(n)&&!isFileOrBlob(n)){return _object_spread({},r,az(_object_spread({},n),"".concat(t).concat(i,".")))}return _object_spread_props(_object_spread({},r),{["".concat(t).concat(i)]:n})},{})};var aV=(e,t)=>{var r=e;if(r.status===404||r.status===403||r.status===500){return{nonFieldErrors:["Unexpected error!"]}}var i=az(t);var n=az(r.data);var{non_field_errors:o}=n,a=_object_without_properties(n,["non_field_errors"]);var s=isStringArray(o)?o:[];for(var l of Object.keys(a)){if(!(l in i)){var u=n[l];if(isStringArray(u)){s.push(...u)}}}return{nonFieldErrors:s.map(translateBeErrorMessage),fieldErrors:Object.keys(n).filter(e=>e in i).reduce((e,t)=>{var r=n[t];if(isStringArray(r)){return _object_spread_props(_object_spread({},e),{[t]:r.map(translateBeErrorMessage)})}return e},{})}};var aq=(e,t,r)=>{if(!isAxiosError(e)||!e.response){throw e}var{fieldErrors:i,nonFieldErrors:n}=aV(e.response,r);if(n===null||n===void 0?void 0:n.length){t.setSubmitError(n[0])}if(i){for(var o of Object.keys(i)){var a=i[o];if(a.length>0){t.setError(o,{message:a[0]})}}}};var aW=(e,t)=>{return r=>_async_to_generator(function*(){e.setSubmitError(undefined);try{yield t(r)}catch(t){aq(t,e,r)}})()};var aK=(e,t)=>{var r=function(t){var r=e[t];if(Array.isArray(r)){r.forEach((e,r)=>{if(aH(e)||aD(e)){i.append("".concat(t,"[").concat(r,"]"),e)}else if(aG(e)||aU(e)){i.append("".concat(t,"[").concat(r,"]"),e.toString())}else if(typeof e==="object"&&e!==null){i.append("".concat(t,"[").concat(r,"]"),JSON.stringify(e))}else{i.append("".concat(t,"[").concat(r,"]"),e)}})}else{if(aH(r)||aD(r)){i.append(t,r)}else if(aG(r)){i.append(t,r.toString())}else if(aU(r)){i.append(t,"".concat(r))}else if(typeof r==="object"&&r!==null){i.append(t,JSON.stringify(r))}else{i.append(t,r)}}};var i=new FormData;for(var n of Object.keys(e))r(n);i.append("_method",t.toUpperCase());return i};var aY=e=>{var t={};for(var r in e){var i=e[r];if(!isDefined(i)){t[r]="null"}else if(isBoolean(i)){t[r]=i===true?"true":"false"}else{t[r]=i}}return t};// CONCATENATED MODULE: ./assets/core/ts/utils/api.ts
function aQ(t,r,i){return(0,e._)(function*(){var e=yield fetch(t,{method:r,body:i,credentials:"same-origin"});var n=yield e.text();var o;try{o=JSON.parse(n)}catch(t){if(!e.ok){throw new Error("HTTP ".concat(e.status))}return n}var a=o;// JsonResponse trait shape: { status_code, message, data }
// Non-2xx HTTP status means error.
if(!e.ok){var s=typeof(a===null||a===void 0?void 0:a.message)==="string"?a.message:"HTTP ".concat(e.status);throw new Error(s)}// wp_send_json_error shape: { success: false, data }
// Always returns HTTP 200, so we have to inspect the payload.
if((a===null||a===void 0?void 0:a.success)===false){var l;var u=typeof(a===null||a===void 0?void 0:a.data)==="string"?a.data:typeof(a===null||a===void 0?void 0:(l=a.data)===null||l===void 0?void 0:l.message)==="string"?a.data.message:(0,n4.__)("Something went wrong","tutor");throw new Error(u)}return o})()}function aZ(e){return aQ(e,"GET")}/**
* WordPress admin-ajax.php POST helper
*/function aX(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return aQ(n9/* ["default"].WP_AJAX_BASE_URL */.A.WP_AJAX_BASE_URL,"POST",aK((0,og._)((0,or._)({},t),{action:e,[n9/* .tutorConfig.nonce_key */.P.nonce_key]:n9/* .tutorConfig._tutor_nonce */.P._tutor_nonce}),"POST"))}/**
* Generic form POST helper (page submits / quiz / redirects)
*/function aJ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return aQ(e,"POST",aK((0,og._)((0,or._)({},t),{_tutor_nonce:n9/* .tutorConfig._tutor_nonce */.P._tutor_nonce}),"POST"))};// CONCATENATED MODULE: ./assets/core/ts/utils/component-discovery.ts
function a0(){var e=new Set;var t=t=>{var r;var i=(r=t.getAttribute("x-data"))!==null&&r!==void 0?r:"";var n=/\btutor([A-Z][A-Za-z0-9]*)\b/g;var o;while((o=n.exec(i))!==null){var a=o[1].charAt(0).toLowerCase()+o[1].slice(1);e.add(a)}};document.querySelectorAll("[x-data]").forEach(t);document.querySelectorAll("template").forEach(e=>{e.content.querySelectorAll("[x-data]").forEach(t)});return[...e]};// CONCATENATED MODULE: ./assets/core/ts/utils/currency.ts
var a1,a2,a4,a3,a8;var a9=e=>{var{symbol:t="$",position:r="left",thousandSeparator:i=",",decimalSeparator:n=".",fraction_digits:o=2}=e;return e=>{var a=e=>{var t=e.toFixed(o);var[r,a]=t.split(".");var s=r.replace(/\B(?=(\d{3})+(?!\d))/g,i);return a?"".concat(s).concat(n).concat(a):s};var s=a(Number(e));if(r==="left"){return"".concat(t).concat(s)}return"".concat(s).concat(t)}};var a5,a6,a7,se,st;var sr=a9({symbol:(a5=(a1=ad.tutor_currency)===null||a1===void 0?void 0:a1.symbol)!==null&&a5!==void 0?a5:"$",position:(a6=(a2=ad.tutor_currency)===null||a2===void 0?void 0:a2.position)!==null&&a6!==void 0?a6:"left",thousandSeparator:(a7=(a4=ad.tutor_currency)===null||a4===void 0?void 0:a4.thousand_separator)!==null&&a7!==void 0?a7:",",decimalSeparator:(se=(a3=ad.tutor_currency)===null||a3===void 0?void 0:a3.decimal_separator)!==null&&se!==void 0?se:".",fraction_digits:Number((st=(a8=ad.tutor_currency)===null||a8===void 0?void 0:a8.no_of_decimal)!==null&&st!==void 0?st:2)});var si=e=>{var t,r,i;var n;var o=(n=(t=tutorConfig.tutor_currency)===null||t===void 0?void 0:t.currency)!==null&&n!==void 0?n:"USD";var a;var s=(a=(r=tutorConfig.local)===null||r===void 0?void 0:r.replace("_","-"))!==null&&a!==void 0?a:"en-US";var l;var u=Number((l=(i=tutorConfig.tutor_currency)===null||i===void 0?void 0:i.no_of_decimal)!==null&&l!==void 0?l:2);var c=new Intl.NumberFormat(s,{style:"currency",currency:o,minimumFractionDigits:u});return c.format(e)};var sn=e=>{var{discount_type:t,discount_amount:r,total:i}=e;var n=so({discount_amount:r,discount_type:t,total:i});return i-n};var so=e=>{var{discount_type:t,discount_amount:r,total:i}=e;if(t==="flat"){return r}return i*(r/100)};// CONCATENATED MODULE: ./assets/core/ts/utils/decode-html-entities.ts
var sa=e=>{var t=new DOMParser;var r=t.parseFromString(e,"text/html");return r.body.textContent||""};// CONCATENATED MODULE: ./assets/core/ts/utils/endpoints.ts
var ss={ADMIN_AJAX:"wp-admin/admin-ajax.php",TAGS:"course-tag",CATEGORIES:"course-category",USERS:"users",USERS_LIST:"tutor_user_list",ORDER_DETAILS:"tutor_order_details",ADMIN_COMMENT:"tutor_order_comment",ORDER_MARK_AS_PAID:"tutor_order_paid",ORDER_REFUND:"tutor_order_refund",ORDER_CANCEL:"tutor_order_cancel",ADD_ORDER_DISCOUNT:"tutor_order_discount",COURSE_LIST:"course_list",BUNDLE_LIST:"tutor_get_bundle_list",CATEGORY_LIST:"category_list",CREATED_COURSE:"tutor_create_course",TUTOR_INSTRUCTOR_SEARCH:"tutor_course_instructor_search",CREATE_DRAFT_COURSE:"tutor_create_new_draft_course",TUTOR_YOUTUBE_VIDEO_DURATION:"tutor_youtube_video_duration",TUTOR_UNLINK_PAGE_BUILDER:"tutor_unlink_page_builder",// AI CONTENT GENERATION
GENERATE_AI_IMAGE:"tutor_pro_generate_image",MAGIC_FILL_AI_IMAGE:"tutor_pro_magic_fill_image",MAGIC_TEXT_GENERATION:"tutor_pro_generate_text_content",MAGIC_AI_MODIFY_CONTENT:"tutor_pro_modify_text_content",USE_AI_GENERATED_IMAGE:"tutor_pro_use_magic_image",OPEN_AI_SAVE_SETTINGS:"tutor_pro_chatgpt_save_settings",GENERATE_COURSE_CONTENT:"tutor_pro_generate_course_content",GENERATE_COURSE_TOPIC_CONTENT:"tutor_pro_generate_course_topic_content",SAVE_AI_GENERATED_COURSE_CONTENT:"tutor_pro_ai_course_create",GENERATE_QUIZ_QUESTIONS:"tutor_pro_generate_quiz_questions",GENERATE_AI_QUIZ_QUESTIONS:"tutor_pro_ai_generate_questions",// SUBSCRIPTION
GET_SUBSCRIPTIONS_LIST:"tutor_subscription_plans",SAVE_SUBSCRIPTION:"tutor_subscription_plan_save",DELETE_SUBSCRIPTION:"tutor_subscription_plan_delete",DUPLICATE_SUBSCRIPTION:"tutor_subscription_plan_duplicate",SORT_SUBSCRIPTION:"tutor_subscription_plan_sort",UPDATE_SUBSCRIPTION_STATUS:"tutor_subscription_status_update",RESUME_SUBSCRIPTION:"tutor_subscription_resume",EARLY_RENEW_SUBSCRIPTION:"tutor_subscription_early_renew",// COURSE
GET_COURSE_DETAILS:"tutor_course_details",UPDATE_COURSE:"tutor_update_course",GET_COURSE_LIST:"tutor_course_list",RESET_COURSE_PROGRESS:"tutor_reset_course_progress",TUTOR_COMPLETE_COURSE:"tutor_complete_course",// WOO COMMERCE PRODUCTS
GET_WC_PRODUCTS:"tutor_get_wc_products",GET_WC_PRODUCT_DETAILS:"tutor_get_wc_product",// QUIZ
GET_QUIZ_DETAILS:"tutor_quiz_details",SAVE_QUIZ:"tutor_quiz_builder_save",QUIZ_IMPORT_DATA:"quiz_import_data",QUIZ_EXPORT_DATA:"quiz_export_data",DELETE_QUIZ:"tutor_quiz_delete",START_QUIZ:"tutor_start_quiz",QUIZ_ABANDON:"tutor_quiz_abandon",QUIZ_TIMEOUT:"tutor_quiz_timeout",QUIZ_ATTEMPT_SUBMIT:"tutor_answering_quiz_question",REVIEW_QUIZ_ANSWERS:"tutor_review_quiz_answers",INSTRUCTOR_FEEDBACK:"tutor_instructor_feedback",// ZOOM
GET_ZOOM_MEETING_DETAILS:"tutor_zoom_meeting_details",SAVE_ZOOM_MEETING:"tutor_zoom_save_meeting",DELETE_ZOOM_MEETING:"tutor_zoom_delete_meeting",ZOOM_SAVE_API:"tutor_save_zoom_api",ZOOM_SAVE_SETTINGS:"tutor_save_zoom_settings",// GOOGLE MEET
GET_GOOGLE_MEET_DETAILS:"tutor_google_meet_meeting_details",SAVE_GOOGLE_MEET:"tutor_google_meet_new_meeting",DELETE_GOOGLE_MEET:"tutor_google_meet_delete",UPLOAD_GOOGLE_MEET_CREDENTIALS:"tutor_pro_google_meet_credential_upload",RESET_GOOGLE_MEET_CREDENTIALS:"tutor_google_meet_reset_cred",UPDATE_GOOGLE_MEET_SETTINGS:"tutor_update_google_meet_settings",// TOPIC
GET_COURSE_CONTENTS:"tutor_course_contents",SAVE_TOPIC:"tutor_save_topic",DELETE_TOPIC:"tutor_delete_topic",DELETE_TOPIC_CONTENT:"tutor_delete_lesson",UPDATE_COURSE_CONTENT_ORDER:"tutor_update_course_content_order",DUPLICATE_CONTENT:"tutor_duplicate_content",ADD_CONTENT_BANK_CONTENT_TO_COURSE:"tutor_content_bank_add_content_to_course",DELETE_CONTENT_BANK_CONTENT_FROM_COURSE:"tutor_content_bank_remove_content_from_course",// LESSON
GET_LESSON_DETAILS:"tutor_lesson_details",SAVE_LESSON:"tutor_save_lesson",LOAD_LESSON_COMMENTS:"tutor_load_lesson_comments",CREATE_LESSON_COMMENT:"tutor_create_lesson_comment",UPDATE_LESSON_COMMENT:"tutor_update_lesson_comment",DELETE_LESSON_COMMENT:"tutor_delete_lesson_comment",REPLY_LESSON_COMMENT:"tutor_reply_lesson_comment",LOAD_COMMENT_REPLIES:"tutor_load_comment_replies",// Q&A
QNA_SINGLE_ACTION:"tutor_qna_single_action",DELETE_DASHBOARD_QNA:"tutor_delete_dashboard_question",CREATE_UPDATE_QNA:"tutor_qna_create_update",UPDATE_QNA:"tutor_qna_update",LOAD_QNA_REPLIES:"tutor_qna_load_replies",// ASSIGNMENT
GET_ASSIGNMENT_DETAILS:"tutor_assignment_details",SAVE_ASSIGNMENT:"tutor_assignment_save",ASSIGNMENT_SUBMIT:"tutor_assignment_submit",REMOVE_ATTACHMENT:"tutor_remove_assignment_attachment",REMOVE_ASSIGNMENT_ATTEMPT:"tutor_remove_assignment_attempt",// TAX SETTINGS
GET_TAX_SETTINGS:"tutor_get_tax_settings",GET_H5P_QUIZ_CONTENT:"tutor_h5p_list_quiz_contents",GET_H5P_LESSON_CONTENT:"tutor_h5p_list_lesson_contents",GET_H5P_QUIZ_CONTENT_BY_ID:"tutor_h5p_quiz_content_by_id",// PAYMENT SETTINGS
GET_PAYMENT_SETTINGS:"tutor_payment_settings",GET_PAYMENT_GATEWAYS:"tutor_payment_gateways",INSTALL_PAYMENT_GATEWAY:"tutor_install_payment_gateway",REMOVE_PAYMENT_GATEWAY:"tutor_remove_payment_gateway",// ADDON LIST
GET_ADDON_LIST:"tutor_get_all_addons",ADDON_ENABLE_DISABLE:"addon_enable_disable",// INSTALL PLUGIN
TUTOR_INSTALL_PLUGIN:"tutor_install_plugin",// COUPON
GET_COUPON_DETAILS:"tutor_coupon_details",CREATE_COUPON:"tutor_coupon_create",UPDATE_COUPON:"tutor_coupon_update",COUPON_APPLIES_TO:"tutor_coupon_applies_to_list",// ENROLLMENT
CREATE_ENROLLMENT:"tutor_enroll_bulk_student",GET_COURSE_BUNDLE_LIST:"tutor_course_bundle_list",GET_UNENROLLED_USERS:"tutor_unenrolled_users",// MEMBERSHIP
GET_MEMBERSHIP_PLANS:"tutor_membership_plans",SAVE_MEMBERSHIP_PLAN:"tutor_membership_plan_save",DUPLICATE_MEMBERSHIP_PLAN:"tutor_membership_plan_duplicate",DELETE_MEMBERSHIP_PLAN:"tutor_membership_plan_delete",// COURSE BUNDLE
GET_BUNDLE_DETAILS:"tutor_get_course_bundle_data",UPDATE_BUNDLE:"tutor_create_course_bundle",ADD_REMOVE_COURSE_TO_BUNDLE:"tutor_add_remove_course_to_bundle",// IMPORT EXPORT
GET_EXPORTABLE_CONTENT:"tutor_pro_exportable_contents",EXPORT_CONTENTS:"tutor_pro_export",EXPORT_SETTINGS_FREE:"tutor_export_settings",IMPORT_CONTENTS:"tutor_pro_import",IMPORT_SETTINGS_FREE:"tutor_import_settings",GET_IMPORT_EXPORT_HISTORY:"tutor_pro_export_import_history",DELETE_IMPORT_EXPORT_HISTORY:"tutor_pro_delete_export_import_history",// CONTENT BANK
GET_CONTENT_BANK_COLLECTIONS:"tutor_content_bank_collections",SAVE_CONTENT_BANK_COLLECTION:"tutor_content_bank_collection_save",DELETE_CONTENT_BANK_COLLECTION:"tutor_content_bank_collection_delete",GET_CONTENT_BANK_CONTENTS:"tutor_content_bank_contents",DELETE_CONTENT_BANK_CONTENTS:"tutor_content_bank_content_delete",GET_CONTENT_DETAILS:"tutor_pro_get_content_details",GET_CONTENT_BANK_LESSON_DETAILS:"tutor_content_bank_lesson_details",GET_CONTENT_BANK_ASSIGNMENT_DETAILS:"tutor_content_bank_assignment_details",SAVE_CONTENT_BANK_LESSON_CONTENT:"tutor_content_bank_lesson_save",SAVE_CONTENT_BANK_ASSIGNMENT_CONTENT:"tutor_content_bank_assignment_save",SAVE_QUESTION_CONTENT:"tutor_content_bank_question_save",GET_CONTENT_BANK_QUESTION_DETAILS:"tutor_content_bank_question_details",DUPLICATE_CONTENT_BANK_CONTENT:"tutor_content_bank_content_duplicate",MOVE_CONTENT_BANK_CONTENT:"tutor_content_bank_content_move",DUPLICATE_CONTENT_BANK_COLLECTION:"tutor_content_bank_collection_duplicate",IMPORT_FROM_COURSES:"tutor_content_bank_content_synchronize",// Calendar
GET_CALENDAR_EVENTS:"get_calendar_materials",// Announcement
CREATE_ANNOUNCEMENT:"tutor_announcement_create",DELETE_ANNOUNCEMENT:"tutor_announcement_delete",// Notifications
PUSH_NOTIFICATION_SAVE_SUBSCRIPTION:"tutor_pn_save_subscription",GET_ALL_NOTIFICATIONS:"tutor_get_all_notifications",MARK_ALL_NOTIFICATIONS_AS_READ:"toggle_all_notifications_status_as_read",MARK_SINGLE_NOTIFICATION_AS_READ:"toggle_single_notification_status_as_read",MARK_ALL_NOTIFICATIONS_AS_UNREAD:"tutor_mark_all_notifications_as_unread",//Reviews
PLACE_RATING:"tutor_place_rating",DELETE_REVIEW:"delete_tutor_review",CLEAR_REVIEW_POPUP_DATA:"tutor_clear_review_popup_data",// Settings
FETCH_COUNTRIES:"/assets/json/countries.json",UPLOAD_PROFILE_PHOTO:"tutor_user_photo_upload",REMOVE_PROFILE_PHOTO:"tutor_user_photo_remove",UPDATE_PROFILE:"tutor_update_profile",SAVE_SOCIAL_PROFILE:"tutor_social_profile",SAVE_BILLING_INFO:"tutor_save_billing_info",SAVE_WITHDRAW_METHOD:"tutor_save_withdraw_account",RESET_PASSWORD:"tutor_profile_password_reset",UPDATE_PROFILE_NOTIFICATION:"tutor_save_notification_preference",UPDATE_USER_PREFERENCES:"tutor_save_user_preferences",RESET_USER_PREFERENCES:"tutor_reset_user_preferences",REMOVE_DEVICE_MANUALLY:"tutor_remove_device_manually",REMOVE_ALL_ACTIVE_LOGINS:"tutor_remove_all_active_logins",// Withdrawals
MAKE_AN_WITHDRAW:"tutor_make_an_withdraw",// Certificate
VERIFY_CERTIFICATE:"tutor_verify_certificate",// Instructor Dashboard
SAVE_INSTRUCTOR_HOME_SECTIONS_ORDER:"tutor_save_instructor_home_sections_order",SAVE_INSTRUCTOR_HOME_SECTIONS_VISIBILITY:"tutor_save_instructor_home_sections_visibility",// Tour
COMPLETE_TOUR:"tutor_complete_tour"};/* export default */const sl=ss;// EXTERNAL MODULE: ./assets/core/ts/utils/format.ts
var su=r(16131);// EXTERNAL MODULE: ./assets/core/ts/utils/number.ts
var sc=r(4041);// CONCATENATED MODULE: ./assets/core/ts/index.ts
nQ.plugin(Y);nQ.plugin(n);var sd=()=>(0,e._)(function*(){n0.registerAll({components:[oB,ot,oa,om/* .popoverMeta */.P,ok,n2,ao,oE,ow,oO,o5,ov,od,n8,as,oM],services:[aw,aO,aL,o8,ak,aS]});n0.registerLazy({calendar:()=>r.e(/* import() | tutor-calendar */"809").then(r.bind(r,73241)).then(e=>{var{calendarMeta:t}=e;return t}),form:()=>r.e(/* import() | tutor-form */"353").then(r.bind(r,26779)).then(e=>{var{formMeta:t}=e;return t}),fileUploader:()=>r.e(/* import() | tutor-file-uploader */"756").then(r.bind(r,43786)).then(e=>{var{fileUploaderMeta:t}=e;return t}),select:()=>r.e(/* import() | tutor-select */"855").then(r.bind(r,35293)).then(e=>{var{selectMeta:t}=e;return t}),timeInput:()=>r.e(/* import() | tutor-time-input */"691").then(r.bind(r,25069)).then(e=>{var{timeInputMeta:t}=e;return t})});yield n0.loadComponents(a0());n0.initWithAlpine(nQ);window.TutorComponentRegistry=n0;window.Alpine=nQ;// Expose TutorCore with services and utilities
// Use Object.assign to extend existing TutorCore instead of overwriting
window.TutorCore=Object.assign(window.TutorCore||{},{toast:o8.instance,security:{escapeHtml:av,escapeAttr:am},nonce:{getNonceData:a_},api:{wpPost:aX,wpPostForm:aJ,wpGet:aZ},error:{convertToErrorMessage:oR},string:{decodeHtmlEntities:sa,makeFirstCharacterUpperCase:nX},device:{isMobileDevice:of/* .isMobileDevice */.X,isRTL:of/* .isRTL */.V},number:{parseNumberOnly:sc/* .parseNumberOnly */.T},format:{formatBytes:su/* .formatBytes */.z},currency:{createPriceFormatter:a9,formatPrice:sr},constants:{TUTOR_CUSTOM_EVENTS:oi/* .TUTOR_CUSTOM_EVENTS */.T},config:{tutorConfig:ad},endpoints:sl});// Register legacy functions for backward compatibility
// This should be called AFTER TutorCore is set up
ab();nQ.start()})();if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",()=>{sd()})}else{sd()}})()})();