luv-assets 1.0.8 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.html +1 -1
- package/dist/js/js.min.js +1 -0
- package/dist/js/product.min.js +1 -0
- package/dist/js.min.js +1 -0
- package/dist/main.js +0 -2
- package/package.json +1 -1
- package/readme.txt +8 -0
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en" data-bs-theme="light"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Bootstrap w/ Webpack</title><script defer="defer" src="
|
|
1
|
+
<!doctype html><html lang="en" data-bs-theme="light"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Bootstrap w/ Webpack</title><script defer="defer" src="js/js.min.js"></script></head><body><div class="container py-4 px-3 mx-auto"><header class="d-flex justify-content-between align-items-md-center pb-3 mb-5 border-bottom"><h1 class="h4"><a href="/" class="d-flex align-items-center text-dark text-decoration-none"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-bootstrap-fill d-inline-block me-2" viewBox="0 0 16 16"><path d="M6.375 7.125V4.658h1.78c.973 0 1.542.457 1.542 1.237 0 .802-.604 1.23-1.764 1.23zm0 3.762h1.898c1.184 0 1.81-.48 1.81-1.377 0-.885-.65-1.348-1.886-1.348H6.375z"/><path d="M4.002 0a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h8a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4zm1.06 12V3.545h3.399c1.587 0 2.543.809 2.543 2.11 0 .884-.65 1.675-1.483 1.816v.1c1.143.117 1.904.931 1.904 2.033 0 1.488-1.084 2.396-2.888 2.396z"/></svg> <span>Webpack</span></a></h1><a href="https://github.com/twbs/examples/tree/main/webpack/" target="_blank" rel="noopener">View on GitHub</a></header><h1>Build Bootstrap with Webpack</h1><div class="col-lg-8 px-0"><p class="fs-4">You've successfully loaded the Bootstrap + Webpack example! It's loaded up with <a href="https://getbootstrap.com/">Bootstrap 5</a> and uses Webpack to compile and bundle our Sass and JavaScript. It also includes Autoprefixer.</p><p>If this button appears blue and the link appears purple, you've done it!</p></div><button type="button" class="btn btn-primary me-3" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample">Toggle offcanvas</button> <a id="popoverButton" class="text-success" href="#" role="button" data-bs-toggle="popover" title="Custom popover" data-bs-content="This is a Bootstrap popover.">Example popover</a><div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel"><div class="offcanvas-header"><h5 class="offcanvas-title" id="offcanvasExampleLabel">Offcanvas</h5><button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button></div><div class="offcanvas-body"><div>Some text as placeholder. In real life you can have the elements you have chosen. Like, text, images, lists, etc.</div><div class="dropdown mt-3"><button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown">Dropdown button</button><ul class="dropdown-menu" aria-labelledby="dropdownMenuButton"><li><a class="dropdown-item" href="#">Action</a></li><li><a class="dropdown-item" href="#">Another action</a></li><li><a class="dropdown-item" href="#">Something else here</a></li></ul></div></div></div><hr class="col-1 my-5 mx-0"><h2>Guides</h2><p>Read more detailed instructions and documentation on using or contributing to Bootstrap.</p><ul class="icon-list"><li><a href="https://getbootstrap.com/docs/5.3/getting-started/introduction/">Bootstrap quick start guide</a></li><li><a href="https://getbootstrap.com/docs/5.3/getting-started/webpack/">Bootstrap Webpack guide</a></li><li><a href="https://getbootstrap.com/docs/5.3/getting-started/parcel/">Bootstrap Parcel guide</a></li><li><a href="https://getbootstrap.com/docs/5.3/getting-started/vite/">Bootstrap Vite guide</a></li><li><a href="https://getbootstrap.com/docs/5.3/getting-started/contribute/">Contributing to Bootstrap</a></li></ul><hr class="mt-5 mb-4"><p class="text-muted">Created and open sourced by the Bootstrap team. Licensed MIT.</p><div class="bg_leftmenu" style="height: 30px;width: 100%;"></div><a href="#"><img src="https://img.luvdress.com/media/upload/4/iv/4ivp13igdyqf3rm1727173088.png" alt="Logo" class="img-fluid logo"/></a></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function isStrictMode(){return function(){return!this}()}function isSurportedLoading(){return"loading"in HTMLImageElement.prototype}function isEmpty(value){if(value===null||value===undefined)return true;if(typeof value==="string")return value.trim()==="";if(Array.isArray(value))return value.length===0;if(typeof value==="object")return Object.keys(value).length===0;return false}function webLoadScript(url,callback){var script=document.createElement("script");script.type="text/javascript";if(typeof callback!="undefined"){if(script.readyState){script.onreadystatechange=function(){if(script.readyState=="loaded"||script.readyState=="complete"){script.onreadystatechange=null;callback()}}}else{script.onload=function(){callback()}}}script.src=url;document.body.appendChild(script)}function check_email(email){if(!email||email==""){return false}const myreg=/^([a-zA-Z0-9]+[_|\_|\.|-|\-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.|-|\-]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;if(!myreg.test(email)){return false}return true}function check_pass(str){const re=/^\w{6,30}$/;if(re.test(str)){return true}else{return false}}function setCookie(name,value){const Days=30;const exp=new Date;exp.setTime(exp.getTime()+Days*24*60*60*1e3);document.cookie=name+"="+escape(value)+";expires="+exp.toGMTString()}function getCookie(name){const arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));if(arr){return unescape(arr[2])}else{return null}}function showToast(msg,element){$(element).find(".toast-body").text(msg);const toastEl=$(element);if(toastEl){const toast=bootstrap.Toast.getOrCreateInstance(toastEl[0]);toast.show()}}$(document).ready(function(){if(typeof memberCheckUrl!=="undefined"&&!isEmpty(memberCheckUrl)){const ajax_params={};if(typeof product_id!=="undefined"&&!isEmpty(product_id)){ajax_params["product_id"]=product_id}$.ajax({async:true,timeout:6e3,dataType:"json",type:"get",data:ajax_params,url:memberCheckUrl,success:function(data,textStatus){if(data.loginStatus){$("#header-welcome-js").removeClass("d-none");$("#header-email-js").text(data.customer_email);$("#header-login-js").addClass("d-none")}if(data.favorite){$("#product-favorite-js").addClass("text-danger")}if(data.favorite_product_count){}if(data.affiliate){$("#affiliate-link-js").show()}if(data.cart_qty){$(".cart-item-count-js").text(data.cart_qty)}},error:function(XMLHttpRequest,textStatus,errorThrown){}})}$("#subscribe_btn").click(function(){$(this).prop("disabled",true);email=$("#subscribe_email").val();if(!check_email(email)){alert("Enter your email address");$("#subscribe_btn").prop("disabled",false);return false}$.ajax({dataType:"json",type:"post",data:{email:email},url:"/member/account/subscribe",success:function(data,textStatus){$("#subscribe_btn").prop("disabled",false);if(data.success){alert(data.message);$("#subscribe_email").val("")}else{alert(data.message)}},error:function(error){alert("Oops! Something went wrong. Please try again later.");$("#subscribe_btn").prop("disabled",false)}})})});function isValidSearchKeyword(keyword,maxLength=100){keyword=keyword.trim();if(keyword===""){return false}if(keyword.length>maxLength){return false}const safePattern=/^[\p{L}\p{N}\s.;:'"!?-]+$/u;if(!safePattern.test(keyword)){return false}const escapedKeyword=keyword.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");return true}const historyKey="search_history";function pullSearchHistory(Url){let localHistory=getCompatibleSearchHistoryFromLocalStorage();if(!isSyncNeeded(localHistory)){return}$.ajax({async:true,timeout:6e3,dataType:"json",type:"get",url:Url,success:function(data,textStatus){if(data.data.length>0){mergeLocalSearchHistory(data.data)}},error:function(XMLHttpRequest,textStatus,errorThrown){}})}function saveOneSearchHistory(keyword,Url){$.ajax({async:true,timeout:6e3,dataType:"json",type:"post",url:Url,data:{keyword:keyword},success:function(data,textStatus){},error:function(XMLHttpRequest,textStatus,errorThrown){}})}function saveSearchToLocalStorage(keyword){let searchHistory=getCompatibleSearchHistoryFromLocalStorage();const index=searchHistory.data.indexOf(keyword);if(index>-1){searchHistory.data.splice(index,1)}searchHistory.data.unshift(keyword);if(searchHistory.data.length>maxSearchHistoryLength){searchHistory.data=searchHistory.data.slice(0,maxSearchHistoryLength)}searchHistory.update_time=(new Date).toISOString();localStorage.setItem(historyKey,JSON.stringify(searchHistory))}function removeSearchFromLocalStorage(keyword){let searchHistory=JSON.parse(localStorage.getItem(historyKey));if(searchHistory&&Array.isArray(searchHistory.data)){if(keyword){searchHistory.data=searchHistory.data.filter(item=>item!==keyword)}else{localStorage.removeItem(historyKey);return}searchHistory.update_time=(new Date).toISOString();localStorage.setItem(historyKey,JSON.stringify(searchHistory));return}else{localStorage.removeItem(historyKey);return}}function getSearchHistoryFromLocalStorage(){let searchHistory=JSON.parse(localStorage.getItem(historyKey))||{update_time:null,last_sync_time:null,data:[]};return searchHistory}function getCompatibleSearchHistoryFromLocalStorage(){const rawHistory=localStorage.getItem(historyKey);if(!rawHistory){return{update_time:null,last_sync_time:null,data:[]}}let history;try{history=JSON.parse(rawHistory)}catch(e){console.error("Failed to parse history:",e);return{update_time:null,last_sync_time:null,data:[]}}if(Array.isArray(history)){history={update_time:null,last_sync_time:null,data:history};localStorage.setItem(historyKey,JSON.stringify(history))}return history}function isSyncNeeded(history){if(!history||!history.last_sync_time)return true;const lastSyncTime=new Date(history.last_sync_time);const currentTime=new Date;const diffInMinutes=(currentTime-lastSyncTime)/(1e3*60);return diffInMinutes>15}function mergeLocalSearchHistory(serverHistory){let localHistory=getCompatibleSearchHistoryFromLocalStorage();localHistory.last_sync_time=(new Date).toISOString();let mergedData=Array.from(new Set([...localHistory.data,...serverHistory]));localHistory.data=mergedData;localStorage.setItem(historyKey,JSON.stringify(localHistory))}function getUrlParams(){const url=new URL(window.location.href);const searchParams=new URLSearchParams(url.search);return searchParams}function is_valid_url(url){var regex=new RegExp(/^(https?|s):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i);return regex.test(url)}function is_same_domain(base_url,custom_url){base_url=base_url.replace("http://","").replace("https://","").replace("www.","").replace("m.","").split(/[/?#]/)[0];custom_url=custom_url.replace("http://","").replace("https://","").replace("www.","").replace("m.","").split(/[/?#]/)[0];return base_url==custom_url||base_url.indexOf(custom_url)!=-1||custom_url.indexOf(base_url)!=-1}function process_friendly_url(param,value,url){var hash=url.split("#")[1];url=url.split("#")[0];var re=new RegExp("([/]"+param+"[/][^?]*)"),match=re.exec(url);var re2=new RegExp("([?].*)"),match2=re2.exec(url);if(match&&match[0])url=url.replace(match[0],"");if(match2&&match2[0])url=url.replace(match2[0],"");var re3=new RegExp("([/]"+param+"$)"),match3=re3.exec(url);if(match3&&match3[0])url=url.replace(match3[0],"");url=url.replace(/\/+$/,"");url=url+"/"+param+"/"+value+"/";if(match2&&match2[0])url=url+match2[0];if(hash)url+="#"+hash;return url}function add_query_arg(param,value,url){var re=new RegExp("[\\?&]"+param+"=([^&#]*)"),match=re.exec(url),delimiter,newString;var hash=url.split("#")[1];url=url.split("#")[0];if(match===null){var hasQuestionMark=/\?/.test(url);delimiter=hasQuestionMark?"&":"?";newString=url+delimiter+param+"="+value}else{delimiter=match[0].charAt(0);newString=url.replace(re,delimiter+param+"="+value)}if(hash){newString+="#"+hash}return newString}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function saveProductToLocalStorage(product_spu,maxHistoryLength=30){let productHistory=JSON.parse(localStorage.getItem(product_history_key))||[];const index=productHistory.indexOf(product_spu);if(index>-1){productHistory.splice(index,1)}productHistory.unshift(product_spu);if(productHistory.length>maxHistoryLength){productHistory=productHistory.slice(0,maxHistoryLength)}localStorage.setItem(product_history_key,JSON.stringify(productHistory))}function fetchAndDisplayViewedProducts(history_url){let productHistory=JSON.parse(localStorage.getItem(product_history_key)||"[]");if(productHistory.length===0){return}const viewedProductsElement=$("#viewed-products-js");viewedProductsElement.empty();$.ajax({url:history_url,method:"POST",data:{productIds:productHistory},success:function(response){viewedProductsElement.html(response.html)},error:function(){viewedProductsElement.html("<p>Failed to load viewed products.</p>")}})}function scrollToElement(targetElement,header_height){const headerHeight=header_height||60;const targetOffsetTop=targetElement.offset().top-headerHeight;$("html, body").animate({scrollTop:targetOffsetTop},{duration:300,easing:"swing"})}function renderSizeChart(){const sizes=Object.keys($size_charts);if(sizes.length===1){renderSizeChartSingle()}else{renderSizeChartMulti()}const tab=['<ul class="nav nav-tabs mb-4" id="sizeTabs" role="tablist">'];for(i=0;i<sizes.length;i++){const key=sizes[i];tab.push('<li class="nav-item" role="presentation">');tab.push(`<button class="nav-link ${i===0?"active":""}" id="${key}-tab" data-bs-toggle="tab" data-bs-target="#${key}" type="button">${key}</button>`);tab.push("</li>")}tab.push("</ul>");const content=['<div class="tab-content" id="sizeTabsContent">'];for(i=0;i<sizes.length;i++){const key=sizes[i];const size=$size_charts[key];content.push(`<div class="table-responsive tab-pane fade ${i===0?"show active":""}" id="${key}" role="tabpanel" aria-labelledby="${key}-tab">`);content.push(renderTable(size));content.push("</div>")}content.push("</div>");$("#panelsStayOpen-sizeChart .accordion-body").append(tab.join(""));$("#panelsStayOpen-sizeChart .accordion-body").append(content.join(""))}function renderSizeChartMulti(){}function renderSizeChartSingle(){}function renderTable(data){const table=['<table class="table table-sm table-bordered table-striped size-table">'];const thead=["<thead>"];const tbody=["<tbody>"];const attrNames=[];for(const size in data){data[size].forEach(item=>{if(!attrNames.includes(item.attr_name)){attrNames.push(item.attr_name)}});break}thead.push("<tr>");thead.push("<th>Size</th>");attrNames.forEach(name=>{thead.push(`<th>${name}</th>`)});thead.push("</tr>");tbody.push("");for(const size in data){const row=["<tr><td>"+size.toUpperCase()+"</td>"];const measurements={};data[size].forEach(m=>{measurements[m.attr_name]=`${m.inch}`});attrNames.forEach(name=>{row.push(`<td>${measurements[name]||"—"}</td>`)});tbody.push(row.join(""))}tbody.push("</tbody>");table.push(thead.join(""));table.push(tbody.join(""));table.push("</table>");return table.join("")}function renderSizeChartEle(){const sizes=Object.keys($size_charts);for(i=0;i<sizes.length;i++){const key=sizes[i];const size=$size_charts[key];renderTableEle(size,key+"Table"+default_size_unit,default_size_unit);renderTableEle(size,key+"Table"+second_size_unit,second_size_unit)}}function renderTableEle(data,tableId,system){const $table=$(`#${tableId}`);const $thead=$table.find("thead tr");const $tbody=$table.find("tbody");const key=system.toLowerCase();const attrNames=[];for(const size in data){data[size].forEach(item=>{if(!attrNames.includes(item.attr_name)){attrNames.push(item.attr_name)}});break}$thead.empty().append("<th>Size</th>");attrNames.forEach(name=>{$thead.append(`<th>${name}</th>`)});$tbody.empty();for(const size in data){const row=["<tr><td>"+size.toUpperCase()+"</td>"];const measurements={};data[size].forEach(m=>{measurements[m.attr_name]=`${m[key]}`});attrNames.forEach(name=>{row.push(`<td>${measurements[name]||"—"}</td>`)});row.push("</tr>");$tbody.append(row.join(""))}}function loadProductDetail(productInfo){let rows="";if(productInfo.spu_attr.length>0){for(let index=0;index<productInfo.spu_attr.length;index++){const detail=productInfo.spu_attr[index];const row=`\n <tr>\n <td>${detail.attr_name}</td>\n <td>${detail.value_name}</td>\n </tr>`;rows+=row}}if(productInfo.custom_attr.length>0){for(let index=0;index<productInfo.custom_attr.length;index++){const detail=productInfo.custom_attr[index];const tr="<tr>";const td=`<td>${detail.attr_name}</td>`;let lists="<td><ul>";for(let i=0;i<detail.list.length;i++){const value=detail.list[i];const listItem=`<li>${value.measurements_name}: ${value.value_with_unit}</li>`;lists+=listItem}lists+="</ul></td>";rows+=tr+td+lists+"</tr>"}}$(".product_detail_img").attr("src",productInfo["image"]);$(".product_detail_name").html(productInfo["name"]);$(".product_detail_price").html(`${ecommerce_product.symbol}${productInfo["price"]}`);$(".product_qty_val").html(productInfo["qty"]);$(".product-options-js tbody").html(rows);return}function parseHeight(heightStr){const match=heightStr.match(/^(\d+)'?(\d*)"?$/);if(!match){throw new Error("Invalid height format. Expected format like '5'6 or 5'6\"")}const feet=parseInt(match[1],10)||0;const inches=parseInt(match[2],10)||0;return{feet:feet,inches:inches}}function initCustomize(relatedAttr,sizeSystem,attrValue){let sizeUnit;if(sizeSystem==="imperial"){sizeUnit="inch"}else{sizeUnit="cm"}let selectedAttr={};let pointCode;for(let i=0;i<$size_charts[relatedAttr][attrValue].length;i++){pointCode=$size_charts[relatedAttr][attrValue][i]["point_code"];if(pointCode==="height"){if(sizeUnit==="inch"){const{feet:feet,inches:inches}=parseHeight($size_charts[relatedAttr][attrValue][i]["ft"]);$("#feet").val(feet);$("#inches").val(inches)}else{$("#cm").val($size_charts[relatedAttr][attrValue][i][sizeUnit])}}else{selectedAttr[pointCode]=$size_charts[relatedAttr][attrValue][i][sizeUnit]}}const $inputs=$(`#${relatedAttr}-custom-form-container input.custom-input-js`);$inputs.each(function(){const name=$(this).attr("name");if(selectedAttr[name]){$(this).val(selectedAttr[name])}})}function calculateProductPrice(productInfo){let totalPrice=parseFloat(ecommerce_product.price);if(productInfo["spu_attr"]&&typeof productInfo["spu_attr"]==="object"&&productInfo["spu_attr"]!==null){for(let key in productInfo["spu_attr"]){if(productInfo["spu_attr"][key].value_price>0){totalPrice+=parseFloat(productInfo["spu_attr"][key].value_price)}}}if(productInfo["custom_attr"]&&typeof productInfo["custom_attr"]==="object"&&productInfo["custom_attr"]!==null){for(let key in productInfo["custom_attr"]){if(productInfo["custom_attr"][key].value_price>0){totalPrice+=parseFloat(productInfo["custom_attr"][key].value_price)}}}totalPrice=totalPrice.toFixed(2);product_info.price=totalPrice;return totalPrice}function checkCustomInfo($input){const value=$input.val();const required=$input.prop("required");if(required&&(value===""||value===0)){return false}const min=parseFloat($input.attr("min"));if(!isNaN(min)&&value<min){return false}const max=parseFloat($input.attr("max"));if(!isNaN(max)&&value>max){return false}return true}function getSpuAttrValueInfo(attr,attrValue){const attrValueInfo={attr_code:attr,value_code:attrValue,attr_name:$sku_map[attr].attr_name,value_name:$sku_map[attr]["values"][attrValue].value_name,value_price:$sku_map[attr]["values"][attrValue].value_price,base_value_price:$sku_map[attr]["values"][attrValue].base_value_price};return attrValueInfo}function getCustomAttrValueInfo(attr,attrValue,value_price,base_value_price){let value_code,value_name;if(!attrValue){value_code="";value_name=""}else{value_code=attrValue;value_name=$sku_map[attr]["values"][attrValue].value_name}const attrValueInfo={attr_code:attr,value_code:value_code,attr_name:$sku_map[attr].attr_name,value_name:value_name,value_price:value_price,base_value_price:base_value_price};return attrValueInfo}function setProductSpuAttr(attr,attrValue,options){const attrValueInfo=getSpuAttrValueInfo(attr,attrValue);const newSpuAttr={...product_info.spu_attr,[attr]:attrValueInfo};if(product_info.custom_attr&&product_info.custom_attr.hasOwnProperty(attr)){delete product_info.custom_attr[attr]}const updates={spu_attr:newSpuAttr};if(options&&options.attrImg){updates.image=options.imgSrc}updateProductInfo(updates)}function setProductCustomAttr(attr,attrValue,value_price,base_value_price){const attrValueInfo=getCustomAttrValueInfo(attr,attrValue,value_price,base_value_price);const newCustomAttr={...product_info.custom_attr,[attr]:attrValueInfo};if(product_info.spu_attr&&product_info.spu_attr.hasOwnProperty(attr)){delete product_info.spu_attr[attr]}updateProductInfo({custom_attr:newCustomAttr})}function switchToSpuAttr(attr,attrValue){if(product_info.custom_attr&&product_info.custom_attr.hasOwnProperty(attr)){delete product_info.custom_attr[attr]}if(attrValue){setProductSpuAttr(attr,attrValue)}}function setProductImage(img_src){var filename=img_src.split("/").splice(-1).toString();product_info["image"]=img_src;updateProductInfo({image:img_src})}function initProductAttr(){product_info["name"]=ecommerce_product.name;product_info["price"]=ecommerce_product.price;product_info["image"]=$("#product-main-image-js").val();product_info["product_id"]=ecommerce_product.id;product_info["spu"]=ecommerce_product.spu;product_info["qty"]=1;product_info["spu_attr"]={};product_info["custom_attr"]={};for(let index=0;index<$selected_sku_list.length;index++){const attr=$selected_sku_list[index].attr_code;const attrValue=$selected_sku_list[index].value_code;setProductSpuAttr(attr,attrValue)}}function getFilenameFromImgSrc(imgSrc){const filename=imgSrc.split("/").splice(-1).toString();return filename}function getIndexByImgSrc(imgSrc){let index=-1;$(".swiper-slide img").each(function(i,element){const currentImgSrc=$(this).data("src");const filename=getFilenameFromImgSrc(currentImgSrc);if(filename===getFilenameFromImgSrc(imgSrc)){index=i;return}});return index}function goToSlide(index,speed=null){swiper.slideTo(index,speed,false)}function updateProductInfo(updates){const keys=Object.keys(updates);for(let index=0;index<keys.length;index++){const key=keys[index];if(key==="image"){const imgSrc=updates[key];const index=getIndexByImgSrc(imgSrc);goToSlide(index)}}Object.assign(product_info,updates);$(document).trigger("product:updated",[product_info])}function renderProductUI(info){const price=calculateProductPrice(info);$("#total-price").text(`${ecommerce_product.symbol}${price}`)}function showAttrErrorMessage(attr){$(`#${attr}-error-message`).addClass("d-block")}function hideAttrErrorMessage(attr){$(`#${attr}-error-message`).removeClass("d-block")}function isAllRequiredAttrsSelected(requiredAttrs=$spu_attr){return requiredAttrs.every(attr=>product_info.spu_attr[attr]||product_info.custom_attr[attr])}function getProductInfo(){var result={success:false,data:{name:product_info.name,product_id:product_info.product_id,spu:product_info.spu,qty:product_info.qty,image:product_info.image,price:product_info.price,spu_attr:[],size_chart:{},custom_attr:[]},errors:[]};var $selected_size_charts={};for(var index=0;index<$spu_attr.length;index++){var errror={type:null,key:null,jQueryElement:null};var attr=$spu_attr[index];if(product_info.spu_attr&&typeof product_info.spu_attr==="object"&&product_info.spu_attr!==null&&product_info.spu_attr[attr]&&typeof product_info.spu_attr[attr]==="object"&&product_info.spu_attr[attr]!==null){result.data.spu_attr.push(product_info.spu_attr[attr]);var value_code=product_info.spu_attr[attr].value_code;if($size_charts.hasOwnProperty(attr)&&$size_charts[attr].hasOwnProperty(value_code)){$selected_size_charts[attr]=$size_charts[attr][value_code]}}else if(product_info.custom_attr&&typeof product_info.custom_attr==="object"&&product_info.custom_attr!==null&&product_info.custom_attr[attr]&&typeof product_info.custom_attr[attr]==="object"&&product_info.custom_attr[attr]!==null){product_info.custom_attr[attr].list=[];cusResult=collectCustomMeasurements(attr);if(cusResult.errors.length>0){errror.type="custom_attr";errror.jQueryElement=cusResult.errors[0];result.errors.push(errror);return result}else{cusResult.data.forEach(function(item){product_info.custom_attr[attr].list.push(item)})}result.data.custom_attr.push(product_info.custom_attr[attr])}else{errror.type="spu_attr";errror.key=attr;errror.jQueryElement=$(`#${attr}`);result.errors.push(errror);return result}}if(Object.keys($selected_size_charts).length>0){product_info.size_chart=$selected_size_charts;result.data.size_chart=product_info.size_chart}result.success=true;return result}function renderErrorMsg(err){scrollToElement(err.jQueryElement);if(err.type==="spu_attr"){showAttrErrorMessage(err.key)}else if(err.type==="custom_attr"){err.jQueryElement.addClass("is-invalid");err.jQueryElement.focus()}}function collectCustomMeasurements(attr){var result={success:true,data:[],errors:[]};var $container=$("#"+attr+"-custom-form-container");$container.find("div.input-group").each(function(){var $group=$(this);if(!$group.is(":visible")){return true}var $input=$group.find("input").first();if(!checkCustomInfo($input)){result.success=false;result.errors.push($input);return false}var name=$input.attr("name");var $labelSpan=$group.find(".measurements-label-js");var measurements_name=$labelSpan.length?$labelSpan.text().trim():"Unknown";if(name==="feet"){var feet=$input.val();var $inchesEle=$group.find("#inches");if(!checkCustomInfo($inchesEle)){result.success=false;result.errors.push($inchesEle);return false}var inches=$inchesEle.val();if(feet!==""&&inches!==""){var measurements_code=$group.data("measurements-code");result.data.push({measurements_code:measurements_code,measurements_name:measurements_name,value_with_unit:feet+"'"+inches+'"'})}}else{var value=$input.val();if(value!==""){var measurements_code=name;var $unitSpan=$group.find(".custom-input-unit-js");var unit=$unitSpan.length?$unitSpan.text().trim():"";result.data.push({measurements_code:measurements_code,measurements_name:measurements_name,value_with_unit:value+" "+unit})}}});return result}function init_share(){var ogUrl=$('meta[property="og:url"]').attr("content");var ogTitle=$('meta[property="og:title"]').attr("content");var elems=$("[data-sharer]");for(var i=0;i<elems.length;i++){elems[i].setAttribute("data-url",ogUrl);elems[i].setAttribute("data-title",ogTitle)}$("#affiliate-link-url-input-js").val(ogUrl)}function handleFavoriteClickThrottle(e){e.preventDefault();var self=$(this);$.ajax({url:productFavoriteUrl,method:"GET",data:{spu:ecommerce_product.spu},dataType:"json",timeout:5e3}).done(function(response){loginStatus=response.loginStatus;if(!loginStatus){window.location.href=memberLoginUrl;return}if(response.favoriteStatus){self.addClass("text-danger")}else{self.removeClass("text-danger")}showToast(response.content,"#toast-js")}).fail(function(){alert("Operation failed. Please try again later.")}).always(function(){})}function handleFavoriteClickA(e){e.preventDefault();e.stopPropagation();var self=$(this);if(self.prop("disabled")){return}self.prop("disabled",true);self.addClass("opacity-50");$.ajax({url:productFavoriteUrl,method:"GET",data:{spu:ecommerce_product.spu},dataType:"json",timeout:5e3}).done(function(response){loginStatus=response.loginStatus;if(!loginStatus){window.location.href=memberLoginUrl;return}if(response.favoriteStatus){self.addClass("text-danger")}else{self.removeClass("text-danger")}showToast(response.content,"#toast-js")}).fail(function(){alert("Operation failed. Please try again later.")}).always(function(){self.prop("disabled",false);self.removeClass("opacity-50")})}function handleFavoriteClickB(e){e.preventDefault();e.stopPropagation();var self=$(this);self.toggleClass("text-danger");$.ajax({url:productFavoriteUrl,method:"GET",data:{spu:ecommerce_product.spu},dataType:"json",timeout:5e3}).done(function(response){loginStatus=response.loginStatus;if(!loginStatus){window.location.href=memberLoginUrl;return}if(response.favoriteStatus){self.addClass("text-danger")}else{self.removeClass("text-danger")}showToast(response.content,"#toast-js")}).fail(function(){self.toggleClass("text-danger");showToast("Operation failed","#toast-js")}).always(function(){})}function checkRemark(customer_remark){if(customer_remark.length>order_remark_max_length){return false}return true}function handleAddToCartClick(e){e.preventDefault();e.stopPropagation();var self=$(this);if(self.prop("disabled")){return}self.prop("disabled",true);self.addClass("opacity-50");var result=getProductInfo();if(!result.success){self.prop("disabled",false);self.removeClass("opacity-50");showToast("Failed to obtain product information. Please refresh and try again.","#toast-js");return}var remark=$("#customer-remark-js").val();if(!checkRemark(remark)){self.prop("disabled",false);self.removeClass("opacity-50");showToast(order_remark_message,"#toast-js")}var data_params=result.data;data_params["customer_remark"]=remark;$.ajax({async:true,timeout:6e3,dataType:"json",type:"post",data:JSON.stringify(data_params),url:addToCartUrl,success:function(response){if(response.status=="success"){var items_count=response.items_count;$(".cart-item-count-js").text(items_count);var $modal=$("#productBottomSheet");var modalInstance=bootstrap.Modal.getOrCreateInstance($modal[0]);modalInstance.hide()}showToast(response.message,"#toast-js")},error:function(XMLHttpRequest,textStatus,errorThrown){let message="Operation failed. Please try again later.";if(textStatus==="timeout"){message="Request timed out. Please check your network and try again."}else if(XMLHttpRequest.status===0){message="Network connection failed. Please check your internet."}else if(XMLHttpRequest.status===401){window.location.href=memberLoginUrl;return}else if(XMLHttpRequest.status>=500){message="Server is busy. Please try again later."}else if(XMLHttpRequest.status>=400){message="Invalid request. Please try again."}else{console.error("AJAX Error:",textStatus,errorThrown)}console.log(message)},complete:function(){self.prop("disabled",false);self.removeClass("opacity-50")}})}function paypalBuynowCreatePayment(){var FUNDING_SOURCES=[paypal.FUNDING.PAYPAL];FUNDING_SOURCES.forEach(function(fundingSource){var button=paypal.Buttons({fundingSource:fundingSource,style:{label:"buynow"},onClick:function(){var remark=$("#customer-remark-js").val();if(!checkRemark(remark)){self.prop("disabled",false);self.removeClass("opacity-50");showToast(order_remark_message,"#toast-js");return false}return true},createOrder:(data,actions)=>{var result=getProductInfo();var data_params=result.data;data_params["customer_remark"]=$("#customer-remark-js").val();return fetch(paypalCreateOrderUrl,{method:"post",body:JSON.stringify(data_params),headers:{"content-type":"application/json"}}).then(response=>{if(!response.ok){throw new Error("Network response was not ok")}return response.json()}).then(order=>{if(order.id=="-1"){throw new Error(order.message)}return order.id}).catch(error=>{alert(error)})},onApprove:(data,actions)=>fetch(paypalCaptureOrderUrl,{method:"post",body:JSON.stringify(data),headers:{"content-type":"application/json"}}).then(response=>{if(!response.ok){throw new Error("Network response was not ok!")}return response.json()}).then(orderData=>{if(orderData.order_sn=="-1"){if(orderData.error_issue==="INSTRUMENT_DECLINED"){alert(orderData.message);return actions.restart()}else{throw new Error(orderData.message)}}const order_sn=orderData.order_sn;actions.redirect(`${paypalFinishOrderUrl}?order_sn=${order_sn}`)}).catch(error=>{alert(error)})});if(button.isEligible()){button.render("#product-paypal-container-js")}})}$(function(){const lazyLoadInstance=new LazyLoad({});$(document).on("product:updated",(e,info)=>{renderProductUI(info)});swiper=new Swiper(".swiper",{autoplay:{delay:5e3},pagination:{el:".swiper-pagination",type:"fraction",renderFraction:function(currentClass,totalClass){return'<span class="swiper-pagination-current">'+currentClass+'</span> / <span class="swiper-pagination-total">'+totalClass+"</span>"}}});initProductAttr();fetchAndDisplayViewedProducts(historyUrl);saveProductToLocalStorage(ecommerce_product.spu);if(products_more_count>products_more_count_min){let isLoading=false;let morePageNum=1;function loadMoreProducts(){if(isLoading)return;isLoading=true;$("#product-list-more").append('<div id="loading-more" class="col-12 text-center my-3">Loading...</div>');$.ajax({url:productsMoreUrl,method:"GET",data:{p:morePageNum},dataType:"json",timeout:5e3}).done(function(response){if(response.html){$("#product-list-more").append(response.html);lazyLoadInstance.update();morePageNum=response.next_page}else{observer.unobserve(document.getElementById("load-trigger"));$("#product-list-more").append('<div class="col-12 text-center text-muted">No more products.</div>')}}).fail(function(){alert("Failed to load more products.")}).always(function(){$("#loading-more").remove();isLoading=false})}const throttledLoad=_.throttle(function(){if(!isLoading){loadMoreProducts()}},1e3,{trailing:true});const observer=new IntersectionObserver(entries=>{if(entries[0].isIntersecting){throttledLoad()}},{rootMargin:"100px"});if(document.getElementById("load-trigger")){observer.observe(document.getElementById("load-trigger"))}}$("#panelsStayOpen-sizeChart").on("show.bs.collapse",function(){if(!$(this).data("rendered")){renderSizeChartEle();$(this).data("rendered",true)}});let currentUnit=default_size_unit;function switchSizeUnit(unit){currentUnit=unit;const activeTabContentPrefix=$("#sizeTabs .nav-link.active").data("content-prefix");const contentId=activeTabContentPrefix+unit;$("#"+contentId).addClass("show active").siblings(".tab-pane").removeClass("show active");if(unit===default_size_unit){$("#switchToDefault-js").addClass("btn-danger").removeClass("btn-secondary");$("#switchToSecond-js").addClass("btn-secondary").removeClass("btn-danger")}else{$("#switchToSecond-js").addClass("btn-danger").removeClass("btn-secondary");$("#switchToDefault-js").addClass("btn-secondary").removeClass("btn-danger")}}$("#switchToDefault-js").on("click",function(){switchSizeUnit(default_size_unit)});$("#switchToSecond-js").on("click",function(){switchSizeUnit(second_size_unit)});$("#sizeTabs .nav-link").on("shown.bs.tab",function(){switchSizeUnit(currentUnit)});$("#affiliate-link-url-copy-js").on("click",function(e){e.preventDefault();var $this=$(this);$("#affiliate-link-url-input-js").select();document.execCommand("copy");$this.find(".affiliate-link-url-copy-label-js").addClass("d-none");$this.find(".affiliate-link-url-copy-label-copied-js").removeClass("d-none");setTimeout(function(){$this.find(".affiliate-link-url-copy-label-js").removeClass("d-none");$this.find(".affiliate-link-url-copy-label-copied-js").addClass("d-none")},2e3)});$(".product-info-attr-js").on("click",".attr-value-js button",function(e){e.preventDefault();const self=$(this);const $fieldset=self.closest("fieldset");const attr=$fieldset.attr("id");const attrValue=self.data("attr-value");self.closest("div").find("button").removeClass("border-danger");self.removeClass("border-light");self.addClass("border-danger");hideAttrErrorMessage(attr);$fieldset.find(".product-selected-attr-value-js").data("value",attrValue).data("value-for-restore",attrValue).attr("data-value",attrValue).attr("data-value-for-restore",attrValue).text($sku_map[attr]["values"][attrValue].value_name);const attrHasPrice=$sku_map[attr].attr_has_price;const attrImg=self.data("attr-img");const options={attrHasPrice:attrHasPrice,attrImg:attrImg};if(attrImg===1){var img_src=self.find("img").attr("src");options.imgSrc=img_src}setProductSpuAttr(attr,attrValue,options);const showSizeChart=$sku_map[attr].show_size_value_chart;if(showSizeChart===1){const $chartContainer=$fieldset.find(".product-selected-chart-js");const $chartBody=$chartContainer.find("tbody");if($size_charts[attr][attrValue]){let rows="";$.each($size_charts[attr][attrValue],function(index,detail){const imperialValue=detail.ft?detail.ft:detail.inch?detail.inch+" in":"";const row=`\n <tr>\n <td>${detail.attr_name}</td>\n <td>${imperialValue}</td>\n <td>${detail.cm} cm</td>\n </tr>`;rows+=row});$chartBody.html(rows);$chartContainer.removeClass("d-none")}}const showSizeCustom=$sku_map[attr].show_size_custom;if(showSizeCustom===1){const $customCheckbox=$fieldset.find(".custom-toggle-checkbox-js");if($customCheckbox.is(":checked")){$customCheckbox.prop("checked",false).trigger("change")}}});$(".product-info-attr-js").on("change",".custom-toggle-checkbox-js",function(){const self=$(this);const customPrice=self.data("custom_price");const baseCustomPrice=self.data("base-custom-price");const $fieldset=self.closest("fieldset");const targetFormId=self.attr("aria-controls");const isChecked=self.is(":checked");$("#"+targetFormId).toggleClass("d-none",!isChecked).attr("aria-hidden",!isChecked);self.attr("aria-expanded",isChecked);const relatedAttr=$fieldset.attr("id");const relatedAttrValue=$fieldset.find(".product-selected-attr-value-js").data("value-for-restore");if(isChecked){$fieldset.find(".d-flex button").removeClass("border-danger");$fieldset.find(".product-selected-attr-value-js").data("value","").attr("data-value","").text("");hideAttrErrorMessage(relatedAttr);if(relatedAttrValue){const size_unit=$("#"+targetFormId).find(".unit-selector-js").val();initCustomize(relatedAttr,size_unit,relatedAttrValue)}$fieldset.find(".product-selected-chart-js").addClass("d-none");setProductCustomAttr(relatedAttr,relatedAttrValue,customPrice,baseCustomPrice)}else{$fieldset.find(".d-flex button").each(function(){if($(this).data("attr-value")==relatedAttrValue){$(this).removeClass("border-light");$(this).addClass("border-danger")}});if(relatedAttrValue){$fieldset.find(".product-selected-attr-value-js").data("value",relatedAttrValue).data("value-for-restore",relatedAttrValue).attr("data-value",relatedAttrValue).attr("data-value-for-restore",relatedAttrValue).text($sku_map[relatedAttr]["values"][relatedAttrValue].value_name)}$fieldset.find(".product-selected-chart-js").removeClass("d-none");switchToSpuAttr(relatedAttr,relatedAttrValue)}});$(".product-info-attr-js").on("change",".unit-selector-js",function(){const $this=$(this);const sizeUnit=$this.val();const $fieldset=$this.closest("fieldset");const relatedAttr=$fieldset.attr("id");const relatedAttrValue=$fieldset.find(".product-selected-attr-value-js").data("value-for-restore");const imperialHeight=$("#imperial-height");const metricHeight=$("#metric-height");const weightUnitLabel=$("#weight-unit-label");const $cus_units=$fieldset.find(".custom-input-unit-js");if(sizeUnit==="imperial"){if(imperialHeight){imperialHeight.removeClass("d-none");metricHeight.addClass("d-none");weightUnitLabel.text("lb")}$cus_units.each(function(){$(this).text("in")})}else{if(imperialHeight){imperialHeight.addClass("d-none");metricHeight.removeClass("d-none");weightUnitLabel.text("kg")}$cus_units.each(function(){$(this).text("cm")})}if(relatedAttrValue){initCustomize(relatedAttr,sizeUnit,relatedAttrValue)}});$(".product-info-attr-js").on("focus",".custom-form-container-js input",function(){$(this).removeClass("is-invalid")}).on("blur",".custom-form-container-js input",function(){if(!checkCustomInfo($(this))){$(this).addClass("is-invalid")}});$("#qty-minus-js").click(function(){let v=parseInt($("#quantity").val());v-=1;if(v<=1){v=1}$("#quantity").val(v);product_info.qty=v;if(v<=1){$(this).addClass("disabled")}else{$(this).removeClass("disabled")}});$("#qty-plus-js").click(function(){let v=parseInt($("#quantity").val());v+=1;if(v>=100){v=100}$("#quantity").val(v);product_info.qty=v;$("#qty-minus-js").removeClass("disabled")});$("#product-detail-icon-share-js").click(function(e){e.preventDefault();init_share();var $modal=$("#shareBottomSheet");var modalInstance=new bootstrap.Modal($modal[0]);modalInstance.show()});$("#shareBottomSheet").on("hidden.bs.modal",function(){});$(".product-info-attr-js").on("click","button.measurement-trigger-js",function(e){e.preventDefault();var code=$(this).data("measurements-code");var name=$size_custom_image[code]["local_img_title"];$("#measurementBottomSheetModalLabel").text(name);const imagePath=$size_custom_image[code]["local_img"];if(imagePath){$("#modalImage").attr("src",imagePath)}const htmlContent=$size_custom_image[code]["local_img_desc"];if(htmlContent){$("#modalHtml").html(htmlContent)}var trigger=code;var $modal=$("#measurementBottomSheet");$modal.data("trigger-source",trigger);console.log("this modal is triggered by:",trigger);var modalInstance=new bootstrap.Modal($modal[0]);modalInstance.show()});$("#measurementBottomSheet").on("hidden.bs.modal",function(){var triggerSource=$(this).data("trigger-source");console.log("this modal is triggered by:",triggerSource,"and it is hidden");$(this).removeData("trigger-source")});$("#product-favorite-js").click(handleFavoriteClickA);$(".product-view-js").on("click","button",function(e){e.preventDefault();var result=getProductInfo();if(!result.success){renderErrorMsg(result.errors[0]);return false}loadProductDetail(result.data);var trigger=$(this).data("trigger");$("#productBottomSheetModalLabel").text($(this).text());if(trigger=="product-add-cart-view-js"){$("#product-add-cart-js").removeClass("d-none");$("#product-paypal-container-js").addClass("d-none")}else if(trigger=="product-buy-now-view-js"){if(typeof paypal=="undefined"){webLoadScript(paypalSdkUrl,function(){paypalBuynowCreatePayment()})}else{paypalBuynowCreatePayment()}$("#product-add-cart-js").addClass("d-none");$("#product-paypal-container-js").removeClass("d-none")}var $modal=$("#productBottomSheet");$modal.data("trigger-source",trigger);console.log("该 modal 是由:",trigger,"触发的");var modalInstance=bootstrap.Modal.getOrCreateInstance($modal[0]);modalInstance.show()});$("#productBottomSheet").on("hidden.bs.modal",function(){var triggerSource=$(this).data("trigger-source");console.log("this modal is triggered by:",triggerSource,"and it is hidden");if(triggerSource==="product-buy-now-view-js"){$("#paypal-button-container").empty()}$(this).removeData("trigger-source")});$("#product-add-cart-js").click(handleAddToCartClick);$("#customer-remark-js").on("focus",function(){$(this).removeClass("is-invalid")}).on("blur",function(){if(!checkRemark($(this).val())){$(this).addClass("is-invalid");showToast(order_remark_message,"#toast-js")}})});
|
package/dist/js.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e={},o=window;for(var r in e)o[r]=e[r];e.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
package/dist/main.js
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{afterMain:()=>w,afterRead:()=>b,afterWrite:()=>C,applyStyles:()=>D,arrow:()=>G,auto:()=>r,basePlacements:()=>a,beforeMain:()=>v,beforeRead:()=>g,beforeWrite:()=>A,bottom:()=>n,clippingParents:()=>h,computeStyles:()=>et,createPopper:()=>St,createPopperBase:()=>Lt,createPopperLite:()=>Dt,detectOverflow:()=>gt,end:()=>c,eventListeners:()=>nt,flip:()=>_t,hide:()=>yt,left:()=>o,main:()=>y,modifierPhases:()=>T,offset:()=>wt,placements:()=>m,popper:()=>u,popperGenerator:()=>kt,popperOffsets:()=>At,preventOverflow:()=>Et,read:()=>_,reference:()=>f,right:()=>s,start:()=>l,top:()=>i,variationPlacements:()=>p,viewport:()=>d,write:()=>E});var i="top",n="bottom",s="right",o="left",r="auto",a=[i,n,s,o],l="start",c="end",h="clippingParents",d="viewport",u="popper",f="reference",p=a.reduce(function(t,e){return t.concat([e+"-"+l,e+"-"+c])},[]),m=[].concat(a,[r]).reduce(function(t,e){return t.concat([e,e+"-"+l,e+"-"+c])},[]),g="beforeRead",_="read",b="afterRead",v="beforeMain",y="main",w="afterMain",A="beforeWrite",E="write",C="afterWrite",T=[g,_,b,v,y,w,A,E,C];function O(t){return t?(t.nodeName||"").toLowerCase():null}function x(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function k(t){return t instanceof x(t).Element||t instanceof Element}function L(t){return t instanceof x(t).HTMLElement||t instanceof HTMLElement}function S(t){return"undefined"!=typeof ShadowRoot&&(t instanceof x(t).ShadowRoot||t instanceof ShadowRoot)}const D={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];L(s)&&O(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});L(n)&&O(n)&&(Object.assign(n.style,o),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};function $(t){return t.split("-")[0]}var I=Math.max,N=Math.min,P=Math.round;function M(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function j(){return!/^((?!chrome|android).)*safari/i.test(M())}function F(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&L(t)&&(s=t.offsetWidth>0&&P(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&P(n.height)/t.offsetHeight||1);var r=(k(t)?x(t):window).visualViewport,a=!j()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function H(t){var e=F(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function W(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&S(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function B(t){return x(t).getComputedStyle(t)}function z(t){return["table","td","th"].indexOf(O(t))>=0}function R(t){return((k(t)?t.ownerDocument:t.document)||window.document).documentElement}function q(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(S(t)?t.host:null)||R(t)}function V(t){return L(t)&&"fixed"!==B(t).position?t.offsetParent:null}function K(t){for(var e=x(t),i=V(t);i&&z(i)&&"static"===B(i).position;)i=V(i);return i&&("html"===O(i)||"body"===O(i)&&"static"===B(i).position)?e:i||function(t){var e=/firefox/i.test(M());if(/Trident/i.test(M())&&L(t)&&"fixed"===B(t).position)return null;var i=q(t);for(S(i)&&(i=i.host);L(i)&&["html","body"].indexOf(O(i))<0;){var n=B(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function Q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function X(t,e,i){return I(t,N(e,i))}function Y(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function U(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}const G={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,r=t.state,l=t.name,c=t.options,h=r.elements.arrow,d=r.modifiersData.popperOffsets,u=$(r.placement),f=Q(u),p=[o,s].indexOf(u)>=0?"height":"width";if(h&&d){var m=function(t,e){return Y("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:U(t,a))}(c.padding,r),g=H(h),_="y"===f?i:o,b="y"===f?n:s,v=r.rects.reference[p]+r.rects.reference[f]-d[f]-r.rects.popper[p],y=d[f]-r.rects.reference[f],w=K(h),A=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0,E=v/2-y/2,C=m[_],T=A-g[p]-m[b],O=A/2-g[p]/2+E,x=X(C,O,T),k=f;r.modifiersData[l]=((e={})[k]=x,e.centerOffset=x-O,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&W(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function J(t){return t.split("-")[1]}var Z={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tt(t){var e,r=t.popper,a=t.popperRect,l=t.placement,h=t.variation,d=t.offsets,u=t.position,f=t.gpuAcceleration,p=t.adaptive,m=t.roundOffsets,g=t.isFixed,_=d.x,b=void 0===_?0:_,v=d.y,y=void 0===v?0:v,w="function"==typeof m?m({x:b,y}):{x:b,y};b=w.x,y=w.y;var A=d.hasOwnProperty("x"),E=d.hasOwnProperty("y"),C=o,T=i,O=window;if(p){var k=K(r),L="clientHeight",S="clientWidth";k===x(r)&&"static"!==B(k=R(r)).position&&"absolute"===u&&(L="scrollHeight",S="scrollWidth"),(l===i||(l===o||l===s)&&h===c)&&(T=n,y-=(g&&k===O&&O.visualViewport?O.visualViewport.height:k[L])-a.height,y*=f?1:-1),l!==o&&(l!==i&&l!==n||h!==c)||(C=s,b-=(g&&k===O&&O.visualViewport?O.visualViewport.width:k[S])-a.width,b*=f?1:-1)}var D,$=Object.assign({position:u},p&&Z),I=!0===m?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:P(i*s)/s||0,y:P(n*s)/s||0}}({x:b,y},x(r)):{x:b,y};return b=I.x,y=I.y,f?Object.assign({},$,((D={})[T]=E?"0":"",D[C]=A?"0":"",D.transform=(O.devicePixelRatio||1)<=1?"translate("+b+"px, "+y+"px)":"translate3d("+b+"px, "+y+"px, 0)",D)):Object.assign({},$,((e={})[T]=E?y+"px":"",e[C]=A?b+"px":"",e.transform="",e))}const et={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:$(e.placement),variation:J(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,tt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,tt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var it={passive:!0};const nt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=x(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",i.update,it)}),a&&l.addEventListener("resize",i.update,it),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",i.update,it)}),a&&l.removeEventListener("resize",i.update,it)}},data:{}};var st={left:"right",right:"left",bottom:"top",top:"bottom"};function ot(t){return t.replace(/left|right|bottom|top/g,function(t){return st[t]})}var rt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,function(t){return rt[t]})}function lt(t){var e=x(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ct(t){return F(R(t)).left+lt(t).scrollLeft}function ht(t){var e=B(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function dt(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:L(t)&&ht(t)?t:dt(q(t))}function ut(t,e){var i;void 0===e&&(e=[]);var n=dt(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=x(n),r=s?[o].concat(o.visualViewport||[],ht(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(ut(q(r)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function pt(t,e,i){return e===d?ft(function(t,e){var i=x(t),n=R(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=j();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+ct(t),y:l}}(t,i)):k(e)?function(t,e){var i=F(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ft(function(t){var e,i=R(t),n=lt(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=I(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=I(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+ct(t),l=-n.scrollTop;return"rtl"===B(s||i).direction&&(a+=I(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(R(t)))}function mt(t){var e,r=t.reference,a=t.element,h=t.placement,d=h?$(h):null,u=h?J(h):null,f=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2;switch(d){case i:e={x:f,y:r.y-a.height};break;case n:e={x:f,y:r.y+r.height};break;case s:e={x:r.x+r.width,y:p};break;case o:e={x:r.x-a.width,y:p};break;default:e={x:r.x,y:r.y}}var m=d?Q(d):null;if(null!=m){var g="y"===m?"height":"width";switch(u){case l:e[m]=e[m]-(r[g]/2-a[g]/2);break;case c:e[m]=e[m]+(r[g]/2-a[g]/2)}}return e}function gt(t,e){void 0===e&&(e={});var o=e,r=o.placement,l=void 0===r?t.placement:r,c=o.strategy,p=void 0===c?t.strategy:c,m=o.boundary,g=void 0===m?h:m,_=o.rootBoundary,b=void 0===_?d:_,v=o.elementContext,y=void 0===v?u:v,w=o.altBoundary,A=void 0!==w&&w,E=o.padding,C=void 0===E?0:E,T=Y("number"!=typeof C?C:U(C,a)),x=y===u?f:u,S=t.rects.popper,D=t.elements[A?x:y],$=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=ut(q(t)),i=["absolute","fixed"].indexOf(B(t).position)>=0&&L(t)?K(t):t;return k(i)?e.filter(function(t){return k(t)&&W(t,i)&&"body"!==O(t)}):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce(function(e,i){var s=pt(t,i,n);return e.top=I(s.top,e.top),e.right=N(s.right,e.right),e.bottom=N(s.bottom,e.bottom),e.left=I(s.left,e.left),e},pt(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(k(D)?D:D.contextElement||R(t.elements.popper),g,b,p),P=F(t.elements.reference),M=mt({reference:P,element:S,strategy:"absolute",placement:l}),j=ft(Object.assign({},S,M)),H=y===u?j:P,z={top:$.top-H.top+T.top,bottom:H.bottom-$.bottom+T.bottom,left:$.left-H.left+T.left,right:H.right-$.right+T.right},V=t.modifiersData.offset;if(y===u&&V){var Q=V[l];Object.keys(z).forEach(function(t){var e=[s,n].indexOf(t)>=0?1:-1,o=[i,n].indexOf(t)>=0?"y":"x";z[t]+=Q[o]*e})}return z}const _t={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,c=t.options,h=t.name;if(!e.modifiersData[h]._skip){for(var d=c.mainAxis,u=void 0===d||d,f=c.altAxis,g=void 0===f||f,_=c.fallbackPlacements,b=c.padding,v=c.boundary,y=c.rootBoundary,w=c.altBoundary,A=c.flipVariations,E=void 0===A||A,C=c.allowedAutoPlacements,T=e.options.placement,O=$(T),x=_||(O!==T&&E?function(t){if($(t)===r)return[];var e=ot(t);return[at(t),e,at(e)]}(T):[ot(T)]),k=[T].concat(x).reduce(function(t,i){return t.concat($(i)===r?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,l=i.flipVariations,c=i.allowedAutoPlacements,h=void 0===c?m:c,d=J(n),u=d?l?p:p.filter(function(t){return J(t)===d}):a,f=u.filter(function(t){return h.indexOf(t)>=0});0===f.length&&(f=u);var g=f.reduce(function(e,i){return e[i]=gt(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[$(i)],e},{});return Object.keys(g).sort(function(t,e){return g[t]-g[e]})}(e,{placement:i,boundary:v,rootBoundary:y,padding:b,flipVariations:E,allowedAutoPlacements:C}):i)},[]),L=e.rects.reference,S=e.rects.popper,D=new Map,I=!0,N=k[0],P=0;P<k.length;P++){var M=k[P],j=$(M),F=J(M)===l,H=[i,n].indexOf(j)>=0,W=H?"width":"height",B=gt(e,{placement:M,boundary:v,rootBoundary:y,altBoundary:w,padding:b}),z=H?F?s:o:F?n:i;L[W]>S[W]&&(z=ot(z));var R=ot(z),q=[];if(u&&q.push(B[j]<=0),g&&q.push(B[z]<=0,B[R]<=0),q.every(function(t){return t})){N=M,I=!1;break}D.set(M,q)}if(I)for(var V=function(t){var e=k.find(function(e){var i=D.get(e);if(i)return i.slice(0,t).every(function(t){return t})});if(e)return N=e,"break"},K=E?3:1;K>0&&"break"!==V(K);K--);e.placement!==N&&(e.modifiersData[h]._skip=!0,e.placement=N,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function vt(t){return[i,s,n,o].some(function(e){return t[e]>=0})}const yt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=gt(e,{elementContext:"reference"}),a=gt(e,{altBoundary:!0}),l=bt(r,n),c=bt(a,s,o),h=vt(l),d=vt(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}},wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,a=n.offset,l=void 0===a?[0,0]:a,c=m.reduce(function(t,n){return t[n]=function(t,e,n){var r=$(t),a=[o,i].indexOf(r)>=0?-1:1,l="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=l[0],h=l[1];return c=c||0,h=(h||0)*a,[o,s].indexOf(r)>=0?{x:h,y:c}:{x:c,y:h}}(n,e.rects,l),t},{}),h=c[e.placement],d=h.x,u=h.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=d,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=c}},At={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=mt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},Et={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,a=t.name,c=r.mainAxis,h=void 0===c||c,d=r.altAxis,u=void 0!==d&&d,f=r.boundary,p=r.rootBoundary,m=r.altBoundary,g=r.padding,_=r.tether,b=void 0===_||_,v=r.tetherOffset,y=void 0===v?0:v,w=gt(e,{boundary:f,rootBoundary:p,padding:g,altBoundary:m}),A=$(e.placement),E=J(e.placement),C=!E,T=Q(A),O="x"===T?"y":"x",x=e.modifiersData.popperOffsets,k=e.rects.reference,L=e.rects.popper,S="function"==typeof y?y(Object.assign({},e.rects,{placement:e.placement})):y,D="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(x){if(h){var j,F="y"===T?i:o,W="y"===T?n:s,B="y"===T?"height":"width",z=x[T],R=z+w[F],q=z-w[W],V=b?-L[B]/2:0,Y=E===l?k[B]:L[B],U=E===l?-L[B]:-k[B],G=e.elements.arrow,Z=b&&G?H(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[F],it=tt[W],nt=X(0,k[B],Z[B]),st=C?k[B]/2-V-nt-et-D.mainAxis:Y-nt-et-D.mainAxis,ot=C?-k[B]/2+V+nt+it+D.mainAxis:U+nt+it+D.mainAxis,rt=e.elements.arrow&&K(e.elements.arrow),at=rt?"y"===T?rt.clientTop||0:rt.clientLeft||0:0,lt=null!=(j=null==P?void 0:P[T])?j:0,ct=z+ot-lt,ht=X(b?N(R,z+st-lt-at):R,z,b?I(q,ct):q);x[T]=ht,M[T]=ht-z}if(u){var dt,ut="x"===T?i:o,ft="x"===T?n:s,pt=x[O],mt="y"===O?"height":"width",_t=pt+w[ut],bt=pt-w[ft],vt=-1!==[i,o].indexOf(A),yt=null!=(dt=null==P?void 0:P[O])?dt:0,wt=vt?_t:pt-k[mt]-L[mt]-yt+D.altAxis,At=vt?pt+k[mt]+L[mt]-yt-D.altAxis:bt,Et=b&&vt?function(t,e,i){var n=X(t,e,i);return n>i?i:n}(wt,pt,At):X(b?wt:_t,pt,b?At:bt);x[O]=Et,M[O]=Et-pt}e.modifiersData[a]=M}},requiresIfExists:["offset"]};function Ct(t,e,i){void 0===i&&(i=!1);var n,s,o=L(e),r=L(e)&&function(t){var e=t.getBoundingClientRect(),i=P(e.width)/t.offsetWidth||1,n=P(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=R(e),l=F(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==O(e)||ht(a))&&(c=(n=e)!==x(n)&&L(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:lt(n)),L(e)?((h=F(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=ct(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function Tt(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}}),n.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||s(t)}),n}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function xt(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function kt(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?Ot:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ot,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:k(t)?ut(t):t.contextElement?ut(t.contextElement):[],popper:ut(e)};var r,c,u=function(t){var e=Tt(t);return T.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}((r=[].concat(n,a.options.modifiers),c=r.reduce(function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return a.orderedModifiers=u.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:h,options:n});l.push(o||function(){})}}),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(xt(e,i)){a.rects={reference:Ct(e,K(i),"fixed"===a.options.strategy),popper:H(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(t){h.forceUpdate(),t(a)})},function(){return r||(r=new Promise(function(t){Promise.resolve().then(function(){r=void 0,t(s())})})),r}),destroy:function(){d(),c=!0}};if(!xt(t,e))return h;function d(){l.forEach(function(t){return t()}),l=[]}return h.setOptions(i).then(function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)}),h}}var Lt=kt(),St=kt({defaultModifiers:[nt,At,et,D,wt,_t,Et,G,yt]}),Dt=kt({defaultModifiers:[nt,At,et,D]});const $t=new Map,It={set(t,e,i){$t.has(t)||$t.set(t,new Map);const n=$t.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>$t.has(t)&&$t.get(t).get(e)||null,remove(t,e){if(!$t.has(t))return;const i=$t.get(t);i.delete(e),0===i.size&&$t.delete(t)}},Nt="transitionend",Pt=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),Mt=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),jt=t=>{t.dispatchEvent(new Event(Nt))},Ft=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),Ht=t=>Ft(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(Pt(t)):null,Wt=t=>{if(!Ft(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},Bt=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),zt=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?zt(t.parentNode):null},Rt=()=>{},qt=t=>{t.offsetHeight},Vt=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Kt=[],Qt=()=>"rtl"===document.documentElement.dir,Xt=t=>{var e;e=()=>{const e=Vt();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(Kt.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of Kt)t()}),Kt.push(e)):e()},Yt=(t,e=[],i=t)=>"function"==typeof t?t.call(...e):i,Ut=(t,e,i=!0)=>{if(!i)return void Yt(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const o=({target:i})=>{i===e&&(s=!0,e.removeEventListener(Nt,o),Yt(t))};e.addEventListener(Nt,o),setTimeout(()=>{s||jt(e)},n)},Gt=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},Jt=/[^.]*(?=\..*)\.|.*/,Zt=/\..*/,te=/::\d+$/,ee={};let ie=1;const ne={mouseenter:"mouseover",mouseleave:"mouseout"},se=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function oe(t,e){return e&&`${e}::${ie++}`||t.uidEvent||ie++}function re(t){const e=oe(t);return t.uidEvent=e,ee[e]=ee[e]||{},ee[e]}function ae(t,e,i=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===i)}function le(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=ue(t);return se.has(o)||(o=t),[n,s,o]}function ce(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=le(e,i,n);if(e in ne){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=re(t),c=l[a]||(l[a]={}),h=ae(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=oe(r,e.replace(Jt,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return pe(s,{delegateTarget:r}),n.oneOff&&fe.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return pe(n,{delegateTarget:t}),i.oneOff&&fe.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function he(t,e,i,n,s){const o=ae(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function de(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&he(t,e,i,r.callable,r.delegationSelector)}function ue(t){return t=t.replace(Zt,""),ne[t]||t}const fe={on(t,e,i,n){ce(t,e,i,n,!1)},one(t,e,i,n){ce(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=le(e,i,n),a=r!==e,l=re(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))de(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(te,"");a&&!e.includes(s)||he(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;he(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=Vt();let s=null,o=!0,r=!0,a=!1;e!==ue(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=pe(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function pe(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function me(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function ge(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const _e={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${ge(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${ge(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=me(t.dataset[n])}return e},getDataAttribute:(t,e)=>me(t.getAttribute(`data-bs-${ge(e)}`))};class be{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=Ft(e)?_e.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...Ft(e)?_e.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,n]of Object.entries(e)){const e=t[i],s=Ft(e)?"element":Mt(e);if(!new RegExp(n).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${s}" but expected type "${n}".`)}}}class ve extends be{constructor(t,e){super(),(t=Ht(t))&&(this._element=t,this._config=this._getConfig(e),It.set(this._element,this.constructor.DATA_KEY,this))}dispose(){It.remove(this._element,this.constructor.DATA_KEY),fe.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){Ut(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return It.get(Ht(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const ye=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map(t=>Pt(t)).join(","):null},we={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(t=>!Bt(t)&&Wt(t))},getSelectorFromElement(t){const e=ye(t);return e&&we.findOne(e)?e:null},getElementFromSelector(t){const e=ye(t);return e?we.findOne(e):null},getMultipleElementsFromSelector(t){const e=ye(t);return e?we.find(e):[]}},Ae=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;fe.on(document,i,`[data-bs-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Bt(this))return;const s=we.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()})},Ee=".bs.alert",Ce=`close${Ee}`,Te=`closed${Ee}`;class Oe extends ve{static get NAME(){return"alert"}close(){if(fe.trigger(this._element,Ce).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),fe.trigger(this._element,Te),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=Oe.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}Ae(Oe,"close"),Xt(Oe);const xe='[data-bs-toggle="button"]';class ke extends ve{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const e=ke.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}fe.on(document,"click.bs.button.data-api",xe,t=>{t.preventDefault();const e=t.target.closest(xe);ke.getOrCreateInstance(e).toggle()}),Xt(ke);const Le=".bs.swipe",Se=`touchstart${Le}`,De=`touchmove${Le}`,$e=`touchend${Le}`,Ie=`pointerdown${Le}`,Ne=`pointerup${Le}`,Pe={endCallback:null,leftCallback:null,rightCallback:null},Me={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class je extends be{constructor(t,e){super(),this._element=t,t&&je.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Pe}static get DefaultType(){return Me}static get NAME(){return"swipe"}dispose(){fe.off(this._element,Le)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Yt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Yt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(fe.on(this._element,Ie,t=>this._start(t)),fe.on(this._element,Ne,t=>this._end(t)),this._element.classList.add("pointer-event")):(fe.on(this._element,Se,t=>this._start(t)),fe.on(this._element,De,t=>this._move(t)),fe.on(this._element,$e,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Fe=".bs.carousel",He=".data-api",We="ArrowLeft",Be="ArrowRight",ze="next",Re="prev",qe="left",Ve="right",Ke=`slide${Fe}`,Qe=`slid${Fe}`,Xe=`keydown${Fe}`,Ye=`mouseenter${Fe}`,Ue=`mouseleave${Fe}`,Ge=`dragstart${Fe}`,Je=`load${Fe}${He}`,Ze=`click${Fe}${He}`,ti="carousel",ei="active",ii=".active",ni=".carousel-item",si=ii+ni,oi={[We]:Ve,[Be]:qe},ri={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ai={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class li extends ve{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=we.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ti&&this.cycle()}static get Default(){return ri}static get DefaultType(){return ai}static get NAME(){return"carousel"}next(){this._slide(ze)}nextWhenVisible(){!document.hidden&&Wt(this._element)&&this.next()}prev(){this._slide(Re)}pause(){this._isSliding&&jt(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?fe.one(this._element,Qe,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void fe.one(this._element,Qe,()=>this.to(t));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?ze:Re;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&fe.on(this._element,Xe,t=>this._keydown(t)),"hover"===this._config.pause&&(fe.on(this._element,Ye,()=>this.pause()),fe.on(this._element,Ue,()=>this._maybeEnableCycle())),this._config.touch&&je.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of we.find(".carousel-item img",this._element))fe.on(t,Ge,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(qe)),rightCallback:()=>this._slide(this._directionToOrder(Ve)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new je(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=oi[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=we.findOne(ii,this._indicatorsElement);e.classList.remove(ei),e.removeAttribute("aria-current");const i=we.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(ei),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===ze,s=e||Gt(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>fe.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(Ke).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),qt(s),i.classList.add(l),s.classList.add(l),this._queueCallback(()=>{s.classList.remove(l,c),s.classList.add(ei),i.classList.remove(ei,c,l),this._isSliding=!1,r(Qe)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return we.findOne(si,this._element)}_getItems(){return we.find(ni,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Qt()?t===qe?Re:ze:t===qe?ze:Re}_orderToDirection(t){return Qt()?t===Re?qe:Ve:t===Re?Ve:qe}static jQueryInterface(t){return this.each(function(){const e=li.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)})}}fe.on(document,Ze,"[data-bs-slide], [data-bs-slide-to]",function(t){const e=we.getElementFromSelector(this);if(!e||!e.classList.contains(ti))return;t.preventDefault();const i=li.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===_e.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),fe.on(window,Je,()=>{const t=we.find('[data-bs-ride="carousel"]');for(const e of t)li.getOrCreateInstance(e)}),Xt(li);const ci=".bs.collapse",hi=`show${ci}`,di=`shown${ci}`,ui=`hide${ci}`,fi=`hidden${ci}`,pi=`click${ci}.data-api`,mi="show",gi="collapse",_i="collapsing",bi=`:scope .${gi} .${gi}`,vi='[data-bs-toggle="collapse"]',yi={parent:null,toggle:!0},wi={parent:"(null|element)",toggle:"boolean"};class Ai extends ve{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=we.find(vi);for(const t of i){const e=we.getSelectorFromElement(t),i=we.find(e).filter(t=>t===this._element);null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return yi}static get DefaultType(){return wi}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(t=>t!==this._element).map(t=>Ai.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(fe.trigger(this._element,hi).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(gi),this._element.classList.add(_i),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(_i),this._element.classList.add(gi,mi),this._element.style[e]="",fe.trigger(this._element,di)},this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(fe.trigger(this._element,ui).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,qt(this._element),this._element.classList.add(_i),this._element.classList.remove(gi,mi);for(const t of this._triggerArray){const e=we.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(_i),this._element.classList.add(gi),fe.trigger(this._element,fi)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(mi)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=Ht(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(vi);for(const e of t){const t=we.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=we.find(bi,this._config.parent);return we.find(t,this._config.parent).filter(t=>!e.includes(t))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const i=Ai.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}})}}fe.on(document,pi,vi,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of we.getMultipleElementsFromSelector(this))Ai.getOrCreateInstance(t,{toggle:!1}).toggle()}),Xt(Ai);const Ei="dropdown",Ci=".bs.dropdown",Ti=".data-api",Oi="ArrowUp",xi="ArrowDown",ki=`hide${Ci}`,Li=`hidden${Ci}`,Si=`show${Ci}`,Di=`shown${Ci}`,$i=`click${Ci}${Ti}`,Ii=`keydown${Ci}${Ti}`,Ni=`keyup${Ci}${Ti}`,Pi="show",Mi='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',ji=`${Mi}.${Pi}`,Fi=".dropdown-menu",Hi=Qt()?"top-end":"top-start",Wi=Qt()?"top-start":"top-end",Bi=Qt()?"bottom-end":"bottom-start",zi=Qt()?"bottom-start":"bottom-end",Ri=Qt()?"left-start":"right-start",qi=Qt()?"right-start":"left-start",Vi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ki={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Qi extends ve{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=we.next(this._element,Fi)[0]||we.prev(this._element,Fi)[0]||we.findOne(Fi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Vi}static get DefaultType(){return Ki}static get NAME(){return Ei}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Bt(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!fe.trigger(this._element,Si,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))fe.on(t,"mouseover",Rt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Pi),this._element.classList.add(Pi),fe.trigger(this._element,Di,t)}}hide(){if(Bt(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!fe.trigger(this._element,ki,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))fe.off(t,"mouseover",Rt);this._popper&&this._popper.destroy(),this._menu.classList.remove(Pi),this._element.classList.remove(Pi),this._element.setAttribute("aria-expanded","false"),_e.removeDataAttribute(this._menu,"popper"),fe.trigger(this._element,Li,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Ft(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ei.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){let t=this._element;"parent"===this._config.reference?t=this._parent:Ft(this._config.reference)?t=Ht(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=St(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Pi)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Ri;if(t.classList.contains("dropstart"))return qi;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Wi:Hi:e?zi:Bi}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(_e.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...Yt(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const i=we.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>Wt(t));i.length&&Gt(i,e,t===xi,!i.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Qi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=we.find(ji);for(const i of e){const e=Qi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[Oi,xi].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(Mi)?this:we.prev(this,Mi)[0]||we.next(this,Mi)[0]||we.findOne(Mi,t.delegateTarget.parentNode),o=Qi.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}fe.on(document,Ii,Mi,Qi.dataApiKeydownHandler),fe.on(document,Ii,Fi,Qi.dataApiKeydownHandler),fe.on(document,$i,Qi.clearMenus),fe.on(document,Ni,Qi.clearMenus),fe.on(document,$i,Mi,function(t){t.preventDefault(),Qi.getOrCreateInstance(this).toggle()}),Xt(Qi);const Xi="backdrop",Yi="show",Ui=`mousedown.bs.${Xi}`,Gi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ji={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Zi extends be{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Gi}static get DefaultType(){return Ji}static get NAME(){return Xi}show(t){if(!this._config.isVisible)return void Yt(t);this._append();const e=this._getElement();this._config.isAnimated&&qt(e),e.classList.add(Yi),this._emulateAnimation(()=>{Yt(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Yi),this._emulateAnimation(()=>{this.dispose(),Yt(t)})):Yt(t)}dispose(){this._isAppended&&(fe.off(this._element,Ui),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=Ht(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),fe.on(t,Ui,()=>{Yt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){Ut(t,this._getElement(),this._config.isAnimated)}}const tn=".bs.focustrap",en=`focusin${tn}`,nn=`keydown.tab${tn}`,sn="backward",on={autofocus:!0,trapElement:null},rn={autofocus:"boolean",trapElement:"element"};class an extends be{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return on}static get DefaultType(){return rn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),fe.off(document,tn),fe.on(document,en,t=>this._handleFocusin(t)),fe.on(document,nn,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,fe.off(document,tn))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=we.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===sn?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?sn:"forward")}}const ln=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",cn=".sticky-top",hn="padding-right",dn="margin-right";class un{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,hn,e=>e+t),this._setElementAttributes(ln,hn,e=>e+t),this._setElementAttributes(cn,dn,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,hn),this._resetElementAttributes(ln,hn),this._resetElementAttributes(cn,dn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)})}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&_e.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=_e.getDataAttribute(t,e);null!==i?(_e.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(Ft(t))e(t);else for(const i of we.find(t,this._element))e(i)}}const fn=".bs.modal",pn=`hide${fn}`,mn=`hidePrevented${fn}`,gn=`hidden${fn}`,_n=`show${fn}`,bn=`shown${fn}`,vn=`resize${fn}`,yn=`click.dismiss${fn}`,wn=`mousedown.dismiss${fn}`,An=`keydown.dismiss${fn}`,En=`click${fn}.data-api`,Cn="modal-open",Tn="show",On="modal-static",xn={backdrop:!0,focus:!0,keyboard:!0},kn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ln extends ve{constructor(t,e){super(t,e),this._dialog=we.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new un,this._addEventListeners()}static get Default(){return xn}static get DefaultType(){return kn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||fe.trigger(this._element,_n,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Cn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(fe.trigger(this._element,pn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Tn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){fe.off(window,fn),fe.off(this._dialog,fn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Zi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new an({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=we.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),qt(this._element),this._element.classList.add(Tn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,fe.trigger(this._element,bn,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){fe.on(this._element,An,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),fe.on(window,vn,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),fe.on(this._element,wn,t=>{fe.one(this._element,yn,e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Cn),this._resetAdjustments(),this._scrollBar.reset(),fe.trigger(this._element,gn)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(fe.trigger(this._element,mn).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(On)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(On),this._queueCallback(()=>{this._element.classList.remove(On),this._queueCallback(()=>{this._element.style.overflowY=e},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=Qt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=Qt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const i=Ln.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}})}}fe.on(document,En,'[data-bs-toggle="modal"]',function(t){const e=we.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),fe.one(e,_n,t=>{t.defaultPrevented||fe.one(e,gn,()=>{Wt(this)&&this.focus()})});const i=we.findOne(".modal.show");i&&Ln.getInstance(i).hide(),Ln.getOrCreateInstance(e).toggle(this)}),Ae(Ln),Xt(Ln);const Sn=".bs.offcanvas",Dn=".data-api",$n=`load${Sn}${Dn}`,In="show",Nn="showing",Pn="hiding",Mn=".offcanvas.show",jn=`show${Sn}`,Fn=`shown${Sn}`,Hn=`hide${Sn}`,Wn=`hidePrevented${Sn}`,Bn=`hidden${Sn}`,zn=`resize${Sn}`,Rn=`click${Sn}${Dn}`,qn=`keydown.dismiss${Sn}`,Vn={backdrop:!0,keyboard:!0,scroll:!1},Kn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Qn extends ve{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Vn}static get DefaultType(){return Kn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||fe.trigger(this._element,jn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new un).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Nn),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(In),this._element.classList.remove(Nn),fe.trigger(this._element,Fn,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(fe.trigger(this._element,Hn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Pn),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(In,Pn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new un).reset(),fe.trigger(this._element,Bn)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Zi({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():fe.trigger(this._element,Wn)}:null})}_initializeFocusTrap(){return new an({trapElement:this._element})}_addEventListeners(){fe.on(this._element,qn,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():fe.trigger(this._element,Wn))})}static jQueryInterface(t){return this.each(function(){const e=Qn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}fe.on(document,Rn,'[data-bs-toggle="offcanvas"]',function(t){const e=we.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this))return;fe.one(e,Bn,()=>{Wt(this)&&this.focus()});const i=we.findOne(Mn);i&&i!==e&&Qn.getInstance(i).hide(),Qn.getOrCreateInstance(e).toggle(this)}),fe.on(window,$n,()=>{for(const t of we.find(Mn))Qn.getOrCreateInstance(t).show()}),fe.on(window,zn,()=>{for(const t of we.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Qn.getOrCreateInstance(t).hide()}),Ae(Qn),Xt(Qn);const Xn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Yn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Un=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Gn=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Yn.has(i)||Boolean(Un.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(i))},Jn={allowList:Xn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Zn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},ts={entry:"(string|element|function|null)",selector:"(string|element)"};class es extends be{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Jn}static get DefaultType(){return Zn}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},ts)}_setContent(t,e,i){const n=we.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?Ft(e)?this._putElementInTemplate(Ht(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Gn(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Yt(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const is=new Set(["sanitize","allowList","sanitizeFn"]),ns="fade",ss="show",os=".tooltip-inner",rs=".modal",as="hide.bs.modal",ls="hover",cs="focus",hs="click",ds={AUTO:"auto",TOP:"top",RIGHT:Qt()?"left":"right",BOTTOM:"bottom",LEFT:Qt()?"right":"left"},us={allowList:Xn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},fs={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class ps extends ve{constructor(t,e){super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return us}static get DefaultType(){return fs}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),fe.off(this._element.closest(rs),as,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=fe.trigger(this._element,this.constructor.eventName("show")),e=(zt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),fe.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(ss),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))fe.on(t,"mouseover",Rt);this._queueCallback(()=>{fe.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!fe.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(ss),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))fe.off(t,"mouseover",Rt);this._activeTrigger[hs]=!1,this._activeTrigger[cs]=!1,this._activeTrigger[ls]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),fe.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(ns,ss),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(ns),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new es({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[os]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ns)}_isShown(){return this.tip&&this.tip.classList.contains(ss)}_createPopper(t){const e=Yt(this._config.placement,[this,t,this._element]),i=ds[e.toUpperCase()];return St(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return Yt(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...Yt(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)fe.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[hs]=!(e._isShown()&&e._activeTrigger[hs]),e.toggle()});else if("manual"!==e){const t=e===ls?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===ls?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");fe.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?cs:ls]=!0,e._enter()}),fe.on(this._element,i,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?cs:ls]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},fe.on(this._element.closest(rs),as,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=_e.getDataAttributes(this._element);for(const t of Object.keys(e))is.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:Ht(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=ps.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Xt(ps);const ms=".popover-header",gs=".popover-body",_s={...ps.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},bs={...ps.DefaultType,content:"(null|string|element|function)"};class vs extends ps{static get Default(){return _s}static get DefaultType(){return bs}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ms]:this._getTitle(),[gs]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=vs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Xt(vs);const ys=".bs.scrollspy",ws=`activate${ys}`,As=`click${ys}`,Es=`load${ys}.data-api`,Cs="active",Ts="[href]",Os=".nav-link",xs=`${Os}, .nav-item > ${Os}, .list-group-item`,ks={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ls={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Ss extends ve{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return ks}static get DefaultType(){return Ls}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Ht(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(t=>Number.parseFloat(t))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(fe.off(this._config.target,As),fe.on(this._config.target,As,Ts,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=we.find(Ts,this._config.target);for(const e of t){if(!e.hash||Bt(e))continue;const t=we.findOne(decodeURI(e.hash),this._element);Wt(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Cs),this._activateParents(t),fe.trigger(this._element,ws,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))we.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Cs);else for(const e of we.parents(t,".nav, .list-group"))for(const t of we.prev(e,xs))t.classList.add(Cs)}_clearActiveClass(t){t.classList.remove(Cs);const e=we.find(`${Ts}.${Cs}`,t);for(const t of e)t.classList.remove(Cs)}static jQueryInterface(t){return this.each(function(){const e=Ss.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}fe.on(window,Es,()=>{for(const t of we.find('[data-bs-spy="scroll"]'))Ss.getOrCreateInstance(t)}),Xt(Ss);const Ds=".bs.tab",$s=`hide${Ds}`,Is=`hidden${Ds}`,Ns=`show${Ds}`,Ps=`shown${Ds}`,Ms=`click${Ds}`,js=`keydown${Ds}`,Fs=`load${Ds}`,Hs="ArrowLeft",Ws="ArrowRight",Bs="ArrowUp",zs="ArrowDown",Rs="Home",qs="End",Vs="active",Ks="fade",Qs="show",Xs=".dropdown-toggle",Ys=`:not(${Xs})`,Us='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Gs=`.nav-link${Ys}, .list-group-item${Ys}, [role="tab"]${Ys}, ${Us}`,Js=`.${Vs}[data-bs-toggle="tab"], .${Vs}[data-bs-toggle="pill"], .${Vs}[data-bs-toggle="list"]`;class Zs extends ve{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),fe.on(this._element,js,t=>this._keydown(t)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?fe.trigger(e,$s,{relatedTarget:t}):null;fe.trigger(t,Ns,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Vs),this._activate(we.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),fe.trigger(t,Ps,{relatedTarget:e})):t.classList.add(Qs)},t,t.classList.contains(Ks)))}_deactivate(t,e){t&&(t.classList.remove(Vs),t.blur(),this._deactivate(we.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),fe.trigger(t,Is,{relatedTarget:e})):t.classList.remove(Qs)},t,t.classList.contains(Ks)))}_keydown(t){if(![Hs,Ws,Bs,zs,Rs,qs].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!Bt(t));let i;if([Rs,qs].includes(t.key))i=e[t.key===Rs?0:e.length-1];else{const n=[Ws,zs].includes(t.key);i=Gt(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),Zs.getOrCreateInstance(i).show())}_getChildren(){return we.find(Gs,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=we.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=we.findOne(t,i);s&&s.classList.toggle(n,e)};n(Xs,Vs),n(".dropdown-menu",Qs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Vs)}_getInnerElement(t){return t.matches(Gs)?t:we.findOne(Gs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=Zs.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}fe.on(document,Ms,Us,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Bt(this)||Zs.getOrCreateInstance(this).show()}),fe.on(window,Fs,()=>{for(const t of we.find(Js))Zs.getOrCreateInstance(t)}),Xt(Zs);const to=".bs.toast",eo=`mouseover${to}`,io=`mouseout${to}`,no=`focusin${to}`,so=`focusout${to}`,oo=`hide${to}`,ro=`hidden${to}`,ao=`show${to}`,lo=`shown${to}`,co="hide",ho="show",uo="showing",fo={animation:"boolean",autohide:"boolean",delay:"number"},po={animation:!0,autohide:!0,delay:5e3};class mo extends ve{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return po}static get DefaultType(){return fo}static get NAME(){return"toast"}show(){fe.trigger(this._element,ao).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(co),qt(this._element),this._element.classList.add(ho,uo),this._queueCallback(()=>{this._element.classList.remove(uo),fe.trigger(this._element,lo),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(fe.trigger(this._element,oo).defaultPrevented||(this._element.classList.add(uo),this._queueCallback(()=>{this._element.classList.add(co),this._element.classList.remove(uo,ho),fe.trigger(this._element,ro)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ho),super.dispose()}isShown(){return this._element.classList.contains(ho)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){fe.on(this._element,eo,t=>this._onInteraction(t,!0)),fe.on(this._element,io,t=>this._onInteraction(t,!1)),fe.on(this._element,no,t=>this._onInteraction(t,!0)),fe.on(this._element,so,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=mo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}})}}Ae(mo),Xt(mo),document.querySelectorAll('[data-bs-toggle="popover"]').forEach(t=>{new vs(t)})})();
|
package/package.json
CHANGED
package/readme.txt
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
从bootstrap的示例中拷贝
|
|
2
2
|
https://github.com/twbs/examples/tree/main/webpack
|
|
3
3
|
|
|
4
|
+
--------------
|
|
5
|
+
webpack 负责定制bootstrap的样式
|
|
4
6
|
|
|
7
|
+
npm install -g terser
|
|
8
|
+
terser 负责压缩js
|
|
9
|
+
terser --help
|
|
10
|
+
示例:
|
|
11
|
+
terser src/js/js.js -o dist/js/js.min.js
|
|
12
|
+
terser src/js/product.js -o dist/js/product.min.js
|
|
5
13
|
|
|
6
14
|
-----------
|
|
7
15
|
// load any GitHub release, commit, or branch
|