1const commonModalIconClassMap={error:"icomoon-icon_failed",success:"icomoon-icon_success"};function showCommonModal({type:t="error",containerClass:e="",iconClass:i,title:n="",content:s="",confirmText:o="",confirmClass:a="",cancelText:c="",cancelClass:d="",zIndex:r=2e3,defaultProgress:l=0,progressStep:g=10,autoProgress:p=!0,maxAutoProgress:m=98,gaShow:v="",onConfirm:u,onClose:h}={}){let _=null,f=l;const w=i||commonModalIconClassMap[t];let y=null,L=null,x=new Promise(((i,l)=>{L=i;y=$(`\n <div class="common-modal is-type-${t} ${e}" style="z-index:${r}">\n <div class="common-modal__content">\n ${w?`<i class="common-modal__icon ${w}"></i>`:""}\n ${n?`<h5 class="common-modal__title">${n}</h5>`:""}\n ${s?`<p class="common-modal__desc">${s}</p>`:""}\n ${"progress"===t?'<div class="common-modal__progress"><div class="common-modal__progress__bar"></div></div>':""}\n <div class="common-modal__btns-wrapper" style="display: ${o?"flex":"none"}">\n ${c?`<button class="common-modal__btn-cancel common-btn-v2 ${d}">${c}</button>`:""}\n ${o?`<button class="common-modal__btn-comfirm common-btn-v2 ${a}">${o}</button>`:""}\n </div>\n <button class="common-modal__btn-close common-btn-v2 is-shape-square is-transparent">\n <i class="icomoon-icon_close"></i>\n </button>\n </div>\n <div class="common-model__mask"></div>\n </div>\n `),y.on("click",".common-modal__btn-close",(function(){b(),h&&h({from:"btn-close"}),i({close:!0,from:"btn-close"})})),y.on("click",".common-modal__btn-comfirm",(function(){b(),u&&u(),i({comfirm:!0,close:!1})})),y.on("click",".common-modal__btn-cancel",(function(){b(),h&&h({from:"btn-cancel"}),i({close:!0,from:"btn-cancel"})})),y.appendTo(document.body),v&>ag("event",v)}));function b(){I(),y?.remove(),y=null,x=null}function k(t){t=Number(t)||0,f=t,y?.[0]?.style.setProperty("--progress",`${t}%`)}function J(){_=setInterval((()=>{console.log("autoProgressTimer interval"),g=Math.floor(10*Math.random())+10;let t=f+g;t>m&&(t=m),k(t)}),1e3)}function I(){clearInterval(_),_=null}return"progress"===t&&k(l),"progress"===t&&p&&J(),{promise:x,close:async function({progress:e=100}={}){"progress"===t&&e&&(I(),k(e),await new Promise((t=>{setTimeout(t,300)}))),b(),h&&h({from:"manually-close"}),L({close:!0,from:"manually-close"})},getModalEL:function(){return y?.[0]},getProgress:function(){return progress},setProgress:k,startAutoProgress:J,endAutoProgress:I}}let userInfo=getUserInfo();var base_url$1=(()=>{const t=location.host;return t.startsWith("release-")?"https://main-api-release.vidwud.com/":t.startsWith("test-")?"https://main-api-test.vidwud.com/":"www.vidwud.com"===t||"share.vidwud.com"===t?"https://main-api.vidwud.com/":"https://main-api-test.vidwud.com/"})(),tool_url=(()=>{const t=location.host;return t.startsWith("release-")?"https://tool-api-release.vidwud.com/":t.startsWith("test-")?"https://tool-api-test.vidwud.com/":"www.vidwud.com"===t||"share.vidwud.com"===t?"https://tool-api.vidwud.com/":"https://tool-api-test.vidwud.com/"})();const getHeaders=function(){const t={"Content-Type":"application/json","Request-App":"vidwud","Request-Origin":"vidwud","X-TASK-VERSION":location.host.startsWith("release-")?"100.0.0":"2.0.0","Request-Language":"en","X-Device-Id":getDeviceId()};return t.Authorization="Bearer "+getCookie("access_token"),t},createGetRequest=function(t){const{url:e,data:i,headers:n={},cancel:s=()=>{},BASE_URL:o=base_url$1}=t,a=new URLSearchParams(i),c=new AbortController,{signal:d}=c;return s(c),fetch(o+e+(i?`?${a.toString()}`:""),{method:"GET",credentials:"include",headers:{...getHeaders(),...n},signal:d}).then((t=>t.json())).catch((t=>t instanceof TypeError?Promise.reject({...t,type:"network_error"}):Promise.reject(t)))},createPostRequest=function(t){const{url:e,data:i,headers:n={},cancel:s=()=>{},BASE_URL:o=base_url$1}=t,a=new AbortController,{signal:c}=a;return s(a),fetch(o+e,{method:"POST",credentials:"include",headers:{...getHeaders(),...n},signal:c,body:JSON.stringify(i)}).then((t=>t.json())).catch((t=>t instanceof TypeError?Promise.reject({...t,type:"network_error"}):Promise.reject(t)))},createPutRequest=function(t){const{url:e,data:i,cancel:n=()=>{}}=t,s=new AbortController,{signal:o}=s;return n(s),fetch(e,{method:"PUT",signal:o,body:i})},createFormDataPostRequest=function(t){const{url:e,data:i,headers:n={},cancel:s=()=>{},BASE_URL:o=base_url$1}=t,a=new AbortController,{signal:c}=a;s(a);const d={...getHeaders(),...n};delete d["Content-Type"];const r=new FormData;for(const t in i)r.append(t,i[t]);return fetch(o+e,{method:"POST",headers:d,credentials:"include",signal:c,body:r}).then((t=>t.json())).catch((t=>t instanceof TypeError?Promise.reject({...t,type:"network_error"}):Promise.reject(t)))},beforeAnythingOnce=once((async()=>{console.log("beforeAnythingOnce");try{await getAppConfig(),await fetchUserInfo()}catch(t){}}));async function fetchUserInfo(){try{const t=await createGetRequest
1({url:"api/user/info"});return console.log(t),200!==t.code?(setUserInfo({}),{}):(setUserInfo(t.data),t.data)}catch(t){}}async function getAppConfig(t="storage"){const e=await createPostRequest({url:"apps/setting/app-config"});if("storage"===t){const t=e.data||{};localStorage.setItem("appConfig",JSON.stringify(t))}else if("getRes"===t)return e}function setUserInfo(t={}){try{localStorage.setItem("userInfo",JSON.stringify(t||{})),localStorage.setItem("user_info",JSON.stringify(t||{})),userInfo=t,t.id?$("body").addClass("app-logged").removeClass("app-not-logged"):$("body").addClass("app-not-logged").removeClass("app-logged")}catch(t){}}function getUserInfo(){try{return userInfo?.id?userInfo:JSON.parse(localStorage.getItem("userInfo"))||{}}catch(t){return{}}}function isLogin(){return!!getUserInfo().id}async function signOut({isReload:t=!0}={}){try{await createPostRequest({url:"api/user/sign-out"}),sessionStorage.clear(),clearCookie("access_token"),clearCookie("refresh_token"),setUserInfo({}),t&&window.location.reload(),window.dispatchEvent(new CustomEvent("signoutsuccess"))}catch(t){}}function getEnvByDomain(){const t=location.host;return t.startsWith("release-")?"release":t.startsWith("test-")?"test":"www.vidwud.com"===t?"prod":"test"}function setCookie$1(t,e,i){const n=new Date,s=location.hostname.includes(".vidwud.com")?".vidwud.com":location.hostname;n.setDate(n.getDate()+i),document.cookie=t+"="+encodeURIComponent(e)+(null==i?"":";expires="+n.toGMTString())+";path=/;domain="+s}function getCookie(t){const e=document.cookie.split(";");for(const i of e){const[e,n]=i.trim().split("=");if(e===t)return decodeURIComponent(n)}return""}function clearCookie(t){setCookie$1(t,"",-1)}function add(t,e){return t+e}function throttle(t,e){let i,n=0;const s=function(...s){const o=this,a=Date.now(),c=e-(a-n);c<=0?(n=a,t.apply(o,s)):i||(i=setTimeout((()=>{n=Date.now(),t.apply(o,s),i=null}),c))};return s.cancel=function(){i&&(clearTimeout(i),i=null),n=0},s}function once(t){let e,i=!1;return function(...n){return i||(i=!0,e=t.apply(this,n)),e}}function inputError(t){const{containerDom:e=document.body,inputDom:i=null,errorText:n="",zIndex:s=0,maxWidth:o=!1,leftOffset:a=0}=t;if(!i)return;i.classList.add("error");let c=i.getBoundingClientRect(),d=e.getBoundingClientRect(),r=document.createElement("p");r.className="input-error-box",r.style=`\n position: fixed;\n opacity: 0;\n left:${c.left-d.left-a}px;\n z-index:${s};\n max-width: ${o?i.offsetWidth+"px":"unset"}\n `,r.innerText=n,$(e).append(r);let l=r.getBoundingClientRect();return r.style.top=c.top-l.height-9-d.top+"px",r.style.opacity="1",$(window).on("resize scroll",(t=>{c=i.getBoundingClientRect(),d=e.getBoundingClientRect(),l=r.getBoundingClientRect(),r.style=`\n position: fixed;\n opacity: 1;\n left:${c.left-d.left-a}px;\n z-index:${s};\n max-width: ${o?i.offsetWidth+"px":"unset"};\n top: ${c.top-l.height-9-d.top}px;\n `})),()=>{i.classList.remove("error"),r.remove()}}function getUrlParam(t){const e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),i=window.location.search.substr(1).match(e);return null!=i?encodeURI(i[2]):null}function showLoginDialog(t){const{isReload:e=!0,successFun:i=()=>{},zIndex:n="1001",website:s=""}=t;setTimeout((()=>{$("body").append(`<signin-component zIndex="${n}" website="${s}" style="position: fixed;z-index: ${n};"></signin-component>`),$("signin-component").off("loginsuccess").on("loginsuccess",(()=>{window.dispatchEvent(new CustomEvent("loginsuccessevent")),e&&window.location.reload(),i()}))}),10)}function showLoginDialogBind(t){const{isReload:e=!0,successFun:i=()=>{},zIndex:n="1001",website:s=""}=t;showLoginDialog({isReload:!1,successFun:async()=>{const t=await createPostRequest({url:"apps/generate/binding"});200!==t.code&&console.error(t),e&&window.location.reload(),i()}})}async function showLoginDialogIfNeeded(t){try{await fetchUserInfo(),isLogin()||showLoginDialog(t)}catch(t){}}const onCheckEmail=t=>
1new RegExp("^\\w[-\\w.+]*@([A-Za-z0-9][-A-Za-z0-9]*\\.)+[A-Za-z]{2,14}$").test(t);function onCheckPassword(t){if(!t||0===t.trim().length)return!1;const e=t.length>=8&&t.length<=20,i=/[A-Z]/.test(t),n=/[a-z]/.test(t),s=/\d/.test(t),o=/[^A-Za-z0-9]/.test(t);return e&&i&&n&&s&&o}function debounce(t,e){let i;const n=function(...n){const s=this;clearTimeout(i),i=setTimeout((()=>{t.apply(s,n)}),e)};return n.cancel=function(){clearTimeout(i),i=null},n}function getStorage(t){const e=localStorage.getItem(t);let i=null;return i=e&&"null"!==e&&null!==e?"number"==typeof e||"textareaVal"===t||"token"===t?e:JSON.parse(e):null,i}function setStorage(t,e){"number"==typeof e||"string"==typeof e?localStorage.setItem(t,e):localStorage.setItem(t,JSON.stringify(e))}function copyTextToClipboard(t,{target:e=document.body}={}){if("string"!=typeof t)return!1;const i=document.createElement("textarea"),n=document.activeElement;i.value=t,i.setAttribute("readonly",""),i.style.contain="strict",i.style.position="absolute",i.style.left="-9999px",i.style.fontSize="12pt";const s=document.getSelection(),o=s.rangeCount>0&&s.getRangeAt(0);e.append(i),i.select(),i.selectionStart=0,i.selectionEnd=t.length;let a=!1;try{a=document.execCommand("copy")}catch{}return i.remove(),o&&(s.removeAllRanges(),s.addRange(o)),n&&n.focus(),a}function utcToLocal(t,e="YYYY/MM/DD HH:mm"){return moment.locale(getNowMomentLang("en")),moment.utc(t).local().format(e)}function getNowMomentLang(t){let e=t;switch(t){case"kr":e="ko";break;case"tw":e="zh-tw";break;case"jp":e="ja";break;default:e=t}return e}function isMobile(){const t=navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)}const currentLang="en",currentDomainObj={"https://main-api-test.vidwud.com/":{en:"https://app-test-ce67766fef.vidwud.com",ar:"https://app-test-ar-ce67766fef.vidwud.com",de:"https://app-test-de-ce67766fef.vidwud.com",es:"https://app-test-es-ce67766fef.vidwud.com",fr:"https://app-test-fr-ce67766fef.vidwud.com",it:"https://app-test-it-ce67766fef.vidwud.com",jp:"https://app-test-jp-ce67766fef.vidwud.com",kr:"https://app-test-kr-ce67766fef.vidwud.com",pt:"https://app-test-pt-ce67766fef.vidwud.com",tw:"https://app-test-tw-ce67766fef.vidwud.com"},"https://main-api-release.vidwud.com/":{en:"https://app-release-ce67766fef.vidwud.com",ar:"https://app-release-ar-ce67766fef.vidwud.com",de:"https://app-release-de-ce67766fef.vidwud.com",es:"https://app-release-es-ce67766fef.vidwud.com",fr:"https://app-release-fr-ce67766fef.vidwud.com",it:"https://app-release-it-ce67766fef.vidwud.com",jp:"https://app-release-jp-ce67766fef.vidwud.com",kr:"https://app-release-kr-ce67766fef.vidwud.com",pt:"https://app-release-pt-ce67766fef.vidwud.com",tw:"https://app-release-tw-ce67766fef.vidwud.com"},"https://main-api.vidwud.com/":{en:"https://app.vidwud.com",ar:"https://app-ar.vidwud.com",de:"https://app-de.vidwud.com",es:"https://app-es.vidwud.com",fr:"https://app-fr.vidwud.com",it:"https://app-it.vidwud.com",jp:"https://app-jp.vidwud.com",kr:"https://app-kr.vidwud.com",pt:"https://app-pt.vidwud.com",tw:"https://app-tw.vidwud.com"}},currentApiDomain=Object.prototype.hasOwnProperty.call(currentDomainObj,base_url$1)?base_url$1:"main-api.vidwud.com",currentWebDomain=currentDomainObj[currentApiDomain].en;function isSafari(){const t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("safari")&&-1===t.indexOf("chrome")}const ViwudUrlObj={en:`${currentWebDomain}`};function getDeviceId(){const t="xDeviceId";let e=getCookie(t);return e||(e=generateUUID(),setCookie$1(t,e,7)),e}function generateUUID(){return crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=15&(crypto.getRandomValues?crypto.getRandomValues(new Uint8Array(1))[0]:16*Math.random());return("x"===t?e:3&e|8).toString(16)}))}function getPageSize({rows:t=8,itemWidth:e=318,minCols:i=5}={}){const n=document.documentElement.clientWidth,s=Math.floor(n/e);return Math.max(i,s)*t}class CreditPopup{constructor(t={}){this.creditParam=t,!this.creditParam?.showLan&&(this.creditParam.showLan=["ar","de","es","fr","it","jp","kr","pt","tw","en"]),this.insertCreditPopHtml(),this.clickBtn=()=>{},this.closeBtn=()=>{},this.bindEvent()}bindEvent(){const t=this;this.container.find(".pop-btn").on("click",(()=>{this.clickBtn(),this.closePopup(),window.open(jsonData.commonHeader.linkPricing)}
1)),this.container.find(".item-more-btn").on("click",(()=>{this.clickBtn(),this.closePopup(),window.open(jsonData.commonHeader.linkPricing)})),this.container.find(".close-icon").on("click",(()=>{this.closeBtn(),this.closePopup()})),isMobileDevice()?this.container.find(".unlock-pro-models .pop-models-item").on("click",(function(){t.container.find(".unlock-pro-models .pop-models-item .item-btn-act").removeClass("item-btn-act");const e=$(this).find(".item-btn").attr("model-id");if(e.includes("kling"))return void t.clickBtn(e);$(this).find(".item-btn").addClass("item-btn-act");const i=$("#ai-generation-page .generation-history");$("#ai-generation-page .generation-control").show(),$(".seo-container,#footer").show(),i.css({transform:"translateX(100vw)"}),setTimeout((()=>{t.clickBtn(e),t.closePopup()}),300)})):this.container.find(".unlock-pro-models .item-btn").on("click",(function(e){const i=$(this).attr("model-id");t.clickBtn(i),t.closePopup()}))}showProModels({clickBtn:t=()=>{},closeBtn:e=()=>{}}){this.showPopup(),this.container.find(".unlock-pro-models").show(),this.clickBtn=t,this.closeBtn=e}showPremiumFeatures({clickBtn:t=()=>{},closeBtn:e=()=>{},title:i,content:n}){this.showPopup(),this.container.find(".premium-features").show(),this.clickBtn=t,this.closeBtn=e,this.getLangJson("Pro_Model"),this.getLangJson("Upgrade_Premium_Features"),this.container.find(".premium-features .pop-tip").html(i||this.getLangJson("Pro_Model")),this.container.find(".premium-features .pop-title").html(n||this.getLangJson("Upgrade_Premium_Features"))}showNotEnoughCredits({needCredit:t,haveCredit:e,clickBtn:i=()=>{},closeBtn:n=()=>{}}){this.container.find(".not-enough-credits .pop-content .pop-text").html(this.getLangJson("You_Have_credits",{val:t,val2:e})),this.showPopup(),this.container.find(".not-enough-credits").show(),this.clickBtn=i,this.closeBtn=n}showFreeLimitReached({clickBtn:t=()=>{},closeBtn:e=()=>{}}){this.showPopup(),this.container.find(".free-limit-reached").show(),this.clickBtn=t,this.closeBtn=e}showStorageLimitReached({clickBtn:t=()=>{},closeBtn:e=()=>{}}){this.showPopup(),this.container.find(".storage-limit-reached").show(),this.clickBtn=t,this.closeBtn=e}
1showHighDefinition({clickBtn:t=()=>{},closeBtn:e=()=>{}}){this.showPopup(),this.container.find(".activate_high_definition").show(),this.clickBtn=t,this.closeBtn=e}showExportFLAC({clickBtn:t=()=>{},closeBtn:e=()=>{}}){this.showPopup(),this.container.find(".Upgrade_Export_FLAC").show(),this.clickBtn=t,this.closeBtn=e}showPopup(){this.hideAllPopup(),this.container.fadeIn()}closePopup(){return new Promise(((t,e)=>{this.container.fadeOut().promise().done((function(){t()}))}))}hideAllPopup(){$(".not-enough-credits").hide(),$(".unlock-pro-models").hide(),$(".premium-features").hide(),$(".free-limit-reached").hide(),$(".storage-limit-reached").hide(),$(".activate_high_definition").hide(),$(".Upgrade_Export_FLAC").hide()}toolListHtml(){const t=this.creditParam.toolName;if(!t)return"";const e=this.creditParam.showLan;let i="";return["ar","de","es","fr","it","jp","kr","pt","tw","en"].forEach((t=>{e.includes(t)||(i+="multi-language-"+t)})),`\n <div class="feature-item ${i}">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${t}</div>\n </div>\n `}insertCreditPopHtml(){const t=`<div class="videos-credit-popups" style="display: none;">\n <div class="not-enough-credits">\n <i class="close-icon icomoon-icon_close"></i>\n <div class="pop-title">${this.getLangJson("Not_Enough_Credits")}</div>\n <div class="pop-description">${this.getLangJson("You_need_more_credits")}</div>\n <div class="pop-content">\n <img class="pop-icon" src="/dist/img/videos/credit-popup/icon_failed.svg" alt="">\n <div class="pop-text">${this.getLangJson("You_Have_credits")}</div>\n </div>\n <div class="pop-btn">${this.getLangJson("Get_More_Credits")}</div>\n </div>\n <div class="unlock-pro-models">\n <i class="close-icon icomoon-icon_close"></i>\n <div class="pop-pc-container">\n <div class="pop-header">\n <img class="pop-icon" src="/dist/img/videos/credit-popup/icon_Model.png" alt="">\n <div class="pop-header-content">\n <div class="pop-tip">${this.getLangJson("Ready_to_Go")}</div>\n <div class="pop-title">${this.getLangJson("Unlock_Pro_Models")}</div>\n </div>\n </div>\n <div class="pop-models-list">\n <div class="pop-models-scroll">\n <div class="pop-models-item first-item">\n <div class="models-info">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_vidwud_basic.png" alt="">\n <div class="item-content">\n <div class="item-text">\n <div class="item-name">\n ${this.getLangJson("Vidwud_Basic")}\n </div>\n <div class="item-tag white-tag">\n <img class="tag-bg-img" src="/dist/img/videos/credit-popup/basic_bg.png" alt="">\n ${this.getLangJson("Standard_Quality")}\n </div>\n </div>\n <div class="item-tip">${this.getLangJson("model_description1")}</div>\n </div>\n </div>\n <div class="item-btn" model-id="vidnoz">\n ${this.getLangJson("Generate_Now")}\n </div>\n </div>\n <div class="pop-models-item">\n <div class="models-info">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_vidwud_lite.png" alt="">\n <div class="item-content">\n <div class="item-text">\n <div class="item-name">\n ${this.getLangJson("Vidwud_Lite")}\n </div>\n <div class="item-tag">\n <img class="tag-bg-img" src="/dist/img/videos/credit-popup/lite_bg.png" alt="">\n ${this.getLangJson("Enhanced_Quality")}\n </div>\n </div>\n <div class="item-tip">${this.getLangJson("model_description2")}</div>\n </div>\n </div>\n <div class="item-btn" model-id="wan2_1">\n ${this.getLangJson("Switch_Now")}\n </div>\n </div>\n <div class="pop-models-item">\n <div class="models-info">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_vidwud_plus.png" alt="">\n <div class="item-content">\n <div class="item-text">\n <div class="item-name">\n ${this.getLangJson("Vidwud_Plus")}
1\n </div>\n <div class="item-tag">\n <img class="tag-bg-img" src="/dist/img/videos/credit-popup/plus_bg.png" alt="">\n ${this.getLangJson("Premium_Quality")}\n </div>\n </div>\n <div class="item-tip">${this.getLangJson("model_description3")}</div>\n </div>\n </div>\n <div class="item-btn" model-id="kling-v1">\n ${this.getLangJson("Unlock_Now")}\n </div>\n </div>\n <div class="pop-models-item">\n <div class="models-info">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_vidwud_ultimate.png" alt="">\n <div class="item-content">\n <div class="item-text">\n <div class="item-name">\n ${this.getLangJson("Vidwud_Ultimate")}\n </div>\n <div class="item-tag">\n <img class="tag-bg-img" src="/dist/img/videos/credit-popup/ultimate_bg.png" alt="">\n ${this.getLangJson("Ultimate_Quality")}\n </div>\n </div>\n <div class="item-tip">${this.getLangJson("model_description4")}</div>\n </div>\n </div>\n <div class="item-btn" model-id="kling-v1-6">\n ${this.getLangJson("Unlock_Now")}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="pop-mobile-container">\n <div class="pop-header">\n <img class="pop-icon" src="/dist/img/videos/credit-popup/icon_Model.png" alt="">\n <div class="pop-header-content">\n <div class="pop-tip">${this.getLangJson("Ready_to_Go")}</div>\n <div class="pop-title">${this.getLangJson("Unlock_Pro_Models")}</div>\n </div>\n </div>\n <div class="pop-models-list">\n <div class="pop-models-scroll">\n <div class="pop-models-item first-item">\n <div class="models-info">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_vidwud_basic.png" alt="">\n <div class="item-content">\n <div class="item-text">\n <div class="item-name">\n ${this.getLangJson("Vidwud_Basic")}\n </div>\n <div class="item-tag white-tag">\n <img class="tag-bg-img" src="/dist/img/videos/credit-popup/basic_bg.png" alt="">\n ${this.getLangJson("Standard_Quality")}\n </div>\n </div>\n <div class="item-tip">${this.getLangJson("model_description1")}</div>\n </div>\n </div>\n <div class="item-btn" model-id="vidnoz">\n \n </div>\n </div>\n <div class="pop-models-item">\n <div class="models-info">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_vidwud_lite.png" alt="">\n <div class="item-content">\n <div class="item-text">\n <div class="item-name">\n ${this.getLangJson("Vidwud_Lite")}\n </div>\n <div class="item-tag">\n <img class="tag-bg-img" src="/dist/img/videos/credit-popup/lite_bg.png" alt="">\n ${this.getLangJson("Enhanced_Quality")}\n </div>\n </div>\n <div class="item-tip">${this.getLangJson("model_description2")}</div>\n </div>\n </div>\n <div class="item-btn" model-id="wan2_1">\n </div>\n </div>\n <div class="pop-models-item">\n <div class="models-info">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_vidwud_plus.png" alt="">\n <div class="item-content">\n <div class="item-text">\n <div class="item-name">\n ${this.getLangJson("Vidwud_Plus")}
1\n </div>\n <div class="item-tag">\n <img class="tag-bg-img" src="/dist/img/videos/credit-popup/plus_bg.png" alt="">\n ${this.getLangJson("Premium_Quality")}\n </div>\n </div>\n <div class="item-tip">${this.getLangJson("model_description3")}</div>\n </div>\n </div>\n <div class="item-btn" model-id="kling-v1">\n </div>\n </div>\n <div class="pop-models-item">\n <div class="models-info">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_vidwud_ultimate.png" alt="">\n <div class="item-content">\n <div class="item-text">\n <div class="item-name">\n ${this.getLangJson("Vidwud_Ultimate")}\n </div>\n <div class="item-tag">\n <img class="tag-bg-img" src="/dist/img/videos/credit-popup/ultimate_bg.png" alt="">\n ${this.getLangJson("Ultimate_Quality")}\n </div>\n </div>\n <div class="item-tip">${this.getLangJson("model_description4")}</div>\n </div>\n </div>\n <div class="item-btn" model-id="kling-v1-6">\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="premium-features">\n <i class="close-icon icomoon-icon_close"></i>\n <div class="pop-pc-container">\n <div class="pop-header">\n <img class="pop-icon" src="/dist/img/videos/credit-popup/icon_lock_pro.png" alt="">\n <div class="pop-header-content">\n <div class="pop-tip">${this.getLangJson("Pro_Model")}</div>\n <div class="pop-title">${this.getLangJson("Upgrade_Premium_Features")}</div>\n </div>\n </div>\n <div class="feature-container">\n <div class="info-title">${this.getLangJson("What_you_get")}</div>\n <div class="list-container">\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_models.svg" alt="">\n <div class="list-item-1">\n <div class="item-title">${this.getLangJson("Premium_Features")}</div>\n <div class="feature-list">\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check-purple.svg" alt="">\n <div class="item-text">${this.getLangJson("Vidwud_Basic")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check-purple.
1svg" alt="">\n <div class="item-text">${this.getLangJson("Vidwud_Lite")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check-purple.svg" alt="">\n <div class="item-text">${this.getLangJson("Vidwud_Plus")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check-purple.svg" alt="">\n <div class="item-text">${this.getLangJson("Vidwud_Ultimate")}</div>\n </div>\n </div>\n </div>\n </div>\n \n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_tool.png" alt="">\n <div class="item-title">${this.getLangJson("Full_Access_Tools",{val:this.getNumTools()})}</div>\n <div class="feature-list">\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_face_swap")}</div>\n </div>\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Multi_face_swap")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Image_to_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_image_generator")}</div>\n </div>\n <div class="feature-item multi-language-jp multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_kissing_video")}</div>\n </div>\n ${this.toolListHtml()}\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text item-more-btn">${this.getLangJson("More")}</div>\n </div>\n </div>\n </div>\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_crown.svg" alt="">\n <div class="item-title">${this.getLangJson("Premium_Features")}</div>\n <div class="feature-list">\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Multiple_video_models")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("HD_image_resolution")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("No_watermark")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Faster_generation_speed")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">
1${this.getLangJson("Unlimited_storage")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Max_MB_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Export_MP3_FLAC")}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="pop-btn">${this.getLangJson("Upgrade_Now")}</div>\n </div>\n </div>\n <div class="free-limit-reached">\n <i class="close-icon icomoon-icon_close"></i>\n <div class="pop-pc-container">\n <div class="pop-header">\n <img class="pop-icon" src="/dist/img/videos/credit-popup/icon_limit.png" alt="">\n <div class="pop-header-content">\n <div class="pop-tip">${this.getLangJson("Free_Limit_Reached")}</div>\n <div class="pop-title">${this.getLangJson("Upgrade_Premium_Features")}</div>\n </div>\n </div>\n <div class="feature-container">\n <div class="info-title">${this.getLangJson("What_you_get")}</div>\n <div class="list-container">\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_tool.png" alt="">\n <div class="item-title">${this.getLangJson("Full_Access_Tools",{val:this.getNumTools()})}</div>\n <div class="feature-list">\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_face_swap")}</div>\n </div>\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Multi_face_swap")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Image_to_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_image_generator")}</div>\n </div>\n <div class="feature-item multi-language-jp multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_kissing_video")}</div>\n </div>\n ${this.toolListHtml()}\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text item-more-btn">${this.getLangJson("More")}</div>\n </div>\n </div>\n </div>\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_crown.svg" alt="">\n <div class="item-title">${this.getLangJson("Premium_Features")}</div>\n <div class="feature-list">\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Multiple_video_models")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("HD_image_resolution")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("No_watermark")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Faster_generation_speed")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">
1${this.getLangJson("Unlimited_storage")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Max_MB_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Export_MP3_FLAC")}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="pop-btn">${this.getLangJson("Upgrade_Now")}</div>\n </div>\n </div>\n <div class="storage-limit-reached">\n <i class="close-icon icomoon-icon_close"></i>\n <div class="pop-pc-container">\n <div class="pop-header">\n <img class="pop-icon" src="/dist/img/videos/credit-popup/icon_stroage.png" alt="">\n <div class="pop-header-content">\n <div class="pop-tip">${this.getLangJson("Storage_Limit_Reached")}</div>\n <div class="pop-title">${this.getLangJson("Upgrade_Premium_Features")}</div>\n </div>\n </div>\n <div class="feature-container">\n <div class="info-title">${this.getLangJson("What_you_get")}</div>\n <div class="list-container">\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_tool.png" alt="">\n <div class="item-title">${this.getLangJson("Full_Access_Tools",{val:this.getNumTools()})}</div>\n <div class="feature-list">\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_face_swap")}</div>\n </div>\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Multi_face_swap")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Image_to_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_image_generator")}</div>\n </div>\n <div class="feature-item multi-language-jp multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_kissing_video")}</div>\n </div>\n ${this.toolListHtml()}\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text item-more-btn">${this.getLangJson("More")}</div>\n </div>\n </div>\n </div>\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_crown.svg" alt="">\n <div class="item-title">${this.getLangJson("Premium_Features")}</div>\n <div class="feature-list">\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Multiple_video_models")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("HD_image_resolution")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("No_watermark")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Faster_generation_speed")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">
1${this.getLangJson("Unlimited_storage")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Max_MB_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Export_MP3_FLAC")}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="pop-btn">${this.getLangJson("Upgrade_Now")}</div>\n </div>\n </div>\n <div class="activate_high_definition">\n <i class="close-icon icomoon-icon_close"></i>\n <div class="pop-pc-container">\n <div class="pop-header">\n <img class="pop-icon" src="/dist/img/videos/credit-popup/icon_lock_hd.png" alt="">\n <div class="pop-header-content">\n <div class="pop-tip">${this.getLangJson("Upgrade_to_Activate_HD")}</div>\n <div class="pop-title">${this.getLangJson("Upgrade_Premium_Features_HD")}</div>\n </div>\n </div>\n <div class="feature-container">\n <div class="info-title">${this.getLangJson("What_you_get")}</div>\n <div class="list-container">\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_tool.png" alt="">\n <div class="item-title">${this.getLangJson("Full_Access_Tools",{val:this.getNumTools()})}</div>\n <div class="feature-list">\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_face_swap")}</div>\n </div>\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Multi_face_swap")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Image_to_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_image_generator")}</div>\n </div>\n <div class="feature-item multi-language-jp multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_kissing_video")}</div>\n </div>\n ${this.toolListHtml()}\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text item-more-btn">${this.getLangJson("More")}</div>\n </div>\n </div>\n </div>\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_crown.svg" alt="">\n <div class="item-title">${this.getLangJson("Premium_Features")}</div>\n <div class="feature-list">\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Multiple_video_models")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("HD_image_resolution")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("No_watermark")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Faster_generation_speed")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">
1${this.getLangJson("Unlimited_storage")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Max_MB_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Export_MP3_FLAC")}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="pop-btn">${this.getLangJson("Upgrade_Now")}</div>\n </div>\n </div>\n <div class="Upgrade_Export_FLAC">\n <i class="close-icon icomoon-icon_close"></i>\n <div class="pop-pc-container">\n <div class="pop-header">\n <img class="pop-icon" src="/dist/img/videos/credit-popup/icon_FLAC.svg" alt="">\n <div class="pop-header-content">\n <div class="pop-tip">${this.getLangJson("Upgrade_Export_FLAC")}</div>\n <div class="pop-title">${this.getLangJson("Upgrade_Export_FLAC_unlock")}</div>\n </div>\n </div>\n <div class="feature-container">\n <div class="info-title">${this.getLangJson("What_you_get")}</div>\n <div class="list-container">\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_tool.png" alt="">\n <div class="item-title">${this.getLangJson("Full_Access_Tools",{val:this.getNumTools()})}</div>\n <div class="feature-list">\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_face_swap")}</div>\n </div>\n <div class="feature-item multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Multi_face_swap")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("Image_to_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_image_generator")}</div>\n </div>\n <div class="feature-item multi-language-jp multi-language-en">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text">${this.getLangJson("AI_kissing_video")}</div>\n </div>\n ${this.toolListHtml()}\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_Check.svg" alt="">\n <div class="item-text item-more-btn">${this.getLangJson("More")}</div>\n </div>\n </div>\n </div>\n <div class="list-item">\n <img class="item-icon" src="/dist/img/videos/credit-popup/icon_get_crown.svg" alt="">\n <div class="item-title">${this.getLangJson("Premium_Features")}</div>\n <div class="feature-list">\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Multiple_video_models")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("HD_image_resolution")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("No_watermark")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Faster_generation_speed")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">
1${this.getLangJson("Unlimited_storage")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Max_MB_video")}</div>\n </div>\n <div class="feature-item">\n <img class="checked-icon" src="/dist/img/videos/credit-popup/icon_btn_crown_mini.svg" alt="">\n <div class="item-text">${this.getLangJson("Export_MP3_FLAC")}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="pop-btn">${this.getLangJson("Upgrade_Now")}</div>\n </div>\n </div>\n </div>`,e=$(t);$(document.body).append(e),this.container=e}getLangJson(t,e={},i=!1){if(i){let i=e.val;if("string"==typeof i){let t=i.replace(/,/g,"");i=parseFloat(t)}1!==i&&(t+="s")}let n=jsonData.videosCreditPopup[t];for(let t in e){const i=new RegExp(`{{${t}}}`,"g");n=n.replace(i,e[t])}return n}getNumTools(){const t=getPreferredLanguage();return this.multiLangObj()[t].length}multiLangObj(){return{ar:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("AI_Head_Swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_kissing_video"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance"),this.getLangJson("AI_music"),this.getLangJson("AI_clothes_changer"),this.getLangJson("Mix_Motion"),jsonData.videoHeader.textStoryToVideo],de:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("AI_Head_Swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_kissing_video"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance"),this.getLangJson("AI_music"),this.getLangJson("AI_clothes_changer"),this.getLangJson("Mix_Motion"),jsonData.videoHeader.textStoryToVideo],en:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("AI_Head_Swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_kissing_video"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance"),this.getLangJson("AI_clothes_changer"),this.getLangJson("Mix_Motion"),this.getLangJson("AI_music"),jsonData.videoHeader.textStoryToVideo],es:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("AI_Head_Swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_kissing_video"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance"),this.getLangJson("AI_music"),this.getLangJson("AI_clothes_changer"),this.getLangJson("Mix_Motion"),jsonData.videoHeader.textStoryToVideo],fr:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("AI_Head_Swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_kissing_video"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance"),this.getLangJson("AI_music"),this.getLangJson("AI_clothes_changer"),this.getLangJson("Mix_Motion"),jsonData.videoHeader.textStoryToVideo],it:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("AI_Head_Swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_kissing_video"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance"),this.getLangJson("AI_music"),this.getLangJson("AI_clothes_changer"),this.getLangJson("Mix_Motion"),jsonData.videoHeader.textStoryToVideo],jp:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance")],kr:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("AI_Head_Swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_kissing_video"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance"),this.getLangJson("AI_music"),this.getLangJson("AI_clothes_changer"),this.getLangJson("Mix_Motion"),jsonData.videoHeader.textStoryToVideo],pt:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("AI_Head_Swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_kissing_video"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance"),this.getLangJson("AI_music"),this.getLangJson("AI_clothes_changer"),this.getLangJson("Mix_Motion"),jsonData.videoHeader.textStoryToVideo],tw:[this.getLangJson("AI_face_swap"),this.getLangJson("Multi_face_swap"),this.getLangJson("AI_Head_Swap"),this.getLangJson("Image_to_video"),this.getLangJson("AI_image_generator"),this.getLangJson("AI_kissing_video"),this.getLangJson("AI_video_effects"),this.getLangJson("Text_to_video"),this.getLangJson("AI_photo_dance"),this.getLangJson("AI_music"),this.getLangJson("AI_clothes_changer"),this.getLangJson("Mix_Motion"),jsonData.videoHeader.textStoryToVideo]}}}function getSensitiveWord(t=[],e=""){const i=(t=t.map((t=>t.toLowerCase()))).filter((t=>isWordGroup(t)||strContainsCJK(t))),n=t.filter((t=>!isWordGroup(t)&&!strContainsCJK(t)));let s="",o="";const a=e,c=a.toLowerCase(),d=containsWord(c,i);d&&(s=a,o=d);const r=splitText(c,!0);for(let t=0;t<r.length;t++)n.includes(r[t])&&(s=a,o+=""!==o?","+r[t]:r[t]);return s&&o?(apiAddintercept({type:"text",data:s,basis:o}).catch((t=>{console.error(t)})),{text:s,word:o}):null}function isWordGroup(t){return t.includes(" ")}function strContainsCJK(t){return/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af\u00C0-\u1EF9]/.test(t)}function containsWord(t,e){let i="";return e.some((e=>
1!!t.includes(e)&&(i=e,!0)))?i:null}function removeSymbolInStr(t){return t.replace(/[^\w\s]/gi,"")}function splitText(t,e=!1){const i=[];let n=0;const s=new Intl.Segmenter("en",{granularity:"word"}).segment(t);for(let o of s){const s=o.index;o.isWordLike;let a=t.slice(n,s);e&&(a=removeSymbolInStr(a),a=a.trim()),a.trim()&&i.push(a),n=s}if(n<t.length){let s=t.slice(n);e&&(s=removeSymbolInStr(s)),s.trim()&&i.push(s.trim())}return i}const apiAddintercept=(t={})=>new Promise(((e,i)=>{fetchPost("/ai/sensitive/intercept",{...t},base_url).then((t=>{e(t)})).catch((t=>{i(t)}))})),creditPopup=new CreditPopup({toolName:jsonData.videoHeader.textStoryToVideo,showLan:["en"]});function nextStep(t="",e=!1){if(window.storyInfo.currentStep=t,!e){const e=new CustomEvent("changeStep",{detail:{step:t}});window.dispatchEvent(e)}$(".main-content").attr("data-step",t),$(`.step-${t}`).show().siblings().hide(),t.includes("script")&&(t="script"),$(`.step-box li[data-step=${t}]`).addClass("active").siblings("li").removeClass("active"),$(".header-wrapper .title").text(window.storyInfo.scenesInfo.title);const i=new URL(window.location.href);i.searchParams.set("extension_id",window.storyInfo.id),i.searchParams.set("step",window.storyInfo.currentStep),history.replaceState({},"",i)}async function saveStoryInfo(){try{if(await saveLimitExceeded())return gtag("event","show_headswap_storagewin"),creditPopup.showStorageLimitReached({clickBtn:()=>{gtag("event","click_headswap_storagewinbtn"),setCookie("st","headswap_storage")}}),void hideLoading()}catch(t){return void hideLoading()}}function fetchPostRequest({url:t,data:e,base_API:i=tool_url,headers:n={},cancel:s=()=>{}}){return createPostRequest({url:t,data:e,headers:n,BASE_URL:i,cancel:s}).catch((t=>{if(!$(".common-modal.is-type-error").length&&"AbortError"!==t.name)return"network_error"===t.type&&showCommonModal({type:"error",containerClass:"video_black",title:jsonData.commonModal.networkError,content:jsonData.commonModal.networkErrorDesc,confirmText:jsonData.aiPhotoDance.errorText.ok}),Promise.reject(t)}))}function fetchGetRequest({url:t,base_API:e=tool_url,headers:i={}}){return createGetRequest({url:t,headers:i,BASE_URL:e}).catch((t=>{if(!$(".common-modal.is-type-error").length)return"network_error"===t.type&&showCommonModal({type:"error",containerClass:"video_black",title:jsonData.commonModal.networkError,content:jsonData.commonModal.networkErrorDesc,confirmText:jsonData.aiPhotoDance.errorText.ok}),Promise.reject(t)}))}async function editStory(){try{await fetchPostRequest({url:`ai/apps-extension/edit/${window.storyInfo.id}`,data:{config:JSON.stringify(window.storyInfo)}})}catch(t){console.log(t)}}async function getStory(t=""){try{const e=await fetchGetRequest({url:`ai/apps-extension/get?id=${t||window.storyInfo.id}`});200===e.code?window.storyInfo=JSON.parse(e.data.config):window.location.href="/"}catch(t){window.location.href="/",console.log(t)}}function countShotWords(t){return((e=t.subtitles||"").match(/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/g)||[]).length+(e.match(/[a-zA-Z]+/g)||[]).length;var e}function estimateScenesTime(t){let e=0;t.forEach((t=>{t.shots.forEach((t=>{e+=countShotWords(t)}))}));const i=Math.ceil(e/150*60),n=Math.floor(i/3600),s=Math.floor(i%3600/60),o=i%60;return n>0?`${String(n).padStart(2,"0")}:${String(s).padStart(2,"0")}:${String(o).padStart(2,"0")}`:`${String(s).padStart(2,"0")}:${String(o).padStart(2,"0")}`}async function refeshUserConfig(){const t=await fetchGetRequest({url:"ai/resource/supplementary-params?action=story_to_video"});if(200!==t.code)throw new Error(t.msg);window.userCreditInfo={...window.userCreditInfo,...t.data},window.chengAllCredits(window.userCreditInfo.user_info.credit)}async function checkExportContentNsfw({text:t,cancel:e=()=>{}}={}){let i=null;if(!i){const t=await fetchPostRequest({url:"ai/sensitive/words-list",headers:{origin:"web"},base_API:base_url$1,cancel:e});200===t.code&&(i=t.data)}return getSensitiveWord(i,t)}function setNeedTimeAndShots(){const t=window.storyInfo.scenesInfo.scenes,e=window.storyInfo.scenesInfo.scenes.reduce(((t,e)=>t+(e.shots?.length||0)),0);window.storyInfo.scenesInfo.needTime=estimateScenesTime(t)||0,e>1?$(".script-time").html(jsonData.storyToVideo.script.needTimeShots.replace("%d",window.storyInfo.scenesInfo.needTime).replace("%d1",e)):$(".script-time").html(jsonData.storyToVideo.script.needTimeShot.replace("%d",window.storyInfo.scenesInfo.needTime).replace("%d1",e))}function commonErrorModal({code:t="",needCredit:e="",clickGA:i={3002:"",3006:"",3008:""}}={}){switch(t){case 3002:gtag("event",`show_${i[t]}`),creditPopup.showFreeLimitReached({clickBtn:()=>{gtag("event",`click_${i[t]}`),setCookie("st",i[t])}});break;case 3006:gtag("event",`up_${i[t]}`),creditPopup.showStorageLimitReached({clickBtn:()=>{gtag("event",`up_${i[t]}upgrade`),setCookie("st",i[t])}});break;case 3008:gtag("event",`show_${i[t]}`),creditPopup.showNotEnoughCredits({needCredit:e,haveCredit:window.userCreditInfo.user_info.credit,clickBtn:()=>{gtag("event",`click_${i[t]}`),setCookie("st",i[t])}});break;default:showCommonModal({type:"error",containerClass:"video_black",title:jsonData.commonModal.failed,content:jsonData.commonModal.anExceptionOccurredPleaseTryAgain,confirmText:jsonData.aiPhotoDance.errorText.ok})}}function formatCount(t){if(t<1e3)return String(t);if(t<1e6){const e=t/1e3,i=Math.round(10*e)/10;if(i>=1e3)return"1M";return(i%1==0?i.toFixed(0):i.toFixed(1))+"K"}const e=t/1e6,i=Math.round(10*e)/10;return(i%1==0?i.toFixed(0):i.toFixed(1))+"M"}async function checkImgValid({file:t}={}){if(!t)return;const e=jsonData.aiPhotoDance.errorText;if(!/jpg|png|webp|jpeg/.test(t.type))return showCommonModal({type:"error",containerClass:"video_black",title:e.failed,content:e.text2,confirmText:e.ok}),!1;try{await getImageSize(t)}catch{return void showCommonModal({type:"error",containerClass:"video_black",title:e.failed,content:jsonData.commonModal.anExceptionOccurredPleaseTryAgain,confirmText:e.ok})}return!0}function getImageSize(t){return new Promise(((e,i)=>{const n=new Image;n.onload=function(){e({width:this.width,height:this.height})},n.onerror=function(){i(new Error("Failed to load image"))},n.src=URL.createObjectURL(t)}))}function getPageWidth(){return window.innerWidth||document.body.clientWidth||document.querySelector("html").offsetWidth}function checkMainScrollEnd(){const t=document.querySelector(".main");if(!t)return;if(isLogin())return void t.classList.remove("main-reach-end");const e=t.getBoundingClientRect(),i=window.innerHeight;e.bottom<=i?t.classList.add("main-reach-end"):t.classList.remove("main-reach-end")}if(window.creditPopup=creditPopup,window.changeCurrentPage("storyToVideo",{click_explore_navloginbtn:"click_story_navloginbtn",click_explore_navupgradebtn:"click_story_navupgradebtn",click_explore_navcreditbtn:"click_story_navcreditbtn",click_explore_navupgradebtnts:"story_navupgradebtn",click_explore_navcreditbtnts:"story_navcreditbtn",show_explore_navprofilecreditbtn:"show_story_navprofilecreditbtn",click_explore_navprofilecreditbtn:"click_story_navprofilecreditbtn",click_explore_navprofilecreditbtnts:"vw_story_navprofilecreditbtn",show_explore_navupgradebanner:"show_story_navupgradebanner",show_explore_navcreditbanner:"show_story_navcreditbanner",click_explore_navupgradebannerbtn:"click_story_navupgradebannerbtn",click_explore_navcreditbannerbtn:"click_story_navcreditbannerbtn",click_explore_navupgradebannerbtnts:"story_navupgradebannerbtn",click_explore_navcreditbannerbtnts:"story_navcreditbannerbtn"}),window.storyInfo={currentStep:"script",aspectRatio:"landscape",videoLanguage:"",videoStyle:"",model_id:"",scriptText:"",needTime:"00:00",scenesInfo:{title:"",summary:"",scenes:[{scene_id:1,scene_title:"",scene_overview:"",shots:[{shot_id:"1-1",subtitles:"",shot_description:"",character:"",config:{type:"video",size:0,width:1920,height:1080,
1key:"",original_key:"",original_url:"",thumbnail_key:"",thumbnail_url:"",duration:0},history:[{type:"video",size:0,width:1920,height:1080,key:"",original_key:"",original_url:"",thumbnail_key:"",thumbnail_url:"",duration:0}]}]}],characters:[{name:"",traits:[],role:"",gender:"",age:"",image_key:"",image_url:"",voice:{id:828,name:"",audio_key:"",audio:{key:"",url:"",static_url:""},tts_config:{plat:"",language:"",model_name:"",speaker_id:"0",style_list:[],words_per_minute:""}}}]},cover_settings:{},subtitle_settings:{},background_music:{},cover_image:{},canvasInfo:{tab:"0",cover_Title:"",titleStyle:"",fontFamily:"",actCoverImg:{},uploadImg:[],background_music:{},volume:10,cover_settings:{},subtitle_settings:{}}},window.userCreditInfo={isSubscriber:function(){return 1===this?.user_info?.is_credit_subscription}},!window.__checkStoryCommon_init__&&(window.__checkStoryCommon_init__=!0,document.addEventListener("click",(function(t){t.target.closest(".skeleton-loading")&&(t.stopPropagation(),t.preventDefault())}),!0),window.addEventListener("signoutsuccess",(()=>{localStorage.removeItem("storyInfo"),window.location.href="/"})),getPageWidth()<=1200&&!isLogin())){const t=throttle(checkMainScrollEnd,50);t(),window.addEventListener("scroll",t),window.addEventListener("changeStep",(t=>{checkMainScrollEnd(),window.scrollTo(0,0)}));const e=document.querySelector(".main");if(e){new ResizeObserver(checkMainScrollEnd).observe(e)}}let languageTippy,cancel,videoStyleList=[],tendingPage=2,tendingList=[],languageList=[];const extension_id=getUrlParam("extension_id"),id=getUrlParam("id"),isEdit=getUrlParam("isEdit");async function init(){if(initScriptFunc(),extension_id){const t=getUrlParam("step");window.storyInfo.id=extension_id,window.storyInfo.currentStep=t,t&&nextStep(t,!0),$(".step-box.pc-flex").show(),$(".story-loading-mask").hide(),await getStory(extension_id),isEdit&&(window.storyInfo.currentStep="edit"),nextStep(window.storyInfo.currentStep),window.storyInfo.scenesInfo.title&&($(".header-wrapper .title-box").removeClass("no-title"),$(".header-wrapper .title-box .title").text(window.storyInfo.scenesInfo.title))}else{$(".step-box.pc-flex").show(),$(".story-loading-mask").hide();const t=[()=>createGetRequest({url:"ai/story/style-list?page=1&page_size=1000",BASE_URL:tool_url}),()=>createGetRequest({url:"ai/story/language-list",BASE_URL:tool_url}),()=>refeshUserConfig()];id&&t.push((()=>fetchPostRequest({url:"ai/resource/remix-params",data:{action:"story_to_video",param:{id:id}}}))),fetchAllApi(t)}}async function fetchAllApi(t=[]){try{const e=t.map((t=>t()));renderALLHtml(await Promise.all(e))}catch(e){console.log(e),showCommonModal({type:"error",containerClass:"video_black",title:"network_error"===e.type?jsonData.commonModal.networkError:jsonData.commonModal.failed,content:"network_error"===e.type?jsonData.commonModal.networkErrorDesc:jsonData.commonModal.anExceptionOccurredPleaseTryAgain,confirmText:jsonData.assets.javascript.retry,onConfirm:()=>{fetchAllApi(t)}})}}function renderALLHtml([t,e,i,n]){renderVideoStyle(t),languageList=e.data,renderLanguage({data:languageList}),n&&setPageInfo(n.data),initAllFunc(),getStorage("storyInfo")&&!n&&setPageInfo(getStorage("storyInfo")),$(".step-script .skeleton-loading").hide()}function initAllFunc(){initVideoStypeFunc(),renderLanguaTippy(),initTendingFunc()}function renderLanguage({data:t=[],isSearch:e=!1}={}){let i="";const n=$(".language-select_dropmenu");if(n.empty(),!e){if(!window.storyInfo.videoLanguage){const e=$("html").attr("lang"),i=t.find((t=>t.lan===e)).country;window.storyInfo.videoLanguage=i}$("#language-select-input").val(t.find((t=>t.country===window.storyInfo.videoLanguage)).show_language)}t.length?(e&&(window.storyInfo.videoLanguage=t[0].country),t.forEach((t=>{i+=`<li class="language-list_item" data-key=${t.country}>${t.show_language}</li>`}))):i=`<div class="no-result">${jsonData.storyToVideo.script.noSearch}</div>`,n.append(i)}function renderLanguaTippy(){const t=$(".language-select"),e=$(".language-select_dropmenu_outer");e.find(".language-select_dropmenu").css("display","flex"),languageTippy=tippy(t[0],{content:()=>e[0],placement:"bottom-start",maxWidth:"auto",interactive:!0,arrow:!1,theme:"none",trigger:"click",hideOnClick:!0,offset:[0,3],appendTo:()=>t[0],zIndex:90,onCreate(t){t.popper.classList.add("tippy-language-select")},onShow(){e.find(`.language-list_item[data-key='${window.storyInfo.videoLanguage}']`).addClass("active").siblings("li").removeClass("active")}})}function renderVideoStyle(t,e=!0){e&&(videoStyleList=[]),videoStyleList=[...videoStyleList,...t.data.list],window.storyInfo.videoStyle||(window.storyInfo.videoStyle=videoStyleList[0]?.id,window.storyInfo.model_id=videoStyleList[0]?.model_id),$(".video-style-list").empty();let i="";videoStyleList.forEach((t=>{i+=`\n <li class="video-style-list_item ${window.storyInfo.videoStyle===t.id?"active":""}" data-id=${t.id} data-model_id=${t.model_id}>\n <div class="img-wrapper">\n <img src=${t.cover} crossorigin="anonymous" oncontextmenu="return false;" ondragstart="return false;">\n </div>\n <p class="name">\n ${t.name||""}\n </p>\n </li>`})),$(".video-style-list").append(i)}function initVideoStypeFunc(){$(document).on("click",".video-style-list_item",(function(){$(this).addClass("active").siblings(".video-style-list_item").removeClass("active"),window.storyInfo.videoStyle=$(this).data("id"),window.storyInfo.model_id=$(this).data("model_id"),gtag("event","change_story_scriptstyle"),setStoryStorage()}))}
1async function getTendingList(){if(tendingPage)try{const t=await createGetRequest({url:`ai/resource/list?action=story_to_video&page=${tendingPage}&pageSize=12`,BASE_URL:tool_url});renderTendingList(t,!1),t.data.list.length<12?tendingPage=0:tendingPage+=1}catch(t){console.log(t)}}function renderTendingList(t,e=!0){e&&(tendingList=[]),tendingList=[...tendingList,...t.data.list];const i=$(".trending-list");i.empty();let n="";tendingList.forEach(((t,e)=>{n+=`<li class="tending-list_item" data-id="${t.id}">\n <div class="text-left">\n ${e<=2?`<img src="/dist/img/videos/story-to-video/icon_list_${e+1}.svg" alt="">`:'<span class="empty"></span>'}\n <span>${t.title}</span>\n </div>\n <div class="text-right">\n <div class="img-box ${t.aspect_ratio||"landscape"}"><img src="${t.thumbnail_url}" alt=""></div>\n <div class="view-box">\n <span>${formatCount(t.view)}</span>\n <span>\n ${jsonData.storyToVideo.script.Views}\n </span>\n </div>\n </div>\n </li>`})),i.append(n)}function initTendingFunc(){$(document).on("click",".tending-list_item",(function(){gtag("event","click_story_scripttrending");const t=$(this).data("id");window.open(`/explore/${t}`,"_self")})),$(document).on("mouseover",".text-left span,.video-style-list_item .name",(function(){overflowAddTitle($(this).get(0))})),$(document).on("mouseover",".text-left span",(function(){setTitleIfEllipsis($(this).get(0))}))}function initScriptFunc(){$(".ratio-item").on("click",(function(){const t=$(this).data("type");$(this).addClass("active").siblings(".ratio-item").removeClass("active"),window.storyInfo.aspectRatio=t,gtag("event","change_story_scriptratio"),setStoryStorage()})),window.storyInfo.aspectRatio=isMobile()?"portrait":"landscape",$(`.ratio-item[data-type=${window.storyInfo.aspectRatio}]`).addClass("active").siblings(".ratio-item").removeClass("active"),$("#script-input").on("input",(function(t){$(this).next(".bottom-expansion").find(".max-length span").text(t.target.value.length||0),t.target?.value?.length>=2e3?$(this).next(".bottom-expansion").find(".max-length").addClass("error"):$(this).next(".bottom-expansion").find(".max-length").removeClass("error"),t.target?.value?.length?($(".step-script").find(".generate-btn").removeClass("disabled"),$(".step-script").find(".expansion").removeClass("disabled")):($(".step-script").find(".generate-btn").addClass("disabled"),$(".step-script").find(".expansion").addClass("disabled"))})),$("#script-input").on("blur",(function(t){window.storyInfo.scriptText=t.target.value.trim(),setStoryStorage()})),$(".script-textarea-box .expansion").on("click",(async function(){gtag("event","click_story_scriptextend"),isShowLoading({show:!0});try{if(!window.userCreditInfo.available_times.story_script_expansion&&!window.userCreditInfo.isSubscriber())throw commonErrorModal({code:3002,clickGA:{3002:"story_scriptextendlimit"}}),new Error("fail");if(await checkExportContentNsfw({text:window.storyInfo.scriptText,cancel:t=>{cancel=t}}))throw showCommonModal({type:"error",containerClass:"video_black",title:jsonData.commonModal.failed,content:jsonData.aiPhotoDance.errorText.text8,confirmText:jsonData.aiPhotoDance.errorText.ok}),new Error("fail");const t=await fetchPostRequest({url:"ai/story/script-expansion",data:{prompt:window.storyInfo.scriptText,language:window.storyInfo.videoLanguage,response_type:"async"},cancel:t=>{cancel=t}});if(200!==t?.code)throw commonErrorModal({code:t.code,clickGA:{3002:"story_scriptextendlimit"}}),new Error("fail");loadScriptText({access_key:t.data.access_key,type:"expansion"})}catch(t){console.log(t),$("#script-input").trigger("input"),isShowLoading({show:!1})}})),$(".script-textarea-box .bottom-menu-box .cancel").on("click",(function(){isShowLoading({show:!1}),cancel&&cancel.abort(),$("#script-input").trigger("input")})),$(".script-textarea-box .bottom-menu-box .confirm").on("click",(function(){gtag("event","click_story_scriptextendconfirm");const t=$("#script-expansion").val().trim().slice(0,2e3);$("#script-input").val(t).trigger("input"),window.storyInfo.scriptText=t,setStoryStorage(),isShowLoading({show:!1})})),$(".step-script").find(".generate-btn").on("click",(async function(){gtag("event","click_story_scriptgenbtn"),$(".step-script").find(".generate-btn").addClass("loading"),$(".script-textarea-box").addClass("disabled"),$(".header-wrapper .title-box").addClass("disabled"),$(".step-script .out-mask").show(),$(".script-textarea-box").addClass("out-mask-showing"),$(".step-script-left").addClass("disabled");try{if(!window.userCreditInfo.available_times.story_generate_script&&!window.userCreditInfo.isSubscriber())throw commonErrorModal({code:3002,clickGA:{3002:"story_scriptgenbtnlimit"}}),new Error("fail");if(await checkExportContentNsfw({text:window.storyInfo.scriptText}))throw showCommonModal({type:"error",containerClass:"video_black",title:jsonData.commonModal.failed,content:jsonData.aiPhotoDance.errorText.text8,confirmText:jsonData.aiPhotoDance.errorText.ok}),new Error("fail");const t=await fetchPostRequest({url:"ai/story/generate-scripts",data:{prompt:window.storyInfo.scriptText,language:window.storyInfo.videoLanguage,response_type:"async"}});if(200!==t?.code)throw commonErrorModal({code:t.code,clickGA:{3002:"story_scriptgenbtnlimit"}}),new Error("fail");loadScriptText({access_key:t.data.access_key,type:"generate"})}catch(t){$(".step-script").find(".generate-btn").removeClass("loading disabled"),$(".script-textarea-box").removeClass("disabled"),$(".header-wrapper .title-box").removeClass("disabled"),$(".step-script .out-mask").hide(),$(".script-textarea-box").removeClass("out-mask-showing"),$(".step-script-left").removeClass("disabled"),isS
1howLoading({show:!1})}})),$("#language-select-input").on("click",(function(t){t.stopPropagation()})),$("#language-select-input").on("focus",(function(t){languageTippy.show()})),$("#language-select-input").on("input",(function(t){const e=t.target.value.toLowerCase();renderLanguage({data:languageList.filter((t=>t.show_language.toLowerCase().includes(e))),isSearch:!0})})),$("#language-select-input").on("keydown",(function(t){t.stopPropagation(),"Enter"===t.key&&(t.preventDefault(),$(this).blur(),languageTippy.hide())})),$("#language-select-input").on("blur",(function(t){t.stopPropagation(),t.target.value?($("#language-select-input").val(languageList.find((t=>t.country===window.storyInfo.videoLanguage)).show_language),setStoryStorage()):$("#language-select-input").val(window.storyInfo.videoLanguage),renderLanguage({data:languageList,isSearch:!1})})),$(document).on("mousedown",".language-list_item",(function(t){t.stopPropagation(),$(this).addClass("active").siblings("li").removeClass("active"),$("#language-select-input").val($(this).text().trim()),window.storyInfo.videoLanguage=$(this).data("key"),languageTippy.hide(),gtag("event","change_story_scriptlang"),setStoryStorage()})),$("#script-expansion").on("input",(function(t){t.target.value.length?$(this).next(".bottom-menu-box").find(".confirm").removeClass("disabled"):(console.log($(this).next(".bottom-menu-box")),$(this).next(".bottom-menu-box").find(".confirm").addClass("disabled"))}))}function isShowLoading({show:t=!0,done:e=!1}){t?($(".script-textarea-box").addClass("loading"),$(".step-script").find(".generate-btn").addClass("disabled"),$("#script-input").attr("readonly",!0)):($(".script-textarea-box").removeClass("loading done"),$("#script-input").attr("readonly",!1)),e&&($(".script-textarea-box").addClass("done"),$("#script-input").attr("readonly",!0))}async function createStory(){try{const t=await fetchPostRequest({url:"ai/apps-extension/create",data:{config:JSON.stringify(window.storyInfo)}});if(200!==t?.code)throw commonErrorModal({code:t.code}),new Error("fail");window.storyInfo.id=t.data.id,nextStep("script-scenes"),editStory(),localStorage.removeItem("storyInfo"),$(".header-wrapper .title-box").removeClass("disabled"),$(".step-script .out-mask").hide(),$(".script-textarea-box").removeClass("out-mask-showing"),$(".step-script-left").removeClass("disabled")}catch(t){$(".step-script").find(".generate-btn").removeClass("loading disabled"),$(".script-textarea-box").removeClass("disabled")}}async function loadScriptText({access_key:t="",type:e=""}){try{const i=await fetchPostRequest({url:"ai/story/retrieve",data:{access_key:t},cancel:t=>{cancel=t}});if(200!==i?.code)throw commonErrorModal({code:i.code}),new Error("fail");if(0===i.data.status)"generate"===e?(window.storyInfo.scenesInfo=i.data.response.data,window.storyInfo.generateId=t,!window.storyInfo.id&&createStory()):(isShowLoading({show:!1,done:!0}),$("#script-expansion").val(i.data.response.data.content).trigger("input")),refeshUserConfig();else{if(1===i.data.status)throw new Error("fail");setTimeout((()=>{loadScriptText({access_key:t,type:e})}),2e3)}}catch(t){if(console.log(t),$(".step-script").find(".generate-btn").removeClass("loading disabled"),$(".script-textarea-box").removeClass("disabled"),$(".header-wrapper .title-box").removeClass("disabled"),$(".step-script .out-mask").hide(),$(".script-textarea-box").removeClass("out-mask-showing"),$(".step-script-left").removeClass("disabled"),$("#script-input").trigger("input"),isShowLoading({show:!1}),$(".common-modal.is-type-error").length)return;showCommonModal({type:"error",containerClass:"video_black",title:jsonData.commonModal.failed,content:jsonData.commonModal.anExceptionOccurredPleaseTryAgain,confirmText:jsonData.aiPhotoDance.errorText.ok})}}function setPageInfo(t){window.storyInfo.aspectRatio=t.aspect_ratio,window.storyInfo.scriptText=t.script_text,window.storyInfo.videoStyle=t.video_style,window.storyInfo.videoLanguage=t.video_language,window.storyInfo.model_id=t.model_id,$("#language-select-input").val(languageList.find((t=>t.country===window.storyInfo.videoLanguage)).show_language),$(`.ratio-item[data-type=${window.storyInfo.aspectRatio}]`).addClass("active").siblings(".ratio-item").removeClass("active"),$(`.video-style-list_item[data-id=${window.storyInfo.videoStyle}]`).addClass("active").siblings(".video-style-list_item").removeClass("active"),$("#script-input").val(window.storyInfo.scriptText).trigger("input")}function setStoryStorage(){setStorage("storyInfo",{script_text:window.storyInfo.scriptText,model_id:window.storyInfo.model_id,video_style:window.storyInfo.videoStyle,video_language:window.storyInfo.videoLanguage,aspect_ratio:window.storyInfo.aspectRatio})}function handleScrollToBottom({scrollElement:t=document.documentElement,callback:e=()=>{},offset:i=0,debounceTime:n=300}={}){let s=t.scrollTop;const o=debounce((function(){const n=t.scrollTop,o=t.scrollHeight,a=t.clientHeight;if(n>s){n+a>=o-i&&e()}s=n}),n);t.addEventListener("scroll",o)}function setTitleIfEllipsis(t){const e=t.clientHeight;t.scrollHeight>e+1?t.title=t.textContent.trim():t.removeAttribute("title")}
1$((function(){init(),gtag("event","open_story_page")}));var all=Object.freeze({__proto__:null});console.log(all);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.