const firebase=window.firebase,config$1={apiKey:"AIzaSyAggX7zwnqbVl56pZP4O7oH0QtPu9YMph0",authDomain:"printess-saas.firebaseapp.com"};firebase.initializeApp(config$1);const checkErrorCode=e=>{const t=document.getElementById("errorContainer"),o=document.getElementById("errorWrapper");t&&(t.style.display=""),"auth/email-already-in-use"===e?o&&(o.innerHTML="This email address is already in use.
Did you mean to sign in?"):"auth/invalid-email"===e?o&&(o.textContent="Invalid e-mail address!"):"auth/weak-password"===e?o&&(o.textContent="Your password is weaaaak!"):"auth/wrong-password"===e||"auth/user-not-found"===e?o&&(o.innerHTML="Invalid e-mail address or password.
Please try again!"):"auth/too-many-requests"===e&&o&&(o.innerHTML="Access to this account has been temporarily
disabled due to many failed login attempts.")};async function signinWithGoogle(){const e=new firebase.auth.GoogleAuthProvider;e.setCustomParameters({prompt:"select_account"});try{return await firebase.auth().signInWithPopup(e)}catch(e){const t=e.code;throw checkErrorCode(t),e}}async function signinUser(e,t){try{return await firebase.auth().signInWithEmailAndPassword(e,t)}catch(e){const t=e.code;throw checkErrorCode(t),e}}async function sendPasswordResetMail(e=firebase.auth().currentUser.email){try{await firebase.auth().sendPasswordResetEmail(e)}catch(e){const t=e.code;throw console.log(t),alert(e.message),e}}class MenuTopic{constructor(e){this.name=e.n,this.id=e.id,this.type=e.t,this.keywords=e.kws}serialize(){return{n:this.name,id:this.id,t:this.type,kws:JSON.parse(JSON.stringify(this.keywords))}}save(){return{n:this.name.toLowerCase(),id:this.id,t:this.type,kws:this.keywords}}rename(e){this.name=e.toLowerCase(),this.addKeywords(this.keywords)}addKeywords(e){e.includes(this.name)||e.unshift(this.name.toLowerCase()),this.keywords=e}removeKeywords(){this.keywords=[this.name]}delete(e){const t=this.keywords.indexOf(e);t>=0&&this.keywords.splice(t,1)}}class MenuCategory{constructor(e){this.name=e.n,this.id=e.id,this.type=e.t,this.topics=[];for(const t of e.tops)this.topics.push(new MenuTopic(t))}serialize(){return{n:this.name,id:this.id,t:"category",tops:this.topics.map(e=>e.serialize())}}rename(e){this.name=e.toLowerCase()}update(e,t){const o=this.topics.findIndex(t=>t.id===e);o>=0&&this.topics.splice(o,1,t)}insert(e,t){if("top"===t)this.topics.unshift(e);else if("bottom"===t)this.topics.push(e);else{const o=this.topics.findIndex(e=>e.id===t.id);o>=0?this.topics.splice(o+1,0,e):this.topics.push(e)}}move(e,t,o){const r=this.topics.findIndex(e=>e.id===t);"above"===o?this.topics.splice(r,0,e):this.topics.splice(r+1,0,e)}delete(e){const t=this.topics.findIndex(t=>t.id===e);t>=0&&this.topics.splice(t,1)}}function generateID(){const e=(new Date).getTime();let t,o="P";const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(t=0;t<20;t++)o+=r.charAt(Math.floor((e+62*Math.random())%62));return o}class Menu{constructor(e){this.name=e.n,this.id=e.id,this.type=e.t,this.categories=[];for(const t of e.cats)this.categories.push(new MenuCategory(t))}serialize(){return{n:this.name,id:this.id,t:this.type,cats:this.categories.map(e=>e.serialize())}}rename(e){this.name=e}update(e,t){const o=this.categories.findIndex(t=>t.id===e);o>=0&&this.categories.splice(o,1,t)}insert(e,t){if("top"===t)this.categories.unshift(e);else if("bottom"===t)this.categories.push(e);else{const o=this.categories.findIndex(e=>e.name===t.name);o>=0?this.categories.splice(o+1,0,e):this.categories.push(e)}}move(e,t,o){const r=this.categories.findIndex(t=>t.id===e.id),i=this.categories.splice(r,1)[0],a=this.categories.findIndex(e=>e.id===t);"above"===o?this.categories.splice(a,0,i):this.categories.splice(a+1,0,i)}delete(e){const t=this.categories.findIndex(t=>t.id===e);t>=0&&this.categories.splice(t,1)}findCategory(e){for(const t of this.categories){const o=t.topics.findIndex(t=>t.id===e.id);if(o>=0)return t}return null}}const imageAiFilterType=["IMAGE-EDIT"],imageAiFilterModel=["GPT ImageEdit","Nano Banana","Nano Banana Pro"],imageAiGptImageEditQuality=["low","medium","high"];class ImageAiFilter{constructor(e="",t="",o,r,i,a,s,n,l){this.id=e,this.label=t||"New Effect",this.type=o??"IMAGE-EDIT",this.model=r??"Nano Banana",this.gptQuality=i??"medium",this.isUserPrompt=a??!1,this.promptPrefix=s??"",this.prompt=n??"",this.thumbnailUrl=l??""}}let Snippet$1=class{constructor(e){this.title=e.title??"",this.imageUrl=e.iurl,this.snippetUrl=e.surl,this.id=e.id,this.docId=e.did,this.uid=e.uid,this.language=e.l,this.metadata=JSON.parse(e.meta??"{}"),this.isGlobal="gy8z44EmLiZ0vrUKrXlWtiZY15D2"===e.uid}get imageCount(){return this.metadata?.editables?.images??0}hasImageCountEqual(e){return!(!this.metadata||!this.metadata.editables)&&this.metadata.editables.images===e}hasTextCountEqual(e){return!(!this.metadata||!this.metadata.editables)&&this.metadata.editables.texts===e}},Template$1=class{constructor(e,t){e&&t&&(this.id=t.id,this.userId=e.uid??"",this.name=t.n,this.isWritable=t.w,this.isDeletable=t.d,this.isPublishable=t.p,this.hasPublishedVersion=t.hpv,this.hasDesignVersion=t.hdv,this.thumbnailUrl=t.turl,this.backgroundColor=t.bg,this.lastSaveDate=new Date(t.ls),this.lastPublishDate=new Date(t.lp))}};class UserTemplates{constructor(e){e?(this.userId=e.uid,this.eMail=e.e,this.templates=e.ts.sort((e,t)=>e.n.localeCompare(t.n)).map(t=>new Template$1(e,t))):(this.userId="",this.eMail="",this.templates=[])}}function toCdnUrl(e){return e.replace("//printess-prod.s3.eu-central-1.amazonaws.com/","//resource.printess.com/")}class TemplatePageImage{constructor(e,t="",o=""){this.spreadIndex=e.si??0,this.pageIndex=e.pi??0,this.thumbnailUrl=toCdnUrl(e.t??""),this.backgroundColor=e.bg??"",this.documentId=e.did??"",this.spreadId=t,this.pageId=o}fromSerialized(e){return this.spreadIndex=e.spreadIndex??0,this.pageIndex=e.pageIndex??0,this.thumbnailUrl=toCdnUrl(e.thumbnailUrl??""),this.backgroundColor=e.backgroundColor??"",this.documentId=e.documentId??"",this.spreadId=e.spreadId??"",this.pageId=e.pageId??"",this}}class TemplateDetails{constructor(e){this.id=e.id,this.images=e.images.map(e=>new TemplatePageImage(e)),e.documentInfo&&(this.documentIdToNameMapping=JSON.parse(e.documentInfo)),e.template?this.template=new Template$1({uid:e.userId},e.template):this.template=null}}function createRequestInit(e,t,o,r){const i={Accept:"application/json","Content-Type":o};r&&(i.Authorization="Bearer "+r);return{method:e,mode:"cors",cache:"no-cache",credentials:"omit",headers:i,redirect:"follow",referrerPolicy:"no-referrer",body:t}}function sendXhr$1(e,t,o){return new Promise((r,i)=>{e.onreadystatechange=()=>{4===e.readyState&&r()},o&&(e.upload.onprogress=e=>{e.lengthComputable&&o(e.loaded,e.total)}),e.onerror=function(){i({status:this.status,statusText:e.statusText})},e.send(t)})}async function postFormData(e,t,o,r){const i=new XMLHttpRequest;return i.open("POST",e,!0),i.setRequestHeader("Authorization","Bearer "+o),await sendXhr$1(i,t,r),i}async function postPlainText(e,t,o){return await fetch(e,createRequestInit("POST",t,"text/plain",o))}async function postJson(e,t,o){return await fetch(e,createRequestInit("POST",t,"application/json",o))}function assertNever$1(e,t=""){throw new Error(t||"Unexpected object: "+e)}function createOverlayDiv(){const e=document.createElement("div");return e.style.left="0",e.style.top="0",e.style.bottom="0",e.style.right="0",e.style.position="absolute",e.style.backgroundColor="transparent",e.style.cursor="grab",e}function isMobile(e=896){return!window.matchMedia(`(min-width: ${e+1}px)`).matches}const config={mobileDeviceWidth:896,isMobile:isMobile(896),tokenRole:"",tokenRoles:[],claims:new Map,helpUrl:"https://printess.com/kb/user-manual/",isPrintessSystem:!0},tagType=["layout-tags","group-tags","keywords"],isTagType=e=>tagType.includes(e),dropshipVisibleToUserIds=["sZ5lDGZQqjcdw0AOVyKNzbw1spC3","F0RI3uPtv7bb4Ph2762AkcwQAuu2","i12qBGdGXEdEyp7KlcAtkhoK3V82","tn6LY4Q1gCarfkZ5w3fd3QdsxqY2","2p0r3uaaEsbVu1VCCf8oGKueywp1"],imageCategoriesVisibleToUserIds=["gy8z44EmLiZ0vrUKrXlWtiZY15D2"];function hasPlan(e){const t=config.claims.get("plan");return!!t&&t.has(e)}function hasClaim(e){const t=config.claims.get("allow");return!!t&&t.has(e)}function drawerCanBeDisplayed(e,t){if(t&&"subscription"!==e.name&&"team-members"!==e.name)return!1;if("gy8z44EmLiZ0vrUKrXlWtiZY15D2"===currentUser.id&&!e.hide)return!0;if(("dropshipper"===e.name||"dropship-orders"===e.name)&&-1!==dropshipVisibleToUserIds.indexOf(currentUser.id))return!0;if("image-categories"===e.name&&-1!==imageCategoriesVisibleToUserIds.indexOf(currentUser.id))return!0;if(e.forbiddenPlans&&e.forbiddenPlans.length){if(!!e.forbiddenPlans.find(e=>hasPlan(e)))return!1}return!(e.requiredClaim&&!hasClaim(e.requiredClaim))&&(!e.hide&&e.displayTo.some(e=>config.tokenRoles.indexOf(e)>-1))}function getDomain(){let e="api.printess.com";const t=window;return t.printessSettings&&t.printessSettings.domain&&(e=t.printessSettings.domain),e}function getEditorUrl(){let e="https://editor.printess.com/";const t=window;return t.printessSettings&&t.printessSettings.editor&&(e=t.printessSettings.editor),e}class ValueDebounce{constructor(e){this.timeout=1e3,this.callback=e}change(e,t=1e3){this.value=e,window.clearTimeout(this.timeoutHandle),this.timeoutHandle=window.setTimeout(()=>{this.callback(this.value)},t)}immediate(e){this.value=e,this.callback(e)}}async function sha1hex$1(e){let t;if("string"==typeof e){t=(new TextEncoder).encode(e)}else t=e;const o=await crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(o)).map(e=>e.toString(16).padStart(2,"0")).join("")}async function getUserFileUrl(e,t){const o=await sha1hex$1(e);return-1!==window.location.host.indexOf("localhost")?"https://printess-bkr.s3.eu-central-1.amazonaws.com/uploads/"+o+"/static/"+t:"https://printess-prod.s3.eu-central-1.amazonaws.com/uploads/"+o+"/static/"+t}function normalizeUrl(e){return e&&!e.endsWith("/")?e+"/":e}function generateDBID(){const e=(new Date).getTime();let t,o="P";const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(t=0;t<20;t++)o+=r.charAt(Math.floor((e+62*Math.random())%62));return o}class DialogCloseEvent extends CustomEvent{constructor(e={}){super("close-event",{bubbles:!0,composed:!0,detail:e})}}class ReloadEvent extends CustomEvent{constructor(e){super("reload-triggered",{detail:e,bubbles:!0,composed:!0})}}function sleep(e){return new Promise(t=>setTimeout(t,e))}function getValidJsName(e){const t=e.replace(/[^\d|\w]/gi,"_");return t.match(/^\d/)?"x"+t:t}function assertNever(e,t=""){throw new Error(t||"Unexpected object: "+e)}function showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}let ServerErrorResponse$2=class e{constructor(e,t){this.code=e,this.message=t}static async Create(t){if("application/json; charset=utf-8"===t.headers.get("Content-Type")){const o=await t.json();return"number"==typeof o.c&&"string"==typeof o.m?new e(o.c,o.m):new e(t.status,o)}const o=await t.text();return new e(t.status,t.statusText+" => "+o)}};class PrintessApi{constructor(e,t){this.urlPrefix=e||"http://localhost:5000",this.token=t}async postPlainText(e,t){e.startsWith("/")||(e="/"+e);return postPlainText(this.urlPrefix+e,t,this.token)}async postJson(e,t){e.startsWith("/")||(e="/"+e);return postJson(this.urlPrefix+e,t,this.token)}async postJsonTyped(e,t){e.startsWith("/")||(e="/"+e);const o=this.urlPrefix+e,r=await postJson(o,t,this.token);return 200===r.status?await r.json():await ServerErrorResponse$2.Create(r)}async postJsonVoid(e,t){e.startsWith("/")||(e="/"+e);const o=this.urlPrefix+e,r=await postJson(o,t,this.token);if(200!==r.status)return await ServerErrorResponse$2.Create(r)}async loginWithGoogleAuthToken(e){const t=await this.postPlainText("/jwttokenlogin",e);return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async handleErrorResponse(e,t){if(!e.ok){let o=`${t}: ${e.statusText} (statusCode=${e.status})`;try{const r=await e.text();o=401===e.status?`${t}: Please reload the editor or logout and login to continue. Seems like your authentication token expired and the request didn't go through.`:`${r} ${e.statusText} (statusCode=${e.status})`}catch(e){console.log(e)}throw o}}async activate(e,t){const o={userId:e,activationCode:t},r=await this.postJson("/printess/activate",JSON.stringify(o));if(200!==r.status)return await ServerErrorResponse$2.Create(r)}async loadUserTokens(){const e=await this.postJson("/user/tokens/load","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async revokeToken(e){const t=await this.postJson("/user/token/revoke",JSON.stringify({jti:e}));if(200!==t.status){const e=await ServerErrorResponse$2.Create(t);alert(e.message)}}async loadOrders(e){const t=await this.postJson("/orders/list",JSON.stringify(e));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async loadDropshipOrders(){const e=await this.postJson("dropship/orders/list",JSON.stringify({take:500}));return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async loadDropshipOrderInfo(e){const t=await this.postJson("dropship/order/info/load",JSON.stringify({id:e}));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async sendOrderToDropshipper(e){const t={orderId:e};return await this.postJsonVoid("order/sendToDropshipper",JSON.stringify(t))}async loadSubmissionErrors(){const e=await this.postJson("submission/errors/list",JSON.stringify({}));return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async loadTemplatesList(){const e=await this.postJson("/templates/list","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async loadCurrentPaymentPeriodData(e){const t=await this.postJson("/saas/currentPeriod",JSON.stringify({userId:e}));await this.handleErrorResponse(t,"Cannot load current payment period data");return await t.json()}async loadTemplates(e){const t=await this.postJson("/templates/user/load",JSON.stringify({templateName:e}));await this.handleErrorResponse(t,"Cannot load user templates");const o=await t.json();return new UserTemplates(o)}async loadRecentTemplates(){const e=await this.postJson("templates/user/recent/load",JSON.stringify({}));await this.handleErrorResponse(e,"Cannot load recent user templates");const t=await e.json();return new UserTemplates(t)}async loadTemplateDetails(e){const t=await this.postJson("/template/details",JSON.stringify({templateName:e}));await this.handleErrorResponse(t,"Cannot load template details");const o=await t.json();return new TemplateDetails(o)}async loadDailyUsage(e){const t=await this.postJson("/saas/usage/daily",JSON.stringify(e));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async loadDailyCredits(e){const t=await this.postJson("/saas/credits/daily",JSON.stringify(e));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async loadAiCredits(e){const t=await this.postJson(`ai/statistics/last/${e}/days`,JSON.stringify({}));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async loadMockupStatisticsLast(e){const t=await this.postJson(`mockup/statistics/last/${e}/days`,JSON.stringify({}));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async loadMockupStatisticsMonth(e,t){const o=await this.postJson(`mockup/statistics/year/${t}/month/${e}`,JSON.stringify({}));return 200===o.status?await o.json():await ServerErrorResponse$2.Create(o)}async loadDailyAdminCredits(e){const t=await this.postJson("/admin/credits/daily",JSON.stringify(e));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async addWhitelistEntry(e){const t=await this.postJson("/user/whitelist/add",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("user has been added successfully")}async removeWhitelistEntry(e){const t=await this.postJson("/user/whitelist/remove",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("Team member has been removed successfully")}async removePinnedUser(e){const t=await this.postJson("/user/pinned/remove",JSON.stringify({userId:e}));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("Team member has been removed successfully")}async loadProfile(){const e=await this.postJson("/user/profile/read","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async updateProfile(e){const t=await this.postJson("/user/profile/update",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("profile updated successfully")}async loadPinnedUsers(){const e=await this.postJson("/user/pinned/load","{}");if(200===e.status){const t=await e.json();return t.forEach(e=>e.userLevel=e.userLevel?e.userLevel:"user"),t}return await ServerErrorResponse$2.Create(e)}async updatedPinnedUser(e){const t=await this.postJson("/user/pinned/update",JSON.stringify(e));if(200!==t.status)return 406===t.status&&alert("You must provide a valid folder name when setting the user level to 'externalDesigner'."),await ServerErrorResponse$2.Create(t);console.log("pinned user updated successfully")}async loadDirectories(e){const t=await this.postJson("/directories/load",JSON.stringify(e));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async loadInvitation(){const e=await this.postJson("/user/invitation/load","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async acceptInvitation(){const e=await this.postJson("/user/invitation/accept","{}");return 200===e.status&&console.log("invitation accepted"),await ServerErrorResponse$2.Create(e)}async declineInvitation(){const e=await this.postJson("/user/invitation/decline","{}");return 200===e.status&&console.log("invitation declined"),await ServerErrorResponse$2.Create(e)}async loadPlans(){const e=await this.postJson("/saas/plans","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async loadPlanHistory(){const e=await this.postJson("/saas/plans/history","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async loadPackages(){const e=await this.postJson("/saas/packages","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async terminatePlan(){console.log("TODO: send api request to terminate Plan.")}async updatePlan(e){const t=await this.postJson("/saas/plan/book",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("Plan successfully changed")}async loadPackagesHistory(){const e=await this.postJson("/saas/packages/history","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async bookCreditPackages(e){const t=await this.postJson("/saas/packages/book",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("credit packages successfully booked!")}async loadWhitelist(){const e=await this.postJson("/user/whitelist/load","{}");if(200===e.status){const t=await e.json();return t.forEach(e=>e.userLevel=e.userLevel?e.userLevel:"user"),t}return await ServerErrorResponse$2.Create(e)}async bookSeats(e){const t=await this.postJson("/saas/seats/book",JSON.stringify({amount:e}));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("seats successfully booked")}async changeAccountOwner(e){const t=await this.postJson("/account/owner/change",JSON.stringify({newAccountOwnerUserId:e}));if(200!==t.status)return await ServerErrorResponse$2.Create(t)}async loadSeatsHistory(){const e=await this.postJson("/saas/seats/history","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async translate(e){const t=await this.postJson("translations/translate",JSON.stringify({sourceLanguageCode:e}));if(200!==t.status)return await ServerErrorResponse$2.Create(t)}async loadSeatsCount(){const e=await this.postJson("/saas/seats/count","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async loadUsedStorage(){const e=await this.postJson("/saas/storage","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async loadInvoices(){const e=await this.postJson("/saas/invoices","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async loadUserBookedInfo(){const e=await this.postJson("/saas/booked/info","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async loadUpcomingPaymentInfo(){const e=await this.postJson("/saas/payment/calculate","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async writeUserSetting(e){const t=await this.postJson("/user/setting/write",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t)}async loadAtomxyProfiles(){const e=await this.postJson("/atomyx/profiles","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async readUserTranslations(){const e=await this.postJson("user/translations/load",JSON.stringify({}));return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async readUserSettings(e){const t=await this.postJson("/user/settings/read",JSON.stringify(e));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async deleteUserSetting(e){const t=await this.postJson("/user/setting/delete",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log('User setting has been deleted with key: "'+e.key+'"')}async loadLayoutKeywords(e){const t=await this.postJson("/keywords/layout/load",JSON.stringify({includeGlobal:e}));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async loadSnippetTags(e){const t=await this.postJson("/snippets/tags/load",JSON.stringify({includeGlobal:e}));return 200===t.status?await t.json():await ServerErrorResponse$2.Create(t)}async loadLayoutSnippets(e,t,o,r,i=!0,a,s,n){const l=await this.postJson("/layoutSnippets/load",JSON.stringify({tags:e,keywords:t,aspectRatio:o,language:r,includeGlobal:i,sealing:a,featuredSetKey:s,hiddenSetKey:n,productType:"*"}));if(200===l.status){return(await l.json()).map(e=>new Snippet$1(e))}return await ServerErrorResponse$2.Create(l)}async loadStickerSnippets(e,t,o,r=!0){const i=await this.postJson("/snippets/load",JSON.stringify({type:"group",tags:e,keywords:t,language:o,includeGlobal:r}));if(200===i.status){return(await i.json()).map(e=>new Snippet$1(e))}return await ServerErrorResponse$2.Create(i)}async loadLayoutSnippetStatistics(){const e=await this.postJson("/snippets/layout/statistics",JSON.stringify({id:"string"}));if(200===e.status)return await e.json();throw await ServerErrorResponse$2.Create(e)}async deleteLayoutSnippet(e){const t=await this.postJson("/snippet/delete",JSON.stringify({id:e}));if(200===t.status)return;throw await ServerErrorResponse$2.Create(t)}async loadStickerSnippetStatistics(){const e=await this.postJson("/snippets/sticker/statistics",JSON.stringify({id:"string"}));if(200===e.status)return await e.json();throw await ServerErrorResponse$2.Create(e)}async loadKeywords(){const e=await this.postJson("/keywords/load","{}");return 200===e.status?await e.json():await ServerErrorResponse$2.Create(e)}async addKeyword(e){const t=await this.postJson("/keyword/add",JSON.stringify(e));return 200===t.status?(console.log("Keyword added: "+e.keyword),await t.json()):await ServerErrorResponse$2.Create(t)}async renameKeyword(e){const t=await this.postJson("/keyword/rename",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("Keyword renamed to: "+e.keyword)}async removeKeyword(e){const t=await this.postJson("/keyword/remove",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("Keyword removed")}async moveKeyword(e){const t=await this.postJson("/keyword/move",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log("Keyword moved")}async uploadFile(e,t){const o=this.urlPrefix+"/user/file/upload",r=new FormData;r.append("file",e,t);const i=await postFormData(o,r,this.token);if(i.status>=200&&i.status<300)return await getUserFileUrl(currentUser.id,t);throw new Error(i.response)}async uploadFont(e){const t=this.urlPrefix+"/printess/upload/font",o=new FormData;o.append("file",e,e.name);const r=await postFormData(t,o,this.token);if(r.status>=200&&r.status<300){const e=JSON.parse(r.response);return Array.isArray(e)&&e.length?e[0].url:e.url}throw new Error(r.response)}async upload3dModel(e,t){const o=this.urlPrefix+"/user/3dmodel/upload",r=await postFormData(o,e,this.token,t);if(!(r.status>=200&&r.status<300))throw new Error(r.response)}load3dModels(){return this.postJsonTyped("user/3dmodels/list",JSON.stringify({}))}save3dModelJson(e,t){return this.postJsonVoid("user/3dmodel/json/save",JSON.stringify({id:e,json:t}))}delete3dModel(e){return this.postJsonVoid("user/3dmodel/delete",JSON.stringify({id:e}))}async deleteFile(e){const t=await this.postJson("/user/file/delete",JSON.stringify(e));if(200!==t.status)return await ServerErrorResponse$2.Create(t);console.log(e.name+" deleted successfully")}loadShopifyHooks(){return this.postJsonTyped("user/shopify/hooks/json/get",JSON.stringify({}))}saveShopifyHook(e){return this.postJsonTyped("user/shopify/hooks/json/save",JSON.stringify(e))}deleteShopifyHook(e){return this.postJsonTyped("user/shopify/hooks/json/delete",JSON.stringify(e))}loadShopifyFulfillmentSetting(){return this.postJsonTyped("user/shopify/fulfillment/json/get",JSON.stringify({}))}saveShopifyFulfillmentSetting(e){return this.postJsonTyped("user/shopify/fulfillment/json/save",JSON.stringify(e))}deleteShopifyFulfillmentSetting(e){return this.postJsonTyped("user/shopify/fulfillment/json/delete",JSON.stringify(e))}getDropboxRefreshToken(e,t){return this.postJsonTyped("user/dropbox/auth/refreshtoken/get",JSON.stringify({authToken:e,fullAccess:t}))}clearShopifyCreateOrderCache(){return this.postJsonVoid("shops/shopify/integrations/clearordercreatecache",JSON.stringify({}))}async loadProductionJobs(){const e=[];return e.push({enqueuedOn:new Date,processingOn:new Date,finishedOn:new Date,failedOn:new Date,isFinalStatus:!0,errorDetails:null,jobId:"my job id",productionType:"templateId",files:[{documentName:"my document",fileSize:2e3,downloadUrl:"https://www.example.com",pages:2}]}),e}retryOrder(e){return this.postJsonTyped("order/retry",JSON.stringify(e))}loadProductTemplates(){return this.postJsonTyped("productTemplates/load",JSON.stringify({}))}loadProductTemplate(e){const t={id:e};return this.postJsonTyped("productTemplate/load",JSON.stringify(t))}saveProductTemplate(e){return this.postJsonTyped("productTemplate/save",JSON.stringify(e))}loadDropshippers(e){const t={type:e};return this.postJsonTyped("dropshippers/load",JSON.stringify(t))}saveDropshipper(e){return this.postJsonTyped("dropshipper/save",JSON.stringify(e))}deleteDropshipper(e){return this.postJsonVoid("dropshipper/delete",JSON.stringify(e))}loadProductDefinitions(e){const t={dropshipperType:e};return this.postJsonTyped("productDefinitions/load",JSON.stringify(t))}saveProductDefinition(e){return this.postJsonTyped("productDefinition/save",JSON.stringify(e))}deleteProductDefinition(e){return this.postJsonVoid("productDefinition/delete",JSON.stringify({id:e}))}loadDropshipperInventory(e,t,o){const r={id:e,step:t,json:o};return this.postJsonTyped("dropshipper/inventory/load",JSON.stringify(r))}loadImageCategories(){return this.postJsonTyped("imageCategories/load",JSON.stringify({}))}loadImageCategoriesWithCounts(){return this.postJsonTyped("imageCategories/loadWithCounts",JSON.stringify({}))}addImageCategory(e){return this.postJsonTyped("imageCategory/createOrUpdate",JSON.stringify({name:e}))}updateImageCategory(e,t){return this.postJsonTyped("imageCategory/createOrUpdate",JSON.stringify({id:e,aiMode:t}))}deleteImageCategory(e){return this.postJsonVoid("imageCategory/delete",JSON.stringify({id:e}))}deleteGroupImagesFromCategory(e,t){return this.postJsonVoid("imageGroup/delete/from/category",JSON.stringify({categoryId:e,groupId:t}))}addImageGroup(e){return this.postJsonTyped("imageGroup/createOrUpdate",JSON.stringify({name:e}))}loadImageGroups(){return this.postJsonTyped("imageGroups/load",JSON.stringify({}))}updateImageGroup(e,t){return this.postJsonTyped("imageGroup/createOrUpdate",JSON.stringify({id:e,name:t}))}deleteImageGroup(e){return this.postJsonVoid("imageGroup/delete",JSON.stringify({id:e}))}loadImageInfo(e){return this.postJsonTyped("image/info/load",JSON.stringify({id:e}))}loadImageCategoryImages(e,t=0,o=400){return this.postJsonTyped("imageCategory/images/load",JSON.stringify({imageCategoryId:e,skip:t,take:o}))}connectImage(e,t,o){return this.postJsonVoid("imageCategory/image/connect",JSON.stringify({imageCategoryId:e,imageId:t,groupId:o}))}disconnectImage(e,t,o){return this.postJsonVoid("imageCategory/image/disconnect",JSON.stringify({imageCategoryId:e,imageId:t,groupId:o}))}setImageCategoryImageMeta(e,t,o,r){return this.postJsonVoid("imageCategory/image/meta/set",JSON.stringify({imageCategoryId:e,imageId:t,groupId:o,meta:r}))}imageExistsV3(e){return this.postJsonTyped("v3/image/exists",JSON.stringify({fileHash:e,shopInfo:{}}))}importImageFromUrlV2(e,t,o,r,i,a,s,n){return this.postJsonTyped("v2/processing/image/url/import",JSON.stringify({fileName:e,url:o,fileHash:t,fileMagick:r,fileCheck:i,imageCategoryId:a,imageGroupId:n,imageId:s,shopInfo:{}}))}async upload(e,t,o){const{extension:r,magick:i}=await getExtension(e),a=await calculateBlobSha1(e),s=await this.imageExistsV3(a);if(!(s instanceof ServerErrorResponse$2)&&t>0&&o>0)return void await this.connectImage(t,s.id,o);const n=new FormData,l=await sha1hex(currentUser.id);n.append("key","printess/upload/"+l+"/"+(new Date).getTime()+"_"+a+r),n.append("acl","public-read"),n.append("file",e,e.name),n.append("fileHash",a);try{if(s instanceof ServerErrorResponse$2){const r=await uploadToEndpoint(n);return await this.importImageFromUrlV2(e.name,a,r,i,"",t,0,o)}return await this.importImageFromUrlV2(e.name,a,"https://invalid.url",i,"",t,s.id,o)}finally{}}async loadImageAiFilterCategories(){const e=await this.readUserSettings({keys:["image-ai-effect-categories"]});if(e instanceof ServerErrorResponse$2)throw alert(e.message),new Error(e.message);return e["image-ai-effect-categories"]?JSON.parse(e["image-ai-effect-categories"]):[]}async saveImageAiFilterCategories(e){const t=[];for(const o of e)t.push({...o,filters:o.filters.filter(e=>e.id)});return console.log(t),await this.writeUserSetting({key:"image-ai-effect-categories",json:JSON.stringify(t)})}async addImageAiFilterCategory(e){const t=await this.loadImageAiFilterCategories(),o={id:generateID(),label:e,filters:[]};return t.push(o),await this.saveImageAiFilterCategories(t),o}async deleteImageAiFilterCategory(e){const t=await this.loadImageAiFilterCategories(),o=t.find(t=>t.id===e),r=t.filter(t=>t.id!==e);return o?(this.saveImageAiFilterCategories(r),o.id):""}async loadImageAiFilterCategory(e){return(await this.loadImageAiFilterCategories()).find(t=>t.id===e)}async addOrUpdateImageAiFilterToCategory(e,t){const o=await this.loadImageAiFilterCategories(),r=o.find(t=>t.id===e),i=o.filter(t=>t.id!==e);if(r){if(r.filters.find(e=>e.id===t.id)){const e=r.filters.filter(e=>e.id!==t.id);e.push(t),r.filters=e}else r.filters.push(t);i.push(r),await this.saveImageAiFilterCategories(i);return t}console.log("Category doesnt exist: ",e)}async deleteImageAiFilterFromCategory(e,t){const o=await this.loadImageAiFilterCategories(),r=o.find(t=>t.id===e),i=o.filter(t=>t.id!==e);if(r){const e=r.filters.find(e=>e.id===t);if(e){const o=r.filters.filter(e=>e.id!==t);return r.filters=o,i.push(r),await this.saveImageAiFilterCategories(i),e}}}async loadImageAiFilterInfo(e){const t=(await this.loadImageAiFilterCategories()).find(t=>t.filters.find(t=>t.id===e)),o=t?.filters.find(t=>t.id===e);return o}async uploadAiFilterThumbnail(e,t,o){const{extension:r,magick:i}=await getExtension(e);await calculateBlobSha1(e);let a,s=!0;if(o){let e=await this.loadImageAiFilterInfo(o);(e instanceof ServerErrorResponse$2||!e)&&(console.log("new imageAiFilter in frontend: ",o),s=!1),a=e,await this.deleteImageAiFilterFromCategory(t,o)}else{const e=(await this.loadImageAiFilterCategory(t)).filters.length||0;a=new ImageAiFilter(e.toString(),"Untitled"),s=!1}const n=await this.upload(e,0,0);if(n instanceof ServerErrorResponse$2);else if(n&&(a.thumbnailUrl=n.original.url,n.scaledVersions&&n.scaledVersions.length)){const e=n.scaledVersions.sort((e,t)=>e.width-t.width);a.thumbnailUrl=e[0].url}return s&&await this.addOrUpdateImageAiFilterToCategory(t,a),a.thumbnailUrl}async uploadPhotoBookThemeThumbnail(e){const t=await this.upload(e,0,0);if(t instanceof ServerErrorResponse$2);else if(t){let e=t.original.url;if(t.scaledVersions&&t.scaledVersions.length){const o=t.scaledVersions.sort((e,t)=>e.width-t.width);e=o[0].url}return e}}async loadAddons(){return(await unwrapOrThrow(this.postJsonTyped("addons/load","{}"))).map(e=>({...e,price:JSON.parse(e.price)}))}loadAddonEvents(){return unwrapOrThrow(this.postJsonTyped("addon/events/load","{}"))}bookAddon(e){return unwrapOrThrow(this.postJsonVoid("addon/book",JSON.stringify({id:e})))}cancelAddon(e){return unwrapOrThrow(this.postJsonVoid("addon/cancel",JSON.stringify({id:e})))}}async function unwrapOrThrow(e){const t=await e;if(t instanceof ServerErrorResponse$2)throw new Error(t.message);return t}function createEditorUrl(e,t){const o=e.result?.ff;return`${getEditorUrl()+(t??"")}?name=${encodeURIComponent(e.loadableTemplateName)}${currentUser.id===e.userId?"":"&userId="+e.userId}${e.usedPublishedVersion?"&version=published":"&version=draft"}${o?"&formFieldsUrl="+o:""}`}class ApiStream{constructor(e,t,o,r){if("orders"===t)this.endpoint="wss://"+e+"/stream/orders";this.closeConnection=!1,this.timeout=250,this.token=o,this.onMessage=r,this.connect()}disconnect(){clearInterval(this.pingHandle),clearTimeout(this.timeoutHandle),this.closeConnection=!0,this.socket.close()}tryReconnect(){clearInterval(this.pingHandle),clearTimeout(this.timeoutHandle),this.timeoutHandle=window.setTimeout(()=>this.connect(),this.timeout)}connect(){!0!==this.closeConnection&&(this.timeout=Math.min(1.5*this.timeout,1e4),this.socket=new WebSocket(this.endpoint),this.socket.onerror=()=>{this.tryReconnect()},this.socket.onclose=()=>{this.tryReconnect()},this.socket.onopen=()=>{const e={c:adm.useAdminMode?"adminAuth":"auth",p:this.token};this.timeout=250,clearInterval(this.pingHandle),this.pingHandle=window.setInterval(()=>this.sendPing(),25e3),this.socket.send(JSON.stringify(e))},this.socket.onmessage=e=>{const t=JSON.parse(e.data);switch(t.c){case"ping":this.sendPong();break;case"pong":case"auth":break;case"tokenExpired":this.disconnect();break;default:this.onMessage(t)}})}sendPing(){this.socket.send(JSON.stringify({c:"ping",p:""}))}sendPong(){this.socket.send(JSON.stringify({c:"pong",p:""}))}}function arrayBufferToHex(e){const t=new Uint8Array(e);return Array.from(t).map(e=>("00"+e.toString(16)).slice(-2)).join("")}async function sha1hex(e){let t;if("string"==typeof e){t=(new TextEncoder).encode(e)}else t=e;return arrayBufferToHex(await crypto.subtle.digest("SHA-1",t))}function loadBlobAsArrayBuffer(e){return new Promise((t,o)=>{const r=new FileReader;r.onload=function(){t(r.result)},r.onerror=function(e){o(e)},r.readAsArrayBuffer(e)})}async function calculateBlobSha1(e){const t=await loadBlobAsArrayBuffer(e),o=new Uint8Array(t);return await sha1hex(o)}function sendXhr(e,t,o){return new Promise((o,r)=>{e.onreadystatechange=function(){4===e.readyState&&o()},e.onerror=function(){r({status:this.status,statusText:e.statusText})},e.send(t)})}async function getExtension(e){if(e.size<12)throw new Error("Invalid image file. Please upload a valid file. File="+e.name);const t=e.slice(0,12),o=arrayBufferToHex(await loadBlobAsArrayBuffer(t));let r="";if(o.startsWith("89504e470d0a1a0a"))r=".png";else if(o.startsWith("ffd8ff"))r=".jpg";else if(o.startsWith("255044462d"))r=".pdf";else if(o.startsWith("49492a00")||o.startsWith("4d4d002a"))r=".tif";else if(o.startsWith("52494646")||o.endsWith("57454250"))r=".webp";else{if(-1===o.indexOf("6674797068656963"))throw new Error("Invalid file type provided.");r=".heic"}return{extension:r,magick:o}}async function uploadToEndpoint(e){const t=e.get("key"),o=new XMLHttpRequest,r="https://printess-open.s3.eu-central-1.amazonaws.com/";if(o.open("POST",r,!0),await sendXhr(o,e),o.status>=200&&o.status<300){return r+t}throw new Error("Could not upload. Status code="+o.status)} /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const t$3=window,e$7=t$3.ShadowRoot&&(void 0===t$3.ShadyCSS||t$3.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$4=Symbol(),n$4=new WeakMap;let o$6=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==s$4)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(e$7&&void 0===e){const o=void 0!==t&&1===t.length;o&&(e=n$4.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&n$4.set(t,e))}return e}toString(){return this.cssText}};const r$3=e=>new o$6("string"==typeof e?e:e+"",void 0,s$4),i$4=(e,...t)=>{const o=1===e.length?e[0]:t.reduce((t,o,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[r+1],e[0]);return new o$6(o,e,s$4)},S$1=(e,t)=>{e$7?e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(t=>{const o=document.createElement("style"),r=t$3.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=t.cssText,e.appendChild(o)})},c$3=e$7?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const o of e.cssRules)t+=o.cssText;return r$3(t)})(e):e; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var s$3;const e$6=window,r$2=e$6.trustedTypes,h$1=r$2?r$2.emptyScript:"",o$5=e$6.reactiveElementPolyfillSupport,n$3={toAttribute(e,t){switch(t){case Boolean:e=e?h$1:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=null!==e;break;case Number:o=null===e?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch(e){o=null}}return o}},a$1=(e,t)=>t!==e&&(t==t||e==e),l$4={attribute:!0,type:String,converter:n$3,reflect:!1,hasChanged:a$1};let d$1=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),(null!==(t=this.h)&&void 0!==t?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,o)=>{const r=this._$Ep(o,t);void 0!==r&&(this._$Ev.set(r,o),e.push(r))}),e}static createProperty(e,t=l$4){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const o="symbol"==typeof e?Symbol():"__"+e,r=this.getPropertyDescriptor(e,o,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){return{get(){return this[t]},set(r){const i=this[e];this[t]=r,this.requestUpdate(e,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||l$4}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),void 0!==e.h&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,t=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const o of t)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const o=new Set(e.flat(1/0).reverse());for(const e of o)t.unshift(c$3(e))}else void 0!==e&&t.push(c$3(e));return t}static _$Ep(e,t){const o=t.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof e?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(e=this.constructor.h)||void 0===e||e.forEach(e=>e(this))}addController(e){var t,o;(null!==(t=this._$ES)&&void 0!==t?t:this._$ES=[]).push(e),void 0!==this.renderRoot&&this.isConnected&&(null===(o=e.hostConnected)||void 0===o||o.call(e))}removeController(e){var t;null===(t=this._$ES)||void 0===t||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=null!==(e=this.shadowRoot)&&void 0!==e?e:this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){var e;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$ES)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostConnected)||void 0===t?void 0:t.call(e)})}enableUpdating(e){}disconnectedCallback(){var e;null===(e=this._$ES)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostDisconnected)||void 0===t?void 0:t.call(e)})}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$EO(e,t,o=l$4){var r;const i=this.constructor._$Ep(e,o);if(void 0!==i&&!0===o.reflect){const a=(void 0!==(null===(r=o.converter)||void 0===r?void 0:r.toAttribute)?o.converter:n$3).toAttribute(t,o.type);this._$El=e,null==a?this.removeAttribute(i):this.setAttribute(i,a),this._$El=null}}_$AK(e,t){var o;const r=this.constructor,i=r._$Ev.get(e);if(void 0!==i&&this._$El!==i){const e=r.getPropertyOptions(i),a="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==(null===(o=e.converter)||void 0===o?void 0:o.fromAttribute)?e.converter:n$3;this._$El=i,this[i]=a.fromAttribute(t,e.type),this._$El=null}}requestUpdate(e,t,o){let r=!0;void 0!==e&&(((o=o||this.constructor.getPropertyOptions(e)).hasChanged||a$1)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),!0===o.reflect&&this._$El!==e&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(e,o))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((e,t)=>this[t]=e),this._$Ei=void 0);let t=!1;const o=this._$AL;try{t=this.shouldUpdate(o),t?(this.willUpdate(o),null===(e=this._$ES)||void 0===e||e.forEach(e=>{var t;return null===(t=e.hostUpdate)||void 0===t?void 0:t.call(e)}),this.update(o)):this._$Ek()}catch(e){throw t=!1,this._$Ek(),e}t&&this._$AE(o)}willUpdate(e){}_$AE(e){var t;null===(t=this._$ES)||void 0===t||t.forEach(e=>{var t;return null===(t=e.hostUpdated)||void 0===t?void 0:t.call(e)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){void 0!==this._$EC&&(this._$EC.forEach((e,t)=>this._$EO(t,this[t],e)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ var t$2;d$1.finalized=!0,d$1.elementProperties=new Map,d$1.elementStyles=[],d$1.shadowRootOptions={mode:"open"},null==o$5||o$5({ReactiveElement:d$1}),(null!==(s$3=e$6.reactiveElementVersions)&&void 0!==s$3?s$3:e$6.reactiveElementVersions=[]).push("1.6.1");const i$3=window,s$2=i$3.trustedTypes,e$5=s$2?s$2.createPolicy("lit-html",{createHTML:e=>e}):void 0,o$4="$lit$",n$2=`lit$${(Math.random()+"").slice(9)}$`,l$3="?"+n$2,h=`<${l$3}>`,r$1=document,d=()=>r$1.createComment(""),u$2=e=>null===e||"object"!=typeof e&&"function"!=typeof e,c$2=Array.isArray,v=e=>c$2(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),a="[ \t\n\f\r]",f$1=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m$1=/>/g,p$1=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,w=e=>(t,...o)=>({_$litType$:e,strings:t,values:o}),x=w(1),T=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r$1.createTreeWalker(r$1,129,null,!1),P=(e,t)=>{const o=e.length-1,r=[];let i,a=2===t?"":"",s=f$1;for(let t=0;t"===l[0]?(s=null!=i?i:f$1,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,n=l[1],s=void 0===l[3]?p$1:'"'===l[3]?$:g):s===$||s===g?s=p$1:s===_||s===m$1?s=f$1:(s=p$1,i=void 0);const p=s===p$1&&e[t+1].startsWith("/>")?" ":"";a+=s===f$1?o+h:c>=0?(r.push(n),o.slice(0,c)+o$4+o.slice(c)+n$2+p):o+n$2+(-2===c?(r.push(void 0),t):p)}const n=a+(e[o]||"")+(2===t?"":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==e$5?e$5.createHTML(n):n,r]};class V{constructor({strings:e,_$litType$:t},o){let r;this.parts=[];let i=0,a=0;const s=e.length-1,n=this.parts,[l,c]=P(e,t);if(this.el=V.createElement(l,o),C.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(r=C.nextNode())&&n.length0){r.textContent=s$2?s$2.emptyScript:"";for(let o=0;o2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,o,r){const i=this.strings;let a=!1;if(void 0===i)e=N(this,e,t,0),a=!u$2(e)||e!==this._$AH&&e!==T,a&&(this._$AH=e);else{const r=e;let s,n;for(e=i[0],s=0;s{var r,i;const a=null!==(r=null==o?void 0:o.renderBefore)&&void 0!==r?r:t;let s=a._$litPart$;if(void 0===s){const e=null!==(i=null==o?void 0:o.renderBefore)&&void 0!==i?i:null;a._$litPart$=s=new M(t.insertBefore(d(),e),e,void 0,null!=o?o:{})}return s._$AI(e),s /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */};var l$2,o$3;let s$1=class extends d$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const o=super.createRenderRoot();return null!==(e=(t=this.renderOptions).renderBefore)&&void 0!==e||(t.renderBefore=o.firstChild),o}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=B(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}render(){return T}};s$1.finalized=!0,s$1._$litElement$=!0,null===(l$2=globalThis.litElementHydrateSupport)||void 0===l$2||l$2.call(globalThis,{LitElement:s$1});const n$1=globalThis.litElementPolyfillSupport;null==n$1||n$1({LitElement:s$1}),(null!==(o$3=globalThis.litElementVersions)&&void 0!==o$3?o$3:globalThis.litElementVersions=[]).push("3.3.1"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const e$4=e=>t=>"function"==typeof t?((e,t)=>(customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:o,elements:r}=t;return{kind:o,elements:r,finisher(t){customElements.define(e,t)}}})(e,t),i$2=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(o){o.createProperty(t.key,e)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(o){o.createProperty(t.key,e)}}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function e$3(e){return(t,o)=>void 0!==o?((e,t,o)=>{t.constructor.createProperty(o,e)})(e,t,o):i$2(e,t)} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function t$1(e){return e$3({...e,state:!0})} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const o$2=({finisher:e,descriptor:t})=>(o,r)=>{var i;if(void 0===r){const r=null!==(i=o.originalKey)&&void 0!==i?i:o.key,a=null!=t?{kind:"method",placement:"prototype",key:r,descriptor:t(o.key)}:{...o,key:r};return null!=e&&(a.finisher=function(t){e(t,r)}),a}{const i=o.constructor;void 0!==t&&Object.defineProperty(o,r,t(r)),null==e||e(i,r)}}; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function i$1(e,t){return o$2({descriptor:t=>{const o={get(){var t,o;return null!==(o=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(e))&&void 0!==o?o:null},enumerable:!0,configurable:!0};return o}})} /** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var n;null===(n=window.HTMLSlotElement)||void 0===n||n.prototype.assignedElements; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4},e$2=e=>(...t)=>({_$litDirective$:e,values:t});class i{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,o){this._$Ct=e,this._$AM=t,this._$Ci=o}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}} /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */let e$1=class extends i{constructor(e){if(super(e),this.et=A,e.type!==t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===A||null==e)return this.ft=void 0,this.et=e;if(e===T)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}};e$1.directiveName="unsafeHTML",e$1.resultType=1;const o$1=e$2(e$1);var __decorate$2F=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const iconNames=["image","image-solid","image-regular","portrait","bezier","text","pathText","magnet","pointer","close-square","close","docRef","collapseLeft","expandLeft","edit","edit-inverse","pen","pen-solid","pencil-ruler","plus","plus-circle","plus-square","minus","minus-light","circle-1","shapes","square","settings","vector-shape","address-card","paperclip","facing-pages","page","cog","perspective","style","story","text-flow","exchange","text-align-justify-justify","text-align-justify-left","text-align-justify-right","text-align-justify-center","text-align-left","text-align-right","text-align-center","check","check-solid","check-square","user-circle","user-solid","user-crown-solid","arrow-left","arrow-right","arrow-up","arrow-down","arrows","arrows-circle","arrows-h","arrows-v","carret-down-solid","carret-right-solid","carret-left-solid","text-size","text-width","line-height","line-width","palette","brush","undo","undo-solid","redo","redo-solid","copy","copy-solid","paste","cut","object-ungroup","trash","trash-solid","remove-format","clipboard","search-plus","search-minus","search-light","save","save-light","slash","empty","cloud-upload-alt","folder-open-solid","tint","warp-arc","warp-flag","warp-bulge","warp-arc-upper","warp-pit-upper","warp-arc-lower","warp-pit-lower","warp-fish","warp-squeeze","warp-mug","mesh","crop","place-image","fill-image","fit-image","vertical-align-bottom-baseline","vertical-align-center-baseline","vertical-align-center","vertical-align-top","vertical-align-bottom","warning","effects","robot","microchip","record","play","running","rotator","lock-closed","lock-open","lock-closed-solid","user-lock-closed","user-lock-opened","link","stroke-cap-round","stroke-cap-projecting","stroke-cap-butt","stroke-align-center","stroke-align-inside","stroke-align-outside","stroke-join-miter","stroke-join-round","stroke-join-bevel","wrap-both-sides","no-wrap","printess-wand","print-solid","print-slash-solid","shopping-cart","shopping-cart-solid","shopping-cart-add","folder-plus","eye-solid","eye-solid-slash","font","send-back","send-backward","bring-front","bring-forward","distort","list-ul","ellipsis-v","ellipsis-h","sun-light","adjust","scroll-old","align-top","align-middle","align-bottom","align-left","align-center","align-right","space-vertical-around","space-vertical-between","space-horizontal-around","space-horizontal-between","layer-group","ruler","layout-snippet","layout-snippet-invers","group-snippet","group-snippet-invers","primary-doc","primary-doc-invers","preview-doc","preview-doc-invers","production-doc","production-doc-invers","facebook-round","clock-solid","page-plus-solid","user-friends-solid","opacity","file-invoice","help","triangle-solid","pin-solid","pin","angle-right","angle-down","sync","mirror-x","mirror-y","folder-tree-solid","filter-reset","compact-disc","chevron-double-down-duotone","chevron-left","chevron-right","angle-left","angle-right","database","coins","sync-alt","clock-light","calendar-alt","calendar-light","coin-light","coin","page-inverse","page-light","bars-light","credit-card","info-circle","carret-left-solid","check-circle-solid","pause-solid","pause-light","angle-up-light","angle-down-light","chevron-up-light","chevron-down-light","sign-in-light","share-light","share-solid","reply-light","reply-solid","undo-arrow","redo-arrow","rotate","primary","back","angle-double-right","angle-double-left","arrow-to-right","arrow-to-left","distribute-image","minus-square","arrow-square-right","bullseye-pointer-solid","hand-pointer-light","project-diagram-solid","eye-dropper","eye-dropper-light","cloud-upload-light","cloud-upload-check","arrows-resize-h","arrows-resize-v","arrows-resize","arrows-minimize","arrows-maximize","shopping-basket","shopping-basket-light","home-solid","home-light","smile","code-curly","text-bottom","text-center","text-top","pen-swirl","handwriting","focus-face","focus-group","mug","shirt","flower","burger-menu","path-non-zero","path-even-odd","circle-dollar","grid-lines","camera-slash","scissors","record-up","record-down","arrow-left-circle","arrow-right-circle","grid-4","image-to-text","text-to-image","handwriting-to-text","text-to-handwriting","arrow-right-long","camera-solid","desktop-mobile-duotone","cloud-check-duotone","glass","pot-food","coke","cube-regular","cube-invers","deco-fading","deco-color-cut","deco-oblique-lines","deco-horizontal-lines","text-block-shadow","text-line-shadow","text-3d-shadow","text-no-shadow","add-gap-around","remove-gap-around","book-thin","book-solid","chart-mixed","badge-check","grip-dots-vertical","square-caret-down","file-arrow-down","download","file-code-light","file-plus-light","download-light","circle-check-solid","circle-ellipsis-solid","circle-plus-solid"];function getIcon$1(e){switch(e){case"docRef":return' ';case"image":return'';case"image-solid":return'';case"image-regular":return'';case"help":return'';case"bezier":return'';case"pathText":return'\t\t ';case"text":return'';case"magnet":return'';case"pointer":return'';case"collapseLeft":return'';case"expandLeft":return'';case"edit":return'';case"edit-inverse":return'';case"pen":return'';case"pen-solid":return'';case"pencil-ruler":return'';case"plus-circle":return'';case"minus":return'';case"minus-light":return'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"circle-1":return'';case"shapes":return'';case"vector-shape":return'';case"address-card":return'';case"paperclip":return'';case"facing-pages":return'';case"page":return'';case"cog":return'';case"perspective":return' ';case"style":return'';case"story":return'';case"plus-square":return'';case"text-flow":return'';case"exchange":return'';case"text-align-justify-justify":return'';case"text-align-justify-left":return'';case"text-align-justify-right":return'';case"text-align-justify-center":return'';case"text-align-left":return'';case"text-align-right":return'';case"text-align-center":return'';case"check":return'';case"check-solid":return'';case"plus":return'';case"arrow-left":return'';case"mirror-x":return'';case"arrow-up":return'';case"arrow-down":return'';case"arrow-right":return'';case"mirror-y":return'';case"arrows-h":return'';case"arrows-v":return'';case"arrows":return'';case"arrows-circle":return'';case"text-size":return'';case"text-width":return'';case"line-width":return'\t\t';case"line-height":return'';case"palette":return'';case"brush":return'';case"undo":return'';case"redo":return'';case"copy":return'';case"cut":return'';case"paste":return'';case"object-ungroup":return'';case"trash":return'';case"remove-format":return'';case"clipboard":return'';case"undo-solid":return'';case"redo-solid":return'';case"copy-solid":return'';case"trash-solid":return'';case"search-plus":return'';case"search-minus":return'';case"search-light":return'';case"save":return'';case"save-light":return'\x3c!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"cloud-upload-alt":return'';case"folder-open-solid":return'';case"tint":return'';case"warp-arc":return'\t';case"warp-flag":return'';case"warp-bulge":return'';case"warp-arc-lower":return'';case"warp-arc-upper":return'';case"warp-pit-upper":return'';case"warp-pit-lower":return'';case"warp-fish":return'';case"warp-squeeze":return'';case"settings":return'';case"slash":return'';case"empty":return'';case"warp-mug":return'';case"close-square":return'';case"close":return'';case"square":return'';case"mesh":return'\n ';case"crop":return'';case"place-image":return'\x3c!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"fill-image":return'';case"fit-image":return'';case"vertical-align-bottom-baseline":return'\n \n \n \n ';case"vertical-align-bottom":return'\n \n \n ';case"vertical-align-center":return'\n \n \n ';case"vertical-align-center-baseline":return'\n \n \n \n \n \n \n ';case"vertical-align-top":return'\n \n \n \n ';case"warning":return'';case"effects":return'';case"robot":return'';case"microchip":return'';case"record":return'';case"play":return'';case"running":return'';case"rotator":return'';case"lock-closed":return'';case"lock-open":return'';case"user-lock-closed":return'';case"user-crown-solid":return'';case"user-solid":return'';case"user-lock-opened":return'';case"link":return'';case"stroke-cap-round":return'';case"stroke-cap-projecting":return'\t';case"stroke-cap-butt":return'';case"stroke-align-center":return'';case"stroke-align-inside":return'';case"stroke-align-outside":return'\t\t';case"stroke-join-miter":return'';case"stroke-join-round":return'';case"stroke-join-bevel":return'';case"ruler":return'';case"no-wrap":return'\t\t\t\t\t\t\t\t\t\t';case"wrap-both-sides":return' \t\t\t\t';case"printess-wand":return'\t\t';case"shopping-cart":return'';case"shopping-cart-solid":return'';case"shopping-cart-add":return'';case"folder-plus":return'';case"eye-solid":return'';case"eye-solid-slash":return'';case"lock-closed-solid":return'';case"print-solid":return'';case"print-slash-solid":return'';case"carret-down-solid":return'';case"carret-right-solid":return'';case"carret-left-solid":return'';case"font":return'';case"check-square":return'';case"user-circle":return'';case"send-back":return'';case"send-backward":return'';case"bring-front":return'';case"bring-forward":return'';case"distort":return'';case"list-ul":return'';case"portrait":return'';case"ellipsis-h":return'';case"ellipsis-v":return'';case"sun-light":return'';case"adjust":return'';case"scroll-old":return'';case"align-top":return' \n ';case"align-middle":return'';case"align-bottom":return' ';case"align-left":return' ';case"align-center":return' ';case"align-right":return' ';case"space-vertical-around":return' ';case"space-vertical-between":return' ';case"space-horizontal-around":return' ';case"space-horizontal-between":return' ';case"layer-group":return'';case"facebook-round":return'';case"primary-doc":return'\n \n \n \n \n \n ';case"primary-doc-invers":return'\n \n ';case"preview-doc":return'\n \n \n \n \n \n ';case"preview-doc-invers":return'\n \n \n \n \n \n ';case"production-doc":return'\n \n \n ';case"production-doc-invers":return'\n \n \n ';case"layout-snippet":return'\n \n \n \n \n \n \n \n \n \n ';case"layout-snippet-invers":return'\n \n \n \n \n \n ';case"group-snippet":return'\n \n \n \n \n \n \n ';case"group-snippet-invers":return'\n \n \n ';case"pin-solid":return'';case"pin":return'';case"file-invoice":return'';case"clock-solid":return'';case"page-plus-solid":return'';case"user-friends-solid":return'';case"opacity":return'';case"triangle-solid":return'';case"angle-right":return'';case"angle-down":return'';case"sync":return'';case"folder-tree-solid":return'';case"filter-reset":return'\n \n \n \n ';case"compact-disc":return'\n \n \n ';case"chevron-double-down-duotone":return'\n \n \n ';case"chevron-right":return'\n \n ';case"chevron-left":return'\n \n ';case"angle-left":return'\n \n ';case"database":return'\n \n ';case"circle-dollar":return'';case"coins":return'\n \n \n ';case"sync-alt":return'\n \n ';case"clock-light":return'\n \n ';case"calendar-alt":return'\n \n ';case"calendar-light":return'\n \n ';case"coin-light":return'\n \n ';case"page-inverse":return'\n \n ';case"coin":return'\n \n ';case"page-light":return'\n \n ';case"bars-light":return'\n \n ';case"credit-card":return'\n \n ';case"info-circle":return'\n \n ';case"check-circle-solid":return'\n \n ';case"pause-solid":return'\n \n ';case"pause-light":return'\n \n ';case"angle-up-light":return'\n \n ';case"angle-down-light":return'\n \n ';case"chevron-down-light":return'\n \n ';case"chevron-up-light":return'\n \n ';case"sign-in-light":return'\n \n ';case"share-light":return'\n \n ';case"reply-light":return'\n \n ';case"reply-solid":return'\n \n ';case"share-solid":return'\n \n ';case"undo-arrow":return'\n \n ';case"redo-arrow":return'\n \n ';case"arrows-resize":return'';case"arrows-resize-h":return'';case"arrows-resize-v":return'';case"arrows-minimize":return'';case"arrows-maximize":return'';case"rotate":return'\n \n \n \n \n \n \n ';case"primary":return'\n \n \n ';case"back":return'\n \n \n \n ';case"angle-double-right":return'\n \n ';case"angle-double-left":return'\n \n ';case"arrow-to-right":return'\n \n ';case"arrow-to-left":return'\n \n ';case"distribute-image":return'';case"minus-square":return'\n \n ';case"arrow-square-right":return'\n \n ';case"bullseye-pointer-solid":return'\n \n ';case"hand-pointer-light":return'\n \n ';case"eye-dropper":return'';case"eye-dropper-light":return'\n \n ';case"project-diagram-solid":return'';case"cloud-upload-light":return'\n \n ';case"cloud-upload-check":return'\x3c!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"shopping-basket":return'\n \n ';case"shopping-basket-light":return'\n \n ';case"home-light":return'\n \n ';case"home-solid":return'\n \n ';case"smile":return'';case"code-curly":return'';case"text-bottom":return'';case"text-center":return'';case"text-top":return'';case"handwriting":return'\n \n ';case"pen-swirl":return'';case"shirt":return'';case"focus-face":return'';case"focus-group":return'';case"mug":return'';case"burger-menu":return'';case"flower":return'';case"path-non-zero":return'';case"path-even-odd":return'';case"grid-lines":return'\x3c!--! Font Awesome Pro 6.1.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"camera-slash":return'\x3c!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"scissors":return'';case"record-up":return'\x3c!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"record-down":return'\x3c!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"arrow-left-circle":return'\x3c!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"arrow-right-circle":return'\x3c!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"grid-4":return'';case"image-to-text":return'';case"text-to-image":return'';case"handwriting-to-text":return'';case"text-to-handwriting":return'';case"arrow-right-long":return'\x3c!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"camera-solid":return'\x3c!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"desktop-mobile-duotone":return'\x3c!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"cloud-check-duotone":return'\x3c!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"glass":return'';case"pot-food":return'';case"coke":return'\n \n \n \n \n \n \n \n \n \n ';case"cube-regular":case"cube-invers":return'';case"deco-fading":return' ';case"deco-color-cut":return'';case"deco-oblique-lines":return' ';case"deco-horizontal-lines":return' ';case"text-block-shadow":return'';case"text-line-shadow":return' ';case"text-3d-shadow":return' ';case"text-no-shadow":return'';case"add-gap-around":return'';case"remove-gap-around":return'';case"book-thin":return'';case"book-solid":return'';case"chart-mixed":return'\x3c!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --\x3e';case"badge-check":return'\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e';case"grip-dots-vertical":return'\x3c!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e';case"square-caret-down":return'\x3c!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e';case"file-arrow-down":return'\x3c!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e';case"download":return'\x3c!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e';case"file-code-light":return'\n \n ';case"file-plus-light":return'\n \n ';case"download-light":return'\n \n ';case"circle-check-solid":return'\n \n ';case"circle-ellipsis-solid":return'\n \n ';case"circle-plus-solid":return'\n \n ';default:assertNever$1(e)}}let WcIcon=class extends s$1{constructor(){super(...arguments),this.primaryColor="text",this.icon="pen"}static get styles(){return i$4` :host, :host * { box-sizing: border-box; } :host { display: block; } svg { width: 100%; height: 100%; display: block; } .color-arrows { fill: rgba(255,255,255,0.5); } svg.color-arrows:hover { fill: rgba(255,255,255,0.6); } .color-headline { fill: var(--printess-headlineColor); } svg.color-headline:hover { fill: var(--printess-headlineColorHover); } .color-text { fill: var(--printess-textColor); } svg.color-text:hover { fill: var(--printess-textColorHover); } .color-medium { fill: var(--printess-textColorDisabled); } svg.color-medium:hover { fill: var(--printess-textColorDisabledHover); } .color-light { fill: var(--printess-textColorLight); } .color-light:hover { fill: var(--printess-textColorLightHover); } .color-toolbar { fill: var(--printess-toolbarColor); } svg.color-toolbar:hover { fill: var(--printess-toolbarColorHover); } .color-remove { fill: var(--printess-textColor); } svg.color-remove:hover { fill: tomato; } .color-red { fill: red; } svg.color-red:hover { fill: tomato; } .color-pink, .color-pink:hover { fill: #d3277c; } .color-magenta { fill: #a2256b; } .color-magenta:hover { fill: #910c57; } .color-printess-pink, .color-printess-pink:hover { fill: var(--printess-pink); } .color-black, .color-black:hover { fill: black; } .color-green, .color-green:hover { fill: green; } .color-lightgreen, .color-lightgreen:hover { fill: #83c000; } .color-blue, .color-blue:hover { fill: blue; } .color-table-blue { fill: #4c9ce2; } .color-table-blue:hover { fill: #6face2; } .color-gray, .color-gray:hover { fill: #555555; } .color-lightgray, .color-lightgray:hover { fill: #bbb; } .color-warning, .color-warning:hover { fill: orange; } .color-frame { fill: var(--printess-frameColor); } svg.color-frame:hover { fill: var(--printess-frameColorHover); } .color-head-toolbar { fill: var(--printess-headToolbarColor); } svg.color-head-toolbar:hover { fill: var(--printess-headToolbarColorHover); } `}render(){let e="color-"+this.primaryColor;return this.classList.contains("strict-no-zoom")&&(e+=" strict-no-zoom"),x`${o$1(getIcon$1(this.icon).replace("{canReceiveMenuClick&&e.callback&&e.callback()}),e.disabled)if(t.classList.add("disabled"),e.icon){const o=new WcIcon;o.icon=e.icon,o.primaryColor="gray",t.appendChild(o)}else t.appendChild(document.createElement("div"));else if(!e.textOnly)if(e.icon){const o=new WcIcon;o.icon=e.icon,e.iconColor?o.primaryColor=e.iconColor:e.icon.indexOf("-invers")>=0?o.primaryColor="headline":o.primaryColor="text",t.appendChild(o)}else{const o=document.createElement("div");e.color&&(o.style.backgroundColor=e.color,o.classList.add("color")),t.appendChild(o)}const o=document.createElement("div");if(o.classList.add("printess-ctx-menu-caption"),o.innerText=e.caption,e.color&&(o.style.color=e.color),e.font&&(o.style.fontFamily=e.font,o.style.fontSize="11pt"),t.appendChild(o),e.sub){const e=new WcIcon;e.icon="carret-right-solid",e.primaryColor="text",e.classList.add("arrow"),t.appendChild(e)}return t}function showCtxMenu(e,t,o=0,r=0,i=180,a=!1){e.preventDefault();const s=i;removeCtxMenu();const n=e.clientX,l=e.clientY;if(!e.target)return;if(!t){const o=e.target;"function"==typeof o.getContextMenu&&(t=o.getContextMenu(e.target,n,l))}if(!t)return;const c=28*t.filter(e=>"-"!==e.caption).length+7*t.filter(e=>"-"===e.caption).length;contextMenuDiv.style.height=c+"px",contextMenuDiv.style.width=s+"px",e.preventDefault();let d=n,p=l,h=n,g=l;contextMenuDiv.innerHTML="";const u=document.createElement("div");contextMenuDiv.appendChild(u);const m=document.createElement("ul");u.appendChild(m),canReceiveMenuClick=!1;for(const e of t){const t=getLi(e);if(t.addEventListener("mousedown",()=>{canReceiveMenuClick=!0}),t.addEventListener("mouseup",()=>{canReceiveMenuClick&&removeCtxMenu()}),e.sub&&e.sub.length){t.classList.add("printess-sub-menu-trigger");const o=document.createElement("div"),r=document.createElement("ul");o.appendChild(r),o.classList.add("printess-sub-menu");for(const t of e.sub){const e=getLi(t);r.appendChild(e)}g=window.innerHeight-l<7?-33-(l+7-window.innerHeight):7,h=window.innerWidth-n<2*s?-s:s,o.style.top=g+"px",o.style.left=h+"px",o.style.width=s+"px",t.onmouseover=()=>{o.style.display="block"},o.onmouseover=()=>{o.style.display="block"},t.onmouseout=()=>{o.style.display="none"},o.onmouseout=()=>{o.style.display="none"},t.appendChild(o)}m.appendChild(t)}p=l+c>window.innerHeight?window.innerHeight-c-10:l,window.innerWidth-(n+o)=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const publicDrawer={Production:[{name:"dashboard",title:"Dashboard",displayTo:["admin","printess-team","owner","user"]},{name:"printjobs",title:"Print Jobs",displayTo:["admin","printess-team","owner","user"]},{name:"dropship-orders",title:"Dropship Orders",displayTo:["admin","printess-team","owner","debug"],requiredClaim:"dropship"},{name:"submission-errors",title:"Submission Errors",displayTo:["user","printess-team","owner","debug"]}],"Account Settings":[{name:"account",title:"Account Data",displayTo:["admin","printess-team","owner"]},{name:"subscription",title:"Subscription",displayTo:["admin","printess-team","owner"]},{name:"invoices",title:"Payment & Invoices",displayTo:["debug","printess-team"]},{name:"team-members",title:"Team Members",displayTo:["admin","printess-team","owner"]},{name:"layout-snippets",title:"Layout Snippets",displayTo:["admin","printess-team","owner"]},{name:"photobook-themes",title:"Photobook Themes",displayTo:["admin","printess-team","owner"]},{name:"advanced-editor-settings",title:"Advanced Settings",displayTo:["admin","printess-team","owner"]}],"Buyerside Settings":[{name:"design",title:"Logo & Theme",displayTo:["admin","printess-team","owner","debug"]},{name:"translations",title:"Translations",displayTo:["admin","printess-team","owner"]},{name:"keyword-menu",title:"Keyword Menu",displayTo:["admin","printess-team","debug","owner"]},{name:"sort-index",title:"Menu Sort Index",displayTo:["admin","printess-team","debug","owner"],forbiddenPlans:["pay as you go","small","medium"]},{name:"image-categories",title:"Image Categories",displayTo:["admin","printess-team","debug","owner","user"],forbiddenPlans:["pay as you go","small","medium"]},{name:"image-ai-effects",title:"AI Image Effects",displayTo:["admin","printess-team","debug","owner","user"],forbiddenPlans:["pay as you go","small"]},{name:"3d",title:"3D Models",displayTo:["admin","printess-team","owner","user","debug"],forbiddenPlans:["pay as you go"]},{name:"offensive-words",title:"Offensive Words",displayTo:["admin","printess-team","owner"]},{name:"advanced-buyerside-settings",title:"Letter Generator",displayTo:["admin","printess-team","owner"]},{name:"ai-access",title:"AI Limits",displayTo:["admin","printess-team","owner"]}],"Integration & Workflow Settings":[{name:"shopintegrations",title:"Shop Integrations",displayTo:["owner","debug"]},{name:"dropshipper",title:"Dropshippers",displayTo:["admin","printess-team","owner","debug"],requiredClaim:"dropship"},{name:"siteflow",title:"HP Site Flow",displayTo:["admin","printess-team","owner","debug"],requiredClaim:"dropship"},{name:"siteflow-products",title:"HP Site Flow",displayTo:["admin","printess-team","owner","debug"],hide:!0,requiredClaim:"dropship"},{name:"siteflow-connections",title:"HP Site Flow",displayTo:["admin","printess-team","owner","debug"],hide:!0,requiredClaim:"dropship"},{name:"print-settings",title:"Print Settings",displayTo:["admin","printess-team","owner"]},{name:"impositions",title:"Impositions",displayTo:["admin","printess-team","owner"]},{name:"advanced-shop-settings",title:"Advanced Settings",displayTo:["admin","printess-team","owner"]}],"Internal Stuff":[{name:"controls-overview",title:"Controls Overview",displayTo:["debug"]},{name:"taglist-test",title:"Taglist Test",displayTo:["debug"]},{name:"icons",title:"Icons",displayTo:["debug"]}]};let WcAppDrawer=class extends s$1{static get styles(){return[drawerStyles]}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this._handleResize)}disconnectedCallback(){window.removeEventListener("resize",this._handleResize),super.disconnectedCallback()}constructor(e,t){super(),this.selectedDrawer="dashboard",this.isTrialExpired=!1,this.drawerOpen=!1,this.debug="localhost"===window.location.hostname||window.location.href.indexOf("debug=1")>0||!0===window.printessDebug,this._handleResize=()=>{config.isMobile=window.innerWidth<=config.mobileDeviceWidth,this.requestUpdate()},this.selectedDrawer=e,this.isTrialExpired=t}getDrawerSelection(e){this.callback=e}openDrawer(){this.drawerOpen=!this.drawerOpen,this.requestUpdate()}setDrawerSelection(e){this.selectedDrawer=e,this.callback&&this.callback(this.selectedDrawer)}notToDisplay(e){return("subscription"===e||"design"===e)&&"api.printess.com"!==apiEndpoint&&"dev-aws.printess.com"!==apiEndpoint&&"localhost:5001"!==apiEndpoint}getMenuToBeDisplayed(){return Object.entries(publicDrawer).reduce((e,[t,o])=>{const r=o.filter(e=>drawerCanBeDisplayed(e,this.isTrialExpired));return r.length>0&&(e[t]=r),e},{})}render(){const e=this.getMenuToBeDisplayed();return x` ${config.isMobile?x``:""} `} ${t.map(e=>x`
this.setDrawerSelection(e.name)} > ${e.title}
`)} `)} `}};__decorate$2E([e$3({type:String})],WcAppDrawer.prototype,"selectedDrawer",void 0),__decorate$2E([e$3({type:Boolean})],WcAppDrawer.prototype,"isTrialExpired",void 0),WcAppDrawer=__decorate$2E([e$4("wc-app-drawer")],WcAppDrawer); /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ const isCEPolyfill="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,removeNodes=(e,t,o=null)=>{for(;t!==o;){const o=t.nextSibling;e.removeChild(t),t=o}},marker=`{{lit-${String(Math.random()).slice(2)}}}`,nodeMarker=`\x3c!--${marker}--\x3e`,markerRegex=new RegExp(`${marker}|${nodeMarker}`),boundAttributeSuffix="$lit$";class Template{constructor(e,t){this.parts=[],this.element=t;const o=[],r=[],i=document.createTreeWalker(t.content,133,null,!1);let a=0,s=-1,n=0;const{strings:l,values:{length:c}}=e;for(;n0;){const t=l[n],o=lastAttributeNameRegex.exec(t)[2],r=o.toLowerCase()+"$lit$",i=e.getAttribute(r);e.removeAttribute(r);const a=i.split(markerRegex);this.parts.push({type:"attribute",index:s,name:o,strings:a}),n+=a.length-1}}"TEMPLATE"===e.tagName&&(r.push(e),i.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(marker)>=0){const r=e.parentNode,i=t.split(markerRegex),a=i.length-1;for(let t=0;t{const o=e.length-t.length;return o>=0&&e.slice(o)===t},isTemplatePartActive=e=>-1!==e.index,createMarker=()=>document.createComment(""),lastAttributeNameRegex=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,walkerNodeFilter=133;function removeNodesFromTemplate(e,t){const{element:{content:o},parts:r}=e,i=document.createTreeWalker(o,133,null,!1);let a=nextActiveIndexInTemplateParts(r),s=r[a],n=-1,l=0;const c=[];let d=null;for(;i.nextNode();){n++;const e=i.currentNode;for(e.previousSibling===d&&(d=null),t.has(e)&&(c.push(e),null===d&&(d=e)),null!==d&&l++;void 0!==s&&s.index===n;)s.index=null!==d?-1:s.index-l,a=nextActiveIndexInTemplateParts(r,a),s=r[a]}c.forEach(e=>e.parentNode.removeChild(e))}const countNodes=e=>{let t=11===e.nodeType?0:1;const o=document.createTreeWalker(e,133,null,!1);for(;o.nextNode();)t++;return t},nextActiveIndexInTemplateParts=(e,t=-1)=>{for(let o=t+1;o0){for(;-1!==s;)i[s].index+=n,s=nextActiveIndexInTemplateParts(i,s);return}s=nextActiveIndexInTemplateParts(i,s)}}} /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const directives=new WeakMap,isDirective=e=>"function"==typeof e&&directives.has(e),noChange={},nothing={}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ class TemplateInstance{constructor(e,t,o){this.__parts=[],this.template=e,this.processor=t,this.options=o}update(e){let t=0;for(const o of this.__parts)void 0!==o&&o.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=isCEPolyfill?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],o=this.template.parts,r=document.createTreeWalker(e,133,null,!1);let i,a=0,s=0,n=r.nextNode();for(;ae}),commentMarker=` ${marker} `;class TemplateResult{constructor(e,t,o,r){this.strings=e,this.values=t,this.type=o,this.processor=r}getHTML(){const e=this.strings.length-1;let t="",o=!1;for(let r=0;r-1||o)&&-1===e.indexOf("--\x3e",i+1);const a=lastAttributeNameRegex.exec(e);t+=null===a?e+(o?commentMarker:nodeMarker):e.substr(0,a.index)+a[1]+a[2]+"$lit$"+a[3]+marker}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return void 0!==policy&&(t=policy.createHTML(t)),e.innerHTML=t,e}} /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const isPrimitive=e=>null===e||!("object"==typeof e||"function"==typeof e),isIterable=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class AttributeCommitter{constructor(e,t,o){this.dirty=!0,this.element=e,this.name=t,this.strings=o,this.parts=[];for(let e=0;e{try{const e={get capture(){return eventOptionsSupported=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class EventPart{constructor(e,t,o){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=o,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;isDirective(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=noChange,e(this)}if(this.__pendingValue===noChange)return;const e=this.__pendingValue,t=this.value,o=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),r=null!=e&&(null==t||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=getOptions(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=noChange}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const getOptions=e=>e&&(eventOptionsSupported?{capture:e.capture,passive:e.passive,once:e.once}:e.capture); /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */function templateFactory(e){let t=templateCaches.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},templateCaches.set(e.type,t));let o=t.stringsArray.get(e.strings);if(void 0!==o)return o;const r=e.strings.join(marker);return o=t.keyString.get(r),void 0===o&&(o=new Template(e,e.getTemplateElement()),t.keyString.set(r,o)),t.stringsArray.set(e.strings,o),o}const templateCaches=new Map,parts=new WeakMap,render$1=(e,t,o)=>{let r=parts.get(t);void 0===r&&(removeNodes(t,t.firstChild),parts.set(t,r=new NodePart(Object.assign({templateFactory:templateFactory},o))),r.appendInto(t)),r.setValue(e),r.commit()}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ class DefaultTemplateProcessor{handleAttributeExpressions(e,t,o,r){const i=t[0];if("."===i){return new PropertyCommitter(e,t.slice(1),o).parts}if("@"===i)return[new EventPart(e,t.slice(1),r.eventContext)];if("?"===i)return[new BooleanAttributePart(e,t.slice(1),o)];return new AttributeCommitter(e,t,o).parts}handleTextExpression(e){return new NodePart(e)}}const defaultTemplateProcessor=new DefaultTemplateProcessor; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const html=(e,...t)=>new TemplateResult(e,t,"html",defaultTemplateProcessor),getTemplateCacheKey=(e,t)=>`${e}--${t}`; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */let compatibleShadyCSSVersion=!0;void 0===window.ShadyCSS?compatibleShadyCSSVersion=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),compatibleShadyCSSVersion=!1);const shadyTemplateFactory=e=>t=>{const o=getTemplateCacheKey(t.type,e);let r=templateCaches.get(o);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},templateCaches.set(o,r));let i=r.stringsArray.get(t.strings);if(void 0!==i)return i;const a=t.strings.join(marker);if(i=r.keyString.get(a),void 0===i){const o=t.getTemplateElement();compatibleShadyCSSVersion&&window.ShadyCSS.prepareTemplateDom(o,e),i=new Template(t,o),r.keyString.set(a,i)}return r.stringsArray.set(t.strings,i),i},TEMPLATE_TYPES=["html","svg"],removeStylesFromLitTemplates=e=>{TEMPLATE_TYPES.forEach(t=>{const o=templateCaches.get(getTemplateCacheKey(t,e));void 0!==o&&o.keyString.forEach(e=>{const{element:{content:t}}=e,o=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{o.add(e)}),removeNodesFromTemplate(e,o)})})},shadyRenderSet=new Set,prepareTemplateStyles=(e,t,o)=>{shadyRenderSet.add(e);const r=o?o.element:document.createElement("template"),i=t.querySelectorAll("style"),{length:a}=i;if(0===a)return void window.ShadyCSS.prepareTemplateStyles(r,e);const s=document.createElement("style");for(let e=0;e{if(!o||"object"!=typeof o||!o.scopeName)throw new Error("The `scopeName` option is required.");const r=o.scopeName,i=parts.has(t),a=compatibleShadyCSSVersion&&11===t.nodeType&&!!t.host,s=a&&!shadyRenderSet.has(r),n=s?document.createDocumentFragment():t;if(render$1(e,n,Object.assign({templateFactory:shadyTemplateFactory(r)},o)),s){const e=parts.get(n);parts.delete(n);const o=e.value instanceof TemplateInstance?e.value.template:void 0;prepareTemplateStyles(r,n,o),removeNodes(t,t.firstChild),t.appendChild(n),parts.set(t,e)}!i&&a&&window.ShadyCSS.styleElement(t.host)}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ var _a;window.JSCompiler_renameProperty=(e,t)=>e;const defaultConverter={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},notEqual=(e,t)=>t!==e&&(t==t||e==e),defaultPropertyDeclaration={attribute:!0,type:String,converter:defaultConverter,reflect:!1,hasChanged:notEqual},STATE_HAS_UPDATED=1,STATE_UPDATE_REQUESTED=4,STATE_IS_REFLECTING_TO_ATTRIBUTE=8,STATE_IS_REFLECTING_TO_PROPERTY=16,finalized="finalized";class UpdatingElement extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach((t,o)=>{const r=this._attributeNameForProperty(o,t);void 0!==r&&(this._attributeToPropertyMap.set(r,o),e.push(r))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((e,t)=>this._classProperties.set(t,e))}}static createProperty(e,t=defaultPropertyDeclaration){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const o="symbol"==typeof e?Symbol():`__${e}`,r=this.getPropertyDescriptor(e,o,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}static getPropertyDescriptor(e,t,o){return{get(){return this[t]},set(r){const i=this[e];this[t]=r,this.requestUpdateInternal(e,i,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||defaultPropertyDeclaration}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty(finalized)||e.finalize(),this[finalized]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const o of t)this.createProperty(o,e[o])}}static _attributeNameForProperty(e,t){const o=t.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,o=notEqual){return o(e,t)}static _propertyValueFromAttribute(e,t){const o=t.type,r=t.converter||defaultConverter,i="function"==typeof r?r:r.fromAttribute;return i?i(e,o):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const o=t.type,r=t.converter;return(r&&r.toAttribute||defaultConverter.toAttribute)(e,o)}initialize(){this._updateState=0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,t)=>this[t]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,o){t!==o&&this._attributeToProperty(e,o)}_propertyToAttribute(e,t,o=defaultPropertyDeclaration){const r=this.constructor,i=r._attributeNameForProperty(e,o);if(void 0!==i){const e=r._propertyValueToAttribute(t,o);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(i):this.setAttribute(i,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const o=this.constructor,r=o._attributeToPropertyMap.get(e);if(void 0!==r){const e=o.getPropertyOptions(r);this._updateState=16|this._updateState,this[r]=o._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}requestUpdateInternal(e,t,o){let r=!0;if(void 0!==e){const i=this.constructor;o=o||i.getPropertyOptions(e),i._valueHasChanged(this[e],t,o.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==o.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,o))):r=!1}!this._hasRequestedUpdate&&r&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this.requestUpdateInternal(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((e,t)=>this._propertyToAttribute(t,this[t],e)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}UpdatingElement[_a=finalized]=!0; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ const legacyCustomElement=(e,t)=>(window.customElements.define(e,t),t),standardCustomElement=(e,t)=>{const{kind:o,elements:r}=t;return{kind:o,elements:r,finisher(t){window.customElements.define(e,t)}}},customElement=e=>t=>"function"==typeof t?legacyCustomElement(e,t):standardCustomElement(e,t),standardProperty=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?Object.assign(Object.assign({},t),{finisher(o){o.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(o){o.createProperty(t.key,e)}},legacyProperty=(e,t,o)=>{t.constructor.createProperty(o,e)};function property(e){return(t,o)=>void 0!==o?legacyProperty(e,t,o):standardProperty(e,t)}function query(e,t){return(t,o)=>{const r={get(){return this.renderRoot.querySelector(e)},enumerable:!0,configurable:!0};return void 0!==o?legacyQuery(r,t,o):standardQuery(r,t)}}const legacyQuery=(e,t,o)=>{Object.defineProperty(t,o,e)},standardQuery=(e,t)=>({kind:"method",placement:"prototype",key:t.key,descriptor:e}),supportsAdoptingStyleSheets=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,constructionToken=Symbol();class CSSResult{constructor(e,t){if(t!==constructionToken)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(supportsAdoptingStyleSheets?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const unsafeCSS=e=>new CSSResult(String(e),constructionToken),textFromCSSResult=e=>{if(e instanceof CSSResult)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)},css=(e,...t)=>{const o=t.reduce((t,o,r)=>t+textFromCSSResult(o)+e[r+1],e[0]);return new CSSResult(o,constructionToken)}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ (window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const renderNotImplemented={};class LitElement extends UpdatingElement{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,o)=>e.reduceRight((e,o)=>Array.isArray(o)?t(o,e):(e.add(o),e),o),o=t(e,new Set),r=[];o.forEach(e=>r.unshift(e)),this._styles=r}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map(e=>{if(e instanceof CSSStyleSheet&&!supportsAdoptingStyleSheets){const t=Array.prototype.slice.call(e.cssRules).reduce((e,t)=>e+t.cssText,"");return unsafeCSS(t)}return e})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?supportsAdoptingStyleSheets?this.renderRoot.adoptedStyleSheets=e.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==renderNotImplemented&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){return renderNotImplemented}}LitElement.finalized=!0,LitElement.render=render,LitElement.shadowRootOptions={mode:"open"}; /** * @license * Copyright 2014-2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const loaderPromise=new Promise((e,t)=>{if("undefined"!=typeof google&&google.charts&&"function"==typeof google.charts.load)e();else{let o=document.querySelector('script[src="proxy.php?url=https%3A%2F%2Fwww.gstatic.com%2Fcharts%2Floader.js"]');o||(o=document.createElement("script"),o.src="proxy.php?url=https%3A%2F%2Fwww.gstatic.com%2Fcharts%2Floader.js",document.head.appendChild(o)),o.addEventListener("load",e),o.addEventListener("error",t)}});async function load(e={}){await loaderPromise;const{version:t="current",packages:o=["corechart"],language:r=document.documentElement.lang||"en",mapsApiKey:i}=e;return google.charts.load(t,{packages:o,language:r,mapsApiKey:i})}async function dataTable(e){if(await load(),null==e)return new google.visualization.DataTable;if(e.getNumberOfRows)return e;if(e.cols)return new google.visualization.DataTable(e);if(e.length>0)return google.visualization.arrayToDataTable(e);if(0===e.length)throw new Error("Data was empty.");throw new Error("Data format was not recognized.")}async function createChartWrapper(e){return await load(),new google.visualization.ChartWrapper({container:e})} /** * @license * Copyright 2014-2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var __decorate$2D=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const DEFAULT_EVENTS=["ready","select"],CHART_TYPES={area:"AreaChart",bar:"BarChart","md-bar":"google.charts.Bar",bubble:"BubbleChart",calendar:"Calendar",candlestick:"CandlestickChart",column:"ColumnChart",combo:"ComboChart",gantt:"Gantt",gauge:"Gauge",geo:"GeoChart",histogram:"Histogram",line:"LineChart","md-line":"google.charts.Line",org:"OrgChart",pie:"PieChart",sankey:"Sankey",scatter:"ScatterChart","md-scatter":"google.charts.Scatter","stepped-area":"SteppedAreaChart",table:"Table",timeline:"Timeline",treemap:"TreeMap",wordtree:"WordTree"};class GoogleChart extends LitElement{constructor(){super(...arguments),this.type="column",this.events=[],this.options=void 0,this.cols=void 0,this.rows=void 0,this.data=void 0,this.view=void 0,this.selection=void 0,this.drawn=!1,this._data=void 0,this.chartWrapper=null,this.redrawTimeoutId=void 0}render(){return html`
`}firstUpdated(){createChartWrapper(this.shadowRoot.getElementById("chartdiv")).then(e=>{this.chartWrapper=e,this.typeChanged(),google.visualization.events.addListener(e,"ready",()=>{this.drawn=!0}),google.visualization.events.addListener(e,"select",()=>{this.selection=e.getChart().getSelection()}),this.propagateEvents(DEFAULT_EVENTS,e)})}updated(e){e.has("type")&&this.typeChanged(),(e.has("rows")||e.has("cols"))&&this.rowsOrColumnsChanged(),e.has("data")&&this.dataChanged(),e.has("view")&&this.viewChanged(),(e.has("_data")||e.has("options"))&&this.redraw(),e.has("selection")&&this.selectionChanged()}typeChanged(){if(null==this.chartWrapper)return;this.chartWrapper.setChartType(CHART_TYPES[this.type]||this.type);const e=this.chartWrapper.getChart();google.visualization.events.addOneTimeListener(this.chartWrapper,"ready",()=>{const t=this.chartWrapper.getChart();t!==e&&this.propagateEvents(this.events.filter(e=>!DEFAULT_EVENTS.includes(e)),t);const o=this.shadowRoot.getElementById("styles");o.children.length||this.localizeGlobalStylesheets(o),this.selection&&this.selectionChanged()}),this.redraw()}propagateEvents(e,t){for(const o of e)google.visualization.events.addListener(t,o,e=>{this.dispatchEvent(new CustomEvent(`google-chart-${o}`,{bubbles:!0,composed:!0,detail:{chart:this.chartWrapper.getChart(),data:e}}))})}selectionChanged(){if(null==this.chartWrapper)return;const e=this.chartWrapper.getChart();if(null!=e&&e.setSelection){if("timeline"===this.type){const t=JSON.stringify(e.getSelection());if(JSON.stringify(this.selection)===t)return}e.setSelection(this.selection)}}redraw(){null!=this.chartWrapper&&null!=this._data&&(this.chartWrapper.setDataTable(this._data),this.chartWrapper.setOptions(this.options||{}),this.drawn=!1,void 0!==this.redrawTimeoutId&&clearTimeout(this.redrawTimeoutId),this.redrawTimeoutId=window.setTimeout(()=>{this.chartWrapper.draw()},5))}get imageURI(){if(null==this.chartWrapper)return null;const e=this.chartWrapper.getChart();return e&&e.getImageURI()}viewChanged(){this.view&&(this._data=this.view)}async rowsOrColumnsChanged(){const{rows:e,cols:t}=this;if(e&&t)try{const o=await dataTable({cols:t});o.addRows(e),this._data=o}catch(e){this.shadowRoot.getElementById("chartdiv").textContent=e}}dataChanged(){let e,t=this.data;if(!t)return;let o=!1;try{t=JSON.parse(t)}catch(e){o="string"==typeof t||t instanceof String}e=o?fetch(t).then(e=>e.json()):Promise.resolve(t),e.then(dataTable).then(e=>{this._data=e})}localizeGlobalStylesheets(e){const t=Array.from(document.head.querySelectorAll('link[rel="stylesheet"][type="text/css"][id^="load-css-"]'));for(const o of t){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",o.getAttribute("href")),e.appendChild(t)}}}GoogleChart.styles=css` :host { display: -webkit-flex; display: -ms-flex; display: flex; margin: 0; padding: 0; width: 400px; height: 300px; } :host([hidden]) { display: none; } :host([type="gauge"]) { width: 300px; height: 300px; } #chartdiv { width: 100%; } /* Workaround for slow initial ready event for tables. */ .google-visualization-table-loadtest { padding-left: 6px; } `,__decorate$2D([property({type:String,reflect:!0})],GoogleChart.prototype,"type",void 0),__decorate$2D([property({type:Array})],GoogleChart.prototype,"events",void 0),__decorate$2D([property({type:Object,hasChanged:()=>!0})],GoogleChart.prototype,"options",void 0),__decorate$2D([property({type:Array})],GoogleChart.prototype,"cols",void 0),__decorate$2D([property({type:Array})],GoogleChart.prototype,"rows",void 0),__decorate$2D([property({type:String})],GoogleChart.prototype,"data",void 0),__decorate$2D([property({type:Object})],GoogleChart.prototype,"view",void 0),__decorate$2D([property({type:Array})],GoogleChart.prototype,"selection",void 0),__decorate$2D([property({type:Object})],GoogleChart.prototype,"_data",void 0),customElements.define("google-chart",GoogleChart);var __decorate$2C=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcPrintjobsStatistics=class extends s$1{static get styles(){return i$4` .printjobs-statistics { display: flex; flex-wrap: wrap; gap: 10px; } .box { display: grid; grid-template-columns: 50px 1fr; align-items: center; padding: 15px 20px; background-color: rgb(248, 248, 248); border-radius: 4px; flex: 1 1 240px; max-width: 240px; } wc-icon { width: 35px; height: 35px; } .text-wrapper { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; text-align: right; } .topic { font-size: 14px; } .value { font-size: 22px; } .status { grid-column: 1 / span 2; grid-row: 2; font-size: 12px; color: #bbbbbb; padding-top: 10px; border-top: 1px solid #ccc; display: flex; flex-direction: row; } `}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}constructor(){super()}connectedCallback(){super.connectedCallback(),this.loadData(),window.addEventListener("resize",()=>this.redrawChart())}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",()=>this.redrawChart())}redrawChart(){this.chart&&this.chart.draw(this.createData(),this.getChartOptions())}getChartOptions(){return{height:400,vAxis:{format:"#,## %",minValue:0},hAxis:{slantedText:!0,slantedTextAngle:45,showTextEvery:config.isMobile?7:2,titleTextStyle:{fontName:"Noto Sans",fontSize:12},textStyle:{fontName:"Noto Sans",fontSize:12}},legend:{position:"bottom"},backgroundColor:"rgb(248, 248, 248)",chartArea:{width:"100%",top:40}}}async loadData(){if(this.paymentPeriodData=await api.loadCurrentPaymentPeriodData(),!this.chart){const e=this.shadowRoot?.getElementById("conversionChart");e&&(google.charts.load("current",{packages:["corechart","bar"]}),google.charts.setOnLoadCallback(()=>{this.chart=new google.visualization.ColumnChart(e),this.chart.draw(this.createData(),this.getChartOptions())}))}}storageDisplay(e){return e<1024?e.toFixed(2).toLocaleString()+" Bytes":e<1048576?(e/1024).toFixed(2).toLocaleString()+" KB":e<1073741824?(e/1048576).toFixed(2).toLocaleString()+" MB":e<1099511627776?(e/1073741824).toFixed(2).toLocaleString()+" GB":(e/1099511627776).toFixed(2).toLocaleString()+" TB"}createData(){const e=new google.visualization.DataTable,t=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});if(e.addColumn("string","Date"),e.addColumn("number","Conversion Rate"),e.addColumn("number","Checkout Rate"),this.paymentPeriodData)for(let o=0;oe.date==r.day),a=this.paymentPeriodData.savedSaveTokens.find(e=>e.day==r.day),s=[];if(!i)continue;const n=i&&a?100*a.count/i.value:0,l=i?100*r.count/i.value:0;s.push(t.format(new Date(r.day))),s.push(n),s.push(l),e.addRow(s)}return 0===e.getNumberOfRows()&&e.addRow([new Date,0,0]),e}render(){return x`
Credits ${(this.paymentPeriodData?.credits??0).toLocaleString()}
Total Storage (Designer)
${this.storageDisplay(this.paymentPeriodData?.storage?.overallDesignerSide??0)}
Images
${this.storageDisplay(this.paymentPeriodData?.storage?.images??0)}
Fonts
${this.storageDisplay(this.paymentPeriodData?.storage?.files??0)}
Snippets
${this.storageDisplay(this.paymentPeriodData?.storage?.snippets??0)}
3D Models
${this.storageDisplay(this.paymentPeriodData?.storage?.models3d??0)}
Settings Data
${this.storageDisplay(this.paymentPeriodData?.storage?.userData??0)}
Save Tokens
${this.storageDisplay(this.paymentPeriodData?.storage?.unexpiredShopTemplates??0)}
Customer Images
${this.storageDisplay(this.paymentPeriodData?.storage?.shopImagesOlderThan31Days??0)}
`}};__decorate$2C([e$3({attribute:!1,type:Object})],WcPrintjobsStatistics.prototype,"paymentPeriodData",void 0),WcPrintjobsStatistics=__decorate$2C([e$4("wc-printjobs-statistics")],WcPrintjobsStatistics);const dashboardStyles=i$4` .dashboard { font-family: var(--printess-text-font); color: #555555; } .topic { font-size: 22px; font-weight: 500; font-family: var(--printess-header-font); color: #555555; } @media (max-width: ${config.mobileDeviceWidth}px) { h3.topic { font-size: 20px; margin: 20px 0; } .subtopic { font-size: 14px; } } `;var __decorate$2B=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const months$2=["January","February","March","April","May","June","July","August","September","October","November","December"];let WcDailyAdminCreditsChart=class extends s$1{static get styles(){return i$4` div#admin_credits_chart { margin-right: 10px; min-height: 600px; } `}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async loadDailyAdminCredits(e){const t=await api.loadDailyAdminCredits(e);t instanceof ServerErrorResponse$2?this.showError(t):(this.dailyCredits=t.creditsDays,this.renderGoogleChart())}renderGoogleChart(){const e=this.dailyCredits?this.dailyCredits:[],t=document.createElement("div");t.setAttribute("id","admin_credits_chart"),google.charts.load("current",{packages:["corechart","line"]}),google.charts.setOnLoadCallback(function(){const o=new google.visualization.DataTable;o.addColumn("string","Day of month"),o.addColumn("number","Credits"),o.addColumn({type:"string",role:"tooltip"}),o.addRows(e.map(e=>[`${new Date(e.d).getDate()}. ${months$2[new Date(e.d).getMonth()].slice(0,3)}`,e.a,`${new Date(e.d).toLocaleDateString()} \n Credits: ${e.a.toLocaleString()}`]));const r={colors:["#e35fbc"],tooltip:{isHtml:!0},legend:"none",backgroundColor:"rgb(248, 248, 248)",chartArea:{left:80,right:0,top:40,width:"100%"},curveType:"function",vAxis:{viewWindow:{min:0},textStyle:{fontName:"Noto Sans",fontSize:12}},hAxis:{textStyle:{fontName:"Noto Sans",fontSize:12},slantedText:!0,slantedTextAngle:30,showTextEvery:config.isMobile?5:30,title:"",titleTextStyle:{fontName:"Noto Sans",fontSize:0}}},i=new google.visualization.LineChart(t);i.draw(o,r),window.addEventListener("resize",()=>i.draw(o,r))}),this.shadowRoot?.appendChild(t)}connectedCallback(){super.connectedCallback();const e=new Date,t=new Date;e.setDate(e.getDate()-580),e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),t.setDate(t.getDate()),t.setHours(23),t.setMinutes(59),t.setSeconds(59),t.setMilliseconds(999),this.loadDailyAdminCredits({includingStartDate:e,includingEndDate:t})}};__decorate$2B([e$3({type:Array})],WcDailyAdminCreditsChart.prototype,"dailyCredits",void 0),WcDailyAdminCreditsChart=__decorate$2B([e$4("wc-daily-admin-credits-chart")],WcDailyAdminCreditsChart);var __decorate$2A=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const months$1=["January","February","March","April","May","June","July","August","September","October","November","December"];let WcDailyCreditsChart=class extends s$1{static get styles(){return i$4` div#credits_chart, div#pages_chart, div#storage_chart, div#jobs_chart { margin-right: 10px; min-height: 300px; } .chart-container { background-color: rgb(248, 248, 248); margin: 0 10px 10px 0; padding: 20px; border-radius: 4px; } p.chart-title { text-align: center; margin: 0; } .status { grid-column: 1 / span 2; grid-row: 2; font-size: 12px; color: #bbbbbb; padding-top: 10px; border-top: 1px solid #ccc; display: flex; flex-direction: row; align-items: center; } wc-icon { width: 15px; height: 15px; margin-right: 10px; } `}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async loadDailyUserCredits(e){const t=await api.loadDailyUsage(e);t instanceof ServerErrorResponse$2?this.showError(t):(this.dailyUsage=t.days,this.renderGoogleChart("credits"),this.renderGoogleChart("jobs"),this.renderGoogleChart("pages"),this.renderGoogleChart("storage"))}renderGoogleChart(e){const t=this.dailyUsage?this.dailyUsage:[],o=this.shadowRoot?.getElementById(e+"_chart");google.charts.load("current",{packages:["corechart","line"]}),google.charts.setOnLoadCallback(function(){if(!o)return;const r=new google.visualization.DataTable;r.addColumn("string","Day of month"),r.addColumn("number",e),r.addColumn({type:"string",role:"tooltip"}),r.addRows(t.map(t=>[`${new Date(t.date).getDate()}. ${months$1[new Date(t.date).getMonth()].slice(0,3)}`,t[e],`${new Date(t.date).toLocaleDateString()} \n ${e}: ${t[e].toLocaleString()}`]));const i={colors:["#e35fbc"],tooltip:{isHtml:!0},legend:"none",backgroundColor:"rgb(248, 248, 248)",chartArea:{left:80,right:0,top:40,width:"100%"},curveType:"function",vAxis:{viewWindow:{min:0},textStyle:{fontName:"Noto Sans",fontSize:12}},hAxis:{textStyle:{fontName:"Noto Sans",fontSize:12},slantedText:!0,slantedTextAngle:45,showTextEvery:config.isMobile?5:2,title:"Date",titleTextStyle:{fontName:"Noto Sans",fontSize:12}}},a=new google.visualization.LineChart(o);a.draw(r,i),window.addEventListener("resize",()=>a.draw(r,i))})}connectedCallback(){super.connectedCallback();const e=new Date,t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-30)),o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999));this.loadDailyUserCredits({includingStartDate:t,includingEndDate:o})}render(){return x`

Daily used credits

Credits used in the last 30 days

Daily produced jobs

Jobs produced in the last 30 days
`}};__decorate$2A([e$3({type:Array})],WcDailyCreditsChart.prototype,"dailyUsage",void 0),WcDailyCreditsChart=__decorate$2A([e$4("wc-daily-credits-chart")],WcDailyCreditsChart); /** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const{I:l$1}=Z,e=e=>void 0===e.strings,c$1=()=>document.createComment(""),r=(e,t,o)=>{var r;const i=e._$AA.parentNode,a=void 0===t?e._$AB:t._$AA;if(void 0===o){const t=i.insertBefore(c$1(),a),r=i.insertBefore(c$1(),a);o=new l$1(t,r,e,e.options)}else{const t=o._$AB.nextSibling,s=o._$AM,n=s!==e;if(n){let t;null===(r=o._$AQ)||void 0===r||r.call(o,e),o._$AM=e,void 0!==o._$AP&&(t=e._$AU)!==s._$AU&&o._$AP(t)}if(t!==a||n){let e=o._$AA;for(;e!==t;){const t=e.nextSibling;i.insertBefore(e,a),e=t}}}return o},u$1=(e,t,o=e)=>(e._$AI(t,o),e),f={},s=(e,t=f)=>e._$AH=t,m=e=>e._$AH,p=e=>{var t;null===(t=e._$AP)||void 0===t||t.call(e,!1,!0);let o=e._$AA;const r=e._$AB.nextSibling;for(;o!==r;){const e=o.nextSibling;o.remove(),o=e}},u=(e,t,o)=>{const r=new Map;for(let i=t;i<=o;i++)r.set(e[i],i);return r},c=e$2(class extends i{constructor(e){if(super(e),e.type!==t.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,o){let r;void 0===o?o=t:void 0!==t&&(r=t);const i=[],a=[];let s=0;for(const t of e)i[s]=r?r(t,s):s,a[s]=o(t,s),s++;return{values:a,keys:i}}render(e,t,o){return this.dt(e,t,o).values}update(e,[t,o,i]){var a;const n=m(e),{values:l,keys:c}=this.dt(t,o,i);if(!Array.isArray(n))return this.ht=c,l;const d=null!==(a=this.ht)&&void 0!==a?a:this.ht=[],h=[];let g,f,b=0,y=n.length-1,v=0,w=l.length-1;for(;b<=y&&v<=w;)if(null===n[b])b++;else if(null===n[y])y--;else if(d[b]===c[v])h[v]=u$1(n[b],l[v]),b++,v++;else if(d[y]===c[w])h[w]=u$1(n[y],l[w]),y--,w--;else if(d[b]===c[w])h[w]=u$1(n[b],l[w]),r(e,h[w+1],n[b]),b++,w--;else if(d[y]===c[v])h[v]=u$1(n[y],l[v]),r(e,n[b],n[y]),y--,v++;else if(void 0===g&&(g=u(c,v,w),f=u(d,b,y)),g.has(d[b]))if(g.has(d[y])){const t=f.get(c[v]),o=void 0!==t?n[t]:null;if(null===o){const t=r(e,n[b]);u$1(t,l[v]),h[v]=t}else h[v]=u$1(o,l[v]),r(e,n[b],o),n[t]=null;v++}else p(n[y]),y--;else p(n[b]),b++;for(;v<=w;){const t=r(e,h[w+1]);u$1(t,l[v]),h[v++]=t}for(;b<=y;){const e=n[b++];null!==e&&p(e)}return this.ht=c,s(e,h),T}}); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */var __decorate$2z=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcSnippetStatistics=class extends s$1{constructor(){super(...arguments),this.mode="stickers",this.availableMonths=[],this.selectedMonthKey=""}static get styles(){return i$4` :host { --image-width: 100px; } .snippet-statistics-container { padding: 20px; background-color: rgb(248, 248, 248); margin-bottom: 10px; } .header { text-align: center; margin: 0; margin-bottom: 16px; } .img-c { width: var(--image-width); height: var(--image-width); border: 1px solid var(--lumo-base-color); position: relative; } .img { max-width: var(--image-width); max-height: var(--image-width); margin-left: auto; margin-right: auto; } .flex { display: flex; } .vc { align-items: center; } .c { font-size: 14px; align-self: center; background: var(--lumo-base-color); color: white; border-top-left-radius: 5px; min-width: 20px; height: 28px; display: flex; justify-content: center; align-items: center; position: absolute; bottom: -1px; right: -1px; padding: 0px 5px; } .con { display: flex; flex-wrap: wrap; gap: 10px; background: rgb(248, 248, 248); margin-bottom: 10px; } `}connectedCallback(){super.connectedCallback(),this.loadState()}async loadState(){this.layouts=await api.loadLayoutSnippetStatistics(),this.stickers=await api.loadStickerSnippetStatistics(),this.filterMonthsAndYears()}filterMonthsAndYears(){"layouts"==this.mode&&this.layouts?this.availableMonths=this.getAvailableYearMonths(this.layouts):this.stickers&&(this.availableMonths=this.getAvailableYearMonths(this.stickers))}getAvailableYearMonths(e){const t=new Set;return Object.keys(e.statistics).forEach(e=>{const o=new Date(e);if(!isNaN(o.getTime())){const e=o.getFullYear(),r=o.getMonth()+1;t.add(`${e}-${r.toString().padStart(2,"0")}`)}}),Array.from(t).map(e=>{const[t,o]=e.split("-").map(Number);return{year:t,month:o,displayText:new Date(t,o-1).toLocaleDateString("en-US",{month:"long",year:"numeric"}),key:e}}).sort((e,t)=>e.year!==t.year?t.year-e.year:t.month-e.month)}handleModeChange(e){const t=e.target;this.mode=t.value,this.filterMonthsAndYears()}handleMonthChange(e){const t=e.target;this.selectedMonthKey=t.value}renderSnippets(e){if(!e)return"";const[t,o]=this.selectedMonthKey.split("-").map(Number);let r;if(t&&o){const i=new Date(Date.UTC(t,o-1,1,0,0,0,0)).toISOString().replace(/\.\d{3}Z/,""),a=e.statistics[i];r=Object.keys(a).map(e=>({snippetId:e,count:a[e]})).sort((e,t)=>t.count-e.count)}else r=Object.keys(e.overall).map(t=>({snippetId:t,count:e.overall[t]})).sort((e,t)=>t.count-e.count);return c(r,e=>e.snippetId,t=>{const o=e.snippets[t.snippetId],r=o?o.imageUrl:"";return x`
${r?x`
${t.count}
`:""}
`})}render(){return x`

Snippets Statistics -

${this.renderSnippets("stickers"==this.mode?this.stickers:this.layouts)}
`}};__decorate$2z([e$3({attribute:!0,type:Object})],WcSnippetStatistics.prototype,"layouts",void 0),__decorate$2z([e$3({attribute:!0,type:Object})],WcSnippetStatistics.prototype,"stickers",void 0),__decorate$2z([t$1()],WcSnippetStatistics.prototype,"mode",void 0),__decorate$2z([t$1()],WcSnippetStatistics.prototype,"availableMonths",void 0),__decorate$2z([t$1()],WcSnippetStatistics.prototype,"selectedMonthKey",void 0),WcSnippetStatistics=__decorate$2z([e$4("wc-snippet-statistics")],WcSnippetStatistics);var __decorate$2y=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const aiColumns=[{k:"bgr",d:"Remove Background",unit:"count"},{k:"fs",d:"Face Segmentation",unit:"count"},{k:"fs-cp",d:"Face Segmentation (CutoutPro)",unit:"count"},{k:"sa",d:"Segment Anything",unit:"count"},{k:"sa3",d:"Segment Anything 3",unit:"count"},{k:"swap",d:"Face Swap",unit:"count"},{k:"cc",d:"Cut Contour",unit:"count"},{k:"tisdxl",d:"SDXL",unit:"count"},{k:"tifs",d:"Flux Schnell",unit:"count"},{k:"tifd",d:"Flux Dev",unit:"count"},{k:"tifp",d:"Flux Pro",unit:"count"},{k:"tifu",d:"Flux Ultra",unit:"count"},{k:"tinb",d:"Nano Banana",unit:"count"},{k:"tinbp",d:"Nano Banana Pro",unit:"count"},{k:"tifpk",d:"Flux Pro Kontext",unit:"count"},{k:"tif2k4",d:"Flux 2 Klein 4B",unit:"count"},{k:"gpt-image-1-low",d:"GPT Image 1 - low",unit:"count"},{k:"gpt-image-1-medium",d:"GPT Image 1 - medium",unit:"count"},{k:"gpt-image-1-high",d:"GPT Image 1 - high",unit:"count"},{k:"gpt-image-1.5-low",d:"GPT Image 1.5 - low",unit:"count"},{k:"gpt-image-1.5-medium",d:"GPT Image 1.5 - medium",unit:"count"},{k:"gpt-image-1.5-high",d:"GPT Image 1.5 - high",unit:"count"},{k:"ui",d:"Upscale",unit:"megapixel"},{k:"p",d:"LLM",unit:"count"},{k:"pb",d:"Photobook",unit:"count"}],aiUsageCounters=aiColumns.map(e=>e.k),aiLabels=aiColumns.map(e=>e.d),googleChartColors=["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935"];function buildTooltipHtml(e,t){const o=t.map((e,t)=>({label:aiLabels[t],value:e,color:googleChartColors[t%googleChartColors.length],unit:aiColumns[t].unit})).filter(e=>e.value>0);return`\n
\n ${e}\n
\n ${o.map(e=>` ${e.label}: ${e.value.toLocaleString()} (${e.unit})`).join("
")}\n
\n `}let WcAiCreditsChart=class extends s$1{constructor(){super(...arguments),this.mode="entries",this.entries=30,this.months=12}static get styles(){return i$4` div#ai_chart { margin-right: 10px; min-height: 600px; position: relative; overflow: visible; } .google-visualization-tooltip { pointer-events: none !important; position: absolute !important; background: white !important; border: 1px solid #ccc !important; border-radius: 4px !important; box-shadow: 0 2px 6px rgba(0,0,0,.15) !important; padding: 0 !important; margin: 0 !important; } .chart-container { background-color: rgb(248, 248, 248); margin: 0 10px 10px 0; padding: 20px; border-radius: 4px; } p.chart-title { text-align: center; margin: 0; } .status { grid-column: 1 / span 2; grid-row: 2; font-size: 12px; color: #bbbbbb; padding-top: 10px; border-top: 1px solid #ccc; display: flex; flex-direction: row; align-items: center; } wc-icon { width: 15px; height: 15px; margin-right: 10px; } `}connectedCallback(){super.connectedCallback(),this.loadPromise=google.charts.load("current",{packages:["corechart","line"]}),this.loadAiCredits(),this.loadBookedPlan()}requestUpdate(e,t,o){super.requestUpdate(e,t,o),"entries"!==e&&"mode"!==e&&"months"!==e||this.loadAiCredits()}showError(e){console.log("error msg: ",e.message,"error code: ",e.code),alert(e.message)}async loadBookedPlan(){const e=await api.loadUserBookedInfo();e instanceof ServerErrorResponse$2?this.showError(e):this.bookedInfo=e}async loadAiCredits(){if(!(this.mode&&this.entries&&this.months))return;const e="entries"===this.mode?this.entries:31*this.months,t=await api.loadAiCredits(e);t instanceof ServerErrorResponse$2?this.showError(t):(this.aiCredits=t,this.loadPromise&&await this.loadPromise,this.renderGoogleChart())}createData(){const e=this.aiCredits,t=new google.visualization.DataTable;t.addColumn("string","Date");for(const e of aiLabels)t.addColumn("number",e),t.addColumn({type:"string",role:"tooltip",p:{html:!0}});if(e){const o=[];if("entries"===this.mode)for(const t in e){const r=e[t],i=aiUsageCounters.map(e=>r[e]??0),a=new Date(t).toLocaleDateString(),s=buildTooltipHtml(a,i);o.push([a,...i.flatMap(e=>[e,s])])}else if("months"===this.mode){let t=null,r="";for(const i in e){const a=e[i],s=i.substring(0,7);if(r!==s){if(t){const e=new Intl.DateTimeFormat(navigator.language,{year:"numeric",month:"long"}).format(new Date(r+"-01")),i=aiUsageCounters.map(e=>t[e]??0),a=buildTooltipHtml(e,i);o.push([e,...i.flatMap(e=>[e,a])])}if(o.length===this.months)break;r=s,t={}}if(t)for(const e of aiUsageCounters)t[e]||(t[e]=0),t[e]+=a[e]??0}if(t&&o.lengtht[e]??0),a=buildTooltipHtml(e,i);o.push([e,...i.flatMap(e=>[e,a])])}}t.addRows(o.reverse())}for(let e=0;ethis.chart?.draw(this.createData(),this.createChartOptions()))),this.chart&&this.chart.draw(this.createData(),this.createChartOptions())}render(){return x`

Used AI Volume - ${"entries"===this.mode?x` `:x` `}

Remove Background, Face Segmentation, Face Swap, Cut Contour, Flux Ultra, Upscale, LLM, Photobook: Current display value represents the count
SDXL, Flux Schnell, Flux Dev, Flux Pro: Current display value represents mega pixel
Those numbers are not the final AI credits. This will come later.
AI Credits used in the last days
`}};__decorate$2y([e$3({type:Object})],WcAiCreditsChart.prototype,"aiCredits",void 0),__decorate$2y([e$3({type:Object})],WcAiCreditsChart.prototype,"bookedInfo",void 0),__decorate$2y([e$3({type:String,attribute:!0})],WcAiCreditsChart.prototype,"mode",void 0),__decorate$2y([e$3({type:Number,attribute:!0})],WcAiCreditsChart.prototype,"entries",void 0),__decorate$2y([e$3({type:Number,attribute:!0})],WcAiCreditsChart.prototype,"months",void 0),WcAiCreditsChart=__decorate$2y([e$4("wc-ai-credits-chart")],WcAiCreditsChart);var __decorate$2x=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const months=["January","February","March","April","May","June","July","August","September","October","November","December"];let WcDailyMockupChart=class extends s$1{static get styles(){return i$4` div#mockup_chart { margin-right: 10px; min-height: 300px; } .chart-container { background-color: rgb(248, 248, 248); margin: 0 10px 10px 0; padding: 20px; border-radius: 4px; } p.chart-title { text-align: center; margin: 0; } .status { grid-column: 1 / span 2; grid-row: 2; font-size: 12px; color: #bbbbbb; padding-top: 10px; border-top: 1px solid #ccc; display: flex; flex-direction: row; align-items: center; } wc-icon { width: 15px; height: 15px; margin-right: 10px; } `}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async loadDailyUserCredits(e){const t=await api.loadMockupStatisticsLast(e);t instanceof ServerErrorResponse$2?this.showError(t):(this.dailyUsage=t,this.dailyUsage.sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime()),this.renderGoogleChart("mockup"))}renderGoogleChart(e){const t=this.dailyUsage?this.dailyUsage:[],o=this.shadowRoot?.getElementById(e+"_chart");google.charts.load("current",{packages:["corechart","line"]}),google.charts.setOnLoadCallback(function(){if(!o)return;const r=new google.visualization.DataTable;r.addColumn("string","Day of month"),r.addColumn("number",e),r.addColumn({type:"string",role:"tooltip"}),r.addRows(t.map(t=>[`${new Date(t.date).getDate()}. ${months[new Date(t.date).getMonth()].slice(0,3)}`,t.value,`${new Date(t.date).toLocaleDateString()} \n ${e}: ${t.value.toLocaleString()}`]));const i={colors:["#e35fbc"],tooltip:{isHtml:!0},legend:"none",backgroundColor:"rgb(248, 248, 248)",chartArea:{left:80,right:0,top:40,width:"100%"},curveType:"function",vAxis:{viewWindow:{min:0},textStyle:{fontName:"Noto Sans",fontSize:12}},hAxis:{textStyle:{fontName:"Noto Sans",fontSize:12},slantedText:!0,slantedTextAngle:45,showTextEvery:config.isMobile?5:2,title:"Date",titleTextStyle:{fontName:"Noto Sans",fontSize:12}}},a=new google.visualization.LineChart(o);a.draw(r,i),window.addEventListener("resize",()=>a.draw(r,i))})}connectedCallback(){super.connectedCallback(),this.loadDailyUserCredits(31)}render(){return x`

Daily used Mockup credits

Mockup credits used in the last 30 days
`}};__decorate$2x([e$3({type:Array})],WcDailyMockupChart.prototype,"dailyUsage",void 0),WcDailyMockupChart=__decorate$2x([e$4("wc-daily-mockup-chart")],WcDailyMockupChart);var __decorate$2w=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcDashboardPage=class extends s$1{constructor(){super(...arguments),this.aiEntries=30}static get styles(){return[dashboardStyles,i$4` .chart-container { background-color: rgb(248, 248, 248); margin: 0 10px 10px 0; padding: 20px; border-radius: 4px; } p.chart-title { text-align: center; margin: 0; } .status { grid-column: 1 / span 2; grid-row: 2; font-size: 12px; color: #bbbbbb; padding-top: 10px; border-top: 1px solid #ccc; display: flex; flex-direction: row; align-items: center; } wc-icon { width: 15px; height: 15px; margin-right: 10px; } `]}connectedCallback(){super.connectedCallback(),location.hash="#dashboard"}renderStatistics(){return new WcPrintjobsStatistics}render(){return x`

Dashboard

${this.renderStatistics()}
${adm.canUseAdminMode?x`

All daily used Credits

`:""}
`}};__decorate$2w([e$3({type:Number,attribute:!1})],WcDashboardPage.prototype,"aiEntries",void 0),WcDashboardPage=__decorate$2w([e$4("wc-dashboard-page")],WcDashboardPage);const accountStyles=i$4` .account-page { font-family: var(--printess-text-font); font-size: 14px; font-weight: 400; color: #555555; } .topic { font-size: 22px; font-weight: 500; font-family: var(--printess-header-font); } .card { margin-top: 30px; margin-bottom: 70px; } wc-icon { width: 20px; height: 20px; cursor: pointer; } .pink { border-bottom: 2px solid var(--printess-pink); } .green { border-bottom: 2px solid var(--printess-green); } .red { border-bottom: 2px solid var(--printess-red); } .blue { border-bottom: 2px solid var(--printess-blue); } .table-header { padding-left: 20px; border-top-right-radius: 4px; border-top-left-radius: 4px; color: #fff; margin-top: 10px; margin-bottom: 0; } .title { font-size: 18px; font-weight: 400; line-height: 50px; margin: 0; } .table-body p { padding: 0 20px; } .pink .table-header { background-color: var(--printess-pink); } .green .table-header { background-color: var(--printess-green); } .red .table-header { background-color: var(--printess-red); } .blue .table-header { background-color: var(--printess-blue); } dl { display: grid; margin-top: 0; margin-bottom: 0; grid-template-columns: 60px 1fr; } dt, dd { display: flex; line-height: 25px; margin-left: 0; text-align: left; padding: 10px; align-items: center; } dt { padding-left: 20px; } dd { display: flex; justify-content: space-between; padding-left: 0; } .token { width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pink dt:nth-of-type(even), .pink dd:nth-of-type(even) { background-color: var(--printess-lightpink); } .lightgreen { background-color: var(--printess-lightgreen); } .blue dt:nth-of-type(even), .blue dd:nth-of-type(even) { background-color: var(--printess-lightblue); } button { padding: 4px 10px; border: none; border-radius: 4px; color: #fff; cursor: pointer; font-family: var(--printess-button-font); font-size: 14px; font-weight: 400; } .settings { padding: 7px 20px; margin: 20px 15px; } .pink button { background-color: var(--printess-pink); } .green button { background-color: var(--printess-green); } .red button { background-color: var(--printess-red); } .blue button { background-color: var(--printess-blue); } .pink .hide-token { background-color: var(--printess-pink); border: 1px solid var(--printess-pink); color: var(--printess-pink); } .green .hide-token { background-color: var(--printess-lightgreen); border: 1px solid var(--printess-green); color: var(--printess-green); } .magenta .hide-token { background-color: var(--printess-lightmagenta); border: 1px solid var(--printess-magenta); color: var(--printess-magenta); } .red .hide-token { background-color: var(--printess-lightred); border: 1px solid var(--printess-red); color: var(--printess-red); } .blue .hide-token { background-color: var(--printess-lightblue); border: 1px solid var(--printess-blue); color: var(--printess-blue); } @media (max-width: ${config.mobileDeviceWidth}px) { .topic { font-size: 20px; } .subtopic { font-size: 14px; } .card { width: 100%; margin-bottom: 50px; } .table-header { padding-left: 10px; } .title { font-size: 14px; line-height: 36px; margin: 0; } dl { grid-template-columns: 80px calc(50% - 80px) 80px calc(50% - 80px); } dd, dt { font-size: 12px; word-break: break-word; line-height: 16px; padding: 10px; align-items: center; } dd { grid-column: 2 / span 3; } .table-body p { font-size: 12px; padding: 0 15px; } .settings { font-size: 12px; } } `;class NobsBase{constructor(e,t){if(e instanceof Nobs&&t instanceof NobsBase){e._called_from_constructor_findMutations(t);for(const o of Object.keys(t)){const r=t[o];r instanceof NobsBase?e.hasObjectReplacement(r)?this[o]=e.getObjectReplacement(r):e._called_from_constructor_hasMutation(r)?this[o]=new r.constructor(e,r):this[o]=r:r instanceof Map?this[o]=e._called_from_constructor_cloneMap(r):Array.isArray(r)?this[o]=e._called_from_constructor_cloneArray(r):e.hasProperty(t,o)?this[o]=e.popProperty(t,o):this[o]=t[o]}const o=e.getChangedProperties(t);if(o&&o.size>0)for(const[e,t]of o)this[e]=t}}}class Snobs{static setProperty(e,t,o){return(new Nobs).setProperty(e,t,o)}static removeObject(e){return(new Nobs).removeObject(e)}static addToCollection(e,t,o=void 0,r=void 0){return(new Nobs).addToCollection(e,t,o,r)}static replaceObject(e,t){return(new Nobs).replaceObject(e,t)}}class Nobs{constructor(){this.createdObjects=new Map,this.replacedObjects=new Map,this.removedObjects=new Set,this.changedProperties=new Map,this.replacedCollections=new Map,this.mutatedObjects=new Set}setProperty(e,t,o){if(e&&(o instanceof NobsBase||null===o)&&e[t]instanceof NobsBase)this.replaceObject(e[t],o);else{let r=this.changedProperties.get(e);r||(r=new Map,this.changedProperties.set(e,r)),r.set(t,o)}return this}getChangedProperties(e){return this.changedProperties.get(e)}getProperty(e,t){const o=this.changedProperties.get(e);return o&&o.has(t)?o.get(t):e[t]}popProperty(e,t){const o=this.changedProperties.get(e);if(o&&o.has(t)){const e=o.get(t);return o.delete(t),e}return e[t]}hasProperty(e,t){const o=this.changedProperties.get(e);return!(!o||!o.has(t))}replaceCollection(e,t){return this.replacedCollections.set(e,t),this}addToCollection(e,t,o=void 0,r=void 0){let i=this.createdObjects.get(e);i||(i=[],this.createdObjects.set(e,i));const a={object:t,insertBefore:o,insertAfter:r};return i.push(a),this}reOrderInsideCollection(e,t,o=void 0,r=void 0){return t!==o&&t!==r&&(this.removeObject(t),this.addToCollection(e,t,o,r)),this}replaceObject(e,t){return this.replacedObjects.set(e,t),this}hasObjectReplacement(e){return this.replacedObjects.has(e)}getObjectReplacement(e){return this.replacedObjects.get(e)}removeObject(e){return this.removedObjects.add(e),this}_called_from_constructor_hasMutation(e){return this.mutatedObjects.has(e)}_called_from_constructor_findMutations(e){let t=!1;for(const o of Object.keys(e)){const r=e[o];if(this.hasProperty(e,o)&&(t=!0),r instanceof NobsBase)(this.replacedObjects.has(r)||this._called_from_constructor_findMutations(r))&&(this.mutatedObjects.add(r),t=!0);else if(r instanceof Map||Array.isArray(r)){if(this.replacedCollections.has(r)&&(this.mutatedObjects.add(r),t=!0),r instanceof Map)for(const e of r.values())(this.removedObjects.has(e)||this.replacedObjects.has(e))&&(this.mutatedObjects.add(e),t=!0),t=this._called_from_constructor_findMutations(e)||t;else for(const e of r)(this.removedObjects.has(e)||this.replacedObjects.has(e))&&(this.mutatedObjects.add(e),t=!0),t=this._called_from_constructor_findMutations(e)||t;this.createdObjects.has(r)&&(t=!0)}}return t&&this.mutatedObjects.add(e),t}static getId(e){const t=e.id;if(!t)throw new Error("Nobs: By convention, objects stored in a Map need to have an 'id' property");return t}_called_from_constructor_cloneMap(e){const t=new Map,o=this.replacedCollections.get(e);if(o&&o instanceof Map)return o;let r;const i=this.createdObjects.get(e);for(const[o,a]of e.entries())if(!this.removedObjects.has(a)){if(r=this.replacedObjects.get(a),!r&&this.mutatedObjects.has(a)&&(r=new a.constructor(this,a)),r||(r=a),i)for(const e of i)e.insertBefore===r&&t.set(Nobs.getId(e.object),e.object);if(t.set(o,r),i)for(const e of i)e.insertAfter===r&&t.set(Nobs.getId(e.object),e.object)}if(i)for(const e of i)void 0===e.insertBefore&&void 0===e.insertAfter&&t.set(Nobs.getId(e.object),e.object);return t}_called_from_constructor_cloneArray(e){const t=[],o=this.replacedCollections.get(e);if(o&&Array.isArray(o))return o;let r;const i=this.createdObjects.get(e);for(const o of e)if(!this.removedObjects.has(o)){if(r=this.replacedObjects.get(o),!r&&this.mutatedObjects.has(o)&&(r=new o.constructor(this,o)),r||(r=o),i)for(const e of i)e.insertBefore===r&&t.push(e.object);if(t.push(r),i)for(const e of i)e.insertAfter===r&&t.push(e.object)}if(i)for(const e of i)void 0===e.insertBefore&&void 0===e.insertAfter&&t.push(e.object);return t}}var countries=[{country:"Afghanistan",countryCode:"+93",ISO2Code:"AF",ISO3Code:"AFG"},{country:"Albania",countryCode:"+355",ISO2Code:"AL",ISO3Code:"ALB"},{country:"Algeria",countryCode:"+213",ISO2Code:"DZ",ISO3Code:"DZA"},{country:"American Samoa",countryCode:"+1-684",ISO2Code:"AS",ISO3Code:"ASM"},{country:"Andorra",countryCode:"+376",ISO2Code:"AD",ISO3Code:"AND"},{country:"Angola",countryCode:"+244",ISO2Code:"AO",ISO3Code:"AGO"},{country:"Anguilla",countryCode:"+1-264",ISO2Code:"AI",ISO3Code:"AIA"},{country:"Antarctica",countryCode:"+672",ISO2Code:"AQ",ISO3Code:"ATA"},{country:"Antigua and Barbuda",countryCode:"+1-268",ISO2Code:"AG",ISO3Code:"ATG"},{country:"Argentina",countryCode:"+54",ISO2Code:"AR",ISO3Code:"ARG"},{country:"Armenia",countryCode:"+374",ISO2Code:"AM",ISO3Code:"ARM"},{country:"Aruba",countryCode:"+297",ISO2Code:"AW",ISO3Code:"ABW"},{country:"Australia",countryCode:"+61",ISO2Code:"AU",ISO3Code:"AUS"},{country:"Austria",countryCode:"+43",ISO2Code:"AT",ISO3Code:"AUT"},{country:"Azerbaijan",countryCode:"+994",ISO2Code:"AZ",ISO3Code:"AZE"},{country:"Bahamas",countryCode:"+1-242",ISO2Code:"BS",ISO3Code:"BHS"},{country:"Bahrain",countryCode:"+973",ISO2Code:"BH",ISO3Code:"BHR"},{country:"Bangladesh",countryCode:"+880",ISO2Code:"BD",ISO3Code:"BGD"},{country:"Barbados",countryCode:"+1-246",ISO2Code:"BB",ISO3Code:"BRB"},{country:"Belarus",countryCode:"+375",ISO2Code:"BY",ISO3Code:"BLR"},{country:"Belgium",countryCode:"+32",ISO2Code:"BE",ISO3Code:"BEL"},{country:"Belize",countryCode:"+501",ISO2Code:"BZ",ISO3Code:"BLZ"},{country:"Benin",countryCode:"+229",ISO2Code:"BJ",ISO3Code:"BEN"},{country:"Bermuda",countryCode:"+1-441",ISO2Code:"BM",ISO3Code:"BMU"},{country:"Bhutan",countryCode:"+975",ISO2Code:"BT",ISO3Code:"BTN"},{country:"Bolivia",countryCode:"+591",ISO2Code:"BO",ISO3Code:"BOL"},{country:"Bosnia and Herzegovina",countryCode:"+387",ISO2Code:"BA",ISO3Code:"BIH"},{country:"Botswana",countryCode:"+267",ISO2Code:"BW",ISO3Code:"BWA"},{country:"Brazil",countryCode:"+55",ISO2Code:"BR",ISO3Code:"BRA"},{country:"British Indian Ocean Territory",countryCode:"+246",ISO2Code:"IO",ISO3Code:"IOT"},{country:"British Virgin Islands",countryCode:"+1-284",ISO2Code:"VG",ISO3Code:"VGB"},{country:"Brunei",countryCode:"+673",ISO2Code:"BN",ISO3Code:"BRN"},{country:"Bulgaria",countryCode:"+359",ISO2Code:"BG",ISO3Code:"BGR"},{country:"Burkina Faso",countryCode:"+226",ISO2Code:"BF",ISO3Code:"BFA"},{country:"Burundi",countryCode:"+257",ISO2Code:"BI",ISO3Code:"BDI"},{country:"Cambodia",countryCode:"+855",ISO2Code:"KH",ISO3Code:"KHM"},{country:"Cameroon",countryCode:"+237",ISO2Code:"CM",ISO3Code:"CMR"},{country:"Canada",countryCode:"+1",ISO2Code:"CA",ISO3Code:"CAN"},{country:"Cape Verde",countryCode:"+238",ISO2Code:"CV",ISO3Code:"CPV"},{country:"Cayman Islands",countryCode:"+1-345",ISO2Code:"KY",ISO3Code:"CYM"},{country:"Central African Republic",countryCode:"+236",ISO2Code:"CF",ISO3Code:"CAF"},{country:"Chad",countryCode:"+235",ISO2Code:"TD",ISO3Code:"TCD"},{country:"Chile",countryCode:"+56",ISO2Code:"CL",ISO3Code:"CHL"},{country:"China",countryCode:"+86",ISO2Code:"CN",ISO3Code:"CHN"},{country:"Christmas Island",countryCode:"+61",ISO2Code:"CX",ISO3Code:"CXR"},{country:"Cocos Islands",countryCode:"+61",ISO2Code:"CC",ISO3Code:"CCK"},{country:"Colombia",countryCode:"+57",ISO2Code:"CO",ISO3Code:"COL"},{country:"Comoros",countryCode:"+269",ISO2Code:"KM",ISO3Code:"COM"},{country:"Cook Islands",countryCode:"+682",ISO2Code:"CK",ISO3Code:"COK"},{country:"Costa Rica",countryCode:"+506",ISO2Code:"CR",ISO3Code:"CRI"},{country:"Croatia",countryCode:"+385",ISO2Code:"HR",ISO3Code:"HRV"},{country:"Cuba",countryCode:"+53",ISO2Code:"CU",ISO3Code:"CUB"},{country:"Curacao",countryCode:"+599",ISO2Code:"CW",ISO3Code:"CUW"},{country:"Cyprus",countryCode:"+357",ISO2Code:"CY",ISO3Code:"CYP"},{country:"Czech Republic",countryCode:"+420",ISO2Code:"CZ",ISO3Code:"CZE"},{country:"Democratic Republic of the Congo",countryCode:"+243",ISO2Code:"CD",ISO3Code:"COD"},{country:"Denmark",countryCode:"+45",ISO2Code:"DK",ISO3Code:"DNK"},{country:"Djibouti",countryCode:"+253",ISO2Code:"DJ",ISO3Code:"DJI"},{country:"Dominica",countryCode:"+1-767",ISO2Code:"DM",ISO3Code:"DMA"},{country:"Dominican Republic",countryCode:"+1-809",ISO2Code:"DO",ISO3Code:"DOM"},{country:"Dominican Republic",countryCode:"+1-829",ISO2Code:"DO",ISO3Code:"DOM"},{country:"Dominican Republic",countryCode:"+1-849",ISO2Code:"DO",ISO3Code:"DOM"},{country:"East Timor",countryCode:"+670",ISO2Code:"TL",ISO3Code:"TLS"},{country:"Ecuador",countryCode:"+593",ISO2Code:"EC",ISO3Code:"ECU"},{country:"Egypt",countryCode:"+20",ISO2Code:"EG",ISO3Code:"EGY"},{country:"El Salvador",countryCode:"+503",ISO2Code:"SV",ISO3Code:"SLV"},{country:"Equatorial Guinea",countryCode:"+240",ISO2Code:"GQ",ISO3Code:"GNQ"},{country:"Eritrea",countryCode:"+291",ISO2Code:"ER",ISO3Code:"ERI"},{country:"Estonia",countryCode:"+372",ISO2Code:"EE",ISO3Code:"EST"},{country:"Ethiopia",countryCode:"+251",ISO2Code:"ET",ISO3Code:"ETH"},{country:"Falkland Islands",countryCode:"+500",ISO2Code:"FK",ISO3Code:"FLK"},{country:"Faroe Islands",countryCode:"+298",ISO2Code:"FO",ISO3Code:"FRO"},{country:"Fiji",countryCode:"+679",ISO2Code:"FJ",ISO3Code:"FJI"},{country:"Finland",countryCode:"+358",ISO2Code:"FI",ISO3Code:"FIN"},{country:"France",countryCode:"+33",ISO2Code:"FR",ISO3Code:"FRA"},{country:"French Polynesia",countryCode:"+689",ISO2Code:"PF",ISO3Code:"PYF"},{country:"Gabon",countryCode:"+241",ISO2Code:"GA",ISO3Code:"GAB"},{country:"Gambia",countryCode:"+220",ISO2Code:"GM",ISO3Code:"GMB"},{country:"Georgia",countryCode:"+995",ISO2Code:"GE",ISO3Code:"GEO"},{country:"Germany",countryCode:"+49",ISO2Code:"DE",ISO3Code:"DEU"},{country:"Ghana",countryCode:"+233",ISO2Code:"GH",ISO3Code:"GHA"},{country:"Gibraltar",countryCode:"+350",ISO2Code:"GI",ISO3Code:"GIB"},{country:"Greece",countryCode:"+30",ISO2Code:"GR",ISO3Code:"GRC"},{country:"Greenland",countryCode:"+299",ISO2Code:"GL",ISO3Code:"GRL"},{country:"Grenada",countryCode:"+1-473",ISO2Code:"GD",ISO3Code:"GRD"},{country:"Guam",countryCode:"+1-671",ISO2Code:"GU",ISO3Code:"GUM"},{country:"Guatemala",countryCode:"+502",ISO2Code:"GT",ISO3Code:"GTM"},{country:"Guernsey",countryCode:"+44-1481",ISO2Code:"GG",ISO3Code:"GGY"},{country:"Guinea",countryCode:"+224",ISO2Code:"GN",ISO3Code:"GIN"},{country:"Guinea-Bissau",countryCode:"+245",ISO2Code:"GW",ISO3Code:"GNB"},{country:"Guyana",countryCode:"+592",ISO2Code:"GY",ISO3Code:"GUY"},{country:"Haiti",countryCode:"+509",ISO2Code:"HT",ISO3Code:"HTI"},{country:"Honduras",countryCode:"+504",ISO2Code:"HN",ISO3Code:"HND"},{country:"Hong Kong",countryCode:"+852",ISO2Code:"HK",ISO3Code:"HKG"},{country:"Hungary",countryCode:"+36",ISO2Code:"HU",ISO3Code:"HUN"},{country:"Iceland",countryCode:"+354",ISO2Code:"IS",ISO3Code:"ISL"},{country:"India",countryCode:"+91",ISO2Code:"IN",ISO3Code:"IND"},{country:"Indonesia",countryCode:"+62",ISO2Code:"ID",ISO3Code:"IDN"},{country:"Iran",countryCode:"+98",ISO2Code:"IR",ISO3Code:"IRN"},{country:"Iraq",countryCode:"+964",ISO2Code:"IQ",ISO3Code:"IRQ"},{country:"Ireland",countryCode:"+353",ISO2Code:"IE",ISO3Code:"IRL"},{country:"Isle of Man",countryCode:"+44-1624",ISO2Code:"IM",ISO3Code:"IMN"},{country:"Israel",countryCode:"+972",ISO2Code:"IL",ISO3Code:"ISR"},{country:"Italy",countryCode:"+39",ISO2Code:"IT",ISO3Code:"ITA"},{country:"Ivory Coast",countryCode:"+225",ISO2Code:"CI",ISO3Code:"CIV"},{country:"Jamaica",countryCode:"+1-876",ISO2Code:"JM",ISO3Code:"JAM"},{country:"Japan",countryCode:"+81",ISO2Code:"JP",ISO3Code:"JPN"},{country:"Jersey",countryCode:"+44-1534",ISO2Code:"JE",ISO3Code:"JEY"},{country:"Jordan",countryCode:"+962",ISO2Code:"JO",ISO3Code:"JOR"},{country:"Kazakhstan",countryCode:"+7",ISO2Code:"KZ",ISO3Code:"KAZ"},{country:"Kenya",countryCode:"+254",ISO2Code:"KE",ISO3Code:"KEN"},{country:"Kiribati",countryCode:"+686",ISO2Code:"KI",ISO3Code:"KIR"},{country:"Kosovo",countryCode:"+383",ISO2Code:"XK",ISO3Code:"XKX"},{country:"Kuwait",countryCode:"+965",ISO2Code:"KW",ISO3Code:"KWT"},{country:"Kyrgyzstan",countryCode:"+996",ISO2Code:"KG",ISO3Code:"KGZ"},{country:"Laos",countryCode:"+856",ISO2Code:"LA",ISO3Code:"LAO"},{country:"Latvia",countryCode:"+371",ISO2Code:"LV",ISO3Code:"LVA"},{country:"Lebanon",countryCode:"+961",ISO2Code:"LB",ISO3Code:"LBN"},{country:"Lesotho",countryCode:"+266",ISO2Code:"LS",ISO3Code:"LSO"},{country:"Liberia",countryCode:"+231",ISO2Code:"LR",ISO3Code:"LBR"},{country:"Libya",countryCode:"+218",ISO2Code:"LY",ISO3Code:"LBY"},{country:"Liechtenstein",countryCode:"+423",ISO2Code:"LI",ISO3Code:"LIE"},{country:"Lithuania",countryCode:"+370",ISO2Code:"LT",ISO3Code:"LTU"},{country:"Luxembourg",countryCode:"+352",ISO2Code:"LU",ISO3Code:"LUX"},{country:"Macau",countryCode:"+853",ISO2Code:"MO",ISO3Code:"MAC"},{country:"Macedonia",countryCode:"+389",ISO2Code:"MK",ISO3Code:"MKD"},{country:"Madagascar",countryCode:"+261",ISO2Code:"MG",ISO3Code:"MDG"},{country:"Malawi",countryCode:"+265",ISO2Code:"MW",ISO3Code:"MWI"},{country:"Malaysia",countryCode:"+60",ISO2Code:"MY",ISO3Code:"MYS"},{country:"Maldives",countryCode:"+960",ISO2Code:"MV",ISO3Code:"MDV"},{country:"Mali",countryCode:"+223",ISO2Code:"ML",ISO3Code:"MLI"},{country:"Malta",countryCode:"+356",ISO2Code:"MT",ISO3Code:"MLT"},{country:"Marshall Islands",countryCode:"+692",ISO2Code:"MH",ISO3Code:"MHL"},{country:"Mauritania",countryCode:"+222",ISO2Code:"MR",ISO3Code:"MRT"},{country:"Mauritius",countryCode:"+230",ISO2Code:"MU",ISO3Code:"MUS"},{country:"Mayotte",countryCode:"+262",ISO2Code:"YT",ISO3Code:"MYT"},{country:"Mexico",countryCode:"+52",ISO2Code:"MX",ISO3Code:"MEX"},{country:"Micronesia",countryCode:"+691",ISO2Code:"FM",ISO3Code:"FSM"},{country:"Moldova",countryCode:"+373",ISO2Code:"MD",ISO3Code:"MDA"},{country:"Monaco",countryCode:"+377",ISO2Code:"MC",ISO3Code:"MCO"},{country:"Mongolia",countryCode:"+976",ISO2Code:"MN",ISO3Code:"MNG"},{country:"Montenegro",countryCode:"+382",ISO2Code:"ME",ISO3Code:"MNE"},{country:"Montserrat",countryCode:"+1-664",ISO2Code:"MS",ISO3Code:"MSR"},{country:"Morocco",countryCode:"+212",ISO2Code:"MA",ISO3Code:"MAR"},{country:"Mozambique",countryCode:"+258",ISO2Code:"MZ",ISO3Code:"MOZ"},{country:"Myanmar",countryCode:"+95",ISO2Code:"MM",ISO3Code:"MMR"},{country:"Namibia",countryCode:"+264",ISO2Code:"NA",ISO3Code:"NAM"},{country:"Nauru",countryCode:"+674",ISO2Code:"NR",ISO3Code:"NRU"},{country:"Nepal",countryCode:"+977",ISO2Code:"NP",ISO3Code:"NPL"},{country:"Netherlands",countryCode:"+31",ISO2Code:"NL",ISO3Code:"NLD"},{country:"Netherlands Antilles",countryCode:"+599",ISO2Code:"AN",ISO3Code:"ANT"},{country:"New Caledonia",countryCode:"+687",ISO2Code:"NC",ISO3Code:"NCL"},{country:"New Zealand",countryCode:"+64",ISO2Code:"NZ",ISO3Code:"NZL"},{country:"Nicaragua",countryCode:"+505",ISO2Code:"NI",ISO3Code:"NIC"},{country:"Niger",countryCode:"+227",ISO2Code:"NE",ISO3Code:"NER"},{country:"Nigeria",countryCode:"+234",ISO2Code:"NG",ISO3Code:"NGA"},{country:"Niue",countryCode:"+683",ISO2Code:"NU",ISO3Code:"NIU"},{country:"North Korea",countryCode:"+850",ISO2Code:"KP",ISO3Code:"PRK"},{country:"Northern Mariana Islands",countryCode:"+1-670",ISO2Code:"MP",ISO3Code:"MNP"},{country:"Norway",countryCode:"+47",ISO2Code:"NO",ISO3Code:"NOR"},{country:"Oman",countryCode:"+968",ISO2Code:"OM",ISO3Code:"OMN"},{country:"Pakistan",countryCode:"+92",ISO2Code:"PK",ISO3Code:"PAK"},{country:"Palau",countryCode:"+680",ISO2Code:"PW",ISO3Code:"PLW"},{country:"Palestine",countryCode:"+970",ISO2Code:"PS",ISO3Code:"PSE"},{country:"Panama",countryCode:"+507",ISO2Code:"PA",ISO3Code:"PAN"},{country:"Papua New Guinea",countryCode:"+675",ISO2Code:"PG",ISO3Code:"PNG"},{country:"Paraguay",countryCode:"+595",ISO2Code:"PY",ISO3Code:"PRY"},{country:"Peru",countryCode:"+51",ISO2Code:"PE",ISO3Code:"PER"},{country:"Philippines",countryCode:"+63",ISO2Code:"PH",ISO3Code:"PHL"},{country:"Pitcairn",countryCode:"+64",ISO2Code:"PN",ISO3Code:"PCN"},{country:"Poland",countryCode:"+48",ISO2Code:"PL",ISO3Code:"POL"},{country:"Portugal",countryCode:"+351",ISO2Code:"PT",ISO3Code:"PRT"},{country:"Puerto Rico",countryCode:"+1-787",ISO2Code:"PR",ISO3Code:"PRI"},{country:"Puerto Rico",countryCode:"+1-939",ISO2Code:"PR",ISO3Code:"PRI"},{country:"Qatar",countryCode:"+974",ISO2Code:"QA",ISO3Code:"QAT"},{country:"Republic of the Congo",countryCode:"+242",ISO2Code:"CG",ISO3Code:"COG"},{country:"Reunion",countryCode:"+262",ISO2Code:"RE",ISO3Code:"REU"},{country:"Romania",countryCode:"+40",ISO2Code:"RO",ISO3Code:"ROU"},{country:"Rwanda",countryCode:"+250",ISO2Code:"RW",ISO3Code:"RWA"},{country:"Saint Barthelemy",countryCode:"+590",ISO2Code:"BL",ISO3Code:"BLM"},{country:"Saint Helena",countryCode:"+290",ISO2Code:"SH",ISO3Code:"SHN"},{country:"Saint Kitts and Nevis",countryCode:"+1-869",ISO2Code:"KN",ISO3Code:"KNA"},{country:"Saint Lucia",countryCode:"+1-758",ISO2Code:"LC",ISO3Code:"LCA"},{country:"Saint Martin",countryCode:"+590",ISO2Code:"MF",ISO3Code:"MAF"},{country:"Saint Pierre and Miquelon",countryCode:"+508",ISO2Code:"PM",ISO3Code:"SPM"},{country:"Saint Vincent and the Grenadines",countryCode:"+1-784",ISO2Code:"VC",ISO3Code:"VCT"},{country:"Samoa",countryCode:"+685",ISO2Code:"WS",ISO3Code:"WSM"},{country:"San Marino",countryCode:"+378",ISO2Code:"SM",ISO3Code:"SMR"},{country:"Sao Tome and Principe",countryCode:"+239",ISO2Code:"ST",ISO3Code:"STP"},{country:"Saudi Arabia",countryCode:"+966",ISO2Code:"SA",ISO3Code:"SAU"},{country:"Senegal",countryCode:"+221",ISO2Code:"SN",ISO3Code:"SEN"},{country:"Serbia",countryCode:"+381",ISO2Code:"RS",ISO3Code:"SRB"},{country:"Seychelles",countryCode:"+248",ISO2Code:"SC",ISO3Code:"SYC"},{country:"Sierra Leone",countryCode:"+232",ISO2Code:"SL",ISO3Code:"SLE"},{country:"Singapore",countryCode:"+65",ISO2Code:"SG",ISO3Code:"SGP"},{country:"Sint Maarten",countryCode:"+1-721",ISO2Code:"SX",ISO3Code:"SXM"},{country:"Slovakia",countryCode:"+421",ISO2Code:"SK",ISO3Code:"SVK"},{country:"Slovenia",countryCode:"+386",ISO2Code:"SI",ISO3Code:"SVN"},{country:"Solomon Islands",countryCode:"+677",ISO2Code:"SB",ISO3Code:"SLB"},{country:"Somalia",countryCode:"+252",ISO2Code:"SO",ISO3Code:"SOM"},{country:"South Africa",countryCode:"+27",ISO2Code:"ZA",ISO3Code:"ZAF"},{country:"South Korea",countryCode:"+82",ISO2Code:"KR",ISO3Code:"KOR"},{country:"South Sudan",countryCode:"+211",ISO2Code:"SS",ISO3Code:"SSD"},{country:"Spain",countryCode:"+34",ISO2Code:"ES",ISO3Code:"ESP"},{country:"Sri Lanka",countryCode:"+94",ISO2Code:"LK",ISO3Code:"LKA"},{country:"Sudan",countryCode:"+249",ISO2Code:"SD",ISO3Code:"SDN"},{country:"Suriname",countryCode:"+597",ISO2Code:"SR",ISO3Code:"SUR"},{country:"Svalbard and Jan Mayen",countryCode:"+47",ISO2Code:"SJ",ISO3Code:"SJM"},{country:"Swaziland",countryCode:"+268",ISO2Code:"SZ",ISO3Code:"SWZ"},{country:"Sweden",countryCode:"+46",ISO2Code:"SE",ISO3Code:"SWE"},{country:"Switzerland",countryCode:"+41",ISO2Code:"CH",ISO3Code:"CHE"},{country:"Syria",countryCode:"+963",ISO2Code:"SY",ISO3Code:"SYR"},{country:"Taiwan",countryCode:"+886",ISO2Code:"TW",ISO3Code:"TWN"},{country:"Tajikistan",countryCode:"+992",ISO2Code:"TJ",ISO3Code:"TJK"},{country:"Tanzania",countryCode:"+255",ISO2Code:"TZ",ISO3Code:"TZA"},{country:"Thailand",countryCode:"+66",ISO2Code:"TH",ISO3Code:"THA"},{country:"Togo",countryCode:"+228",ISO2Code:"TG",ISO3Code:"TGO"},{country:"Tokelau",countryCode:"+690",ISO2Code:"TK",ISO3Code:"TKL"},{country:"Tonga",countryCode:"+676",ISO2Code:"TO",ISO3Code:"TON"},{country:"Trinidad and Tobago",countryCode:"+1-868",ISO2Code:"TT",ISO3Code:"TTO"},{country:"Tunisia",countryCode:"+216",ISO2Code:"TN",ISO3Code:"TUN"},{country:"Turkey",countryCode:"+90",ISO2Code:"TR",ISO3Code:"TUR"},{country:"Turkmenistan",countryCode:"+993",ISO2Code:"TM",ISO3Code:"TKM"},{country:"Turks and Caicos Islands",countryCode:"+1-649",ISO2Code:"TC",ISO3Code:"TCA"},{country:"Tuvalu",countryCode:"+688",ISO2Code:"TV",ISO3Code:"TUV"},{country:"U.S. Virgin Islands",countryCode:"+1-340",ISO2Code:"VI",ISO3Code:"VIR"},{country:"Uganda",countryCode:"+256",ISO2Code:"UG",ISO3Code:"UGA"},{country:"Ukraine",countryCode:"+380",ISO2Code:"UA",ISO3Code:"UKR"},{country:"United Arab Emirates",countryCode:"+971",ISO2Code:"AE",ISO3Code:"ARE"},{country:"United Kingdom",countryCode:"+44",ISO2Code:"GB",ISO3Code:"GBR"},{country:"United States",countryCode:"+1",ISO2Code:"US",ISO3Code:"USA"},{country:"Uruguay",countryCode:"+598",ISO2Code:"UY",ISO3Code:"URY"},{country:"Uzbekistan",countryCode:"+998",ISO2Code:"UZ",ISO3Code:"UZB"},{country:"Vanuatu",countryCode:"+678",ISO2Code:"VU",ISO3Code:"VUT"},{country:"Vatican",countryCode:"+379",ISO2Code:"VA",ISO3Code:"VAT"},{country:"Venezuela",countryCode:"+58",ISO2Code:"VE",ISO3Code:"VEN"},{country:"Vietnam",countryCode:"+84",ISO2Code:"VN",ISO3Code:"VNM"},{country:"Wallis and Futuna",countryCode:"+681",ISO2Code:"WF",ISO3Code:"WLF"},{country:"Western Sahara",countryCode:"+212",ISO2Code:"EH",ISO3Code:"ESH"},{country:"Yemen",countryCode:"+967",ISO2Code:"YE",ISO3Code:"YEM"},{country:"Zambia",countryCode:"+260",ISO2Code:"ZM",ISO3Code:"ZMB"},{country:"Zimbabwe",countryCode:"+263",ISO2Code:"ZW",ISO3Code:"ZWE"}];const userProfileStyles=i$4` .card { margin-top: 30px; margin-bottom: 70px; } wc-icon { padding: 5px 0 0 5px; width: 20px; height: 20px; cursor: pointer; } .green { border-bottom: 2px solid var(--printess-green); } .table-header { padding-left: 20px; border-top-right-radius: 4px; border-top-left-radius: 4px; color: #fff; margin-top: 10px; margin-bottom: 0; } .title { font-size: 18px; font-weight: 400; line-height: 50px; margin: 0; } .green .table-header { background-color: var(--printess-green); } dl { display: grid; margin-top: 10px; margin-bottom: 0; grid-template-columns: 150px calc(100% - 150px); } .span-text { grid-column: 2 / span 3; } dt, dd { display: flex; line-height: 25px; margin-left: 0; text-align: left; padding: 10px; align-items: center; } dd { display: flex; justify-content: space-between; padding-left: 0; } .profile-input { color: #555; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid #ccc; background-color: rgba(242,246,219,0.5); padding: 7px 10px; border-radius: 4px; } .missing-field { border: 1px solid rgb(210, 0, 100); } .warning { color: rgb(210, 0, 100); text-align: left; width: calc(100% - 40px); font-size: 12px; margin: 30px 0 0; } select { color: #555; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid #ccc; background-color: rgba(242,246,219,0.5); padding: 7px 10px; border-radius: 4px; } .lightgreen { background-color: var(--printess-lightgreen); } input.readonly { border: none; outline: none; background-color: transparent; font-size: 16px; } .button-wrapper { margin: 20px 0 20px 10px; display: flex; gap: 10px; } button { padding: 4px 10px; border: none; border-radius: 4px; color: #fff; cursor: pointer; font-family: var(--printess-button-font); font-size: 14px; font-weight: 400; } .settings { padding: 7px 20px; margin: 20px 15px; } .green button { background-color: var(--printess-green); } @media (max-width: ${config.mobileDeviceWidth}px) { .card { width: 100%; margin-bottom: 50px; } .table-header { padding-left: 10px; } .title { font-size: 14px; line-height: 36px; margin: 0; } .table-body { padding-bottom: 10px; } dl { grid-template-columns: 80px calc(50% - 80px) 80px calc(50% - 80px); } .profile-input { font-size: 12px; padding: 5px 7px; } select { font-size: 12px; padding: 5px 7px; } dd, dt { font-size: 12px; word-break: break-word; line-height: 16px; padding: 10px; align-items: center; } dd { grid-column: 2 / span 3; } .table-body p { font-size: 12px; padding: 0 10px; } .settings { font-size: 12px; margin-bottom: 10px; } } `;class UserProfile extends NobsBase{constructor(e,t){if(super(e,t),!(e instanceof Nobs||t instanceof UserProfile))if("string"==typeof e)this.email=e,this.displayName="";else{const t=e;this.company=t.company,this.displayName=t.displayName??"",this.firstName=t.firstName,this.lastName=t.lastName,this.email=t.email??"",this.phone=t.phone,this.countryCode=t.countryCode,this.addressOne=t.addressOne,this.addressTwo=t.addressTwo,this.postalCode=t.postalCode,this.city=t.city,this.state=t.state,this.country=t.country,this.timezone=t.timezone,this.vat=t.vat,this.accountingEmail=t.accountingEmail}}toDto(){return{company:this.company,displayName:this.displayName,firstName:this.firstName,lastName:this.lastName,email:this.email,phone:this.phone,countryCode:this.countryCode,addressOne:this.addressOne,addressTwo:this.addressTwo,postalCode:this.postalCode,city:this.city,state:this.state,country:this.country,timezone:this.timezone,vat:this.vat,accountingEmail:this.accountingEmail}}}const dialogStyles$1=i$4` :host { --dialog-warning-red: rgb(210, 0, 100); --dialog-disabled-pink: #e0afd2; } .modal { font-family: var(--printess-text-font); color: #555555; display: block; position: fixed; z-index: 100; padding-top: 70px; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; } .modal-wrapper { background-color: #fefefe; margin: auto; width: 50vmin; min-width: 60vw; box-shadow: 0px 4px 10px rgba(0,0,0,0.2), 0px 4px 20px rgba(0,0,0,0.2); } .pink { border-bottom: 2px solid var(--printess-pink); } .green { border-bottom: 2px solid var(--printess-green); } .magenta { border-bottom: 2px solid var(--printess-magenta); } .blue { border-bottom: 2px solid var(--printess-blue); } .modal-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; padding-left: 20px; color: #fff; margin-top: 10px; margin-bottom: 0; } .modal-title { line-height: 50px; margin: 0; font-size: 18px; font-weight: 400; } wc-icon { width: 20px; height: 20px; cursor: pointer; margin: 15px 20px; } .pink .modal-header { background-color: var(--printess-pink); } .green .modal-header { background-color: var(--printess-green); } .magenta .modal-header { background-color: var(--printess-magenta); } .blue .modal-header { background-color: var(--printess-blue); } .modal-content { padding: 20px; font-size: 16px; font-weight: 400; text-align: left; min-height: 160px; max-height: 50vh; overflow: auto; } label { font-size: 14px; padding-left: 2px; } input { padding: 10px; font-size: 14px; font-weight: 400; width: 100%; margin-top: 7px; border: 1px solid rgb(118, 118, 118); } input:hover { background-color: var(--printess-lightpink); border: 1px solid rgb(118, 118, 118); } button.submit { width: 100%; padding: 10px; margin-top: 15px; color: white; cursor: pointer; outline: none; border: none; border-radius: 4px; background-color: var(--printess-pink); font-family: var(--printess-button-font); font-size: 14px; font-weight: 400; } .pink .submit { background-color: var(--printess-pink); } .green .submit { background-color: var(--printess-green); } .magenta .submit { background-color: var(--printess-magenta); } .blue .submit { background-color: var(--printess-blue); } button.gray { background-color: #aaa !important;} button.gray:hover { background-color: #999 !important; } .pink .submit:hover { background-color: var(--printess-pinkHover); } @media (max-width: ${config.mobileDeviceWidth}px) { .modal { padding-top: 45px; } .modal-wrapper { width: 70vmin; min-width: unset; } .modal-content { max-height: unset; } } `,baseStyles=i$4` .modal { display: flex; justify-content: center; align-items: center; padding: 0px; } .modal-header { margin-top: 0px; } .error-msg { color: #d20064; font-size: 12px; font-family: var(--printess-text-font); } input, input:hover { border: 1px solid #ccc; } `;var __decorate$2v=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcBackdrop=class extends s$1{constructor(){super()}static get styles(){return i$4` :host, :host * { box-sizing: border-box; } :host { position: fixed; left:0; top:0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.5); z-index: 89; } `}cancelMouse(e){e.preventDefault(),e.stopPropagation()}connectedCallback(){super.connectedCallback(),this.addEventListener("mousedown",this.cancelMouse),this.addEventListener("mouseup",this.cancelMouse),this.addEventListener("mousemove",this.cancelMouse)}disconnectedCallback(){this.removeEventListener("mousedown",this.cancelMouse),this.removeEventListener("mouseup",this.cancelMouse),this.removeEventListener("mousemove",this.cancelMouse),super.disconnectedCallback()}render(){return x``}};WcBackdrop=__decorate$2v([e$4("wc-backdrop")],WcBackdrop);var __decorate$2u=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcDialogEmailSent=class extends s$1{static get styles(){return[dialogStyles$1,i$4` .modal { display: flex; justify-content: center; align-items: center; padding: 0px; } .modal-header { margin-top: 0px; } .modal-content { min-height: auto; } `]}connectedCallback(){super.connectedCallback()}constructor(){super(),this.backdrop=new WcBackdrop}showDialog(){document.body.appendChild(this.backdrop),document.body.appendChild(this)}closeDialog(){document.body.removeChild(this.backdrop),document.body.removeChild(this)}render(){return x` `}};WcDialogEmailSent=__decorate$2u([e$4("wc-dialog-email-sent")],WcDialogEmailSent);var __decorate$2t=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcCardContainer=class extends s$1{static get styles(){return i$4` .card { font-family: var(--printess-text-font); color: #555555; border-bottom: 2px solid var(--color); margin: 30px 0 70px; } .card.button-margin { margin-bottom: 10px; } .table-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; color: white; background-color: var(--color); border-top-right-radius: 4px; border-top-left-radius: 4px; padding: 0px 20px; } .title { font-size: 18px; font-weight: 400; line-height: 50px; margin: 0px; } .blue { --color: var(--printess-blue); } .green { --color: var(--printess-green); } .red { --color: var(--printess-red); } .pink { --color: var(--printess-pink); } .header-actions { display: flex; gap: 10px; } ::slotted(.wc-card-action) { background: transparent; border: none!important; padding: 0!important; } @media (max-width: ${config.mobileDeviceWidth}px) { .card { margin-bottom: 50px; } .card.button-margin { margin-bottom: 10px; } .table-header { padding-left: 10px; } .title { font-size: 14px; line-height: 36px; } } `}connectedCallback(){super.connectedCallback()}constructor(){super(),this.title="",this.color="pink",this.hasButtonBelow=!1}render(){return x`

${this.title}

`}};__decorate$2t([e$3({attribute:!0,type:String})],WcCardContainer.prototype,"title",void 0),__decorate$2t([e$3({attribute:!0,type:String})],WcCardContainer.prototype,"color",void 0),__decorate$2t([e$3({attribute:!0,type:Boolean})],WcCardContainer.prototype,"hasButtonBelow",void 0),__decorate$2t([e$3({attribute:!0,type:String})],WcCardContainer.prototype,"icon",void 0),WcCardContainer=__decorate$2t([e$4("wc-card-container")],WcCardContainer);var __decorate$2s=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcButton=class extends s$1{static get styles(){return i$4` :host { display: inline-block; } .button { display: flex; gap: 5px; justify-content: center; border: 1px solid var(--color); border-radius: 4px; color: #ffffff; cursor: pointer; font-family: var(--printess-button-font); font-size: 14px; font-weight: 400; background: var(--color); white-space: nowrap; justify-content: center; align-items: center; } .button.full-width { width: 100%; } .button.light { color: #404040; } .sm { padding: 4px 10px; } .md { padding: 7px 20px; } .lg { padding: 10px 30px; } .sm wc-icon { width: 14px; height: 19px; } .md wc-icon, .lg wc-icon { width: 20px; height: 19px; } .blue { --color: var(--printess-blue); } .green { --color: var(--printess-green); } .red { --color: var(--printess-red); } .pink { --color: var(--printess-pink); } .gray { --color: var(--printess-gray); } .light-gray { --color: var(--printess-lightgray); } .light-pink { --color: var(--printess-lightpink); } .button:hover:not(:disabled) { border-color: color-mix(in srgb, var(--color) 90%, black); background: color-mix(in srgb, var(--color) 90%, black); } button:disabled { opacity: 0.6; pointer-events: none; } .spinner, .spinner:after { border-radius: 50%; width: 2em; height: 2em; } .spinner { font-size: 6px; position: relative; border-top: 0.5em solid rgba(255,255,255, 0.2); border-right: 0.5em solid rgba(255,255,255, 0.2); border-bottom: 0.5em solid rgba(255,255,255, 0.2); border-left: 0.5em solid #ffffff; -webkit-transform: translateZ(0); -ms-transform: translateZ(0); transform: translateZ(0); -webkit-animation: load8 1.1s infinite linear; animation: load8 1.1s infinite linear; margin-right: 10px; } @-webkit-keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @media (max-width: ${config.mobileDeviceWidth}px) { .button { font-size: 12px; } .md { padding: 5px 10px; } .lg { padding: 7px 20px; } } `}connectedCallback(){super.connectedCallback()}constructor(){super(),this.color="pink",this.size="sm",this.width="",this.disabled=!1,this.loading=!1}render(){const e=this.color.startsWith("light")?"gray":"toolbar";return x` `}};__decorate$2s([e$3({attribute:!0,type:String})],WcButton.prototype,"caption",void 0),__decorate$2s([e$3({attribute:!0,type:String})],WcButton.prototype,"color",void 0),__decorate$2s([e$3({attribute:!0,type:String})],WcButton.prototype,"size",void 0),__decorate$2s([e$3({attribute:!0,type:String})],WcButton.prototype,"icon",void 0),__decorate$2s([e$3({attribute:!0,type:String})],WcButton.prototype,"margin",void 0),__decorate$2s([e$3({attribute:!0,type:String})],WcButton.prototype,"width",void 0),__decorate$2s([e$3({type:Boolean,reflect:!0})],WcButton.prototype,"disabled",void 0),__decorate$2s([e$3({type:Boolean,reflect:!0})],WcButton.prototype,"loading",void 0),__decorate$2s([e$3({type:String})],WcButton.prototype,"loadingText",void 0),WcButton=__decorate$2s([e$4("wc-button")],WcButton);var __decorate$2r=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcInput=class extends s$1{constructor(){super(),this.value="",this.name="",this.color="pink",this.placeholder="",this.type="text",this.label="",this.checked=!1,this.warning=!1,this.deleteInput=!1,this.addInput=!1,this.addDisabled=!1,this.id=this.generateUniqueId()}generateUniqueId(){const e=this.name?.toLowerCase().replace(/[^a-z0-9]/g,"-");return`${e||"input"}-${Math.floor(1e5*Math.random())}`}handleChange(e){const t=e.target;this.callback&&this.callback(t.value)}handleInput(e){const t=e.target;this.dispatchEvent(new CustomEvent("text-input",{detail:{value:t.value},bubbles:!0,composed:!0}))}handleDelete(){this.dispatchEvent(new CustomEvent("delete-input",{detail:{name:this.name},bubbles:!0,composed:!0}))}handleAdd(){this.dispatchEvent(new CustomEvent("add-input",{detail:{name:this.name},bubbles:!0,composed:!0}))}renderInput(){return x` ${this.deleteInput?x`
`:""} ${this.addInput?x`
`:""} `}renderTextarea(){return x` ${this.deleteInput?x`
`:""} `}renderSelect(){return this.options?.length?x` `:x``}renderDataList(){return x` ${this.list?.map(e=>x``)} ${this.addInput?x`
`:""} `}renderCheckbox(){return x`
`}render(){return x`
${"select"===this.type?this.renderSelect():"textarea"===this.type?this.renderTextarea():"datalist"===this.type?this.renderDataList():"checkbox"===this.type?this.renderCheckbox():this.renderInput()}
`}};WcInput.styles=i$4` div.text, div.password, div.datalist, div.select { display: flex; } input, select, textarea { color: #404040; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid rgb(204, 204, 204); background-color: var(--color); padding: 7px 10px; border-radius: 4px; resize: vertical; } ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ color: #a0a0a0; opacity: 1; /* Firefox */ } :-ms-input-placeholder { /* Internet Explorer 10-11 */ color: #a0a0a0; } ::-ms-input-placeholder { /* Microsoft Edge */ color: #a0a0a0; } .warning { border: 1px solid rgb(210, 0, 100); } .straight-border { border-top-right-radius: 0; border-bottom-right-radius: 0; } .delete-input-box, .add-input-box { display: flex; align-items: center; justify-content: center; color: white; font-family: var(--printess-text-font); font-size: 14px; outline: none; border: 1px solid rgb(204, 204, 204); padding: 7px 10px; border-radius: 4px; resize: vertical; border-top-left-radius: 0; border-bottom-left-radius: 0; background: #555555; border-left: none; cursor: pointer; } .add-input-box { background: var(--printess-pink); } .add-input-box.disabled { opacity: 0.6; pointer-events: none; } @scope(div.checkbox) { :scope { display: block; } label { cursor: pointer; font-family: var(--printess-text-font); } input { width: auto; } [type="checkbox"] { position: relative; border: none; border-radius: 10px; outline: none; left: 0px; top: -10px; width: 40px; height: 16px; z-index: 0; -webkit-appearance: none; } [type="checkbox"]:focus, [type="checkbox"]:hover { display: hidden; border: none; outline: none; } [type="checkbox"] + label { position: relative; display: block; cursor: pointer; line-height: 1.2; padding-left: 60px; position: relative; margin-top: -35px; } [type="checkbox"] + label:before { width: 40px; height: 18px; border-radius: 30px; border: 2px solid #ddd; background-color: #EEE; content: ""; margin-right: 15px; transition: background-color 0.5s linear; z-index: 5; position: absolute; left: 0px; } [type="checkbox"] + label:after { width: 18px; height: 18px; border-radius: 30px; background-color: #fff; content: ""; transition: margin 0.1s linear; box-shadow: 0px 0px 5px #aaa; position: absolute; left: 2px; top: 2px; z-index: 10; } [type="checkbox"]:checked + label:before { background-color: #e35fbc; border-color: #e35fbc; } [type="checkbox"]:checked + label:after { margin: 0 0 0 22px; box-shadow: #e447b6 0px 0px 5px; } } .blue { --color: rgba(76, 156, 226, 0.1); } .green { --color: rgba(242, 246, 219, 0.5); } .red { --color: rgba(210, 0, 100, 0.04); } .pink { --color: rgba(208, 4, 155, 0.04); } .orange { --color: rgba(255, 140, 0, 0.05); } @media (max-width: ${config.mobileDeviceWidth}px) { input { font-size: 12px; padding: 5px 7px; } } `,__decorate$2r([e$3({type:String})],WcInput.prototype,"value",void 0),__decorate$2r([e$3({type:String})],WcInput.prototype,"name",void 0),__decorate$2r([e$3({type:String})],WcInput.prototype,"color",void 0),__decorate$2r([e$3({type:String})],WcInput.prototype,"placeholder",void 0),__decorate$2r([e$3({type:String})],WcInput.prototype,"type",void 0),__decorate$2r([e$3({type:String})],WcInput.prototype,"label",void 0),__decorate$2r([e$3({type:Boolean})],WcInput.prototype,"checked",void 0),__decorate$2r([e$3({type:Boolean})],WcInput.prototype,"warning",void 0),__decorate$2r([e$3({type:Boolean})],WcInput.prototype,"deleteInput",void 0),__decorate$2r([e$3({type:Boolean})],WcInput.prototype,"addInput",void 0),__decorate$2r([e$3({type:Boolean})],WcInput.prototype,"addDisabled",void 0),__decorate$2r([e$3({type:Array})],WcInput.prototype,"list",void 0),__decorate$2r([e$3({type:Array})],WcInput.prototype,"options",void 0),WcInput=__decorate$2r([e$4("wc-input")],WcInput);var __decorate$2q=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcUserProfile=class extends s$1{constructor(){super(...arguments),this.inputReadonly=!0,this.loading=!1,this.currentUser=currentUser}static get styles(){return[userProfileStyles,i$4` .full-width { width: 100%; } .mandatory { font-weight: bold; } ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ color: #a0a0a0; opacity: 1; /* Firefox */ } :-ms-input-placeholder { /* Internet Explorer 10-11 */ color: #a0a0a0; } ::-ms-input-placeholder { /* Microsoft Edge */ color: #a0a0a0; } `]}setState(e){this.state=new UserProfile(e,this.state)}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async loadUserProfile(){const e=await api.loadProfile();e instanceof ServerErrorResponse$2?this.showError(e):(this.state=new UserProfile(e),this.profile={...e},this.requestUpdate())}async updateUserProfile(e){const t=await api.updateProfile(e);return t instanceof ServerErrorResponse$2?(this.showError(t),"failure"):(this.loading=!0,window.setTimeout(()=>{this.loading=!1},2e3),"success")}connectedCallback(){super.connectedCallback(),this.loadUserProfile()}compare(e,t){return et?1:0}changeProfile(e){const t=new Nobs,o=e.target.name,r=e.target.value;0!==r.length||"displayName"!==o?(t.setProperty(this.state,o,r),this.setState(t)):e.target.value=this.profile.displayName}exchangeProfile(e,t){const o=new Nobs;o.setProperty(this.state,e,t),this.setState(o)}getFlag(e){const t=e.toUpperCase().split("").map(e=>127397+e.charCodeAt(0));return String.fromCodePoint(...t)}async updateProfile(){if(!this.profile.timezone){const e=new Nobs;e.setProperty(this.state,"timezone",Intl.DateTimeFormat().resolvedOptions().timeZone),this.setState(e)}const e=this.state.toDto(),t=await this.updateUserProfile(e);this.profile=this.state,"failure"===t&&alert("An error occurred, please try again later!")}sendResetMail(){const e=new WcDialogEmailSent;return e.showDialog(),sendPasswordResetMail(),e}getUserContent(){return x`
${this.profile?x`
Email:
${this.profile.email}
Company:
this.exchangeProfile("company",e)}>
Name:
this.exchangeProfile("displayName",e)}>
Phone:
${countries.sort((e,t)=>this.compare(e.countryCode,t.countryCode)).map(e=>x` `)}
Address Line 1:
this.exchangeProfile("addressOne",e)}>
Address Line 2:
this.exchangeProfile("addressTwo",e)}>
Postal Code:
this.exchangeProfile("postalCode",e)}>
City:
this.exchangeProfile("city",e)}>
State:
this.exchangeProfile("state",e)}>
Country:
${countries.sort((e,t)=>this.compare(e.country,t.country)).map(e=>x``)}
EU VAT-ID:
this.exchangeProfile("vat",e)}>
Accounting Email:
this.exchangeProfile("accountingEmail",e)}>
Last Login:
${this.currentUser.lastLogin?.toLocaleDateString()} at ${this.currentUser.lastLogin?.toLocaleTimeString()}
`:""}
${config.isMobile&&this.profile&&!this.profile.displayName?x`
`:""} ${this.profile&&!this.profile.displayName?x`*Please fill in the missing information!`:""} `}render(){return x` ${this.getUserContent()} `}};__decorate$2q([e$3({type:Object})],WcUserProfile.prototype,"state",void 0),__decorate$2q([e$3({type:Boolean})],WcUserProfile.prototype,"inputReadonly",void 0),__decorate$2q([e$3({type:Object})],WcUserProfile.prototype,"profile",void 0),__decorate$2q([e$3({type:Boolean})],WcUserProfile.prototype,"loading",void 0),WcUserProfile=__decorate$2q([e$4("wc-user-profile")],WcUserProfile); /** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ const o=e$2(class extends i{constructor(e){var o;if(super(e),e.type!==t.ATTRIBUTE||"class"!==e.name||(null===(o=e.strings)||void 0===o?void 0:o.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var o,r;if(void 0===this.it){this.it=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!(null===(o=this.nt)||void 0===o?void 0:o.has(e))&&this.it.add(e);return this.render(t)}const i=e.element.classList;this.it.forEach(e=>{e in t||(i.remove(e),this.it.delete(e))});for(const e in t){const o=!!t[e];o===this.it.has(e)||(null===(r=this.nt)||void 0===r?void 0:r.has(e))||(o?(i.add(e),this.it.add(e)):(i.remove(e),this.it.delete(e)))}return T}});var __decorate$2p=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcUserTokens=class extends s$1{constructor(){super(...arguments),this.displayServiceToken=!1,this._handleResize=()=>{config.isMobile=window.innerWidth<=config.mobileDeviceWidth,this.requestUpdate()}}static get styles(){return[accountStyles,i$4` .grid-container { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 20px; justify-content: center; align-items: center; } .blue dt:nth-of-type(even), .blue dd:nth-of-type(even) { background-color: var(--printess-lightblue); } .token-name { white-space: nowrap; } .token { direction: rtl; white-space: nowrap; width: 100%; overflow: hidden; text-overflow: ellipsis; margin-right: 10px; } .revoked { text-decoration: line-through; color: red; } .flex { display: flex; flex-direction: row; gap: 10px; align-items: center; justify-content: flex-end; } .separator { grid-column: 1/4; height: 2px; width: 100%; border-top: 1px solid var(--color); } `]}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async loadUserTokens(){const e=await api.loadUserTokens();e instanceof ServerErrorResponse$2?this.showError(e):this.tokens=e.filter(e=>"demo"!==e.type)}connectedCallback(){super.connectedCallback(),this.loadUserTokens(),window.addEventListener("resize",this._handleResize)}disconnectedCallback(){window.removeEventListener("resize",this._handleResize),super.disconnectedCallback()}copyToken(e){const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),t.remove(),alert("Token copied to clipboard")}async revokeToken(e){"sure"===prompt("Are you sure to revoke this token? The API will block all future requests when using this token. Enter 'sure' to proceed.","No idea...")&&(await api.revokeToken(e),this.loadUserTokens())}getTokenContent(){return x`
${this.tokens?this.tokens.sort((e,t)=>(e.isRevoked.toString()+e.type).localeCompare(t.isRevoked.toString()+t.type)).map((e,t)=>x`
${e.type[0].toUpperCase()}${e.type.slice(1)}-Token:
${"service"===e.type?this.displayServiceToken?e.token:e.token.replace(/./g,"*"):e.token}
${e.isRevoked?x``:x` ${config.isMobile?x` this.copyToken(e.token)}> `:x` ${"service"===e.type?x` this.displayServiceToken=!this.displayServiceToken}> `:x``} this.copyToken(e.token)}> `} this.revokeToken(e.jti)}> `}
${t
`:""} `):x`

Loading Tokens ...

`} `}render(){return x` ${this.getTokenContent()} `}};__decorate$2p([e$3({type:Array})],WcUserTokens.prototype,"tokens",void 0),__decorate$2p([e$3({type:Boolean})],WcUserTokens.prototype,"displayServiceToken",void 0),WcUserTokens=__decorate$2p([e$4("wc-user-tokens")],WcUserTokens);var __decorate$2o=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcReferralCode=class extends s$1{static get styles(){return[accountStyles,i$4` dl { grid-template-columns: 1fr; } dd { padding: 10px 20px; } .flex { display: flex; flex-direction: row; align-items: center; } button:hover { background-color: var(--printess-pinkHover); } `]}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async loadReferralCode(){const e=await api.loadUserTokens();e instanceof ServerErrorResponse$2?this.showError(e):this.referralCode=e}connectedCallback(){super.connectedCallback()}copyReferralCode(e){const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("Copy"),t.remove(),alert("Referral code copied to clipboard")}getContent(){return x`
ImtpZCI6InByaW50ZXNa
this.copyReferralCode("ImtpZCI6InByaW50ZXNa")} >
`}render(){return x` ${this.getContent()} `}};__decorate$2o([e$3({type:Array})],WcReferralCode.prototype,"referralCode",void 0),WcReferralCode=__decorate$2o([e$4("wc-referral-code")],WcReferralCode);var __decorate$2n=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcTopicHeader=class extends s$1{static get styles(){return i$4` .header { font-size: 22px; font-weight: 500; font-family: var(--printess-header-font); } @media (max-width: ${config.mobileDeviceWidth}px) { .header { font-size: 18px; } } `}connectedCallback(){super.connectedCallback()}constructor(e,t){super(),this.title=e,this.color=t}render(){return x`

${this.title}

`}};__decorate$2n([e$3({attribute:!0,type:String})],WcTopicHeader.prototype,"title",void 0),__decorate$2n([e$3({attribute:!0,type:String})],WcTopicHeader.prototype,"color",void 0),WcTopicHeader=__decorate$2n([e$4("wc-topic-header")],WcTopicHeader);var __decorate$2m=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcAlertContainer=class extends s$1{static get styles(){return i$4` p { font-family: var(--printess-text-font); } .warning-title { display: flex; align-items: center; justify-content: center; color: var(--printess-red); font-size: 18px; font-weight: 700; font-family: var(--printess-header-font); } .warning-text { display: flex; align-items: center; justify-content: left; flex-direction: row; border-left: 3px solid var(--printess-red); border-right: 3px solid var(--printess-red); border-top: 1px solid var(--printess-red); border-bottom: 1px solid var(--printess-red); border-radius: 4px; padding: 0px 20px; margin: 20px 0; gap: 20px; } .warning-text.blue { border-left: 3px solid var(--printess-blueHover); border-right: 3px solid var(--printess-blueHover); border-top: 1px solid var(--printess-blueHover); border-bottom: 1px solid var(--printess-blueHover); } .warning-text.blue > .warning-title { color: var(--printess-blueHover); } .warning-text > p { font-size: 15px; text-align: justify; } @media (max-width: ${config.mobileDeviceWidth}px) { p { font-size: 14px; text-align: center; } .warning-title { margin-top: 20px; margin-right: 0; font-size: 14px; } .warning-text { flex-direction: column; gap: 0; } .warning-text > p { font-size: 12px; } } `}constructor(e,t){super(),this.alertType=e,this.content=t}connectedCallback(){super.connectedCallback()}render(){const e=this.header||this.alertType.toUpperCase();return x`
${e}:
${this.content}
`}};__decorate$2m([e$3({type:String})],WcAlertContainer.prototype,"alertType",void 0),__decorate$2m([e$3({type:Object})],WcAlertContainer.prototype,"header",void 0),__decorate$2m([e$3({type:Object})],WcAlertContainer.prototype,"content",void 0),WcAlertContainer=__decorate$2m([e$4("wc-alert-container")],WcAlertContainer);var __decorate$2l=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcAccountPage=class extends s$1{constructor(){super(...arguments),this.debug="localhost"===window.location.hostname||window.location.href.indexOf("debug=1")>0||!0===window.printessDebug}static get styles(){return[accountStyles,i$4` .link-text { text-decoration: none; color: var(--printess-pink); cursor: pointer; } @media (max-width: ${config.mobileDeviceWidth}px) { .team-member-info { font-size: 12px; } } `]}connectedCallback(){super.connectedCallback(),location.hash="#account"}getDeleteAccountContent(){return x`

Once you delete this account, there is no going back. All your content will be deleted.

`}getAlertContent(){return x`

The service token should only get used on server side to process orders. With it, billable orders can be started. To protect your account never embed the service token into a web-site!

`}render(){return window.scrollTo({top:0,behavior:"smooth"}),x` `}};WcAccountPage=__decorate$2l([e$4("wc-account-page")],WcAccountPage);const templateStyles=i$4` .template-item { width: 270px; display: flex; border-radius: 5px; padding: 20px; font-family: var(--printess-text-font); color: #555555; } .pink { background-color: var(--printess-lightpink); } .green { background-color: var(--printess-lightgreen); } .blue { background-color: var(--printess-lightblue); } .magenta { background-color: var(--printess-lightmagenta); } .template-img { display: flex; width: 100px; padding-right:20px; justify-content: center; align-items: center; } img { border-radius: 5px; width: 100px; height: 80px; object-fit: cover; } .template-txt { justify-content: center; margin: auto; width: 180px; } .template-title { margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } a { text-decoration: none; color: var(--printess-text-color); } .template-info { margin-bottom: 0; font-size: 12px; line-height: 20px; } `;var __decorate$2k=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcTemplatePreview=class extends s$1{constructor(e,t){super(),this.color="",this.color=t,this.template=e}static get styles(){return[templateStyles]}render(){return x` ${this.color&&this.template?x`

${this.template.n}

created: ${new Date(this.template.lp).getDate()}.${new Date(this.template.lp).getMonth()+1}.${new Date(this.template.lp).getFullYear()}
last modified: ${new Date(this.template?.ls).getDate()}.${new Date(this.template.ls).getMonth()+1}.${new Date(this.template.ls).getFullYear()}

`:""} `}};__decorate$2k([e$3({attribute:!0,type:Object})],WcTemplatePreview.prototype,"template",void 0),__decorate$2k([e$3({attribute:!0,type:String})],WcTemplatePreview.prototype,"color",void 0),WcTemplatePreview=__decorate$2k([e$4("wc-template-preview")],WcTemplatePreview);const templatesPageStyles=i$4` .template-page { font-family: var(--printess-text-font); color: #555555; } .topic { font-size: 22px; font-weight: 500; font-family: var(--printess-header-font); } .template-wrapper { display: flex; flex-wrap: wrap; flex-direction: row; grid-gap: 20px; margin-top: 30px; } select { padding: 5px 7px; background-color: white; color: #555555; border-radius: 4px; margin-left: 10px; } @media (max-width: ${config.mobileDeviceWidth}px) { .topic { font-size: 20px; } .subtopic { font-size: 14px; } } `;var __decorate$2j=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcTemplatesPage=class extends s$1{constructor(){super(...arguments),this.orderValue="name"}static get styles(){return[templatesPageStyles]}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async loadTemplates(){const e=await api.loadTemplatesList();e instanceof ServerErrorResponse$2?this.showError(e):this.templates=e}connectedCallback(){super.connectedCallback(),this.loadTemplates(),location.hash="#templates"}sortOptions(e,t){switch(this.orderValue){case"name":return e.nt.n?1:0;case"date-modified":return e.lst.ls?-1:0;case"date-created":return e.lpt.lp?-1:0;default:assertNever$1(this.orderValue)}}renderTemplates(){return this.templates?x`${this.templates.uts.filter(e=>e.uid===this.templates.uid)[0]?.ts.sort((e,t)=>this.sortOptions(e,t)).map((e,t)=>new WcTemplatePreview(e,["green","pink","blue","magenta"][t%4]))}`:x`

Templates loading ...

`}setOrderValue(e){this.orderValue=e.target.value}render(){return x`

User Templates

Templates list

${this.renderTemplates()}
`}};__decorate$2j([e$3({type:Object})],WcTemplatesPage.prototype,"templates",void 0),__decorate$2j([e$3({type:String})],WcTemplatesPage.prototype,"orderValue",void 0),WcTemplatesPage=__decorate$2j([e$4("wc-templates-page")],WcTemplatesPage);class SearchOrders extends NobsBase{constructor(e,t){if(super(e,t),!(e instanceof Nobs||t instanceof SearchOrders))if("string"==typeof e)this.templateName=e,this.shopSaveId="",this.origin="",this.productType="",this.externalOrderId="",this.hideEagle=!0;else{const t=e;this.templateName=t.templateName??"",this.shopSaveId=t.saveToken??"",this.templateNameOperator=t.templateNameOperator,this.origin=t.origin??"",this.userId=t.userId??"",this.productType=t.productType??"",this.externalOrderId=t.externalOrderId??"",this.startDate=t.startDate,this.endDate=t.endDate,this.isFinished=t.isFinished,this.isImposed=t.isImposed,this.take=t.take,this.skip=t.skip,this.onlyMyOrders=t.onlyMyOrders,this.hideEagle=!t.payload||-1!==t.payload.indexOf("hideEagle")}}toDto(e){return{templateName:this.templateName,saveToken:this.shopSaveId,templateNameOperator:this.templateNameOperator,origin:this.origin,userId:this.userId,productType:this.productType,externalOrderId:this.externalOrderId,startDate:this.startDate,endDate:this.endDate,isFinished:this.isFinished,isImposed:this.isImposed,isFailed:this.isFailed,take:this.take,skip:this.skip,onlyMyOrders:this.onlyMyOrders,payload:["as admin"===e&&adm.useAdminMode?"skipUserIdCheck":"",this.hideEagle?"hideEagle":""].filter(e=>e).join(",")}}}const printjobsStyles=i$4` .user-orders { font-family: var(--printess-text-font); color: #555555; } .topic { font-size: 22px; font-weight: 500; font-family: var(--printess-header-font); color: #555555; } .buttons-wrapper { color: white; font-family: var(--printess-button-font); font-size: 14px; font-weight: 400; border-radius: 4px; width: 100%; display: flex; flex-direction: row; cursor: pointer; gap: 10px; flex-wrap: wrap; } .option-button { display: flex; align-items: center; padding: 10px 20px; flex: 1 0 auto; justify-content: center; background: var(--printess-blue); border-radius: 4px; height: 15px; } .option-button:hover { background-color: var(--printess-blueHover); } .filter-wrapper { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-top: 30px; } .setting-buttons { display: flex; flex-direction: row; flex-wrap: wrap; margin-bottom: 10px; } .inline { display: flex; align-items: center; margin-bottom: 10px; } .template-name-label { font-size: 16px; } .template-name-input { margin: 0 10px; border: 1px solid #ccc; background: rgba(76, 156, 226, 0.1); } .collapse-icon { cursor: pointer; margin-right: 10px; height: 20px; } .table-settings { display: flex; align-items: center; padding: 10px 20px; height: 35px; margin-right: 10px; cursor: pointer; border: 1px solid #ADADAD; outline: none; border-radius: 4px; font-family: var(--printess-button-font); font-size: 14px; font-weight: 400; color: #555555; } .table-settings:hover { background-color: #e2e2e2; } .input-label { display: flex; flex-direction: column; margin-bottom: 20px; flex: 1 0 300px; padding-right: 20px; } label { font-size: 12px; font-weight: 400; color: #555555; } input { padding: 10px 20px; background-color: rgba(76, 156, 226, 0.1); border-radius: 4px; border: 1px solid #ccc; outline: none; margin: 10px 10px 0 0; font-size: 14px; font-weight: 400; font-family: var(--printess-text-font); height: 40px; width: 100%; color: #555555; } ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ color: #a0a0a0; opacity: 1; /* Firefox */ } :-ms-input-placeholder { /* Internet Explorer 10-11 */ color: #a0a0a0; } ::-ms-input-placeholder { /* Microsoft Edge */ color: #a0a0a0; } .filter-button { padding: 10px; border-radius: 4px; background-color: var(--printess-blue); border: none; height: 40px; } .filter-button:hover { background-color: var(--printess-blueHover); } .expanded-filter { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; border: 1px solid #ccc; border-radius: 4px; padding: 20px 0 0 20px; } select { padding: 10px 20px; margin: 10px 10px 0 0; height: 40px; width: 100%; font-family: var(--printess-text-font); font-size: 14px; font-weight: 400; background-color: rgba(76, 156, 226, 0.1); outline: none; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; color: #555555; } wc-icon { width: 25px; height: 25px; } .filter-icon { cursor: pointer; height: 22px; } .table-container { margin-top: 10px; } .hidden { display: none; } @media (max-width: ${config.mobileDeviceWidth}px) { .topic { font-size: 20px; } .subtopic { font-size: 14px; } .buttons-wrapper { flex-wrap: wrap; height: auto; } .option-button { padding: 7px 10px; font-size: 12px; flex: 1 1 auto; height: 17px; } .collapse-icon { width: 20px; height: 20px; } .filter-wrapper { margin-top: 20px; } .filter-button { height: 30px; padding: 7px 10px; } .setting-buttons { margin-bottom: 10px; } .setting-buttons button { margin-bottom: 5px; } .table-settings { font-size: 12px; padding: 7px 10px; height: 30px; margin-right: 5px; } .inline { width: 100%; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; margin-top: 20px; } .template-name-label { font-size: 12px; } .input-label { flex: 1 0 150px; } input { padding: 0 15px; font-size: 12px; height: 30px; } label { font-size: 12px; } select { padding: 0 15px; font-size: 12px; height: 30px; } wc-icon { width: 15px; height: 15px; } .filter-icon { cursor: pointer; width: 15px; height: 15px; } } `;function requiredArgs(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function toDate(e){requiredArgs(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function getTimezoneOffsetInMilliseconds(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function compareAsc(e,t){requiredArgs(2,arguments);var o=toDate(e),r=toDate(t),i=o.getTime()-r.getTime();return i<0?-1:i>0?1:i}function differenceInCalendarMonths(e,t){requiredArgs(2,arguments);var o=toDate(e),r=toDate(t);return 12*(o.getFullYear()-r.getFullYear())+(o.getMonth()-r.getMonth())}function differenceInMilliseconds(e,t){requiredArgs(2,arguments);var o=toDate(e),r=toDate(t);return o.getTime()-r.getTime()}function endOfDay(e){requiredArgs(1,arguments);var t=toDate(e);return t.setHours(23,59,59,999),t}function endOfMonth(e){requiredArgs(1,arguments);var t=toDate(e),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}function isLastDayOfMonth(e){requiredArgs(1,arguments);var t=toDate(e);return endOfDay(t).getTime()===endOfMonth(t).getTime()}function differenceInMonths(e,t){requiredArgs(2,arguments);var o,r=toDate(e),i=toDate(t),a=compareAsc(r,i),s=Math.abs(differenceInCalendarMonths(r,i));if(s<1)o=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-a*s);var n=compareAsc(r,i)===-a;isLastDayOfMonth(toDate(e))&&1===s&&1===compareAsc(e,i)&&(n=!1),o=a*(s-Number(n))}return 0===o?0:o}function differenceInSeconds(e,t){requiredArgs(2,arguments);var o=differenceInMilliseconds(e,t)/1e3;return o>0?Math.floor(o):Math.ceil(o)}var formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function formatDistance$1(e,t,o){var r;return o=o||{},r="string"==typeof formatDistanceLocale[e]?formatDistanceLocale[e]:1===t?formatDistanceLocale[e].one:formatDistanceLocale[e].other.replace("{{count}}",t),o.addSuffix?o.comparison>0?"in "+r:r+" ago":r}function buildFormatLongFn(e){return function(t){var o=t||{},r=o.width?String(o.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function formatRelative(e,t,o,r){return formatRelativeLocale[e]}function buildLocalizeFn(e){return function(t,o){var r,i=o||{};if("formatting"===(i.context?String(i.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=i.width?String(i.width):a;r=e.formattingValues[s]||e.formattingValues[a]}else{var n=e.defaultWidth,l=i.width?String(i.width):e.defaultWidth;r=e.values[l]||e.values[n]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};function ordinalNumber(e,t){var o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"}var localize={ordinalNumber:ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};function buildMatchPatternFn(e){return function(t,o){var r=String(t),i=o||{},a=r.match(e.matchPattern);if(!a)return null;var s=a[0],n=r.match(e.parsePattern);if(!n)return null;var l=e.valueCallback?e.valueCallback(n[0]):n[0];return{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(s.length)}}}function buildMatchFn(e){return function(t,o){var r=String(t),i=o||{},a=i.width,s=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],n=r.match(s);if(!n)return null;var l,c=n[0],d=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(d)?findIndex(d,function(e){return e.test(c)}):findKey(d,function(e){return e.test(c)}),l=e.valueCallback?e.valueCallback(l):l,{value:l=i.valueCallback?i.valueCallback(l):l,rest:r.slice(c.length)}}}function findKey(e,t){for(var o in e)if(e.hasOwnProperty(o)&&t(e[o]))return o}function findIndex(e,t){for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};requiredArgs(2,arguments);var r=o.locale||locale;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var i=compareAsc(e,t);if(isNaN(i))throw new RangeError("Invalid time value");var a,s,n=cloneObject(o);n.addSuffix=Boolean(o.addSuffix),n.comparison=i,i>0?(a=toDate(t),s=toDate(e)):(a=toDate(e),s=toDate(t));var l,c=differenceInSeconds(s,a),d=(getTimezoneOffsetInMilliseconds(s)-getTimezoneOffsetInMilliseconds(a))/1e3,p=Math.round((c-d)/60);if(p<2)return o.includeSeconds?c<5?r.formatDistance("lessThanXSeconds",5,n):c<10?r.formatDistance("lessThanXSeconds",10,n):c<20?r.formatDistance("lessThanXSeconds",20,n):c<40?r.formatDistance("halfAMinute",null,n):c<60?r.formatDistance("lessThanXMinutes",1,n):r.formatDistance("xMinutes",1,n):0===p?r.formatDistance("lessThanXMinutes",1,n):r.formatDistance("xMinutes",p,n);if(p<45)return r.formatDistance("xMinutes",p,n);if(p<90)return r.formatDistance("aboutXHours",1,n);if(p=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};function humanReadableBackendFailureDetails(e){try{if(e?.includes("Cannot parse resources: ")){const t=e.substring(24).trim().split("\n");for(const e of t){if(e.startsWith("{")&&e.endsWith("}")){const t=JSON.parse(e);if("ReadJavaScriptString"===t.func&&t.errorMessage.includes("ReferenceError")&&t.errorMessage.includes("error=not found: ")){const e=t.errorMessage.indexOf("Result of '"),o=t.errorMessage.indexOf("' is not a string."),r=t.errorMessage.split("error=not found: "),i=r[r.length-1];if(-1!==e&&o>e){const r=t.errorMessage.substring(e+11,o);return i.startsWith("form.")?`The expression '${r}' caused an error. The form field '${i.substring(5)}' does not exist.`:`The expression '${r}' caused an error. Caused by ${i}.`}console.error(i)}break}if(e.startsWith("Method 'ParseStyleFont' failed with 'Cannot find font from style")){const t=e.indexOf("font name=");if(-1!==t){const o=e.indexOf("'",t);if(-1!==o){return`The font '${e.substring(t+10,o)}' does not exist. It is used somewhere in the styles.`}}}}}}catch(e){console.error(e)}return e}let WcDialogErrorMessage=class extends s$1{static get styles(){return[dialogStyles$1,i$4` .modal-wrapper { width: 70vmin; } `]}constructor(e){super(),this.backdrop=new WcBackdrop,this.errorMsg=e}showDialog(){document.body.appendChild(this.backdrop),document.body.appendChild(this)}closeDialog(){document.body.removeChild(this.backdrop),document.body.removeChild(this)}render(){return x` `}};__decorate$2i([e$3({attribute:!1,type:String})],WcDialogErrorMessage.prototype,"errorMsg",void 0),WcDialogErrorMessage=__decorate$2i([e$4("wc-dialog-error-message")],WcDialogErrorMessage);var __decorate$2h=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const columns=[{name:"id",title:"Id"},{name:"jobId",title:"Job Id"},{name:"shortInfo",title:"Short User Info"},{name:"userInfo",title:"User Info"},{name:"userId",title:"User Id"},{name:"sourceUserId",title:"Source User Id"},{name:"externalOrderId",title:"External Order Id"},{name:"templateName",title:"Template Name"},{name:"origin",title:"Origin"},{name:"shopSaveId",title:"Shop Save Id"},{name:"productType",title:"Product Type"},{name:"createdOn",title:"Created"},{name:"finishedOn",title:"Finished"},{name:"isFinished",title:"Status"},{name:"failureDetails",title:"Failure Details"},{name:"result",title:"File"},{name:"document",title:"Documents"},{name:"pages",title:"Pages"},{name:"size",title:"Size"},{name:"usedCredits",title:"Credits"}];let WcPrintjobsTable=class extends s$1{static get styles(){return[tableStyles$1]}constructor(e,t,o){super(),this.showIsoDate=!1,this.editorVersionPrefix="",this.data=e,this.headers=t,this.editorVersionPrefix=o;const r=localStorage.getItem("tableSettings");r?this.headers=JSON.parse(r):this.headers}getSearchValue(e){this.callback=e}setSearchValue(e,t){this.callback&&this.callback(e,t),this.copyToClipboard(t)}getUserInfo(e){let t="";if(this.data.users){const o=this.data.users.filter(t=>t.id===e.userId)[0];if(o&&(t+=o.d+" ("+o.e+")"),e.sourceUserId){const o=this.data.users.filter(t=>t.id===e.sourceUserId)[0];o&&(t+=", issued by "+o.d+" ("+o.e+")")}}return t}getShortUserInfo(e){if(this.data.users){const t=this.data.users.filter(t=>t.id===e.userId)[0];if(e.sourceUserId){const t=this.data.users.filter(t=>t.id===e.sourceUserId)[0];if(t)return t.d}else if(t)return t.d}return""}async retryOrder(e){const t={orderId:e.id,reloadPaymentData:!1};"paymentRequired"==e.failureDetails&&(t.reloadPaymentData=!0);const o=await api.retryOrder(t);o instanceof ServerErrorResponse$2?alert(o.message):console.log("retryOrder",o)}render(){return x` ${this.data?x`
${c(columns,e=>e.name,e=>x` `)} ${this.data&&c(this.data.orders,e=>e.id,e=>{const t=this.getUserInfo(e),o=this.getShortUserInfo(e),r=new Date(e.createdOn).toISOString();return x` `})}
${"Shopify"===currentUser.displayName&&"externalOrderId"===e.name?"Shopify Order Id":e.title}
this.retryOrder(e)}> this.copyToClipboard(e.id)}>${e.id} this.copyToClipboard(e.jobId)}>${e.jobId} this.setSearchValue("userId",e.userId)}>${o} ${t} this.setSearchValue("userId",e.userId)}>${e.userId} this.copyToClipboard(e.sourceUserId)}>${e.sourceUserId} this.copyToClipboard(e.externalOrderId)}>${"Shopify"===currentUser.displayName?x`${e.externalOrderId}`:e.externalOrderId}   ${e.templateName.replace("~published","").replace("~merged","")} this.setSearchValue("origin",e.origin)}>${e.origin} ${e.shopSaveId} ${e.productType} this.copyToClipboard(r)}>${this.showIsoDate?r:formatDistance(new Date(e.createdOn),new Date,{addSuffix:!0})} this.copyToClipboard(new Date(e.finishedOn??e.createdOn).toISOString())}>${e.isFinished?formatDistance(new Date(e.finishedOn?e.finishedOn:0),new Date,{addSuffix:!0}):""} ${this.statusValue(e.isFinished,e.isFailure,e.failureDetails)} ${humanReadableBackendFailureDetails(e.failureDetails)} ${this.pdfValue(e.result?.r,e.result?.zip,e.result?.p,e.finishedOn)} ${e.documents} ${e.pages} ${e.size?x`${(e.size/1048576).toFixed(2).toLocaleString()} MB`:"0 MB"} ${e.usedCredits??""}
`:x`
`}`}copyToClipboard(e){navigator.clipboard.writeText(e).then(function(){},function(){})}showErrorMsg(e){new WcDialogErrorMessage(e).showDialog()}statusValue(e,t,o){return e&&!t?x``:e?x`this.showErrorMsg(o)} style="cursor: pointer; display: inline-block;">`:x`
`}pdfValue(e,t,o,r){if(r){const e=new Date,t=new Date(r);if(e.setDate(e.getDate()-30),t0?x`${Object.keys(e).map(t=>x` `)}`:t?x` `:o&&o.length>0?x`${o.map(e=>x` `)}`:x``}};__decorate$2h([e$3({attribute:!1,type:Object})],WcPrintjobsTable.prototype,"data",void 0),__decorate$2h([e$3({attribute:!1,type:Array})],WcPrintjobsTable.prototype,"headers",void 0),__decorate$2h([e$3({attribute:!1,type:String})],WcPrintjobsTable.prototype,"errorMsg",void 0),__decorate$2h([e$3({attribute:!1,type:Object})],WcPrintjobsTable.prototype,"productionStatus",void 0),__decorate$2h([e$3({attribute:!1,type:Boolean})],WcPrintjobsTable.prototype,"showIsoDate",void 0),__decorate$2h([e$3({attribute:!1,type:String})],WcPrintjobsTable.prototype,"editorVersionPrefix",void 0),WcPrintjobsTable=__decorate$2h([e$4("wc-printjobs-table")],WcPrintjobsTable);var __decorate$2g=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const mobileColumns=[{name:"id",title:"Id"},{name:"jobId",title:"Job Id"},{name:"shortUserInfo",title:"Short User Info"},{name:"userInfo",title:"User Info"},{name:"userId",title:"User Id"},{name:"sourceUserId",title:"Source User Id"},{name:"externalOrderId",title:"External Order Id"},{name:"origin",title:"Origin"},{name:"shopSaveId",title:"Shop Save Id"},{name:"productType",title:"Product Type"},{name:"createdOn",title:"Created"},{name:"result",title:"File"},{name:"loadableTemplateName",title:"Loadable Template Name"}];let WcDialogTableSettings=class extends s$1{static get styles(){return[dialogStyles$1,i$4` .modal { padding-top: 50px; } .modal-content { max-height: calc(100% - 198px); overflow-y: auto; } label { cursor: pointer; font-family: var(--printess-text-font); } input { width: auto; } [type="checkbox"] { position: relative; border: none; border-radius: 10px; outline: none; left: 0px; top: -10px; width: 40px; height: 16px; z-index: 0; -webkit-appearance: none; } [type="checkbox"]:focus, [type="checkbox"]:hover { display: hidden; border: none; outline: none; } [type="checkbox"] + label { position: relative; display: block; cursor: pointer; line-height: 1.2; padding-left: 70px; position: relative; margin-top: -35px; } [type="checkbox"] + label:before { width: 40px; height: 18px; border-radius: 30px; border: 2px solid #ddd; background-color: #EEE; content: ""; margin-right: 15px; transition: background-color 0.5s linear; z-index: 5; position: absolute; left: 0px; } [type="checkbox"] + label:after { width: 18px; height: 18px; border-radius: 30px; background-color: #fff; content: ""; transition: margin 0.1s linear; box-shadow: 0px 0px 5px #aaa; position: absolute; left: 2px; top: 2px; z-index: 10; } [type="checkbox"]:checked + label:before { background-color: #e35fbc; border-color: #e35fbc; } [type="checkbox"]:checked + label:after { margin: 0 0 0 22px; box-shadow: #e447b6 0px 0px 5px; } `]}constructor(){super(),this.state=["Id","Template Name","Created","Status","File","Documents","Pages","Size"],this.headerSelection=config.isMobile?mobileColumns:columns,this.backdrop=new WcBackdrop}showDialog(e){this.callback=e,document.body.appendChild(this.backdrop),document.body.appendChild(this);const t=localStorage.getItem("tableSettings");t?this.state=JSON.parse(t):this.state}closeDialog(){document.body.removeChild(this.backdrop),document.body.removeChild(this)}checkAll(e){e.target.checked?(columns.forEach(e=>this.state.push(e.title)),this.shadowRoot?.querySelectorAll("input").forEach(e=>e.checked=!0)):(this.shadowRoot?.querySelectorAll("input").forEach(e=>e.checked=!1),this.state=[])}addColumn(e){const t=e.target.value;if(this.state.includes(t)){const e=this.state.indexOf(t);this.state.splice(e,1)}else this.state=[...this.state,t]}adjustTable(){this.callback&&this.callback(this.state),localStorage.setItem("tableSettings",JSON.stringify(this.state)),this.closeDialog()}render(){return x` `}};__decorate$2g([e$3({type:Array})],WcDialogTableSettings.prototype,"state",void 0),WcDialogTableSettings=__decorate$2g([e$4("wc-dialog-table-settings")],WcDialogTableSettings);const paginationStyles=i$4` wc-icon { width: 25px; height: 25px; } .pagination-container { font-size: 14px; display: grid; grid-template-columns: 2fr 1fr 2fr; align-items: center; font-family: var(--printess-text-font); color: #555555; } .page-button { cursor: pointer; margin-left: 10px; background-color: transparent; border: none; outline: none; width: 30px; height: 30px; border-radius: 4px; } .page-button:hover { background-color: #eee; } .page-button wc-icon { width: 20px; height: 20px; } .active-page { background-color: #d0049b; color: white; } .active-page:hover { background-color: #d0049b; cursor: default; } .disabled:hover, .disabled:focus { cursor: default; background-color: transparent; } .dropdown { position: relative; display: inline-block; width: 80px; } .current-take { background-color: rgba(208, 4, 155, 0.04); border-radius: 4px; border: 1px solid #ccc; outline: none; font-size: 14px; font-weight: 400; height: 40px; width: 80px; display: flex; justify-content: center; align-items: center; cursor: pointer; } .entries-list { display: block; position: absolute; width: 80px; left: 0; z-index: 1; border: 1px solid lightgray; background-color: white; border-radius: 4px; } .top { top: 40px; } .bottom { bottom: 40px; } .entry { display: block; text-align: center; padding: 10px 20px; cursor: pointer; } .entry:hover { background-color: #eee; } .hidden { display: none; } @media (max-width: ${config.mobileDeviceWidth}px) { .pagination-container { font-size: 12px; grid-template-columns: 2fr 1fr 3fr; } .current-take { font-size: 12px; height: 30px; width: 80px; } .top { top: 30px; } .bottom { bottom: 30px; } .page-button { margin-left: 0; width: 20px; height: 20px; } wc-icon { width: 15px; height: 15px; } .page-button wc-icon { width: 15px; height: 15px; } } `;var __decorate$2f=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcPagination=class extends s$1{static get styles(){return[paginationStyles]}constructor(e,t,o,r,i){super(),this.hideTopList=!0,this.hideBottomList=!0,this.page=1,this.take=100,this.skip=0,this.count=e,this.page=t,this.skip=o,this.take=r,this.position=i}getPageValues(e){this.callback=e}displayTopList(){this.hideTopList=!this.hideTopList}displayBottomList(){this.hideBottomList=!this.hideBottomList}changeEntries(e){const t=e.target.getAttribute("data-value");this.take=null!==t?parseInt(t):this.take,this.skip=0,this.page=1,"top"===this.position?this.hideTopList=!this.hideTopList:this.hideBottomList=!this.hideBottomList,this.callback&&this.callback(this.page,this.skip,this.take)}updateTable(){const e=this.count%this.take;this.skip=(this.page-1)*this.take,this.skip===this.count&&(this.take=e,this.skip=this.count-e),this.callback&&this.callback(this.page,this.skip,this.take)}nextPage(){this.page!==Math.ceil(this.count/this.take)&&(this.page++,this.updateTable())}prevPage(){1!==this.page&&(this.page--,this.updateTable())}firstPage(){1!==this.page&&(this.page=1,this.updateTable())}lastPage(){this.page!==Math.ceil(this.count/this.take)&&(this.page=Math.ceil(this.count/this.take),this.updateTable())}render(){return x`
${config.isMobile?x` ${this.take*this.page-this.take+1} - ${this.page*this.take>this.count?this.count:this.page*this.take} / ${this.count}`:x` Showing ${this.take*this.page-this.take+1} to ${this.page*this.take>this.count?this.count:this.page*this.take} of ${this.count} entries`}
${config.isMobile?"":x`Entries:  `}
${this.page} ${config.isMobile?"":x`of ${Math.ceil(this.count/this.take)}`}
`}};__decorate$2f([e$3({attribute:!1,type:Boolean})],WcPagination.prototype,"hideTopList",void 0),__decorate$2f([e$3({attribute:!1,type:Boolean})],WcPagination.prototype,"hideBottomList",void 0),__decorate$2f([e$3({attribute:!1,type:Number})],WcPagination.prototype,"page",void 0),__decorate$2f([e$3({attribute:!1,type:Number})],WcPagination.prototype,"take",void 0),__decorate$2f([e$3({attribute:!1,type:Number})],WcPagination.prototype,"skip",void 0),__decorate$2f([e$3({attribute:!1,type:Number})],WcPagination.prototype,"count",void 0),__decorate$2f([e$3({attribute:!1,type:String})],WcPagination.prototype,"position",void 0),WcPagination=__decorate$2f([e$4("wc-pagination")],WcPagination);const tableStyles=i$4` .table-wrapper { margin-top: 15px; overflow: auto; border-bottom: 2px solid #d0049b; font-family: var(--printess-text-font); } a { text-decoration: none; color: white; } dl { display: grid; margin-top: 0; margin-bottom: 20px; grid-template-columns: 80px calc(100% - 80px); } .mobile-table-header { font-size: 14px; padding: 10px; grid-column: 1 / span 2; background-color: #D0049B; border-top-right-radius: 4px; border-top-left-radius: 4px; } dt, dd { display: flex; line-height: 16px; margin-left: 0; text-align: left; padding: 10px; font-size: 12px; } dd { display: flex; justify-content: space-between; } dt:nth-of-type(even), dd:nth-of-type(even) { background-color: #D0049B19; } dd a { text-decoration: none; color: #d3277c; } dd.ellipsis { display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: calc(90%); } wc-icon { width: 15px; height: 15px; } .flex { display: flex; } .hide { display: none; } .loader { position: fixed; left: 50%; top: 50%; display: inline-block; width: 80px; height: 80px; } .loader:after { content: " "; display: block; width: 64px; height: 64px; margin: 8px; border-radius: 50%; border: 6px solid var(--printess-magenta); border-color: var(--printess-magenta) transparent var(--printess-magenta) transparent; animation: loader 1.2s linear infinite; } @keyframes loader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .spinner, .spinner:after { border-radius: 50%; width: 2em; height: 2em; } .spinner { font-size: 8px; position: relative; border-top: 0.5em solid rgba(230,0,126, 0.2); border-right: 0.5em solid rgba(230,0,126, 0.2); border-bottom: 0.5em solid rgba(230,0,126, 0.2); border-left: 0.5em solid #e6007e; -webkit-transform: translateZ(0); -ms-transform: translateZ(0); transform: translateZ(0); -webkit-animation: load8 1.1s infinite linear; animation: load8 1.1s infinite linear; } @-webkit-keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } `;var __decorate$2e=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcPrintjobsTableMobile=class extends s$1{static get styles(){return[tableStyles]}constructor(e,t){super(),this.data=e,this.headers=t;const o=localStorage.getItem("tableSettings");o?this.headers=JSON.parse(o):this.headers}getSearchValue(e){this.callback=e}setSearchValue(e,t){this.callback&&this.callback(e,t)}getUserInfo(e){let t="";if(this.data.users){const o=this.data.users.filter(t=>t.id===e.userId)[0];if(o&&(t+=o.d+" ("+o.e+")"),e.sourceUserId){const o=this.data.users.filter(t=>t.id===e.sourceUserId)[0];o&&(t+=", issued by "+o.d+" ("+o.e+")")}}return t}getShortUserInfo(e){if(this.data.users){const t=this.data.users.filter(t=>t.id===e.userId)[0];if(e.sourceUserId){const t=this.data.users.filter(t=>t.id===e.sourceUserId)[0];if(t)return t.d}else if(t)return t.d}return""}showErrorMsg(e){new WcDialogErrorMessage(e).showDialog()}statusValue(e,t,o){return e&&!t?x``:e?x`this.showErrorMsg(o)} style="cursor: pointer;">`:x`
`}pdfValue(e,t,o){return e&&Object.keys(e).length>0?x`${Object.keys(e).map(t=>x` `)}`:t?x` `:o&&o.length>0?x`${o.map(e=>x` `)}`:x``}render(){return x` ${this.data?x`
${this.data&&c(this.data.orders,e=>e.id,e=>{const t=this.getUserInfo(e),o=this.getShortUserInfo(e);return x`
${this.headers.includes("Template Name")?x` `:""} ${this.headers.includes("Id")?x`
Id
${e.id}
`:""} ${this.headers.includes("Job Id")?x`
Job Id
${e.jobId}
`:""} ${this.headers.includes("Short User Info")?x`
Short User Info
this.setSearchValue("userId",e.userId)}>${o}
`:""} ${this.headers.includes("User Info")?x`
User Info
${t}
`:""} ${this.headers.includes("User Id")?x`
User Id
this.setSearchValue("userId",e.userId)}>${e.userId}
`:""} ${this.headers.includes("Source User Id")?x`
Source User Id
${e.sourceUserId}
`:""} ${this.headers.includes("External Order Id")?x`
External Order Id
${e.externalOrderId}
`:""} ${this.headers.includes("Origin")?x`
Origin
this.setSearchValue("origin",e.origin)}>${e.origin}
`:""} ${this.headers.includes("Shop Save Id")?x`
Shop Save Id
${e.shopSaveId}
`:""} ${this.headers.includes("Product Type")?x`
Product Type
${e.productType}
`:""} ${this.headers.includes("Created")?x`
Created
${formatDistance(new Date(e.createdOn),new Date,{addSuffix:!0})} ${this.statusValue(e.isFinished,e.isFailure,e.failureDetails)}
`:""} ${this.headers.includes("File")?x`
File
${this.pdfValue(e.result?.r,e.result?.zip,e.result?.p)}
(${e.size?x`${(e.size/1048576).toFixed(2).toLocaleString()} MB`:"0 MB"})
`:""}
`})}
`:x`
`}`}};__decorate$2e([e$3({attribute:!1,type:Object})],WcPrintjobsTableMobile.prototype,"data",void 0),__decorate$2e([e$3({attribute:!1,type:Array})],WcPrintjobsTableMobile.prototype,"headers",void 0),__decorate$2e([e$3({attribute:!1,type:String})],WcPrintjobsTableMobile.prototype,"errorMsg",void 0),__decorate$2e([e$3({attribute:!1,type:Object})],WcPrintjobsTableMobile.prototype,"productionStatus",void 0),WcPrintjobsTableMobile=__decorate$2e([e$4("wc-printjobs-table-mobile")],WcPrintjobsTableMobile);class OrderStream extends ApiStream{constructor(e,t,o){super(e,"orders",t,e=>{if("order"==e.c){const t=JSON.parse(e.p);o(t)}})}}var __decorate$2d=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcPrintjobsPage=class extends s$1{static get styles(){return[printjobsStyles]}setState(e){this.state=new SearchOrders(e,this.state)}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}constructor(){super(),this.headers=["ID","Template Name","Created","Status","File","Documents","Pages","Size"],this.hideFilter=!0,this.page=1,this.take=100,this.skip=0,this.isFilter=!1,this.showIsoDate=!1,this.action="proxy.php?url=https%3A%2F%2Faccount.printess.com%2Fpause",this.editorVersionPrefix="",this.loadOrdersDebounce=new ValueDebounce(async e=>{const t=await api.loadOrders(e);t instanceof ServerErrorResponse$2?this.showError(t):this.data=t}),this._handleResize=()=>{config.isMobile=window.innerWidth<=config.mobileDeviceWidth,this.requestUpdate()},this.date=new Date,this.date.setDate(this.date.getDate()-30),adm.canUseAdminMode&&(this.date=new Date,this.date.setDate(this.date.getDate()-1)),this.state=new SearchOrders({templateName:"",origin:"",productType:"",externalOrderId:"",take:this.take,startDate:this.date})}handleOrder(e){if(this.data&&this.data.users&&this.data.orders&&1===this.page&&!this.isFilter){const t=this.data.users;let o=this.data.count,r=[],i=!1;this.data.orders.forEach(t=>{t.id===e.id?(i=!0,e.isFinished?("isProcessing"!==this.status.value&&r.push(e),"isProcessing"===this.status.value&&o--):r.push(t)):r.push(t)}),i||("isProcessing"===this.status.value&&e.isFinished?(o--,r.length>this.take&&r.pop()):(o++,r=[e,...r],r.length>this.take&&r.pop())),this.data={orders:r,count:o,users:t}}}connectedCallback(){super.connectedCallback(),location.hash="#printjobs",window.addEventListener("resize",this._handleResize),this.loadEditorVersion()}async loadEditorVersion(){const e=await api.readUserSettings({keys:["version"]});if(e instanceof ServerErrorResponse$2)this.showError(e);else if(e.version)try{this.editorVersionPrefix="v/"+JSON.parse(e.version)+"/"}catch(t){this.editorVersionPrefix="v/"+e.version+"/"}this.initTable()}initTable(){const e=this.state.toDto("as admin");this.loadOrdersDebounce.immediate(e),this.connectOrderStream()}disconnectedCallback(){window.removeEventListener("resize",this._handleResize),this.orderStream?.disconnect(),super.disconnectedCallback()}connectOrderStream(){this.orderStream&&this.orderStream.disconnect(),this.orderStream=new OrderStream(apiEndpoint,api.token??"",this.handleOrder.bind(this)),this.orderStream}loadTemplates(){const e=this.state.toDto("as admin");this.loadOrdersDebounce.change(e,500)}toggleDateDisplay(){this.showIsoDate=!this.showIsoDate}setSearchOrders(e,t){const o=new Nobs;this.page=1,o.setProperty(this.state,"skip",0),o.setProperty(this.state,"take",this.take),o.setProperty(this.state,e,t),this.setState(o),this.loadTemplates()}onSearchOrderChange(e){let t=e.target.name;const o="onlyMyOrders"===t?e.target.checked:e.target.value;this.isFilter=!0,"templateName"===t&&"string"==typeof o&&o.startsWith("st:")&&(t="shopSaveId"),"startDate"===t&&(this.startDate=new Date(e.target.value)),this.startDate||"startDate"===t||(this.startDate=new Date,adm.useAdminMode?this.startDate.setDate((new Date).getDate()-1):this.startDate.setDate((new Date).getDate()-30),this.setSearchOrders("startDate",this.startDate)),this.setSearchOrders(t,o)}onMyOrdersChange(e){const t=new Nobs;let o;switch(this.page=1,this.isFilter=!0,e.target.value){case"allOrders":o=!1;break;case"myOrders":o=!0}t.setProperty(this.state,"skip",0),t.setProperty(this.state,"take",this.take),t.setProperty(this.state,"onlyMyOrders",o),this.setState(t),this.loadTemplates()}onStatusChange(e){const t=new Nobs;let o,r;switch(this.page=1,this.isFilter=!0,e.target.value){case"all":o=void 0,r=void 0;break;case"isFinished":o=!0,r=!1;break;case"isProcessing":o=!1,r=!1,this.isFilter=!1;break;case"isFailed":o=!0,r=!0}t.setProperty(this.state,"skip",0),t.setProperty(this.state,"take",this.take),t.setProperty(this.state,"isFinished",o),t.setProperty(this.state,"isFailed",r),this.setState(t),this.loadTemplates()}expandFilter(){this.hideFilter=!this.hideFilter}resetFilter(){this.page=1,this.isFilter=!1,this.state=new SearchOrders({templateName:"",origin:"",productType:"",externalOrderId:"",take:this.take,startDate:this.date,onlyMyOrders:!1}),this.shadowRoot?.querySelectorAll("input").forEach(e=>e.value=""),this.status.value="all",this.onlyMyOrders.value="allOrders";const e=this.state.toDto("as admin");this.loadOrdersDebounce.immediate(e)}setTableSettings(){(new WcDialogTableSettings).showDialog(e=>{this.headers=e})}setPagination(e){if(this.data){const t=new WcPagination(this.data.count,this.page,this.skip,this.take,e);return t.getPageValues((e,t,o)=>{this.page=e,this.skip=t,this.take=o,this.applyPagination()}),t}}applyPagination(){const e=new Nobs;e.setProperty(this.state,"take",this.take),e.setProperty(this.state,"skip",this.skip),this.setState(e),this.loadTemplates()}renderTable(){const e=new WcPrintjobsTableMobile(this.data,this.headers),t=new WcPrintjobsTable(this.data,this.headers,this.editorVersionPrefix);return e.getSearchValue((e,t)=>{this.setSearchOrders(e,t),this.isFilter=!0}),t.getSearchValue((e,t)=>{this.setSearchOrders(e,t),this.isFilter=!0}),t.showIsoDate=this.showIsoDate,config.isMobile?e:t}toggleAdminMode(){adm.useAdminMode=!adm.useAdminMode,this.connectOrderStream(),this.loadTemplates(),this.requestUpdate()}setPrintjobsAction(){if(this.action="proxy.php?url=https%3A%2F%2Faccount.printess.com%2Fpause"===this.action?"continue":"pause","pause"===this.action){const e=this.state.toDto("as admin");this.loadOrdersDebounce.immediate(e),this.connectOrderStream()}else"continue"===this.action&&this.orderStream.disconnect()}render(){const e=(new Date).setDate((new Date).getDate()-30);return x`

Print Jobs

Customer orders

select columns
refresh printjobs
${config.isMobile?x``:x`
toggle date display
`}
${config.isMobile?x``:this.action} ${config.isMobile?"":"live job"} streaming
${adm.canUseAdminMode?x`
${adm.useAdminMode?"admin":"user"}
`:""}
${adm.canUseAdminMode?x`
`:""}
${this.data&&0===this.data.count?x`

~ No Print Jobs available ~

`:x`
${this.renderTable()}
`}
`}};__decorate$2d([e$3({attribute:!1,type:Object})],WcPrintjobsPage.prototype,"state",void 0),__decorate$2d([e$3({attribute:!1,type:Object})],WcPrintjobsPage.prototype,"data",void 0),__decorate$2d([e$3({attribute:!1,type:Array})],WcPrintjobsPage.prototype,"headers",void 0),__decorate$2d([e$3({attribute:!1,type:Boolean})],WcPrintjobsPage.prototype,"hideFilter",void 0),__decorate$2d([e$3({attribute:!1,type:Number})],WcPrintjobsPage.prototype,"page",void 0),__decorate$2d([e$3({attribute:!1,type:Number})],WcPrintjobsPage.prototype,"take",void 0),__decorate$2d([e$3({attribute:!1,type:Number})],WcPrintjobsPage.prototype,"skip",void 0),__decorate$2d([e$3({attribute:!1,type:Object})],WcPrintjobsPage.prototype,"date",void 0),__decorate$2d([e$3({attribute:!1,type:Object})],WcPrintjobsPage.prototype,"startDate",void 0),__decorate$2d([e$3({attribute:!1,type:Boolean})],WcPrintjobsPage.prototype,"isFilter",void 0),__decorate$2d([e$3({attribute:!1,type:Boolean})],WcPrintjobsPage.prototype,"showIsoDate",void 0),__decorate$2d([e$3({attribute:!1,type:String})],WcPrintjobsPage.prototype,"action",void 0),__decorate$2d([e$3({attribute:!1,type:String})],WcPrintjobsPage.prototype,"editorVersionPrefix",void 0),__decorate$2d([i$1("#printStatus")],WcPrintjobsPage.prototype,"status",void 0),__decorate$2d([i$1("#onlyMyOrders")],WcPrintjobsPage.prototype,"onlyMyOrders",void 0),WcPrintjobsPage=__decorate$2d([e$4("wc-printjobs-page")],WcPrintjobsPage);var __decorate$2c=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcEditorPreview=class extends s$1{static get styles(){return[i$4` iframe { width: calc(100% - 2px); height: 100%; display: block; border: 1px solid var(--printess-blue); outline: none; } #message { position: fixed; top: 0; right: 0; display: none; justify-content: center; align-items: center; background-color: lightgoldenrodyellow; color: black; padding: 20px; font-family: sans-serif; } `]}constructor(e,t){super(),this.editorOptions={name:"",version:"draft",editor:"nightly",mode:"buyer"},this.url="",this.skipApiLoad=!1,this.editorOptions=e||this.editorOptions,this.skipApiLoad=t??!1}getCallbackValue(e){this.callback=e}closeEditor(e){this.callback&&this.callback(e)}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async loadUserSettings(e){if(this.skipApiLoad)return;const t=await api.readUserSettings(e);t instanceof ServerErrorResponse$2?this.showError(t):(t.editorOptions&&(this.editorOptions=Object.assign(this.editorOptions,JSON.parse(t.editorOptions))),t.imageUpload&&(this.url=encodeURIComponent(t.imageUpload)))}async connectedCallback(){super.connectedCallback(),await this.loadUserSettings({keys:["editorOptions","imageUpload"]});let e=!1;const t=getEditorUrl(),o=document.createElement("div");o.id="message";const r=document.createElement("iframe");r.id="printess",-1!==t.indexOf("editor.printess.com")?r.src=`https://editor.printess.com/${"current stable version"===this.editorOptions.editor?"":`v/${this.editorOptions.editor}/`}printess-editor/${"designer"===this.editorOptions.mode?"embed-designer.html":"embed.html"}#${this.url||""}`:-1!==t.indexOf("localhost")?r.src=`${t}${"designer"===this.editorOptions.mode?"embed-designer.html":"embed.html"}#${this.url||""}`:(r.src=`${t}printess-editor/${"designer"===this.editorOptions.mode?"embed-designer.html":"embed.html"}#${this.url||""}`,e=!0),r.onload=()=>{window.addEventListener("message",e=>{switch(e.data.cmd){case"back":this.closeEditor(!0);break;case"basket":prompt("Proceed to checkout.\n\nsave-token:\n"+e.data.token+"\n\nThumbnailUrl:",e.data.thumbnailUrl);break;case"formFieldChanged":o.style.display="flex",o.textContent="Form Field: ["+e.data.name+"] changed to '"+e.data.value+"'",setTimeout(()=>o.style.display="none",2e3)}}),r.contentWindow?.postMessage({cmd:"attach",properties:{token:api.token,domain:getDomain(),templateName:this.editorOptions.name,templateVersion:this.editorOptions.version,basketId:"Some-Unique-Basket-Or-Session-Id",shopUserId:"",mergeTemplates:this.editorOptions.mergeTemplates,theme:this.editorOptions.theme,siginingPublicKey:e?"xyHvq4MxAoZbov62ZnnvKQ4Zm23tzpaOYpy5G58i_6kHSbJPL1uNUJ1MLRIt_uLJRnqNmtH9QHte2v3jsaJR0VRxKDLFytkJ8RpYgHedMVmQoJf0q0BUXGU-diMvbKNdcjToUI914I508XITkPt0NhbSqZzldhcvloaJLk_jmK9WbcTQCfxYnItCJ-u_xqgP9uBQGtutpMwFDBOGtF4lzWw86mz6Ib8tQIRwC0UXF24PqlG3_0EHOJc5xtl0rKHuIybySiKhH0zddgVYIMZE0b2bKjutIluc5Xhnlagb4a8KuniNGPYlJUgWFexSyxx8JQemvPvzRbl74Zk5zNKgbHC5FwA-EYGMi7L2DAFZEfyiIFMeuPlZZ77ZH-IpCguuyCjoO70y9TDgW9Lu_QmNs7fUA_jqa05_896_l2o3S4lTw0HuMEmiN85RP3dSXeX2_XmgLyT33h6KE8OHvLgweoxhuxXfRablmvBqNcIHPjzZKtfoABQuGZR8Gq5KWMCvxk76DOBozKDQIFYIO2pk731QKY6SWBe79Kw8vQwSUgIAmpaADc66CoWpkEpYQv1H8dq36fcPAjVjqZc3aPGOI-16TyeSLf_MehDn9tTHPQs6-UD-HjknOscUrHQlLMNr2miSJhHlDIcfxdtfk9D5Gitzi6k7BgSO1_RVhsG9anE":""}},"*")},window.visualViewport&&window.visualViewport.addEventListener("scroll",()=>{r.contentWindow?.postMessage({cmd:"viewportScroll",height:window.visualViewport?.height,offsetTop:window.visualViewport?.offsetTop},"*")}),this.shadowRoot?.appendChild(r),this.shadowRoot?.appendChild(o)}};__decorate$2c([e$3({attribute:!0,type:Object})],WcEditorPreview.prototype,"editorOptions",void 0),WcEditorPreview=__decorate$2c([e$4("wc-editor-preview")],WcEditorPreview);const subscriptionStyles=i$4` .subscription-page { font-family: var(--printess-text-font); font-size: 14px; font-weight: 400; color: #555555; } .topic { font-size: 22px; font-weight: 500; font-family: var(--printess-header-font); color: #555555; } .card { margin-top: 30px; margin-bottom: 70px; } wc-icon { padding: 5px 0 0 5px; width: 20px; height: 20px; cursor: pointer; } .pink { border-bottom: 2px solid var(--printess-pink); } .green { border-bottom: 2px solid var(--printess-green); } .red { border-bottom: 2px solid var(--printess-red); } .blue { border-bottom: 2px solid var(--printess-blue); } .table-header { padding-left: 20px; border-top-right-radius: 4px; border-top-left-radius: 4px; color: #fff; margin-top: 10px; margin-bottom: 0; min-height: 50px; } .title { font-size: 18px; font-weight: 400; line-height: 50px; margin: 0; } .pink .table-header { background-color: var(--printess-pink); } .green .table-header { background-color: var(--printess-green); } .red .table-header { background-color: var(--printess-red); } .blue .table-header { background-color: var(--printess-blue); } dl { display: grid; margin-bottom: 0; grid-template-columns: 150px calc(100% - 150px); } dt, dd { display: flex; line-height: 25px; margin-left: 0; text-align: left; padding: 10px 20px; align-items: center; } dd { display: flex; justify-content: space-between; padding-left: 0; } .overage { color: red; } .odd-row-pink { background-color: var(--printess-lightpink); } .odd-row-blue { background-color: var(--printess-lightblue); } .even-row-white { background-color: white!important; } .blue dt:nth-of-type(even), .blue dd:nth-of-type(even) { background-color: var(--printess-lightblue); } .green dt:nth-of-type(even), .green dd:nth-of-type(even) { background-color: var(--printess-lightgreen); } button { padding: 4px 10px; border: none; border-radius: 4px; color: #fff; cursor: pointer; font-family: var(--printess-button-font); font-size: 14px; font-weight: 400; } .button-wrapper { display: flex; gap: 10px; margin: 20px 15px; } .settings { padding: 7px 20px; margin: 20px 15px; } .pink button { background-color: var(--printess-pink); } .green button { background-color: var(--printess-green); } .red button { background-color: var(--printess-red); } .blue button { background-color: var(--printess-blue); } .pink button:hover { background-color: var(--printess-pinkHover); } .green button:hover { background-color: var(--printess-greenHover); } .red button:hover { background-color: var(--printess-redHover); } .blue button:hover { background-color: var(--printess-blueHover); } button.pink { background-color: var(--printess-pink); } button.green { background-color: var(--printess-green); } button.red { background-color: var(--printess-red); } button.blue { background-color: var(--printess-blue); } button:hover.pink { background-color: var(--printess-pinkHover); } button:hover.green { background-color: var(--printess-greenHover); } button:hover.red { background-color: var(--printess-redHover); } button:hover.blue { background-color: var(--printess-blueHover); } .order-package-table { display: grid; grid-template-columns: repeat(2, 150px 1fr); } .accept-billing { grid-column: 1 / span 2; padding: 10px 20px; } .card-input { color: #555; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid #ccc; background-color: rgba(242,246,219,0.5); padding: 7px 10px; border-radius: 4px; } .card-number { display: grid; grid-template-columns: 3fr 1fr 1fr; } .card-icon-input { position: relative; } .card-icon-input wc-icon { position: absolute; top: 9px; left: 10px; padding: 0px; width: 15px; height: 15px; cursor: default; } .card-date { display: flex; flex-direction: row; } .left { border-bottom-right-radius: 0; border-top-right-radius: 0; border-right: none; padding-left: 30px; } .middle { border-left: none; border-right: none; border-radius: 0; } .right { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: none; } @media (max-width: ${config.mobileDeviceWidth}px) { .topic { font-size: 20px; } .subtopic { font-size: 14px; } .card { width: 100%; margin-bottom: 50px; } .table-header { padding-left: 10px; min-height: 36px; } .title { font-size: 14px; line-height: 36px; margin: 0; } dl { grid-template-columns: 80px calc(50% - 80px) 80px calc(50% - 80px); } dd, dt { font-size: 12px; word-break: break-word; line-height: 16px; padding: 5px; align-items: center; } dd { grid-column: 2 / span 3; } .table-body p { font-size: 12px; padding: 0 10px; } .settings { font-size: 12px; } } `,bootstrapStyles=i$4` button, [type=button], [type=reset], [type=submit] { -webkit-appearance: button; font-family: inherit; text-transform: none; } .default { --default-blue: #007bff; --default-indigo: #6610f2; --default-purple: #6f42c1; --default-pink: #e83e8c; --default-red: #dc3545; --default-orange: #fd7e14; --default-yellow: #ffc107; --default-green: #28a745; --default-teal: #20c997; --default-cyan: #17a2b8; --default-white: #fff; --default-gray: #6c757d; --default-gray-dark: #343a40; --default-primary: #007bff; --default-secondary: #6c757d; --default-success: #28a745; --default-info: #17a2b8; --default-warning: #ffc107; --default-danger: #dc3545; --default-light: #f8f9fa; --default-dark: #343a40; --default-breakpoint-xs: 0; --default-breakpoint-sm: 576px; --default-breakpoint-md: 768px; --default-breakpoint-lg: 992px; --default-breakpoint-xl: 1200px; --default-font-family-sans-serif: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; --default-font-family-monospace: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; margin: 0; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"; font-size: 1rem; font-weight: 400; line-height: 1.5; color: #212529; text-align: left; background-color: #fff; } .default-btn { display: inline-block; font-weight: 400; text-align: center; white-space: nowrap; vertical-align: middle; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid transparent; padding: .375rem .75rem; font-size: 1rem; line-height: 1.5; border-radius: .25rem; transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out; } .default .btn-primary { color: #fff; background-color: #007bff; border-color: #007bff; } .default .btn-secondary { color: #fff; background-color: #6c757d; border-color: #6c757d; } .default .btn-success { color: #fff; background-color: #28a745; border-color: #28a745; } .default .btn-info { color: #fff; background-color: #17a2b8; border-color: #17a2b8; } .default .btn-warning { color: #212529; background-color: #ffc107; border-color: #ffc107; } .default .btn-danger { color: #fff; background-color: #dc3545; border-color: #dc3545; } .default .btn-light { color: #212529; background-color: #f8f9fa; border-color: #f8f9fa; } .default .btn-dark { color: #fff; background-color: #343a40; border-color: #343a40; } .cerulean { --cerulean-blue: #033c73; --cerulean-indigo: #6610f2; --cerulean-purple: #6f42c1; --cerulean-pink: #e83e8c; --cerulean-red: #c71c22; --cerulean-orange: #fd7e14; --cerulean-yellow: #dd5600; --cerulean-green: #73a839; --cerulean-teal: #20c997; --cerulean-cyan: #2fa4e7; --cerulean-white: #fff; --cerulean-gray: #868e96; --cerulean-gray-dark: #343a40; --cerulean-gray-100: #f8f9fa; --cerulean-gray-200: #e9ecef; --cerulean-gray-300: #dee2e6; --cerulean-gray-400: #ced4da; --cerulean-gray-500: #adb5bd; --cerulean-gray-600: #868e96; --cerulean-gray-700: #495057; --cerulean-gray-800: #343a40; --cerulean-gray-900: #212529; --cerulean-primary: #2fa4e7; --cerulean-secondary: #e9ecef; --cerulean-success: #73a839; --cerulean-info: #033c73; --cerulean-warning: #dd5600; --cerulean-danger: #c71c22; --cerulean-light: #f8f9fa; --cerulean-dark: #343a40; --cerulean-primary-rgb: 47, 164, 231; --cerulean-secondary-rgb: 233, 236, 239; --cerulean-success-rgb: 115, 168, 57; --cerulean-info-rgb: 3, 60, 115; --cerulean-warning-rgb: 221, 86, 0; --cerulean-danger-rgb: 199, 28, 34; --cerulean-light-rgb: 248, 249, 250; --cerulean-dark-rgb: 52, 58, 64; --cerulean-white-rgb: 255, 255, 255; --cerulean-black-rgb: 0, 0, 0; --cerulean-body-color-rgb: 73, 80, 87; --cerulean-body-bg-rgb: 255, 255, 255; --cerulean-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --cerulean-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --cerulean-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --cerulean-body-font-family: var(--cerulean-font-sans-serif); --cerulean-body-font-size: 1rem; --cerulean-body-font-weight: 400; --cerulean-body-line-height: 1.5; --cerulean-body-color: #495057; --cerulean-body-bg: #fff; margin: 0; font-family: var(--cerulean-body-font-family); font-size: var(--cerulean-body-font-size); font-weight: var(--cerulean-body-font-weight); line-height: var(--cerulean-body-line-height); color: var(--cerulean-body-color); text-align: var(--cerulean-body-text-align); background-color: var(--cerulean-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .cerulean-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #495057; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.05); transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .cerulean .btn-primary { color: #fff; background-color: #2fa4e7; border-color: #2fa4e7; background-image: linear-gradient(#50b3eb, #2fa4e7 60%, #2c9ad9); } .cerulean .btn-secondary { color: #495057; background-color: #e9ecef; border-color: #e9ecef; background-image: linear-gradient(#edeff2, #e9ecef 60%, #dbdee1); } .cerulean .btn-success { color: #fff; background-color: #73a839; border-color: #73a839; background-image: linear-gradient(#89b659, #73a839 60%, #6c9e36); } .cerulean .btn-info { color: #fff; background-color: #033c73; border-color: #033c73; background-image: linear-gradient(#2b5b89, #033c73 60%, #03386c); } .cerulean .btn-warning { color: #fff; background-color: #dd5600; border-color: #dd5600; background-image: linear-gradient(#e27129, #dd5600 60%, #d05100); } .cerulean .btn-danger { color: #fff; background-color: #c71c22; border-color: #c71c22; background-image: linear-gradient(#d04045, #c71c22 60%, #bb1a20); } .cerulean .btn-light { color: #000; background-color: #f8f9fa; border-color: #f8f9fa; background-image: linear-gradient(#f9fafb, #f8f9fa 60%, #e9eaeb); } .cerulean .btn-dark { color: #fff; background-color: #343a40; border-color: #343a40; background-image: linear-gradient(#545a5f, #343a40 60%, #31373c); } .cosmo { --cosmo-blue: #2780e3; --cosmo-indigo: #6610f2; --cosmo-purple: #613d7c; --cosmo-pink: #e83e8c; --cosmo-red: #ff0039; --cosmo-orange: #f0ad4e; --cosmo-yellow: #ff7518; --cosmo-green: #3fb618; --cosmo-teal: #20c997; --cosmo-cyan: #9954bb; --cosmo-white: #fff; --cosmo-gray: #868e96; --cosmo-gray-dark: #373a3c; --cosmo-gray-100: #f8f9fa; --cosmo-gray-200: #e9ecef; --cosmo-gray-300: #dee2e6; --cosmo-gray-400: #ced4da; --cosmo-gray-500: #adb5bd; --cosmo-gray-600: #868e96; --cosmo-gray-700: #495057; --cosmo-gray-800: #373a3c; --cosmo-gray-900: #212529; --cosmo-primary: #2780e3; --cosmo-secondary: #373a3c; --cosmo-success: #3fb618; --cosmo-info: #9954bb; --cosmo-warning: #ff7518; --cosmo-danger: #ff0039; --cosmo-light: #f8f9fa; --cosmo-dark: #373a3c; --cosmo-primary-rgb: 39, 128, 227; --cosmo-secondary-rgb: 55, 58, 60; --cosmo-success-rgb: 63, 182, 24; --cosmo-info-rgb: 153, 84, 187; --cosmo-warning-rgb: 255, 117, 24; --cosmo-danger-rgb: 255, 0, 57; --cosmo-light-rgb: 248, 249, 250; --cosmo-dark-rgb: 55, 58, 60; --cosmo-white-rgb: 255, 255, 255; --cosmo-black-rgb: 0, 0, 0; --cosmo-body-color-rgb: 55, 58, 60; --cosmo-body-bg-rgb: 255, 255, 255; --cosmo-font-sans-serif: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --cosmo-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --cosmo-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --cosmo-body-font-family: var(--cosmo-font-sans-serif); --cosmo-body-font-size: 1rem; --cosmo-body-font-weight: 400; --cosmo-body-line-height: 1.5; --cosmo-body-color: #373a3c; --cosmo-body-bg: #fff; margin: 0; font-family: var(--cosmo-body-font-family); font-size: var(--cosmo-body-font-size); font-weight: var(--cosmo-body-font-weight); line-height: var(--cosmo-body-line-height); color: var(--cosmo-body-color); text-align: var(--cosmo-body-text-align); background-color: var(--cosmo-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .cosmo-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #373a3c; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .cosmo .btn-primary { color: #fff; background-color: #2780e3; border-color: #2780e3; } .cosmo .btn-secondary { color: #fff; background-color: #373a3c; border-color: #373a3c; } .cosmo .btn-success { color: #fff; background-color: #3fb618; border-color: #3fb618; } .cosmo .btn-info { color: #fff; background-color: #9954bb; border-color: #9954bb; } .cosmo .btn-warning { color: #fff; background-color: #ff7518; border-color: #ff7518; } .cosmo .btn-danger { color: #fff; background-color: #ff0039; border-color: #ff0039; } .cosmo .btn-light { color: #000; background-color: #f8f9fa; border-color: #f8f9fa; } .cosmo .btn-dark { color: #fff; background-color: #373a3c; border-color: #373a3c; } .cyborg { --cyborg-blue: #2a9fd6; --cyborg-indigo: #6610f2; --cyborg-purple: #6f42c1; --cyborg-pink: #e83e8c; --cyborg-red: #c00; --cyborg-orange: #fd7e14; --cyborg-yellow: #f80; --cyborg-green: #77b300; --cyborg-teal: #20c997; --cyborg-cyan: #93c; --cyborg-white: #fff; --cyborg-gray: #555; --cyborg-gray-dark: #222; --cyborg-gray-100: #f8f9fa; --cyborg-gray-200: #e9ecef; --cyborg-gray-300: #dee2e6; --cyborg-gray-400: #adafae; --cyborg-gray-500: #888; --cyborg-gray-600: #555; --cyborg-gray-700: #282828; --cyborg-gray-800: #222; --cyborg-gray-900: #212529; --cyborg-primary: #2a9fd6; --cyborg-secondary: #555; --cyborg-success: #77b300; --cyborg-info: #93c; --cyborg-warning: #f80; --cyborg-danger: #c00; --cyborg-light: #222; --cyborg-dark: #adafae; --cyborg-primary-rgb: 42, 159, 214; --cyborg-secondary-rgb: 85, 85, 85; --cyborg-success-rgb: 119, 179, 0; --cyborg-info-rgb: 153, 51, 204; --cyborg-warning-rgb: 255, 136, 0; --cyborg-danger-rgb: 204, 0, 0; --cyborg-light-rgb: 34, 34, 34; --cyborg-dark-rgb: 173, 175, 174; --cyborg-white-rgb: 255, 255, 255; --cyborg-black-rgb: 0, 0, 0; --cyborg-body-color-rgb: 173, 175, 174; --cyborg-body-bg-rgb: 6, 6, 6; --cyborg-font-sans-serif: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; --cyborg-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --cyborg-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --cyborg-body-font-family: var(--cyborg-font-sans-serif); --cyborg-body-font-size: 1rem; --cyborg-body-font-weight: 400; --cyborg-body-line-height: 1.5; --cyborg-body-color: #adafae; --cyborg-body-bg: #060606; margin: 0; font-family: var(--cyborg-body-font-family); font-size: var(--cyborg-body-font-size); font-weight: var(--cyborg-body-font-weight); line-height: var(--cyborg-body-line-height); color: var(--cyborg-body-color); text-align: var(--cyborg-body-text-align); background-color: var(--cyborg-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .cyborg-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #adafae; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 1rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .cyborg .btn-primary { color: #fff; background-color: #2a9fd6; border-color: #2a9fd6; } .cyborg .btn-secondary { color: #fff; background-color: #555; border-color: #555; } .cyborg .btn-success { color: #fff; background-color: #77b300; border-color: #77b300; } .cyborg .btn-info { color: #fff; background-color: #93c; border-color: #93c; } .cyborg .btn-warning { color: #fff; background-color: #f80; border-color: #f80; } .cyborg .btn-danger { color: #fff; background-color: #c00; border-color: #c00; } .cyborg .btn-light { color: #fff; background-color: #222; border-color: #222; } .cyborg .btn-dark { color: #000; background-color: #adafae; border-color: #adafae; } .darkly { --darkly-blue: #375a7f; --darkly-indigo: #6610f2; --darkly-purple: #6f42c1; --darkly-pink: #e83e8c; --darkly-red: #e74c3c; --darkly-orange: #fd7e14; --darkly-yellow: #f39c12; --darkly-green: #00bc8c; --darkly-teal: #20c997; --darkly-cyan: #3498db; --darkly-white: #fff; --darkly-gray: #888; --darkly-gray-dark: #303030; --darkly-gray-100: #f8f9fa; --darkly-gray-200: #ebebeb; --darkly-gray-300: #dee2e6; --darkly-gray-400: #ced4da; --darkly-gray-500: #adb5bd; --darkly-gray-600: #888; --darkly-gray-700: #444; --darkly-gray-800: #303030; --darkly-gray-900: #222; --darkly-primary: #375a7f; --darkly-secondary: #444; --darkly-success: #00bc8c; --darkly-info: #3498db; --darkly-warning: #f39c12; --darkly-danger: #e74c3c; --darkly-light: #adb5bd; --darkly-dark: #303030; --darkly-primary-rgb: 55, 90, 127; --darkly-secondary-rgb: 68, 68, 68; --darkly-success-rgb: 0, 188, 140; --darkly-info-rgb: 52, 152, 219; --darkly-warning-rgb: 243, 156, 18; --darkly-danger-rgb: 231, 76, 60; --darkly-light-rgb: 173, 181, 189; --darkly-dark-rgb: 48, 48, 48; --darkly-white-rgb: 255, 255, 255; --darkly-black-rgb: 0, 0, 0; --darkly-body-color-rgb: 255, 255, 255; --darkly-body-bg-rgb: 34, 34, 34; --darkly-font-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --darkly-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --darkly-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --darkly-body-font-family: var(--darkly-font-sans-serif); --darkly-body-font-size: 1rem; --darkly-body-font-weight: 400; --darkly-body-line-height: 1.5; --darkly-body-color: #fff; --darkly-body-bg: #222; margin: 0; font-family: var(--darkly-body-font-family); font-size: var(--darkly-body-font-size); font-weight: var(--darkly-body-font-weight); line-height: var(--darkly-body-line-height); color: var(--darkly-body-color); text-align: var(--darkly-body-text-align); background-color: var(--darkly-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .darkly-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #fff; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .darkly .btn-primary { color: #fff; background-color: #375a7f; border-color: #375a7f; } .darkly .btn-secondary { color: #fff; background-color: #444; border-color: #444; } .darkly .btn-success { color: #fff; background-color: #00bc8c; border-color: #00bc8c; } .darkly .btn-info { color: #fff; background-color: #3498db; border-color: #3498db; } .darkly .btn-warning { color: #fff; background-color: #f39c12; border-color: #f39c12; } .darkly .btn-danger { color: #fff; background-color: #e74c3c; border-color: #e74c3c; } .darkly .btn-light { color: #fff; background-color: #adb5bd; border-color: #adb5bd; } .darkly .btn-dark { color: #fff; background-color: #303030; border-color: #303030; } .flatly { --flatly-blue: #2c3e50; --flatly-indigo: #6610f2; --flatly-purple: #6f42c1; --flatly-pink: #e83e8c; --flatly-red: #e74c3c; --flatly-orange: #fd7e14; --flatly-yellow: #f39c12; --flatly-green: #18bc9c; --flatly-teal: #20c997; --flatly-cyan: #3498db; --flatly-white: #fff; --flatly-gray: #95a5a6; --flatly-gray-dark: #343a40; --flatly-gray-100: #f8f9fa; --flatly-gray-200: #ecf0f1; --flatly-gray-300: #dee2e6; --flatly-gray-400: #ced4da; --flatly-gray-500: #b4bcc2; --flatly-gray-600: #95a5a6; --flatly-gray-700: #7b8a8b; --flatly-gray-800: #343a40; --flatly-gray-900: #212529; --flatly-primary: #2c3e50; --flatly-secondary: #95a5a6; --flatly-success: #18bc9c; --flatly-info: #3498db; --flatly-warning: #f39c12; --flatly-danger: #e74c3c; --flatly-light: #ecf0f1; --flatly-dark: #7b8a8b; --flatly-primary-rgb: 44, 62, 80; --flatly-secondary-rgb: 149, 165, 166; --flatly-success-rgb: 24, 188, 156; --flatly-info-rgb: 52, 152, 219; --flatly-warning-rgb: 243, 156, 18; --flatly-danger-rgb: 231, 76, 60; --flatly-light-rgb: 236, 240, 241; --flatly-dark-rgb: 123, 138, 139; --flatly-white-rgb: 255, 255, 255; --flatly-black-rgb: 0, 0, 0; --flatly-body-color-rgb: 33, 37, 41; --flatly-body-bg-rgb: 255, 255, 255; --flatly-font-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --flatly-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --flatly-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --flatly-body-font-family: var(--flatly-font-sans-serif); --flatly-body-font-size: 1rem; --flatly-body-font-weight: 400; --flatly-body-line-height: 1.5; --flatly-body-color: #212529; --flatly-body-bg: #fff; margin: 0; font-family: var(--flatly-body-font-family); font-size: var(--flatly-body-font-size); font-weight: var(--flatly-body-font-weight); line-height: var(--flatly-body-line-height); color: var(--flatly-body-color); text-align: var(--flatly-body-text-align); background-color: var(--flatly-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .flatly-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #212529; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .flatly .btn-primary { color: #fff; background-color: #2c3e50; border-color: #2c3e50; } .flatly .btn-secondary { color: #fff; background-color: #95a5a6; border-color: #95a5a6; } .flatly .btn-success { color: #fff; background-color: #18bc9c; border-color: #18bc9c; } .flatly .btn-info { color: #fff; background-color: #3498db; border-color: #3498db; } .flatly .btn-warning { color: #fff; background-color: #f39c12; border-color: #f39c12; } .flatly .btn-danger { color: #fff; background-color: #e74c3c; border-color: #e74c3c; } .flatly .btn-light { color: #000; background-color: #ecf0f1; border-color: #ecf0f1; } .flatly .btn-dark { color: #fff; background-color: #7b8a8b; border-color: #7b8a8b; } .journal { --journal-blue: #eb6864; --journal-indigo: #6610f2; --journal-purple: #6f42c1; --journal-pink: #e83e8c; --journal-red: #f57a00; --journal-orange: #fd7e14; --journal-yellow: #f5e625; --journal-green: #22b24c; --journal-teal: #20c997; --journal-cyan: #369; --journal-white: #fff; --journal-gray: #777; --journal-gray-dark: #333; --journal-gray-100: #f8f9fa; --journal-gray-200: #eee; --journal-gray-300: #dee2e6; --journal-gray-400: #ced4da; --journal-gray-500: #aaa; --journal-gray-600: #777; --journal-gray-700: #495057; --journal-gray-800: #333; --journal-gray-900: #222; --journal-primary: #eb6864; --journal-secondary: #aaa; --journal-success: #22b24c; --journal-info: #369; --journal-warning: #f5e625; --journal-danger: #f57a00; --journal-light: #f8f9fa; --journal-dark: #222; --journal-primary-rgb: 235, 104, 100; --journal-secondary-rgb: 170, 170, 170; --journal-success-rgb: 34, 178, 76; --journal-info-rgb: 51, 102, 153; --journal-warning-rgb: 245, 230, 37; --journal-danger-rgb: 245, 122, 0; --journal-light-rgb: 248, 249, 250; --journal-dark-rgb: 34, 34, 34; --journal-white-rgb: 255, 255, 255; --journal-black-rgb: 0, 0, 0; --journal-body-color-rgb: 34, 34, 34; --journal-body-bg-rgb: 255, 255, 255; --journal-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --journal-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --journal-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --journal-body-font-family: var(--journal-font-sans-serif); --journal-body-font-size: 1rem; --journal-body-font-weight: 400; --journal-body-line-height: 1.5; --journal-body-color: #222; --journal-body-bg: #fff; margin: 0; font-family: var(--journal-body-font-family); font-size: var(--journal-body-font-size); font-weight: var(--journal-body-font-weight); line-height: var(--journal-body-line-height); color: var(--journal-body-color); text-align: var(--journal-body-text-align); background-color: var(--journal-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .journal-btn { display: inline-block; font-family: "News Cycle", "Arial Narrow Bold", sans-serif; font-weight: 700; line-height: 1.5; color: #222; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 1rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .journal .btn-primary { color: #fff; background-color: #eb6864; border-color: #eb6864; } .journal .btn-secondary { color: #fff; background-color: #aaa; border-color: #aaa; } .journal .btn-success { color: #fff; background-color: #22b24c; border-color: #22b24c; } .journal .btn-info { color: #fff; background-color: #369; border-color: #369; } .journal .btn-warning { color: #fff; background-color: #f5e625; border-color: #f5e625; } .journal .btn-danger { color: #fff; background-color: #f57a00; border-color: #f57a00; } .journal .btn-light { color: #000; background-color: #f8f9fa; border-color: #f8f9fa; } .journal .btn-dark { color: #fff; background-color: #222; border-color: #222; } .litera { --litera-blue: #4582ec; --litera-indigo: #6610f2; --litera-purple: #6f42c1; --litera-pink: #e83e8c; --litera-red: #d9534f; --litera-orange: #fd7e14; --litera-yellow: #f0ad4e; --litera-green: #02b875; --litera-teal: #20c997; --litera-cyan: #17a2b8; --litera-white: #fff; --litera-gray: #868e96; --litera-gray-dark: #343a40; --litera-gray-100: #f8f9fa; --litera-gray-200: #e9ecef; --litera-gray-300: #ddd; --litera-gray-400: #ced4da; --litera-gray-500: #adb5bd; --litera-gray-600: #868e96; --litera-gray-700: #495057; --litera-gray-800: #343a40; --litera-gray-900: #212529; --litera-primary: #4582ec; --litera-secondary: #adb5bd; --litera-success: #02b875; --litera-info: #17a2b8; --litera-warning: #f0ad4e; --litera-danger: #d9534f; --litera-light: #f8f9fa; --litera-dark: #343a40; --litera-primary-rgb: 69, 130, 236; --litera-secondary-rgb: 173, 181, 189; --litera-success-rgb: 2, 184, 117; --litera-info-rgb: 23, 162, 184; --litera-warning-rgb: 240, 173, 78; --litera-danger-rgb: 217, 83, 79; --litera-light-rgb: 248, 249, 250; --litera-dark-rgb: 52, 58, 64; --litera-white-rgb: 255, 255, 255; --litera-black-rgb: 0, 0, 0; --litera-body-color-rgb: 52, 58, 64; --litera-body-bg-rgb: 255, 255, 255; --litera-font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --litera-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --litera-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --litera-body-font-family: var(--litera-font-sans-serif); --litera-body-font-size: 1.1rem; --litera-body-font-weight: 400; --litera-body-line-height: 1.5; --litera-body-color: #343a40; --litera-body-bg: #fff; margin: 0; font-family: var(--litera-body-font-family); font-size: var(--litera-body-font-size); font-weight: var(--litera-body-font-weight); line-height: var(--litera-body-line-height); color: var(--litera-body-color); text-align: var(--litera-body-text-align); background-color: var(--litera-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .litera-btn { display: inline-block; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-weight: 400; line-height: 1.5; color: #343a40; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.5rem 1.1rem; font-size: 0.875rem; border-radius: 1.078em; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .litera .btn-primary { color: #fff; background-color: #4582ec; border-color: #4582ec; } .litera .btn-secondary { color: #fff; background-color: #adb5bd; border-color: #adb5bd; } .litera .btn-success { color: #fff; background-color: #02b875; border-color: #02b875; } .litera .btn-info { color: #fff; background-color: #17a2b8; border-color: #17a2b8; } .litera .btn-warning { color: #fff; background-color: #f0ad4e; border-color: #f0ad4e; } .litera .btn-danger { color: #fff; background-color: #d9534f; border-color: #d9534f; } .litera .btn-light { color: #000; background-color: #f8f9fa; border-color: #f8f9fa; } .litera .btn-dark { color: #fff; background-color: #343a40; border-color: #343a40; } .lumen { --lumen-blue: #158cba; --lumen-indigo: #6610f2; --lumen-purple: #6f42c1; --lumen-pink: #e83e8c; --lumen-red: #ff4136; --lumen-orange: #fd7e14; --lumen-yellow: #ff851b; --lumen-green: #28b62c; --lumen-teal: #20c997; --lumen-cyan: #75caeb; --lumen-white: #fff; --lumen-gray: #999; --lumen-gray-dark: #333; --lumen-gray-100: #f6f6f6; --lumen-gray-200: #f0f0f0; --lumen-gray-300: #dee2e6; --lumen-gray-400: #ced4da; --lumen-gray-500: #adb5bd; --lumen-gray-600: #999; --lumen-gray-700: #555; --lumen-gray-800: #333; --lumen-gray-900: #222; --lumen-primary: #158cba; --lumen-secondary: #f0f0f0; --lumen-success: #28b62c; --lumen-info: #75caeb; --lumen-warning: #ff851b; --lumen-danger: #ff4136; --lumen-light: #f6f6f6; --lumen-dark: #555; --lumen-primary-rgb: 21, 140, 186; --lumen-secondary-rgb: 240, 240, 240; --lumen-success-rgb: 40, 182, 44; --lumen-info-rgb: 117, 202, 235; --lumen-warning-rgb: 255, 133, 27; --lumen-danger-rgb: 255, 65, 54; --lumen-light-rgb: 246, 246, 246; --lumen-dark-rgb: 85, 85, 85; --lumen-white-rgb: 255, 255, 255; --lumen-black-rgb: 0, 0, 0; --lumen-body-color-rgb: 34, 34, 34; --lumen-body-bg-rgb: 255, 255, 255; --lumen-font-sans-serif: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --lumen-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --lumen-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --lumen-body-font-family: var(--lumen-font-sans-serif); --lumen-body-font-size: 1rem; --lumen-body-font-weight: 400; --lumen-body-line-height: 1.5; --lumen-body-color: #222; --lumen-body-bg: #fff; margin: 0; font-family: var(--lumen-body-font-family); font-size: var(--lumen-body-font-size); font-weight: var(--lumen-body-font-weight); line-height: var(--lumen-body-line-height); color: var(--lumen-body-color); text-align: var(--lumen-body-text-align); background-color: var(--lumen-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .lumen-btn { display: inline-block; font-weight: 700; line-height: 1.5; color: #222; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; border-style: solid; border-width: 0 1px 4px 1px; text-transform: uppercase; } .lumen .btn-primary { color: #fff; background-color: #158cba; border-color: #137ea7; } .lumen .btn-secondary { color: #000; background-color: #f0f0f0; border-color: #d8d8d8; } .lumen .btn-success { color: #fff; background-color: #28b62c; border-color: #24a428; } .lumen .btn-success { color: #fff; background-color: #28b62c; border-color: #24a428; } .lumen .btn-info { color: #fff; background-color: #75caeb; border-color: #69b6d4; } .lumen .btn-warning { color: #fff; background-color: #ff851b; border-color: #e67818; } .lumen .btn-danger { color: #fff; background-color: #ff4136; border-color: #e63b31; } .lumen .btn-light { color: #000; background-color: #f6f6f6; border-color: #dddddd; } .lumen .btn-dark { color: #fff; background-color: #555; border-color: #4d4d4d; } .lux { --lux-blue: #007bff; --lux-indigo: #6610f2; --lux-purple: #6f42c1; --lux-pink: #e83e8c; --lux-red: #d9534f; --lux-orange: #fd7e14; --lux-yellow: #f0ad4e; --lux-green: #4bbf73; --lux-teal: #20c997; --lux-cyan: #1f9bcf; --lux-white: #fff; --lux-gray: #919aa1; --lux-gray-dark: #343a40; --lux-gray-100: #f8f9fa; --lux-gray-200: #f7f7f9; --lux-gray-300: #eceeef; --lux-gray-400: #ced4da; --lux-gray-500: #adb5bd; --lux-gray-600: #919aa1; --lux-gray-700: #55595c; --lux-gray-800: #343a40; --lux-gray-900: #1a1a1a; --lux-primary: #1a1a1a; --lux-secondary: #fff; --lux-success: #4bbf73; --lux-info: #1f9bcf; --lux-warning: #f0ad4e; --lux-danger: #d9534f; --lux-light: #fff; --lux-dark: #343a40; --lux-primary-rgb: 26, 26, 26; --lux-secondary-rgb: 255, 255, 255; --lux-success-rgb: 75, 191, 115; --lux-info-rgb: 31, 155, 207; --lux-warning-rgb: 240, 173, 78; --lux-danger-rgb: 217, 83, 79; --lux-light-rgb: 255, 255, 255; --lux-dark-rgb: 52, 58, 64; --lux-white-rgb: 255, 255, 255; --lux-black-rgb: 0, 0, 0; --lux-body-color-rgb: 85, 89, 92; --lux-body-bg-rgb: 255, 255, 255; --lux-font-sans-serif: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --lux-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --lux-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --lux-body-font-family: var(--lux-font-sans-serif); --lux-body-font-size: 1rem; --lux-body-font-weight: 400; --lux-body-line-height: 1.5; --lux-body-color: #55595c; --lux-body-bg: #fff; margin: 0; font-family: var(--lux-body-font-family); font-size: var(--lux-body-font-size); font-weight: var(--lux-body-font-weight); line-height: var(--lux-body-line-height); color: var(--lux-body-color); text-align: var(--lux-body-text-align); background-color: var(--lux-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .lux-btn { display: inline-block; font-weight: 600; line-height: 1.5rem; color: #55595c; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 0 solid transparent; padding: 0.75rem 1.5rem; font-size: 1rem; border-radius: 0; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; font-size: 0.875rem; text-transform: uppercase; } .lux .btn-primary { color: #fff; background-color: #1a1a1a; border-color: #1a1a1a; } .lux .btn-secondary { color: #000; background-color: #fff; border-color: #fff; } .lux .btn-success { color: #fff; background-color: #4bbf73; border-color: #4bbf73; } .lux .btn-info { color: #fff; background-color: #1f9bcf; border-color: #1f9bcf; } .lux .btn-warning { color: #000; background-color: #f0ad4e; border-color: #f0ad4e; } .lux .btn-danger { color: #fff; background-color: #d9534f; border-color: #d9534f; } .lux .btn-light { color: #000; background-color: #fff; border-color: #fff; } .lux .btn-dark { color: #fff; background-color: #343a40; border-color: #343a40; } .materia { --materia-blue: #2196f3; --materia-indigo: #6610f2; --materia-purple: #6f42c1; --materia-pink: #e83e8c; --materia-red: #e51c23; --materia-orange: #fd7e14; --materia-yellow: #ff9800; --materia-green: #4caf50; --materia-teal: #20c997; --materia-cyan: #9c27b0; --materia-white: #fff; --materia-gray: #666; --materia-gray-dark: #222; --materia-gray-100: #f8f9fa; --materia-gray-200: #eee; --materia-gray-300: #dee2e6; --materia-gray-400: #ced4da; --materia-gray-500: #bbb; --materia-gray-600: #666; --materia-gray-700: #444; --materia-gray-800: #222; --materia-gray-900: #212121; --materia-primary: #2196f3; --materia-secondary: #fff; --materia-success: #4caf50; --materia-info: #9c27b0; --materia-warning: #ff9800; --materia-danger: #e51c23; --materia-light: #f8f9fa; --materia-dark: #222; --materia-primary-rgb: 33, 150, 243; --materia-secondary-rgb: 255, 255, 255; --materia-success-rgb: 76, 175, 80; --materia-info-rgb: 156, 39, 176; --materia-warning-rgb: 255, 152, 0; --materia-danger-rgb: 229, 28, 35; --materia-light-rgb: 248, 249, 250; --materia-dark-rgb: 34, 34, 34; --materia-white-rgb: 255, 255, 255; --materia-black-rgb: 0, 0, 0; --materia-body-color-rgb: 68, 68, 68; --materia-body-bg-rgb: 255, 255, 255; --materia-font-sans-serif: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; --materia-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --materia-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --materia-body-font-family: var(--materia-font-sans-serif); --materia-body-font-size: 1rem; --materia-body-font-weight: 400; --materia-body-line-height: 1.5; --materia-body-color: #444; --materia-body-bg: #fff; margin: 0; font-family: var(--materia-body-font-family); font-size: var(--materia-body-font-size); font-weight: var(--materia-body-font-weight); line-height: var(--materia-body-line-height); color: var(--materia-body-color); text-align: var(--materia-body-text-align); background-color: var(--materia-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .materia-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #444; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.8rem 1rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; letter-spacing: .1px; text-transform: uppercase; border: none; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); transition: color .4s, background-color .4s, border-color .4s, box-shadow .4s; } .materia .btn-primary { color: #fff; background-color: #2196f3; background-image: var(--minty-gradient); border-color: #2196f3; } .materia .btn-secondary { color: #000; background-color: #fff; background-image: var(--minty-gradient); border-color: #fff; } .materia .btn-success { color: #fff; background-color: #4caf50; background-image: var(--minty-gradient); border-color: #4caf50; } .materia .btn-info { color: #fff; background-color: #9c27b0; background-image: var(--minty-gradient); border-color: #9c27b0; } .materia .btn-warning { color: #fff; background-color: #ff9800; background-image: var(--minty-gradient); border-color: #ff9800; } .materia .btn-danger { color: #fff; background-color: #e51c23; background-image: var(--minty-gradient); border-color: #e51c23; } .materia .btn-light { color: #000; background-color: #f8f9fa; background-image: var(--minty-gradient); border-color: #f8f9fa; } .materia .btn-dark { color: #fff; background-color: #222; background-image: var(--minty-gradient); border-color: #222; } .minty { --minty-blue: #007bff; --minty-indigo: #6610f2; --minty-purple: #6f42c1; --minty-pink: #e83e8c; --minty-red: #ff7851; --minty-orange: #fd7e14; --minty-yellow: #ffce67; --minty-green: #56cc9d; --minty-teal: #20c997; --minty-cyan: #6cc3d5; --minty-white: #fff; --minty-gray: #888; --minty-gray-dark: #343a40; --minty-gray-100: #f8f9fa; --minty-gray-200: #f7f7f9; --minty-gray-300: #eceeef; --minty-gray-400: #ced4da; --minty-gray-500: #aaa; --minty-gray-600: #888; --minty-gray-700: #5a5a5a; --minty-gray-800: #343a40; --minty-gray-900: #212529; --minty-primary: #78c2ad; --minty-secondary: #f3969a; --minty-success: #56cc9d; --minty-info: #6cc3d5; --minty-warning: #ffce67; --minty-danger: #ff7851; --minty-light: #f8f9fa; --minty-dark: #343a40; --minty-primary-rgb: 120, 194, 173; --minty-secondary-rgb: 243, 150, 154; --minty-success-rgb: 86, 204, 157; --minty-info-rgb: 108, 195, 213; --minty-warning-rgb: 255, 206, 103; --minty-danger-rgb: 255, 120, 81; --minty-light-rgb: 248, 249, 250; --minty-dark-rgb: 52, 58, 64; --minty-white-rgb: 255, 255, 255; --minty-black-rgb: 0, 0, 0; --minty-body-color-rgb: 136, 136, 136; --minty-body-bg-rgb: 255, 255, 255; --minty-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --minty-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --minty-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --minty-body-font-family: var(--minty-font-sans-serif); --minty-body-font-size: 1rem; --minty-body-font-weight: 400; --minty-body-line-height: 1.5; --minty-body-color: #888; --minty-body-bg: #fff; margin: 0; font-family: var(--minty-body-font-family); font-size: var(--minty-body-font-size); font-weight: var(--minty-body-font-weight); line-height: var(--minty-body-line-height); color: var(--minty-body-color); text-align: var(--minty-body-text-align); background-color: var(--minty-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .minty-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #888; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.4rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; font-family: Montserrat, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; } .minty .btn-primary { color: #fff; background-color: #78c2ad; border-color: #78c2ad; } .minty .btn-secondary { color: #fff; background-color: #f3969a; border-color: #f3969a; } .minty .btn-success { color: #fff; background-color: #56cc9d; border-color: #56cc9d; } .minty .btn-info { color: #fff; background-color: #6cc3d5; border-color: #6cc3d5; } .minty .btn-warning { color: #fff; background-color: #ffce67; border-color: #ffce67; } .minty .btn-danger { color: #fff; background-color: #ff7851; border-color: #ff7851; } .minty .btn-light { color: #000; background-color: #f8f9fa; border-color: #f8f9fa; } .minty .btn-dark { color: #fff; background-color: #343a40; border-color: #343a40; } .morph { --morph-blue: #378dfc; --morph-indigo: #6610f2; --morph-purple: #5b62f4; --morph-pink: #d63384; --morph-red: #e52527; --morph-orange: #fd7e14; --morph-yellow: #ffc107; --morph-green: #43cc29; --morph-teal: #20c997; --morph-cyan: #0dcaf0; --morph-white: #fff; --morph-gray: #7f8a99; --morph-gray-dark: #444b40; --morph-gray-100: #f0f5fa; --morph-gray-200: #d9e3f1; --morph-gray-300: #dee2e6; --morph-gray-400: #bed1e6; --morph-gray-500: #adb5bd; --morph-gray-600: #7f8a99; --morph-gray-700: #7b8ab8; --morph-gray-800: #444b40; --morph-gray-900: #212529; --morph-primary: #378dfc; --morph-secondary: #d9e3f1; --morph-success: #43cc29; --morph-info: #5b62f4; --morph-warning: #ffc107; --morph-danger: #e52527; --morph-light: #f0f5fa; --morph-dark: #212529; --morph-primary-rgb: 55, 141, 252; --morph-secondary-rgb: 217, 227, 241; --morph-success-rgb: 67, 204, 41; --morph-info-rgb: 91, 98, 244; --morph-warning-rgb: 255, 193, 7; --morph-danger-rgb: 229, 37, 39; --morph-light-rgb: 240, 245, 250; --morph-dark-rgb: 33, 37, 41; --morph-white-rgb: 255, 255, 255; --morph-black-rgb: 0, 0, 0; --morph-body-color-rgb: 123, 138, 184; --morph-body-bg-rgb: 217, 227, 241; --morph-font-sans-serif: Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --morph-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --morph-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --morph-body-font-family: var(--morph-font-sans-serif); --morph-body-font-size: 1rem; --morph-body-font-weight: 400; --morph-body-line-height: 1.5; --morph-body-color: #7b8ab8; --morph-body-bg: #d9e3f1; margin: 0; font-family: var(--morph-body-font-family); font-size: var(--morph-body-font-size); font-weight: var(--morph-body-font-weight); line-height: var(--morph-body-line-height); color: var(--morph-body-color); text-align: var(--morph-body-text-align); background-color: var(--morph-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .morph-btn { display: inline-block; font-weight: 600; line-height: 1.5; color: #7b8ab8; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 0 solid transparent; padding: 1rem 1.5rem; font-size: 1rem; border-radius: 50rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; position: relative; color: #7b8ab8; border-radius: 50rem; background-color: #d9e3f1; border: none; box-shadow: 5px 5px 10px rgba(55, 94, 148, 0.2), -5px -5px 10px rgba(255, 255, 255, 0.4); transition: background-color .15s ease-in-out, border .15s ease-in-out, box-shadow .15s ease-in-out, color .15s ease-in-out; } .morph .btn-primary, .morph .btn-secondary, .morph .btn-success, .morph .btn-info, .morph .btn-warning, .morph .btn-danger, .morph .btn-light, .morph .btn-dark { position: relative; color: #7b8ab8; border-radius: 50rem; background-color: #d9e3f1; border: none; box-shadow: 5px 5px 10px rgba(55, 94, 148, 0.2), -5px -5px 10px rgba(255, 255, 255, 0.4); transition: background-color .15s ease-in-out, border .15s ease-in-out, box-shadow .15s ease-in-out, color .15s ease-in-out; } .pulse { --pulse-blue: #007bff; --pulse-indigo: #6610f2; --pulse-purple: #593196; --pulse-pink: #e83e8c; --pulse-red: #fc3939; --pulse-orange: #fd7e14; --pulse-yellow: #efa31d; --pulse-green: #13b955; --pulse-teal: #20c997; --pulse-cyan: #009cdc; --pulse-white: #fff; --pulse-gray: #868e96; --pulse-gray-dark: #343a40; --pulse-gray-100: #fafafa; --pulse-gray-200: #f9f8fc; --pulse-gray-300: #ededed; --pulse-gray-400: #cbc8d0; --pulse-gray-500: #adb5bd; --pulse-gray-600: #868e96; --pulse-gray-700: #444; --pulse-gray-800: #343a40; --pulse-gray-900: #17141f; --pulse-primary: #593196; --pulse-secondary: #a991d4; --pulse-success: #13b955; --pulse-info: #009cdc; --pulse-warning: #efa31d; --pulse-danger: #fc3939; --pulse-light: #f9f8fc; --pulse-dark: #17141f; --pulse-primary-rgb: 89, 49, 150; --pulse-secondary-rgb: 169, 145, 212; --pulse-success-rgb: 19, 185, 85; --pulse-info-rgb: 0, 156, 220; --pulse-warning-rgb: 239, 163, 29; --pulse-danger-rgb: 252, 57, 57; --pulse-light-rgb: 249, 248, 252; --pulse-dark-rgb: 23, 20, 31; --pulse-white-rgb: 255, 255, 255; --pulse-black-rgb: 0, 0, 0; --pulse-body-color-rgb: 68, 68, 68; --pulse-body-bg-rgb: 255, 255, 255; --pulse-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --pulse-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --pulse-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --pulse-body-font-family: var(--pulse-font-sans-serif); --pulse-body-font-size: 1rem; --pulse-body-font-weight: 400; --pulse-body-line-height: 1.5; --pulse-body-color: #444; --pulse-body-bg: #fff; margin: 0; font-family: var(--pulse-body-font-family); font-size: var(--pulse-body-font-size); font-weight: var(--pulse-body-font-weight); line-height: var(--pulse-body-line-height); color: var(--pulse-body-color); text-align: var(--pulse-body-text-align); background-color: var(--pulse-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .pulse-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #444; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .pulse .btn-primary { color: #fff; background-color: #593196; border-color: #593196; } .pulse .btn-secondary { color: #fff; background-color: #a991d4; border-color: #a991d4; } .pulse .btn-success { color: #fff; background-color: #13b955; border-color: #13b955; } .pulse .btn-info { color: #fff; background-color: #009cdc; border-color: #009cdc; } .pulse .btn-warning { color: #fff; background-color: #efa31d; border-color: #efa31d; } .pulse .btn-danger { color: #fff; background-color: #fc3939; border-color: #fc3939; } .pulse .btn-warning { color: #fff; background-color: #efa31d; border-color: #efa31d; } .pulse .btn-danger { color: #fff; background-color: #fc3939; border-color: #fc3939; } .pulse .btn-light { color: #000; background-color: #f9f8fc; border-color: #f9f8fc; } .pulse .btn-dark { color: #fff; background-color: #17141f; border-color: #17141f; } .quartz { --quartz-blue: #3a8fd9; --quartz-indigo: #6610f2; --quartz-purple: #686dc3; --quartz-pink: #e83283; --quartz-red: #fc346f; --quartz-orange: #fd7e14; --quartz-yellow: #ffc107; --quartz-green: #41d7a7; --quartz-teal: #528fb3; --quartz-cyan: #39cbfb; --quartz-white: #fff; --quartz-gray: #6c757d; --quartz-gray-dark: #343a40; --quartz-gray-100: #f8f9fa; --quartz-gray-200: #e9e9e8; --quartz-gray-300: #dee2e6; --quartz-gray-400: #ced4da; --quartz-gray-500: #adb5bd; --quartz-gray-600: #6c757d; --quartz-gray-700: #495057; --quartz-gray-800: #343a40; --quartz-gray-900: #212529; --quartz-primary: #e83283; --quartz-secondary: rgba(255, 255, 255, 0.4); --quartz-success: #41d7a7; --quartz-info: #39cbfb; --quartz-warning: #ffc107; --quartz-danger: #fd7e14; --quartz-light: #e9e9e8; --quartz-dark: #212529; --quartz-primary-rgb: 232, 50, 131; --quartz-secondary-rgb: 255, 255, 255; --quartz-success-rgb: 65, 215, 167; --quartz-info-rgb: 57, 203, 251; --quartz-warning-rgb: 255, 193, 7; --quartz-danger-rgb: 253, 126, 20; --quartz-light-rgb: 233, 233, 232; --quartz-dark-rgb: 33, 37, 41; --quartz-white-rgb: 255, 255, 255; --quartz-black-rgb: 0, 0, 0; --quartz-body-color-rgb: 255, 255, 255; --quartz-body-bg-rgb: 104, 109, 195; --quartz-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --quartz-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --quartz-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --quartz-body-font-family: var(--quartz-font-sans-serif); --quartz-body-font-size: 1rem; --quartz-body-font-weight: 400; --quartz-body-line-height: 1.5; --quartz-body-color: #fff; --quartz-body-bg: #686dc3; margin: 0; font-family: var(--quartz-body-font-family); font-size: var(--quartz-body-font-size); font-weight: var(--quartz-body-font-weight); line-height: var(--quartz-body-line-height); color: var(--quartz-body-color); text-align: var(--quartz-body-text-align); background-color: var(--quartz-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); background-image: linear-gradient(90deg, #33b7e2, #5e62b0, #dc307c); } .quartz-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #fff; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.75rem 1.5rem; font-size: 1rem; border-radius: 0.5rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .quartz .btn-primary { color: #fff; background-color: #e83283; border-color: #e83283; } .quartz .btn-secondary { color: #000; background-color: rgba(255, 255, 255, 0.4); border-color: rgba(255, 255, 255, 0.4); border: none; color: #fff; } .quartz .btn-success { color: #fff; background-color: #41d7a7; border-color: #41d7a7; } .quartz .btn-info { color: #fff; background-color: #39cbfb; border-color: #39cbfb; } .quartz .btn-warning { color: #fff; background-color: #ffc107; border-color: #ffc107; } .quartz .btn-danger { color: #fff; background-color: #fd7e14; border-color: #fd7e14; } .quartz .btn-light { color: #000; background-color: #e9e9e8; border-color: #e9e9e8; } .quartz .btn-dark { color: #fff; background-color: #212529; border-color: #212529; } .sandstone { --sandstone-blue: #325d88; --sandstone-indigo: #6610f2; --sandstone-purple: #6f42c1; --sandstone-pink: #e83e8c; --sandstone-red: #d9534f; --sandstone-orange: #f47c3c; --sandstone-yellow: #ffc107; --sandstone-green: #93c54b; --sandstone-teal: #20c997; --sandstone-cyan: #29abe0; --sandstone-white: #fff; --sandstone-gray: #8e8c84; --sandstone-gray-dark: #3e3f3a; --sandstone-gray-100: #f8f9fa; --sandstone-gray-200: #f8f5f0; --sandstone-gray-300: #dfd7ca; --sandstone-gray-400: #ced4da; --sandstone-gray-500: #98978b; --sandstone-gray-600: #8e8c84; --sandstone-gray-700: #495057; --sandstone-gray-800: #3e3f3a; --sandstone-gray-900: #212529; --sandstone-primary: #325d88; --sandstone-secondary: #8e8c84; --sandstone-success: #93c54b; --sandstone-info: #29abe0; --sandstone-warning: #f47c3c; --sandstone-danger: #d9534f; --sandstone-light: #f8f5f0; --sandstone-dark: #3e3f3a; --sandstone-primary-rgb: 50, 93, 136; --sandstone-secondary-rgb: 142, 140, 132; --sandstone-success-rgb: 147, 197, 75; --sandstone-info-rgb: 41, 171, 224; --sandstone-warning-rgb: 244, 124, 60; --sandstone-danger-rgb: 217, 83, 79; --sandstone-light-rgb: 248, 245, 240; --sandstone-dark-rgb: 62, 63, 58; --sandstone-white-rgb: 255, 255, 255; --sandstone-black-rgb: 0, 0, 0; --sandstone-body-color-rgb: 62, 63, 58; --sandstone-body-bg-rgb: 255, 255, 255; --sandstone-font-sans-serif: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --sandstone-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --sandstone-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --sandstone-body-font-family: var(--sandstone-font-sans-serif); --sandstone-body-font-size: 1rem; --sandstone-body-font-weight: 400; --sandstone-body-line-height: 1.5; --sandstone-body-color: #3e3f3a; --sandstone-body-bg: #fff; margin: 0; font-family: var(--sandstone-body-font-family); font-size: var(--sandstone-body-font-size); font-weight: var(--sandstone-body-font-weight); line-height: var(--sandstone-body-line-height); color: var(--sandstone-body-color); text-align: var(--sandstone-body-text-align); background-color: var(--sandstone-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .sandstone-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #3e3f3a; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; font-size: 13px; line-height: 22px; font-weight: 500; text-transform: uppercase; } .sandstone .btn-primary { color: #fff; background-color: #325d88; border-color: #325d88; } .sandstone .btn-secondary { color: #fff; background-color: #8e8c84; border-color: #8e8c84; } .sandstone .btn-success { color: #fff; background-color: #93c54b; border-color: #93c54b; } .sandstone .btn-info { color: #fff; background-color: #29abe0; border-color: #29abe0; } .sandstone .btn-warning { color: #fff; background-color: #f47c3c; border-color: #f47c3c; } .sandstone .btn-danger { color: #fff; background-color: #d9534f; border-color: #d9534f; } .sandstone .btn-light { color: #000; background-color: #f8f5f0; border-color: #f8f5f0; } .sandstone .btn-dark { color: #fff; background-color: #3e3f3a; border-color: #3e3f3a; } .simplex { --simplex-blue: #007bff; --simplex-indigo: #6610f2; --simplex-purple: #9b479f; --simplex-pink: #e83e8c; --simplex-red: #d9230f; --simplex-orange: #d9831f; --simplex-yellow: #ffc107; --simplex-green: #469408; --simplex-teal: #20c997; --simplex-cyan: #029acf; --simplex-white: #fff; --simplex-gray: #777; --simplex-gray-dark: #373a3c; --simplex-gray-100: #f8f9fa; --simplex-gray-200: #ddd; --simplex-gray-300: #ccc; --simplex-gray-400: #bbb; --simplex-gray-500: #adb5bd; --simplex-gray-600: #777; --simplex-gray-700: #444; --simplex-gray-800: #373a3c; --simplex-gray-900: #212529; --simplex-primary: #d9230f; --simplex-secondary: #fff; --simplex-success: #469408; --simplex-info: #029acf; --simplex-warning: #d9831f; --simplex-danger: #9b479f; --simplex-light: #fff; --simplex-dark: #373a3c; --simplex-primary-rgb: 217, 35, 15; --simplex-secondary-rgb: 255, 255, 255; --simplex-success-rgb: 70, 148, 8; --simplex-info-rgb: 2, 154, 207; --simplex-warning-rgb: 217, 131, 31; --simplex-danger-rgb: 155, 71, 159; --simplex-light-rgb: 255, 255, 255; --simplex-dark-rgb: 55, 58, 60; --simplex-white-rgb: 255, 255, 255; --simplex-black-rgb: 0, 0, 0; --simplex-body-color-rgb: 33, 37, 41; --simplex-body-bg-rgb: 252, 252, 252; --simplex-font-sans-serif: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --simplex-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --simplex-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --simplex-body-font-family: var(--simplex-font-sans-serif); --simplex-body-font-size: 1rem; --simplex-body-font-weight: 400; --simplex-body-line-height: 1.5; --simplex-body-color: #212529; --simplex-body-bg: #fcfcfc; margin: 0; font-family: var(--simplex-body-font-family); font-size: var(--simplex-body-font-size); font-weight: var(--simplex-body-font-weight); line-height: var(--simplex-body-line-height); color: var(--simplex-body-color); text-align: var(--simplex-body-text-align); background-color: var(--simplex-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .simplex-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #212529; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .simplex .btn-primary { color: #fff; background-color: #d9230f; border-color: #d9230f; background-image: linear-gradient(#db301d, #d9230f 6%, #cc210e); -webkit-filter: none; filter: none; border: 1px solid #bd1e0d; } .simplex .btn-secondary { color: #000; background-color: #fff; border-color: #fff; background-image: linear-gradient(white, #fff 6%, #f0f0f0); -webkit-filter: none; filter: none; border: 1px solid #dedede; } .simplex .btn-success { color: #fff; background-color: #469408; border-color: #469408; background-image: linear-gradient(#519a17, #469408 6%, #428b08); -webkit-filter: none; filter: none; border: 1px solid #3d8107; } .simplex .btn-info { color: #fff; background-color: #029acf; border-color: #029acf; background-image: linear-gradient(#11a0d2, #029acf 6%, #0291c3); -webkit-filter: none; filter: none; border: 1px solid #0286b4; } .simplex .btn-warning { color: #fff; background-color: #d9831f; border-color: #d9831f; background-image: linear-gradient(#db8a2c, #d9831f 6%, #cc7b1d); -webkit-filter: none; filter: none; border: 1px solid #bd721b; } .simplex .btn-danger { color: #fff; background-color: #9b479f; border-color: #9b479f; background-image: linear-gradient(#a152a5, #9b479f 6%, #924395); -webkit-filter: none; filter: none; border: 1px solid #873e8a; } .simplex .btn-light { color: #000; background-color: #fff; border-color: #fff; background-image: linear-gradient(white, #fff 6%, #f0f0f0); -webkit-filter: none; filter: none; border: 1px solid #dedede; } .simplex .btn-dark { color: #fff; background-color: #373a3c; border-color: #373a3c; background-image: linear-gradient(#434648, #373a3c 6%, #343738); -webkit-filter: none; filter: none; border: 1px solid #303234; } .sketchy { --sketchy-blue: #007bff; --sketchy-indigo: #6610f2; --sketchy-purple: #6f42c1; --sketchy-pink: #e83e8c; --sketchy-red: #dc3545; --sketchy-orange: #fd7e14; --sketchy-yellow: #ffc107; --sketchy-green: #28a745; --sketchy-teal: #20c997; --sketchy-cyan: #17a2b8; --sketchy-white: #fff; --sketchy-gray: #868e96; --sketchy-gray-dark: #333; --sketchy-gray-100: #f8f9fa; --sketchy-gray-200: #f7f7f9; --sketchy-gray-300: #dee2e6; --sketchy-gray-400: #ccc; --sketchy-gray-500: #aaa; --sketchy-gray-600: #868e96; --sketchy-gray-700: #555; --sketchy-gray-800: #333; --sketchy-gray-900: #212529; --sketchy-primary: #333; --sketchy-secondary: #555; --sketchy-success: #28a745; --sketchy-info: #17a2b8; --sketchy-warning: #ffc107; --sketchy-danger: #dc3545; --sketchy-light: #fff; --sketchy-dark: #555; --sketchy-primary-rgb: 51, 51, 51; --sketchy-secondary-rgb: 85, 85, 85; --sketchy-success-rgb: 40, 167, 69; --sketchy-info-rgb: 23, 162, 184; --sketchy-warning-rgb: 255, 193, 7; --sketchy-danger-rgb: 220, 53, 69; --sketchy-light-rgb: 255, 255, 255; --sketchy-dark-rgb: 85, 85, 85; --sketchy-white-rgb: 255, 255, 255; --sketchy-black-rgb: 0, 0, 0; --sketchy-body-color-rgb: 33, 37, 41; --sketchy-body-bg-rgb: 255, 255, 255; --sketchy-font-sans-serif: Neucha, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; --sketchy-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --sketchy-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --sketchy-body-font-family: var(--sketchy-font-sans-serif); --sketchy-body-font-size: 1rem; --sketchy-body-font-weight: 700; --sketchy-body-line-height: 1.5; --sketchy-body-color: #212529; --sketchy-body-bg: #fff; margin: 0; font-family: var(--sketchy-body-font-family); font-size: var(--sketchy-body-font-size); font-weight: var(--sketchy-body-font-weight); line-height: var(--sketchy-body-line-height); color: var(--sketchy-body-color); text-align: var(--sketchy-body-text-align); background-color: var(--sketchy-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .sketchy-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #212529; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 2px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 25px; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; font-family: Neucha, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; border-radius: 255px 25px 225px 25px/25px 225px 25px 255px; text-decoration: none; } .sketchy .btn-primary { color: #fff; background-color: #333; border-color: #333; } .sketchy .btn-secondary { color: #fff; background-color: #555; border-color: #555; } .sketchy .btn-success { color: #fff; background-color: #28a745; border-color: #28a745; } .sketchy .btn-info { color: #fff; background-color: #17a2b8; border-color: #17a2b8; } .sketchy .btn-warning { color: #fff; background-color: #ffc107; border-color: #ffc107; } .sketchy .btn-danger { color: #fff; background-color: #dc3545; border-color: #dc3545; } .sketchy .btn-light { color: #000; background-color: #fff; border-color: #fff; } .sketchy .btn-dark { color: #fff; background-color: #555; border-color: #555; } .slate { --slate-blue: #007bff; --slate-indigo: #6610f2; --slate-purple: #6f42c1; --slate-pink: #e83e8c; --slate-red: #ee5f5b; --slate-orange: #fd7e14; --slate-yellow: #f89406; --slate-green: #62c462; --slate-teal: #20c997; --slate-cyan: #5bc0de; --slate-white: #fff; --slate-gray: #7a8288; --slate-gray-dark: #3a3f44; --slate-gray-100: #f8f9fa; --slate-gray-200: #e9ecef; --slate-gray-300: #dee2e6; --slate-gray-400: #ced4da; --slate-gray-500: #999; --slate-gray-600: #7a8288; --slate-gray-700: #52575c; --slate-gray-800: #3a3f44; --slate-gray-900: #272b30; --slate-primary: #3a3f44; --slate-secondary: #7a8288; --slate-success: #62c462; --slate-info: #5bc0de; --slate-warning: #f89406; --slate-danger: #ee5f5b; --slate-light: #e9ecef; --slate-dark: #272b30; --slate-primary-rgb: 58, 63, 68; --slate-secondary-rgb: 122, 130, 136; --slate-success-rgb: 98, 196, 98; --slate-info-rgb: 91, 192, 222; --slate-warning-rgb: 248, 148, 6; --slate-danger-rgb: 238, 95, 91; --slate-light-rgb: 233, 236, 239; --slate-dark-rgb: 39, 43, 48; --slate-white-rgb: 255, 255, 255; --slate-black-rgb: 0, 0, 0; --slate-body-color-rgb: 170, 170, 170; --slate-body-bg-rgb: 39, 43, 48; --slate-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --slate-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --slate-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --slate-body-font-family: var(--slate-font-sans-serif); --slate-body-font-size: 1rem; --slate-body-font-weight: 400; --slate-body-line-height: 1.5; --slate-body-color: #aaa; --slate-body-bg: #272b30; margin: 0; font-family: var(--slate-body-font-family); font-size: var(--slate-body-font-size); font-weight: var(--slate-body-font-weight); line-height: var(--slate-body-line-height); color: var(--slate-body-color); text-align: var(--slate-body-text-align); background-color: var(--slate-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .slate-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #aaa; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.75rem 1rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; border-color: rgba(0, 0, 0, 0.6); text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); } .slate .btn-primary { color: #fff; background-color: #3a3f44; border-color: #3a3f44; background-image: linear-gradient(#52565a, #3a3f44 60%, #353a3f); filter: none; } .slate .btn-secondary { color: #fff; background-color: #7a8288; border-color: #7a8288; background-image: linear-gradient(#8a9196, #7a8288 60%, #70787d); filter: none; } .slate .btn-success { color: #fff; background-color: #62c462; border-color: #62c462; background-image: linear-gradient(#75cb75, #62c462 60%, #5ab45a); filter: none; color: #fff; } .slate .btn-info { color: #fff; background-color: #5bc0de; border-color: #5bc0de; background-image: linear-gradient(#6fc8e2, #5bc0de 60%, #54b1cc); filter: none; color: #fff; } .slate .btn-warning { color: #fff; background-color: #f89406; border-color: #f89406; background-image: linear-gradient(#f9a124, #f89406 60%, #e48806); filter: none; color: #fff; } .slate .btn-danger { color: #fff; background-color: #ee5f5b; border-color: #ee5f5b; background-image: linear-gradient(#f0726f, #ee5f5b 60%, #db5754); filter: none; } .slate .btn-light { color: #000; background-color: #e9ecef; border-color: rgba(0, 0, 0, 0.6); } .slate .btn-dark { color: #fff; background-color: #272b30; border-color: rgba(0, 0, 0, 0.6); } .solar { --solar-blue: #b58900; --solar-indigo: #6610f2; --solar-purple: #6f42c1; --solar-pink: #e83e8c; --solar-red: #d33682; --solar-orange: #fd7e14; --solar-yellow: #cb4b16; --solar-green: #2aa198; --solar-teal: #20c997; --solar-cyan: #268bd2; --solar-white: #fff; --solar-gray: #839496; --solar-gray-dark: #073642; --solar-gray-100: #fdf6e3; --solar-gray-200: #eee8d5; --solar-gray-300: #dee2e6; --solar-gray-400: #ced4da; --solar-gray-500: #adb5bd; --solar-gray-600: #839496; --solar-gray-700: #495057; --solar-gray-800: #073642; --solar-gray-900: #002b36; --solar-primary: #b58900; --solar-secondary: #839496; --solar-success: #2aa198; --solar-info: #268bd2; --solar-warning: #cb4b16; --solar-danger: #d33682; --solar-light: #fdf6e3; --solar-dark: #073642; --solar-primary-rgb: 181, 137, 0; --solar-secondary-rgb: 131, 148, 150; --solar-success-rgb: 42, 161, 152; --solar-info-rgb: 38, 139, 210; --solar-warning-rgb: 203, 75, 22; --solar-danger-rgb: 211, 54, 130; --solar-light-rgb: 253, 246, 227; --solar-dark-rgb: 7, 54, 66; --solar-white-rgb: 255, 255, 255; --solar-black-rgb: 0, 0, 0; --solar-body-color-rgb: 131, 148, 150; --solar-body-bg-rgb: 0, 43, 54; --solar-font-sans-serif: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --solar-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --solar-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --solar-body-font-family: var(--solar-font-sans-serif); --solar-body-font-size: 1rem; --solar-body-font-weight: 400; --solar-body-line-height: 1.5; --solar-body-color: #839496; --solar-body-bg: #002b36; margin: 0; font-family: var(--solar-body-font-family); font-size: var(--solar-body-font-size); font-weight: var(--solar-body-font-weight); line-height: var(--solar-body-line-height); color: var(--solar-body-color); text-align: var(--solar-body-text-align); background-color: var(--solar-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .solar-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #839496; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .solar .btn-primary { color: #fff; background-color: #b58900; border-color: #b58900; } .solar .btn-secondary { color: #fff; background-color: #839496; border-color: #839496; } .solar .btn-success { color: #fff; background-color: #2aa198; border-color: #2aa198; } .solar .btn-info { color: #fff; background-color: #268bd2; border-color: #268bd2; } .solar .btn-warning { color: #fff; background-color: #cb4b16; border-color: #cb4b16; } .solar .btn-danger { color: #fff; background-color: #d33682; border-color: #d33682; } .solar .btn-light { color: #000; background-color: #fdf6e3; border-color: #fdf6e3; } .solar .btn-dark { color: #fff; background-color: #073642; border-color: #073642; } .spacelab { --spacelab-blue: #446e9b; --spacelab-indigo: #6610f2; --spacelab-purple: #6f42c1; --spacelab-pink: #e83e8c; --spacelab-red: #cd0200; --spacelab-orange: #fd7e14; --spacelab-yellow: #d47500; --spacelab-green: #3cb521; --spacelab-teal: #20c997; --spacelab-cyan: #3399f3; --spacelab-white: #fff; --spacelab-gray: #777; --spacelab-gray-dark: #333; --spacelab-gray-100: #f8f9fa; --spacelab-gray-200: #eee; --spacelab-gray-300: #dee2e6; --spacelab-gray-400: #ced4da; --spacelab-gray-500: #999; --spacelab-gray-600: #777; --spacelab-gray-700: #495057; --spacelab-gray-800: #333; --spacelab-gray-900: #2d2d2d; --spacelab-primary: #446e9b; --spacelab-secondary: #999; --spacelab-success: #3cb521; --spacelab-info: #3399f3; --spacelab-warning: #d47500; --spacelab-danger: #cd0200; --spacelab-light: #eee; --spacelab-dark: #333; --spacelab-primary-rgb: 68, 110, 155; --spacelab-secondary-rgb: 153, 153, 153; --spacelab-success-rgb: 60, 181, 33; --spacelab-info-rgb: 51, 153, 243; --spacelab-warning-rgb: 212, 117, 0; --spacelab-danger-rgb: 205, 2, 0; --spacelab-light-rgb: 238, 238, 238; --spacelab-dark-rgb: 51, 51, 51; --spacelab-white-rgb: 255, 255, 255; --spacelab-black-rgb: 0, 0, 0; --spacelab-body-color-rgb: 119, 119, 119; --spacelab-body-bg-rgb: 255, 255, 255; --spacelab-font-sans-serif: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --spacelab-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --spacelab-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --spacelab-body-font-family: var(--spacelab-font-sans-serif); --spacelab-body-font-size: 1rem; --spacelab-body-font-weight: 400; --spacelab-body-line-height: 1.5; --spacelab-body-color: #777; --spacelab-body-bg: #fff; margin: 0; font-family: var(--spacelab-body-font-family); font-size: var(--spacelab-body-font-size); font-weight: var(--spacelab-body-font-weight); line-height: var(--spacelab-body-line-height); color: var(--spacelab-body-color); text-align: var(--spacelab-body-text-align); background-color: var(--spacelab-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .spacelab-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #777; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.1); } .spacelab .btn-primary { color: #fff; background-color: #446e9b; border-color: #446e9b; background-image: linear-gradient(#7191b3, #446e9b 50%, #3f658f); filter: none; border: 1px solid #36587c; } .spacelab .btn-secondary { color: #fff; background-color: #999; border-color: #999; background-image: linear-gradient(#b1b1b1, #999 50%, #8d8d8d); filter: none; border: 1px solid #7a7a7a; } .spacelab .btn-success { color: #fff; background-color: #3cb521; border-color: #3cb521; background-image: linear-gradient(#6bc756, #3cb521 50%, #37a71e); filter: none; border: 1px solid #30911a; } .spacelab .btn-info { color: #fff; background-color: #3399f3; border-color: #3399f3; background-image: linear-gradient(#64b1f6, #3399f3 50%, #2f8de0); filter: none; border: 1px solid #297ac2; } .spacelab .btn-warning { color: #fff; background-color: #d47500; border-color: #d47500; background-image: linear-gradient(#de963d, #d47500 50%, #c36c00); filter: none; border: 1px solid #aa5e00; } .spacelab .btn-danger { color: #fff; background-color: #cd0200; border-color: #cd0200; background-image: linear-gradient(#d93f3d, #cd0200 50%, #bd0200); filter: none; border: 1px solid #a40200; } .spacelab .btn-light { color: #000; background-color: #eee; border-color: #eee; background-image: linear-gradient(#f2f2f2, #eee 50%, #dbdbdb); filter: none; border: 1px solid #bebebe; } .spacelab .btn-dark { color: #fff; background-color: #333; border-color: #333; background-image: linear-gradient(#646464, #333 50%, #2f2f2f); filter: none; border: 1px solid #292929; } .superhero { --superhero-blue: #4c9be8; --superhero-indigo: #6610f2; --superhero-purple: #6f42c1; --superhero-pink: #e83e8c; --superhero-red: #d9534f; --superhero-orange: #f0ad4e; --superhero-yellow: #ffc107; --superhero-green: #5cb85c; --superhero-teal: #20c997; --superhero-cyan: #5bc0de; --superhero-white: #fff; --superhero-gray: #868e96; --superhero-gray-dark: #343a40; --superhero-gray-100: #ebebeb; --superhero-gray-200: #4e5d6c; --superhero-gray-300: #dee2e6; --superhero-gray-400: #ced4da; --superhero-gray-500: #adb5bd; --superhero-gray-600: #868e96; --superhero-gray-700: #495057; --superhero-gray-800: #343a40; --superhero-gray-900: #212529; --superhero-primary: #4c9be8; --superhero-secondary: #4e5d6c; --superhero-success: #5cb85c; --superhero-info: #5bc0de; --superhero-warning: #ffc107; --superhero-danger: #d9534f; --superhero-light: #abb6c2; --superhero-dark: #20374c; --superhero-primary-rgb: 76, 155, 232; --superhero-secondary-rgb: 78, 93, 108; --superhero-success-rgb: 92, 184, 92; --superhero-info-rgb: 91, 192, 222; --superhero-warning-rgb: 255, 193, 7; --superhero-danger-rgb: 217, 83, 79; --superhero-light-rgb: 170.516129, 182.25, 193.983871; --superhero-dark-rgb: 32, 55, 76; --superhero-white-rgb: 255, 255, 255; --superhero-black-rgb: 0, 0, 0; --superhero-body-color-rgb: 235, 235, 235; --superhero-body-bg-rgb: 15, 37, 55; --superhero-font-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --superhero-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --superhero-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --superhero-body-font-family: var(--superhero-font-sans-serif); --superhero-body-font-size: 1rem; --superhero-body-font-weight: 400; --superhero-body-line-height: 1.5; --superhero-body-color: #ebebeb; --superhero-body-bg: #0f2537; margin: 0; font-family: var(--superhero-body-font-family); font-size: var(--superhero-body-font-size); font-weight: var(--superhero-body-font-weight); line-height: var(--superhero-body-line-height); color: var(--superhero-body-color); text-align: var(--superhero-body-text-align); background-color: var(--superhero-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .superhero-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #ebebeb; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .superhero .btn-primary { color: #fff; background-color: #4c9be8; border-color: #4c9be8; } .superhero .btn-secondary { color: #fff; background-color: #4e5d6c; border-color: #4e5d6c; } .superhero .btn-success { color: #fff; background-color: #5cb85c; border-color: #5cb85c; } .superhero .btn-info { color: #fff; background-color: #5bc0de; border-color: #5bc0de; } .superhero .btn-warning { color: #fff; background-color: #ffc107; border-color: #ffc107; } .superhero .btn-danger { color: #fff; background-color: #d9534f; border-color: #d9534f; } .superhero .btn-light { color: #fff; background-color: #abb6c2; border-color: #abb6c2; } .superhero .btn-dark { color: #fff; background-color: #20374c; border-color: #20374c; } .united { --united-blue: #007bff; --united-indigo: #6610f2; --united-purple: #772953; --united-pink: #e83e8c; --united-red: #df382c; --united-orange: #e95420; --united-yellow: #efb73e; --united-green: #38b44a; --united-teal: #20c997; --united-cyan: #17a2b8; --united-white: #fff; --united-gray: #868e96; --united-gray-dark: #333; --united-gray-100: #f8f9fa; --united-gray-200: #e9ecef; --united-gray-300: #dee2e6; --united-gray-400: #ced4da; --united-gray-500: #aea79f; --united-gray-600: #868e96; --united-gray-700: #495057; --united-gray-800: #333; --united-gray-900: #212529; --united-primary: #e95420; --united-secondary: #aea79f; --united-success: #38b44a; --united-info: #17a2b8; --united-warning: #efb73e; --united-danger: #df382c; --united-light: #e9ecef; --united-dark: #772953; --united-primary-rgb: 233, 84, 32; --united-secondary-rgb: 174, 167, 159; --united-success-rgb: 56, 180, 74; --united-info-rgb: 23, 162, 184; --united-warning-rgb: 239, 183, 62; --united-danger-rgb: 223, 56, 44; --united-light-rgb: 233, 236, 239; --united-dark-rgb: 119, 41, 83; --united-white-rgb: 255, 255, 255; --united-black-rgb: 0, 0, 0; --united-body-color-rgb: 51, 51, 51; --united-body-bg-rgb: 255, 255, 255; --united-font-sans-serif: Ubuntu, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --united-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --united-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --united-body-font-family: var(--united-font-sans-serif); --united-body-font-size: 1rem; --united-body-font-weight: 400; --united-body-line-height: 1.5; --united-body-color: #333; --united-body-bg: #fff; margin: 0; font-family: var(--united-body-font-family); font-size: var(--united-body-font-size); font-weight: var(--united-body-font-weight); line-height: var(--united-body-line-height); color: var(--united-body-color); text-align: var(--united-body-text-align); background-color: var(--united-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .united-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #333; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .united .btn-primary { color: #fff; background-color: #e95420; border-color: #e95420; } .united .btn-secondary { color: #fff; background-color: #aea79f; border-color: #aea79f; } .united .btn-success { color: #fff; background-color: #38b44a; border-color: #38b44a; } .united .btn-info { color: #fff; background-color: #17a2b8; border-color: #17a2b8; } .united .btn-warning { color: #fff; background-color: #efb73e; border-color: #efb73e; } .united .btn-danger { color: #fff; background-color: #df382c; border-color: #df382c; } .united .btn-light { color: #000; background-color: #e9ecef; border-color: #e9ecef; } .united .btn-dark { color: #fff; background-color: #772953; border-color: #772953; } .vapor { --vapor-blue: #1ba2f6; --vapor-indigo: #6610f2; --vapor-purple: #6f42c1; --vapor-pink: #ea39b8; --vapor-red: #e44c55; --vapor-orange: #f1b633; --vapor-yellow: #ffc107; --vapor-green: #3cf281; --vapor-teal: #3f81a2; --vapor-cyan: #32fbe2; --vapor-white: #fff; --vapor-gray: #6c757d; --vapor-gray-dark: #343a40; --vapor-gray-100: #f8f9fa; --vapor-gray-200: #e9ecef; --vapor-gray-300: #dee2e6; --vapor-gray-400: #ced4da; --vapor-gray-500: #adb5bd; --vapor-gray-600: #6c757d; --vapor-gray-700: #495057; --vapor-gray-800: #343a40; --vapor-gray-900: #170229; --vapor-primary: #6f42c1; --vapor-secondary: #ea39b8; --vapor-success: #3cf281; --vapor-info: #1ba2f6; --vapor-warning: #ffc107; --vapor-danger: #e44c55; --vapor-light: #44d9e8; --vapor-dark: #170229; --vapor-primary-rgb: 111, 66, 193; --vapor-secondary-rgb: 234, 57, 184; --vapor-success-rgb: 60, 242, 129; --vapor-info-rgb: 27, 162, 246; --vapor-warning-rgb: 255, 193, 7; --vapor-danger-rgb: 228, 76, 85; --vapor-light-rgb: 68, 217, 232; --vapor-dark-rgb: 23, 2, 41; --vapor-white-rgb: 255, 255, 255; --vapor-black-rgb: 0, 0, 0; --vapor-body-color-rgb: 50, 251, 226; --vapor-body-bg-rgb: 26, 9, 51; --vapor-font-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --vapor-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --vapor-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --vapor-body-font-family: var(--vapor-font-sans-serif); --vapor-body-font-size: 1rem; --vapor-body-font-weight: 400; --vapor-body-line-height: 1.5; --vapor-body-color: #32fbe2; --vapor-body-bg: #1a0933; margin: 0; font-family: var(--vapor-body-font-family); font-size: var(--vapor-body-font-size); font-weight: var(--vapor-body-font-weight); line-height: var(--vapor-body-line-height); color: var(--vapor-body-color); text-align: var(--vapor-body-text-align); background-color: var(--vapor-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .vapor-btn { display: inline-block; font-weight: 400; line-height: 1.5; color: #32fbe2; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 0 solid transparent; padding: 0.375rem 0.75rem; font-size: 1rem; border-radius: 0.15rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .vapor .btn-primary { color: #fff; background-color: #6f42c1; border-color: #6f42c1; box-shadow: 0 0 2px rgba(111, 66, 193, 0.9), 0 0 4px rgba(111, 66, 193, 0.4), 0 0 1rem rgba(111, 66, 193, 0.3), 0 0 4rem rgba(111, 66, 193, 0.1); text-shadow: 0 0 1px rgba(255, 255, 255, 0.3), 0 0 2px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2); } .vapor .btn-secondary { color: #fff; background-color: #ea39b8; border-color: #ea39b8; box-shadow: 0 0 2px rgba(234, 57, 184, 0.9), 0 0 4px rgba(234, 57, 184, 0.4), 0 0 1rem rgba(234, 57, 184, 0.3), 0 0 4rem rgba(234, 57, 184, 0.1); text-shadow: 0 0 1px rgba(255, 255, 255, 0.3), 0 0 2px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2); } .vapor .btn-success { color: #fff; background-color: #3cf281; border-color: #3cf281; box-shadow: 0 0 2px rgba(60, 242, 129, 0.9), 0 0 4px rgba(60, 242, 129, 0.4), 0 0 1rem rgba(60, 242, 129, 0.3), 0 0 4rem rgba(60, 242, 129, 0.1); text-shadow: 0 0 1px rgba(255, 255, 255, 0.3), 0 0 2px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2); } .vapor .btn-info { color: #fff; background-color: #1ba2f6; border-color: #1ba2f6; box-shadow: 0 0 2px rgba(27, 162, 246, 0.9), 0 0 4px rgba(27, 162, 246, 0.4), 0 0 1rem rgba(27, 162, 246, 0.3), 0 0 4rem rgba(27, 162, 246, 0.1); text-shadow: 0 0 1px rgba(255, 255, 255, 0.3), 0 0 2px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2); } .vapor .btn-warning { color: #fff; background-color: #ffc107; border-color: #ffc107; box-shadow: 0 0 2px rgba(255, 193, 7, 0.9), 0 0 4px rgba(255, 193, 7, 0.4), 0 0 1rem rgba(255, 193, 7, 0.3), 0 0 4rem rgba(255, 193, 7, 0.1); text-shadow: 0 0 1px rgba(255, 255, 255, 0.3), 0 0 2px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2); } .vapor .btn-danger { color: #fff; background-color: #e44c55; border-color: #e44c55; box-shadow: 0 0 2px rgba(228, 76, 85, 0.9), 0 0 4px rgba(228, 76, 85, 0.4), 0 0 1rem rgba(228, 76, 85, 0.3), 0 0 4rem rgba(228, 76, 85, 0.1); text-shadow: 0 0 1px rgba(255, 255, 255, 0.3), 0 0 2px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2); } .vapor .btn-light { color: #fff; background-color: #44d9e8; border-color: #44d9e8; box-shadow: 0 0 2px rgba(68, 217, 232, 0.9), 0 0 4px rgba(68, 217, 232, 0.4), 0 0 1rem rgba(68, 217, 232, 0.3), 0 0 4rem rgba(68, 217, 232, 0.1); text-shadow: 0 0 1px rgba(255, 255, 255, 0.3), 0 0 2px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2); } .vapor .btn-dark { color: #fff; background-color: #170229; border-color: #170229; box-shadow: 0 0 2px rgba(111, 66, 193, 0.9), 0 0 4px rgba(111, 66, 193, 0.4), 0 0 1rem rgba(111, 66, 193, 0.3), 0 0 4rem rgba(111, 66, 193, 0.1); text-shadow: 0 0 1px rgba(255, 255, 255, 0.3), 0 0 2px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2); } .yeti { --yeti-blue: #008cba; --yeti-indigo: #6610f2; --yeti-purple: #6f42c1; --yeti-pink: #e83e8c; --yeti-red: #f04124; --yeti-orange: #fd7e14; --yeti-yellow: #e99002; --yeti-green: #43ac6a; --yeti-teal: #20c997; --yeti-cyan: #5bc0de; --yeti-white: #fff; --yeti-gray: #888; --yeti-gray-dark: #333; --yeti-gray-100: #f8f9fa; --yeti-gray-200: #eee; --yeti-gray-300: #dee2e6; --yeti-gray-400: #ccc; --yeti-gray-500: #adb5bd; --yeti-gray-600: #888; --yeti-gray-700: #495057; --yeti-gray-800: #333; --yeti-gray-900: #222; --yeti-primary: #008cba; --yeti-secondary: #eee; --yeti-success: #43ac6a; --yeti-info: #5bc0de; --yeti-warning: #e99002; --yeti-danger: #f04124; --yeti-light: #eee; --yeti-dark: #222; --yeti-primary-rgb: 0, 140, 186; --yeti-secondary-rgb: 238, 238, 238; --yeti-success-rgb: 67, 172, 106; --yeti-info-rgb: 91, 192, 222; --yeti-warning-rgb: 233, 144, 2; --yeti-danger-rgb: 240, 65, 36; --yeti-light-rgb: 238, 238, 238; --yeti-dark-rgb: 34, 34, 34; --yeti-white-rgb: 255, 255, 255; --yeti-black-rgb: 0, 0, 0; --yeti-body-color-rgb: 34, 34, 34; --yeti-body-bg-rgb: 255, 255, 255; --yeti-font-sans-serif: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --yeti-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --yeti-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --yeti-body-font-family: var(--yeti-font-sans-serif); --yeti-body-font-size: 1rem; --yeti-body-font-weight: 400; --yeti-body-line-height: 1.5; --yeti-body-color: #222; --yeti-body-bg: #fff; margin: 0; font-family: var(--yeti-body-font-family); font-size: var(--yeti-body-font-size); font-weight: var(--yeti-body-font-weight); line-height: var(--yeti-body-line-height); color: var(--yeti-body-color); text-align: var(--yeti-body-text-align); background-color: var(--yeti-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .yeti-btn { display: inline-block; font-weight: 300; line-height: 1.5; color: #222; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.375rem 0.5rem; font-size: 1rem; border-radius: 0; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .yeti .btn-primary { color: #fff; background-color: #008cba; border-color: #007ea7; } .yeti .btn-secondary { color: #000; background-color: #eee; border-color: #d6d6d6; } .yeti .btn-success { color: #fff; background-color: #43ac6a; border-color: #3c9b5f; } .yeti .btn-info { color: #fff; background-color: #5bc0de; border-color: #52adc8; } .yeti .btn-warning { color: #fff; background-color: #e99002; border-color: #d28202; } .yeti .btn-danger { color: #fff; background-color: #f04124; border-color: #d83b20; } .yeti .btn-light { color: #000; background-color: #eee; border-color: #d6d6d6; } .yeti .btn-dark { color: #fff; background-color: #222; border-color: #1f1f1f; } .zephyr { --zephyr-blue: #3459e6; --zephyr-indigo: #6610f2; --zephyr-purple: #6f42c1; --zephyr-pink: #d63384; --zephyr-red: #da292e; --zephyr-orange: #f8765f; --zephyr-yellow: #f4bd61; --zephyr-green: #2fb380; --zephyr-teal: #20c997; --zephyr-cyan: #287bb5; --zephyr-white: #fff; --zephyr-gray: #6c757d; --zephyr-gray-dark: #343a40; --zephyr-gray-100: #f8f9fa; --zephyr-gray-200: #e9ecef; --zephyr-gray-300: #dee2e6; --zephyr-gray-400: #ced4da; --zephyr-gray-500: #adb5bd; --zephyr-gray-600: #6c757d; --zephyr-gray-700: #495057; --zephyr-gray-800: #343a40; --zephyr-gray-900: #212529; --zephyr-primary: #3459e6; --zephyr-secondary: #fff; --zephyr-success: #2fb380; --zephyr-info: #287bb5; --zephyr-warning: #f4bd61; --zephyr-danger: #da292e; --zephyr-light: #f8f9fa; --zephyr-dark: #212529; --zephyr-primary-rgb: 52, 89, 230; --zephyr-secondary-rgb: 255, 255, 255; --zephyr-success-rgb: 47, 179, 128; --zephyr-info-rgb: 40, 123, 181; --zephyr-warning-rgb: 244, 189, 97; --zephyr-danger-rgb: 218, 41, 46; --zephyr-light-rgb: 248, 249, 250; --zephyr-dark-rgb: 33, 37, 41; --zephyr-white-rgb: 255, 255, 255; --zephyr-black-rgb: 0, 0, 0; --zephyr-body-color-rgb: 73, 80, 87; --zephyr-body-bg-rgb: 255, 255, 255; --zephyr-font-sans-serif: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; --zephyr-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --zephyr-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); --zephyr-body-font-family: var(--zephyr-font-sans-serif); --zephyr-body-font-size: 1rem; --zephyr-body-font-weight: 400; --zephyr-body-line-height: 1.5; --zephyr-body-color: #495057; --zephyr-body-bg: #fff; margin: 0; font-family: var(--zephyr-body-font-family); font-size: var(--zephyr-body-font-size); font-weight: var(--zephyr-body-font-weight); line-height: var(--zephyr-body-line-height); color: var(--zephyr-body-color); text-align: var(--zephyr-body-text-align); background-color: var(--zephyr-body-bg); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .zephyr-btn { display: inline-block; font-weight: 500; line-height: 1.5; color: #495057; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: transparent; border: 1px solid transparent; padding: 0.5rem 1rem; font-size: 0.875rem; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } .zephyr .btn-primary { color: #fff; background-color: #3459e6; border-color: #3459e6; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .zephyr .btn-secondary { color: #212529; background-color: #fff; border-color: #e6e6e6; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .zephyr .btn-success { color: #fff; background-color: #2fb380; border-color: #2fb380; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .zephyr .btn-info { color: #fff; background-color: #287bb5; border-color: #287bb5; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .zephyr .btn-warning { color: #fff; background-color: #f4bd61; border-color: #f4bd61; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .zephyr .btn-danger { color: #fff; background-color: #da292e; border-color: #da292e; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .zephyr .btn-light { color: #212529; background-color: #f8f9fa; border-color: #dfe0e1; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .zephyr .btn-dark { color: #fff; background-color: #212529; border-color: #212529; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } `,settingsStyles=i$4` .settings-page { font-family: var(--printess-text-font); color: #555555; } .topic { font-size: 22px; font-weight: 500; font-family: var(--printess-header-font); } .card { margin-top: 30px; margin-bottom: 70px; border-bottom: 2px solid var(--printess-green); } .table-header { padding-left: 20px; border-top-right-radius: 4px; border-top-left-radius: 4px; color: #fff; margin-top: 10px; margin-bottom: 0; background-color: var(--printess-green); } .title { font-size: 18px; font-weight: 400; line-height: 50px; margin: 0; } .table-body { padding: 10px 10px 0 20px; font-size: 14px; } dl { display: grid; margin-top: 10px; margin-bottom: 0; grid-template-columns: 110px 1fr; } dt, dd { display: flex; line-height: 25px; margin-left: 0; text-align: left; padding: 10px; align-items: center; } dt { padding-left: 20px; } dd { display: flex; justify-content: space-between; padding-left: 0; } .password-input { color: #555; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid #ccc; background-color: rgba(242,246,219,0.5); padding: 7px 10px; border-radius: 4px; margin-right: 10px; } .hidden { display: none; } .language-tabs { display: flex; flex-direction: row; background-color: rgba(76, 156, 226, 0.1); border-bottom: 1px solid var(--printess-blue); } .lang-tab { padding: 7px 20px; cursor: pointer; display: flex; } .lang-tab.active, .lang-tab:hover { color: var(--printess-blue); } .plus-input { background-color: transparent; border: none; outline: none; width: 30px; text-align: center; font-size: 16px; color: #555; } .jsonTitle { background-color: rgb(208, 4, 155); color: #fff; padding: 12px 20px; margin-top: 30px; font-size: 18px; font-weight: 400; line-height: 25px; border-top-right-radius: 4px; border-top-left-radius: 4px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .jsonText { padding: 12px 20px; min-width: 100%; max-width: 100%; height: 300px; border: 0px; color: #555; outline: none; } #translation-table { background-color: rgba(76, 156, 226, 0.1); border-bottom: 2px solid var(--printess-blue); } #offensive-words { height: 100px; background-color: rgba(242, 246, 219, 0.5); border-bottom: 2px solid var(--printess-green); } .warning { color: rgb(210, 0, 100); text-align: left; width: 100%; font-size: 12px; margin: 10px 0 0; } .button-wrapper { display: flex; flex-direction: row; gap: 10px; margin: 10px 0 30px 0px; } button { padding: 4px 10px; border: none; border-radius: 4px; color: #fff; cursor: pointer; font-family: var(--printess-button-font); font-size: 14px; font-weight: 400; white-space: nowrap; } .settings { padding: 7px 20px; margin: 20px 15px 20px 0px; } .green { background-color: var(--printess-green); } .red { background-color: rgb(210, 0, 100); } .pink { background-color: var(--printess-pink); } .blue { background-color: var(--printess-blue); } .icons { display: flex; flex-direction: row; flex-wrap: wrap; } .icon { margin: 20px; padding-top: 10px; font-size: 12px; } wc-icon { min-width: 20px; height: 20px; } @media (max-width: ${config.mobileDeviceWidth}px) { .topic { font-size: 20px; } .subtopic { font-size: 14px; } .card { width: 100%; margin-bottom: 50px; } .table-header { padding-left: 10px; } .title { font-size: 14px; line-height: 36px; margin: 0; } .table-body { padding: 10px 10px 0 10px; font-size: 12px; } .settings { font-size: 12px; } } `;var __decorate$2b=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcUploadedImage=class extends s$1{static get styles(){return[i$4` .uploaded-image { margin: 20px; height: 100px; z-index: 8; } .img-wrapper { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; } #img-meta { background: var(--printess-lightgreen); width: calc(100% - 40px); text-align: center; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; padding: 0px 20px; position: absolute; bottom: 0px; left: 0px; right: 0px; z-index: 20; } .img-url { cursor: copy; overflow: hidden; text-overflow: ellipsis; } @media (max-width: ${config.mobileDeviceWidth}px) { .uploaded-image { width: auto; height: auto; max-height: 120px; max-width: 100%; } } `]}constructor(e){super(),this.url="https://editor.printess.com/v/nightly/printess-logo.svg",this.url=e}connectedCallback(){super.connectedCallback(),this.style.width="100%"}render(){return x`
user logo
`}};__decorate$2b([e$3({type:String})],WcUploadedImage.prototype,"url",void 0),WcUploadedImage=__decorate$2b([e$4("wc-uploaded-image")],WcUploadedImage);var __decorate$2a=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};const editorVersions=["current stable version","nightly","3.3.1","3.3.2","3.3.3","3.3.4","3.3.5","3.2.32","3.2.31","3.2.30","3.2.29","3.2.28","3.2.25","3.2.24","3.2.23","3.2.22","3.2.21","3.2.20","3.2.19","3.2.18","3.2.17","3.2.16","3.2.15","3.2.14","3.2.13","3.2.12","3.2.11","3.2.10","3.2.9","3.2.8","3.2.7","3.2.6","3.2.5","3.2.4","3.2.3","3.2.2","3.2.1","3.2.0","3.1.0","3.0.0"];let WcPrintessEditorVersion=class extends s$1{constructor(){super(...arguments),this.showDropdown="none",this.saving=!1}static get styles(){return[userProfileStyles,settingsStyles,i$4` .card { background: transparent; margin-bottom: 10px; border-bottom-color: var(--printess-green); } .table-body { display: grid; grid-template-columns: auto 1fr; padding: 10px 10px 10px 20px; gap: 10px; } dt { padding: 0px; } dd { padding: 0px; position: relative; } .card-input { color: #555; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid #ccc; background-color: rgba(242, 246, 219, 0.5); padding: 7px 10px; border-radius: 4px; } .dropdown { position: relative; height: 21px; line-height: 21px; display: flex; justify-content: space-between; align-items: center; } .dropdown-container { clear: both; position: absolute; left: 0; top: 40px; width: calc(100% - 2px); height: 0px; z-index: 999; border-radius: 4px; max-height: 40vh; overflow-y: auto; border: 1px solid #ccc; transition: height .4s ease, visibility .3s ease; background-color: white; } .version-dropdown { overflow: hidden; left: unset; right: 20px; top: 46px; width: 140px; } .dropdown-item { padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ccc; cursor: pointer; font-size: 14px; } .dropdown-item:last-of-type { border: none; } .dropdown-item:hover { background-color: var(--printess-blue); color: white; } .button-wrapper { margin-bottom: 70px; } @media (max-width: ${config.mobileDeviceWidth}px) { .card-input { font-size: 12px; padding: 5px 7px; } .button-wrapper { margin-bottom: 50px; } } `]}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async writeUserSetting(e){const t=await api.writeUserSetting(e);t instanceof ServerErrorResponse$2&&this.showError(t)}async readUserSettings(e){const t=await api.readUserSettings(e);if(t instanceof ServerErrorResponse$2)this.showError(t);else if(t.version)try{this.editorVersion=JSON.parse(t.version)}catch(e){this.editorVersion=t.version}}async deleteUserSetting(){const e=await api.deleteUserSetting({key:"version"});e instanceof ServerErrorResponse$2&&this.showError(e)}connectedCallback(){super.connectedCallback(),this.readUserSettings({keys:["version"]})}toggleDropdown(e){this.showDropdown===e?this.showDropdown="none":this.showDropdown=e}setOption(e){this.editorVersion=e,this.showDropdown="none"}saveEditorVersion(){this.saving=!0,window.setTimeout(()=>{if(!this.editorVersion||"current stable version"===this.editorVersion)return this.deleteUrl(),void(this.saving=!1);this.writeUserSetting({key:"version",json:this.editorVersion}),this.saving=!1},2e3)}deleteUrl(){this.editorVersion=void 0,this.deleteUserSetting()}render(){return x`

Here you can set an editor version that you want your templates to be build on. When you open a template in a different version, a warning will be displayed. This feature can prevent you from breaking your templates.

Editor Version
this.saveEditorVersion()} .loading=${this.saving} loadingText="Saving Editor Version" >
`}};__decorate$2a([e$3({type:String})],WcPrintessEditorVersion.prototype,"showDropdown",void 0),__decorate$2a([e$3({type:Boolean})],WcPrintessEditorVersion.prototype,"saving",void 0),__decorate$2a([e$3({type:String})],WcPrintessEditorVersion.prototype,"editorVersion",void 0),WcPrintessEditorVersion=__decorate$2a([e$4("wc-printess-editor-version")],WcPrintessEditorVersion);var __decorate$29=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcEditorOptions=class extends s$1{constructor(){super(...arguments),this.showDropdown="none",this.resetOptions=!1,this.editorOptions={name:"",version:"version",editor:"nightly",mode:"buyer"}}static get styles(){return[subscriptionStyles,bootstrapStyles,i$4` .card { margin: 0; } .settings { margin: 20px 10px 70px 0; } .template-input { background-color: transparent; border: none; font-size: 14px; font-family: var(--printess-text-font); color: #555; width: 100%; outline: none; } .card-input { background-color: rgba(76, 156, 226, 0.1); } input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; height: 1.2em; width: 1.2em; border-radius: 50em; background: url("https://pro.fontawesome.com/releases/v5.10.0/svgs/light/times.svg") no-repeat 50% 50%; background-size: contain; opacity: 0; pointer-events: none; } input[type="search"]:focus::-webkit-search-cancel-button, input[type="search"]:hover::-webkit-search-cancel-button { opacity: .3; cursor: pointer; pointer-events: all; } dl { grid-template-columns: 160px calc(100% - 160px); } dt { font-size: 14px; } dd { position: relative; } .blue dt:nth-of-type(2n), .blue dd:nth-of-type(2n) { background-color: white; } .collapse-icon { width: 30px; height: 30px; padding: 0; } .dropdown { position: relative; height: 21px; line-height: 21px; display: flex; justify-content: space-between; align-items: center; } .dropdown-container { clear: both; position: absolute; left: 0; top: 46px; width: calc(100% - 22px); height: 0px; z-index: 999; border-radius: 4px; max-height: 40vh; overflow-y: auto; border: 1px solid #ccc; transition: height .4s ease, visibility .3s ease; background-color: white; } .template-dropdown { width: calc(100% - 174px); max-height: 28vh; } .version-dropdown { overflow: hidden; left: unset; right: 20px; top: 46px; width: 140px; } .dropdown-item { padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ccc; cursor: pointer; font-size: 14px; } .dropdown-item:last-of-type { border: none; } .dropdown-item:hover { background-color: var(--printess-blue); color: white; } .color-btn { min-width: 70px; min-height: 25px; margin-right: 10px; } .custom-css { background-color: var(--printess-blue); padding: 0 20px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .css-icon { width: 30px; height: 30px; padding: 0 } .button-wrapper { display: flex; flex-direction: row; gap: 10px; margin: 10px 0 30px 0px; } .spinner, .spinner:after { border-radius: 50%; width: 2em; height: 2em; } .spinner { font-size: 6px; position: relative; border-top: 0.5em solid rgba(255,255,255, 0.2); border-right: 0.5em solid rgba(255,255,255, 0.2); border-bottom: 0.5em solid rgba(255,255,255, 0.2); border-left: 0.5em solid #ffffff; -webkit-transform: translateZ(0); -ms-transform: translateZ(0); transform: translateZ(0); -webkit-animation: load8 1.1s infinite linear; animation: load8 1.1s infinite linear; margin-right: 10px; } @-webkit-keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @media (max-width: ${config.mobileDeviceWidth}px) { dl { grid-template-columns: 1fr; } dt { font-size: 12px; } dd { grid-column: unset; flex-direction: column; } .card-input { font-size: 12px; width: calc(100% - 20px); flex: 1 0 auto; } .dropdown-container { left: 9px; width: calc(100% - 20px); } .template-input { font-size: 12px; } } `]}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async loadTemplates(){const e=await api.loadTemplatesList();e instanceof ServerErrorResponse$2?this.showError(e):(this.templates=e.uts.filter(t=>t.uid===e.uid)[0]?.ts,this.templateSearch=this.templates)}async loadUserSettings(e){const t=await api.readUserSettings(e);t instanceof ServerErrorResponse$2?this.showError(t):t.editorOptions&&(this.editorOptions=JSON.parse(t.editorOptions))}async writeUserSetting(e){const t=await api.writeUserSetting(e);t instanceof ServerErrorResponse$2?this.showError(t):this.setEditorCallback()}async connectedCallback(){super.connectedCallback(),await this.loadUserSettings({keys:["editorOptions"]}),await this.loadTemplates()}getEditorOptions(e){this.callback=e}setEditorCallback(){this.callback&&this.callback(this.editorOptions)}toggleDropdown(e){this.showDropdown===e?this.showDropdown="none":this.showDropdown=e}setOption(e,t){this.editorOptions[e]=t,this.showDropdown="none","name"===e&&(this.nameInput.value=t),this.saveTemplateOptions()}saveTemplateOptions(){const e="version"===this.editorOptions.version?"draft":this.editorOptions.version,t=JSON.stringify({name:this.editorOptions.name,version:e,editor:this.editorOptions.editor});this.writeUserSetting({key:"editorOptions",json:t})}resetEditorOptions(){this.editorOptions={name:"",version:"version",editor:"nightly",mode:"buyer"},this.nameInput.value="",this.saveTemplateOptions()}getTemplateList(e){this.templateSearch=this.templates?.filter(t=>t.n.toLowerCase().includes(e.target.value.toLowerCase())),this.showDropdown="template"}render(){return x`
Template
Editor Version
this.resetEditorOptions()}>
`}};__decorate$29([e$3({type:Array})],WcEditorOptions.prototype,"templates",void 0),__decorate$29([e$3({type:Array})],WcEditorOptions.prototype,"templateSearch",void 0),__decorate$29([e$3({type:String})],WcEditorOptions.prototype,"showDropdown",void 0),__decorate$29([e$3({type:Boolean})],WcEditorOptions.prototype,"resetOptions",void 0),__decorate$29([e$3({type:Object})],WcEditorOptions.prototype,"editorOptions",void 0),__decorate$29([i$1("input#template-name-input")],WcEditorOptions.prototype,"nameInput",void 0),WcEditorOptions=__decorate$29([e$4("wc-editor-options")],WcEditorOptions);const sansserifFonts=["Lato","Neucha","'Noto Sans'","Nunito","Roboto","'Source Sans Pro'","system-ui","Ubuntu"],bsThemes={default:{primary:{font:"#ffffff",btn:"#007bff",hover:"#0b5ed7"},secondary:{font:"#ffffff",btn:"#6c757d",hover:"#5c636a"},success:{font:"#ffffff",btn:"#198754",hover:"#157347"},danger:{font:"#ffffff",btn:"#dc3545",hover:"#bb2d3b"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"}},cerulean:{primary:{font:"#ffffff",btn:"#2fa4e7",hover:"#288bc4"},secondary:{font:"#495057",btn:"#e9ecef",hover:"#eceff1"},success:{font:"#ffffff",btn:"#73a839",hover:"#628f30"},danger:{font:"#ffffff",btn:"#c71c22",hover:"#a9181d"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"}},cyborg:{primary:{font:"#ffffff",btn:"#2a9fd6",hover:"#2487b6"},secondary:{font:"#ffffff",btn:"#555555",hover:"#484848"},success:{font:"#ffffff",btn:"#77b300",hover:"#659800"},danger:{font:"#ffffff",btn:"#c00",hover:"#ad0000"},light:{font:"#ffffff",btn:"#222222",hover:"#1d1d1d"}},litera:{primary:{font:"#ffffff",btn:"#4582ec",hover:"#3b6fc9"},secondary:{font:"#ffffff",btn:"#adb5bd",hover:"#939aa1"},success:{font:"#ffffff",btn:"#02b875",hover:"#029c63"},danger:{font:"#ffffff",btn:"#d9534f",hover:"#b84743"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"}},lumen:{primary:{font:"#ffffff",btn:"#158cba",hover:"#158cba"},secondary:{font:"#000000",btn:"#f0f0f0",hover:"#f0f0f0"},success:{font:"#ffffff",btn:"#28b62c",hover:"#28b62c"},danger:{font:"#ffffff",btn:"#ff4136",hover:"#ff4136"},light:{font:"#000000",btn:"#f6f6f6",hover:"#f6f6f6"}},materia:{primary:{font:"#ffffff",btn:"#2196f3",hover:"#1d84d6"},secondary:{font:"#000000",btn:"#ffffff",hover:"#e0e0e0"},success:{font:"#ffffff",btn:"#4caf50",hover:"#439a46"},danger:{font:"#ffffff",btn:"#e51c23",hover:"#ca191f"},light:{font:"#000000",btn:"#f8f9fa",hover:"#dadbdc"}},morph:{primary:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"},secondary:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"},success:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"},danger:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"},light:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"}},quartz:{primary:{font:"#ffffff",btn:"#e83283",hover:"#c52b6f"},secondary:{font:"#ffffff",btn:"#ffffff66",hover:"#ffffff7d"},success:{font:"#ffffff",btn:"#41d7a7",hover:"#37b78e"},danger:{font:"#ffffff",btn:"#fd7e14",hover:"#d76b11"},light:{font:"#000000",btn:"#e9e9e8",hover:"#ececeb"}},sandstone:{primary:{font:"#ffffff",btn:"#325d88",hover:"#2b4f74"},secondary:{font:"#ffffff",btn:"#8e8c84",hover:"#797770"},success:{font:"#ffffff",btn:"#93c54b",hover:"#7da740"},danger:{font:"#ffffff",btn:"#d9534f",hover:"#b84743"},light:{font:"#000000",btn:"#f8f5f0",hover:"#f9f7f2"}},sketchy:{primary:{font:"#ffffff",btn:"#333333",hover:"#2b2b2b"},secondary:{font:"#ffffff",btn:"#555555",hover:"#484848"},success:{font:"#ffffff",btn:"#28a745",hover:"#228e3b"},danger:{font:"#ffffff",btn:"#dc3545",hover:"#bb2d3b"},light:{font:"#000000",btn:"#ffffff",hover:"white"}},superhero:{primary:{font:"#ffffff",btn:"#4c9be8",hover:"#4184c5"},secondary:{font:"#ffffff",btn:"#4e5d6c",hover:"#424f5c"},success:{font:"#ffffff",btn:"#5cb85c",hover:"#4e9c4e"},danger:{font:"#ffffff",btn:"#d9534f",hover:"#b84743"},light:{font:"#ffffff",btn:"#abb6c2",hover:"#919ba5"}},united:{primary:{font:"#ffffff",btn:"#e95420",hover:"#c6471b"},secondary:{font:"#ffffff",btn:"#aea79f",hover:"#948e87"},success:{font:"#ffffff",btn:"#38b44a",hover:"#30993f"},danger:{font:"#ffffff",btn:"#df382c",hover:"#be3025"},light:{font:"#000000",btn:"#e9ecef",hover:"#eceff1"}},vapor:{primary:{font:"#ffffff",btn:"#6f42c1",hover:"#5e38a4"},secondary:{font:"#ffffff",btn:"#ea39b8",hover:"#c7309c"},success:{font:"#ffffff",btn:"#3cf281",hover:"#33ce6e"},danger:{font:"#ffffff",btn:"#e44c55",hover:"#c24148"},light:{font:"#ffffff",btn:"#44d9e8",hover:"#3ab8c5"}}},bsStyles={default:{primary:{font:"#ffffff",btn:"#007bff",hover:"#0b5ed7"},secondary:{font:"#ffffff",btn:"#6c757d",hover:"#5c636a"},success:{font:"#ffffff",btn:"#198754",hover:"#157347"},danger:{font:"#ffffff",btn:"#dc3545",hover:"#bb2d3b"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"},color:"#212529",background:"#ffffff",font:"-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'",monospace:"SFMono-Regular",sansserif:"system-ui"},cerulean:{primary:{font:"#ffffff",btn:"#2fa4e7",hover:"#288bc4"},secondary:{font:"#495057",btn:"#e9ecef",hover:"#eceff1"},success:{font:"#ffffff",btn:"#73a839",hover:"#628f30"},danger:{font:"#ffffff",btn:"#c71c22",hover:"#a9181d"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"},color:"#2fa4e7",background:"#ffffff",font:'system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',monospace:"SFMono-Regular",sansserif:"system-ui"},cyborg:{primary:{font:"#ffffff",btn:"#2a9fd6",hover:"#2487b6"},secondary:{font:"#ffffff",btn:"#555555",hover:"#484848"},success:{font:"#ffffff",btn:"#77b300",hover:"#659800"},danger:{font:"#ffffff",btn:"#c00",hover:"#ad0000"},light:{font:"#ffffff",btn:"#222222",hover:"#1d1d1d"},color:"#ffffff",background:"#060606",font:'Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif',monospace:"SFMono-Regular",sansserif:"Roboto"},litera:{primary:{font:"#ffffff",btn:"#4582ec",hover:"#3b6fc9"},secondary:{font:"#ffffff",btn:"#adb5bd",hover:"#939aa1"},success:{font:"#ffffff",btn:"#02b875",hover:"#029c63"},danger:{font:"#ffffff",btn:"#d9534f",hover:"#b84743"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"},color:"#343a40",background:"#ffffff",font:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',monospace:"SFMono-Regular",sansserif:"system-ui"},lumen:{primary:{font:"#ffffff",btn:"#158cba",hover:"#158cba"},secondary:{font:"#000000",btn:"#f0f0f0",hover:"#f0f0f0"},success:{font:"#ffffff",btn:"#28b62c",hover:"#28b62c"},danger:{font:"#ffffff",btn:"#ff4136",hover:"#ff4136"},light:{font:"#000000",btn:"#f6f6f6",hover:"#f6f6f6"},color:"#222222",background:"#ffffff",font:'"Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',monospace:"SFMono-Regular",sansserif:"'Source Sans Pro'"},materia:{primary:{font:"#ffffff",btn:"#2196f3",hover:"#1d84d6"},secondary:{font:"#000000",btn:"#ffffff",hover:"#e0e0e0"},success:{font:"#ffffff",btn:"#4caf50",hover:"#439a46"},danger:{font:"#ffffff",btn:"#e51c23",hover:"#ca191f"},light:{font:"#000000",btn:"#f8f9fa",hover:"#dadbdc"},color:"#444444",background:"#ffffff",font:'Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif',monospace:"SFMono-Regular",sansserif:"Roboto"},morph:{primary:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"},secondary:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"},success:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"},danger:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"},light:{font:"#7b8ab8",btn:"#d9e3f1",hover:"#d9e3f1"},color:"#485785",background:"#d9e3f1",font:'Nunito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',monospace:"SFMono-Regular",sansserif:"Nunito"},quartz:{primary:{font:"#ffffff",btn:"#e83283",hover:"#c52b6f"},secondary:{font:"#ffffff",btn:"#ffffff66",hover:"#ffffff7d"},success:{font:"#ffffff",btn:"#41d7a7",hover:"#37b78e"},danger:{font:"#ffffff",btn:"#fd7e14",hover:"#d76b11"},light:{font:"#000000",btn:"#e9e9e8",hover:"#ececeb"},color:"#ffffff",background:"linear-gradient(90deg, #33b7e2, #5e62b0, #dc307c)",font:'system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',monospace:"SFMono-Regular",sansserif:"system-ui"},sandstone:{primary:{font:"#ffffff",btn:"#325d88",hover:"#2b4f74"},secondary:{font:"#ffffff",btn:"#8e8c84",hover:"#797770"},success:{font:"#ffffff",btn:"#93c54b",hover:"#7da740"},danger:{font:"#ffffff",btn:"#d9534f",hover:"#b84743"},light:{font:"#000000",btn:"#f8f5f0",hover:"#f9f7f2"},color:"#3e3f3a",background:"#ffffff",font:'Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',monospace:"SF-Mono-Regular",sansserif:"Roboto"},sketchy:{primary:{font:"#ffffff",btn:"#333333",hover:"#2b2b2b"},secondary:{font:"#ffffff",btn:"#555555",hover:"#484848"},success:{font:"#ffffff",btn:"#28a745",hover:"#228e3b"},danger:{font:"#ffffff",btn:"#dc3545",hover:"#bb2d3b"},light:{font:"#000000",btn:"#ffffff",hover:"white"},color:"#212529",background:"#ffffff",font:'Neucha, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',monospace:"SFMono-Regular",sansserif:"Neucha"},superhero:{primary:{font:"#ffffff",btn:"#4c9be8",hover:"#4184c5"},secondary:{font:"#ffffff",btn:"#4e5d6c",hover:"#424f5c"},success:{font:"#ffffff",btn:"#5cb85c",hover:"#4e9c4e"},danger:{font:"#ffffff",btn:"#d9534f",hover:"#b84743"},light:{font:"#ffffff",btn:"#abb6c2",hover:"#919ba5"},color:"#ebebeb",background:"#0f2537",font:'Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',monospace:"SFMono-Regular",sansserif:"Lato"},united:{primary:{font:"#ffffff",btn:"#e95420",hover:"#c6471b"},secondary:{font:"#ffffff",btn:"#aea79f",hover:"#948e87"},success:{font:"#ffffff",btn:"#38b44a",hover:"#30993f"},danger:{font:"#ffffff",btn:"#df382c",hover:"#be3025"},light:{font:"#000000",btn:"#e9ecef",hover:"#eceff1"},color:"#333333",background:"#ffffff",font:'Ubuntu, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',monospace:"SFMono-Regular",sansserif:"Ubuntu"},vapor:{primary:{font:"#ffffff",btn:"#6f42c1",hover:"#5e38a4"},secondary:{font:"#ffffff",btn:"#ea39b8",hover:"#c7309c"},success:{font:"#ffffff",btn:"#3cf281",hover:"#33ce6e"},danger:{font:"#ffffff",btn:"#e44c55",hover:"#c24148"},light:{font:"#ffffff",btn:"#44d9e8",hover:"#3ab8c5"},color:"#32fbe2",background:"linear-gradient(#17082e 0%, #1a0933 7%, #1a0933 80%, #0c1f4c 100%)",font:'Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',monospace:"SFMono-Regular",sansserif:"Lato"}};var __decorate$28=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcDialogResetBootstrapStyles=class extends s$1{static get styles(){return[dialogStyles$1,i$4` .modal-wrapper { height: auto; width: 50vmin; } .modal-content { padding-bottom: 35px; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: auto; text-align: justify; } .attention-header { font-weight: 700; color: var(--printess-red); margin-top: 10px; display: flex; justify-content: center; } .button-wrapper { display: flex; flex-direction: row; justify-content: space-evenly; align-items: center; width: 100%; } .side-note { font-size: 14px; font-family: var(--printess-text-font); padding: 0px 20px; margin: 20px; border-top: 3px solid var(--dialog-warning-red); border-bottom: 3px solid var(--dialog-warning-red); border-radius: 4px; text-align: center; width: 90%; line-height: 25px; } @media (max-width: ${config.mobileDeviceWidth}px) { .modal-wrapper { width: 90vmin; } } `]}constructor(){super(),this.backdrop=new WcBackdrop}showDialog(e){this.callback=e,document.body.appendChild(this.backdrop),document.body.appendChild(this)}closeDialog(e){document.body.removeChild(this.backdrop),document.body.removeChild(this),this.callback&&this.callback(e)}render(){return x` `}};WcDialogResetBootstrapStyles=__decorate$28([e$4("wc-dialog-reset-bootstrap-styles")],WcDialogResetBootstrapStyles);const colorPickerStyles=i$4` .clr-picker { display:none; flex-wrap:wrap; position:absolute; width:200px; z-index:1000; border-radius:4px; background-color:#fff; justify-content:space-between; box-shadow:0 0 5px rgba(0,0,0,.05),0 5px 20px rgba(0,0,0,.1); -moz-user-select:none; -webkit-user-select:none; user-select:none; } .clr-picker.clr-open { display:flex; } .clr-dark { background-color:#444; } .clr-gradient { position:relative; width:100%; height:100px; margin-bottom:15px; border-radius:3px 3px 0 0; background-image:linear-gradient(rgba(0,0,0,0),#000),linear-gradient(90deg,#fff,currentColor); cursor:pointer; } .clr-marker { position:absolute; width:12px; height:12px; margin:-6px 0 0 -6px; border:1px solid #fff; border-radius:50%; background-color:currentColor; cursor:pointer; } .clr-picker input[type=range]::-webkit-slider-runnable-track { width:100%; height:8px; } .clr-picker input[type=range]::-webkit-slider-thumb { width:8px; height:8px; -webkit-appearance:none; } .clr-picker input[type=range]::-moz-range-track { width:100%; height:8px; border:0; } .clr-picker input[type=range]::-moz-range-thumb { width:8px; height:8px; border:0; } .clr-hue { background-image:linear-gradient(to right,red 0,#ff0 16.66%,#0f0 33.33%,#0ff 50%,#00f 66.66%,#f0f 83.33%,red 100%); } .clr-alpha,.clr-hue { position:relative; width:calc(100% - 40px); height:8px; margin:5px 20px; border-radius:4px; } .clr-alpha span { display:block; height:100%; width:100%; border-radius:inherit; background-image:linear-gradient(90deg,rgba(0,0,0,0),currentColor); } .clr-alpha input,.clr-hue input { position:absolute; width:calc(100% + 16px); height:16px; left:-8px; top:-4px; margin:0; background-color:transparent; opacity:0; cursor:pointer; appearance:none; -webkit-appearance:none; } .clr-alpha div,.clr-hue div { position:absolute; width:16px; height:16px; left:0; top:0; margin:-4px 0 0 -8px; border:2px solid #fff; border-radius:50%; background-color:currentColor; box-shadow:0 0 1px #888; pointer-events:none; } .clr-alpha div:before { content:''; position:absolute; height:100%; width:100%; left:0; top:0; border-radius:50%; background-color:currentColor; } .clr-swatches { order:2; width:calc(100% - 40px); margin:0 20px; } .clr-swatches div { display:flex; flex-wrap:wrap; padding-bottom:12px; justify-content:center; } .clr-swatches button { position:relative; width:20px; height:20px; margin:0 8px 6px 0; border:0; border-radius:50%; color:inherit; text-indent:-1000px; white-space:nowrap; overflow:hidden; cursor:pointer; } .clr-swatches button:last-child,.clr-swatches button:nth-child(6n) { margin-right:0; } .clr-swatches button:after { content:''; display:block; position:absolute; width:100%; height:100%; left:0; top:0; border-radius:inherit; background-color:currentColor; box-shadow:inset 0 0 0 1px rgba(0,0,0,.1); } .clr-dark .clr-swatches button:after { box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}input.clr-color { order:1; width:120px; height:32px; margin:15px 20px 15px 0; padding:0 15px; border:1px solid #ddd; border-radius:16px; color:#444; background-color:#fff; font-family:sans-serif; font-size:14px; text-align:left; box-shadow:none; } .clr-dark input.clr-color { color:#fff; border-color:#777; background-color:#555}input.clr-color:focus { outline:0; border:1px solid #aaa; } .clr-preview { position:relative; width:32px; height:32px; margin:15px 0 20px 20px; border:0; border-radius:50%; overflow:hidden; cursor:pointer; } .clr-preview:after,.clr-preview:before { content:''; position:absolute; height:100%; width:100%; left:0; top:0; border:1px solid #fff; border-radius:50%; } .clr-preview:after { border:0; background-color:currentColor; box-shadow:inset 0 0 0 1px rgba(0,0,0,.1); } .clr-dark .clr-preview:after { box-shadow:inset 0 0 0 1px rgba(255,255,255,.5); } .clr-alpha div,.clr-color,.clr-hue div,.clr-marker { box-sizing:border-box; } .clr-field { display:inline-block; position:relative; color:#000; } .clr-field button { position:absolute; width:30px; height:100%; right:0; top:50%; transform:translateY(-50%); border:0; color:inherit; text-indent:-1000px; white-space:nowrap; overflow:hidden; pointer-events:none; } .clr-field button:after { content:''; display:block; position:absolute; width:100%; height:100%; left:0; top:0; border-radius:inherit; background-color:currentColor; box-shadow:inset 0 0 1px rgba(0,0,0,.5); } .clr-alpha,.clr-alpha div,.clr-field button,.clr-preview:before,.clr-swatches button { background-image:repeating-linear-gradient(45deg,#aaa 25%,transparent 25%,transparent 75%,#aaa 75%,#aaa),repeating-linear-gradient(45deg,#aaa 25%,#fff 25%,#fff 75%,#aaa 75%,#aaa); background-position:0 0,4px 4px; background-size:8px 8px; } .clr-marker:focus { outline:0; } .clr-keyboard-nav .clr-alpha input:focus+div,.clr-keyboard-nav .clr-hue input:focus+div,.clr-keyboard-nav .clr-marker:focus { outline:0; box-shadow:0 0 0 2px #1e90ff,0 0 2px 2px #fff} `;var __decorate$27=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcColorPickerComplex=class extends s$1{static get styles(){return[colorPickerStyles,bootstrapStyles,i$4` .card-input { color: #555; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid #ccc; padding: 7px 10px; border-radius: 4px; } .color-container { display: grid; grid-gap: 10px; grid-template-columns: 1fr 1fr 1fr 1fr 1fr; } .color-wrapper { display: flex; flex-direction: column; } .preview-button { display: flex; justify-content: center; align-items: center; font-size: 12px; margin-bottom: 10px; } .color-palette { display: flex; flex-direction: row; border: 1px solid rgb(204, 204, 204); border-radius: 5px; padding: 5px 7px; margin-bottom: 4px; background-color: rgba(255, 255, 255, 0.8); } .color-box { min-width: 40px; min-height: 25px; position: relative; } .color-hex { position: relative; flex: 1 0 25px; font-weight: 400; font-family: var(--printess-text-font); } .color-box:last-of-type { margin-right: 0; } .color-picker { outline: none; border: none; min-width: 30px; } input.color-text { background-color: transparent; border: none; position: relative; flex: 1 1 25px; font-weight: 400; font-family: var(--printess-text-font); font-size: 14px; color: rgb(85, 85, 85); width: 100%; } input[type="color"] { position: absolute; top: 0; left: 0; cursor: pointer; width: 30px; height: 25px; -webkit-appearance: none; appearance: none; } input[type=color i] { padding: 0; border-color: transparent; border-radius: 50%; color: transparent; background-color: transparent; } .color-box > button { position: absolute; top: 0px; left: 0px; z-index: 9; width: 30px; height: 25px; pointer-events: none; border-radius: 4px; border: 1px solid rgb(204, 204, 204); } .color-btn > button { height: 30px; width: 100%; } @media (max-width: ${config.mobileDeviceWidth}px) { .color-container { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr 1fr 1fr 1fr; } } `]}constructor(e,t,o){super(),this.theme="default",this.font="system-ui",this.names=["primary","secondary","success","danger","light"],this.colorSet={primary:{font:"#ffffff",btn:"#007bff",hover:"#0b5ed7"},secondary:{font:"#ffffff",btn:"#6c757d",hover:"#5c636a"},success:{font:"ffffff",btn:"#198754",hover:"#157347"},danger:{font:"#ffffff",btn:"#dc3545",hover:"#bb2d3b"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"}},this.theme=e,this.font=t,this.colorSet=o}returnColors(e){this.callback=e}setColors(e,t,o){const r=this.colorSet;r[this.names[o]][e]=t,this.colorSet={...r}}setButtonColor(e,t){e.target.style.background=t,e.target.style.borderColor=t}render(){const e=this.theme;return x`
${this.colorSet&&Object.entries(this.colorSet).map((t,o)=>x`
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("font",e.target.value,o)} >
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("font",e.target.value,o)} />
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("btn",e.target.value,o)} >
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("btn",e.target.value,o)} />
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("hover",e.target.value,o)} >
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("hover",e.target.value,o)} />
`)}
`}};__decorate$27([e$3({attribute:!0,type:String})],WcColorPickerComplex.prototype,"theme",void 0),__decorate$27([e$3({attribute:!0,type:String})],WcColorPickerComplex.prototype,"font",void 0),__decorate$27([e$3({type:Array})],WcColorPickerComplex.prototype,"names",void 0),__decorate$27([e$3({attribute:!0,type:Object})],WcColorPickerComplex.prototype,"colorSet",void 0),WcColorPickerComplex=__decorate$27([e$4("wc-color-picker-complex")],WcColorPickerComplex);var __decorate$26=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcToolbarColors=class extends s$1{static get styles(){return[colorPickerStyles,bootstrapStyles,i$4` .color-container { color: #555; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid #ccc; padding: 7px 10px; border-radius: 4px; display: grid; grid-gap: 10px; grid-template-columns: 1fr 1fr 1fr; } .color-palette { display: flex; flex-direction: row; border: 1px solid rgb(204, 204, 204); border-radius: 5px; padding: 5px 7px; background-color: rgba(255, 255, 255, 0.8); } .color-box { min-width: 40px; min-height: 25px; position: relative; } .color-hex { position: relative; flex: 1 0 25px; font-weight: 400; font-family: var(--printess-text-font); } .color-box:last-of-type { margin-right: 0; } .color-picker { outline: none; border: none; min-width: 30px; } input { position: absolute; top: 0; left: 0; cursor: pointer; width: 30px; height: 25px; -webkit-appearance: none; appearance: none; } input[type=color i] { padding: 0; border-color: transparent; border-radius: 50%; color: transparent; background-color: transparent; } .color-box > button { position: absolute; top: 0px; left: 0px; z-index: 9; width: 30px; height: 25px; pointer-events: none; border-radius: 4px; border: 1px solid rgb(204, 204, 204); } .color-btn > button { height: 30px; width: 100%; } @media (max-width: ${config.mobileDeviceWidth}px) { .color-container { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr 1fr; } } `]}constructor(e){super(),this.colorSet={font:"#ffffff",background:"#6c757d",active:"#525960"},this.colorSet=e}returnColors(e){this.callback=e}setColors(e,t){const o=this.colorSet;o[e]=t,this.colorSet={...o}}render(){const e=this.colorSet;return x`
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("font",e.target.value)} >
Font Color
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("background",e.target.value)} >
Background Color
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("active",e.target.value)} >
Active Tab Color
`}};__decorate$26([e$3({attribute:!0,type:Object})],WcToolbarColors.prototype,"colorSet",void 0),WcToolbarColors=__decorate$26([e$4("wc-toolbar-colors")],WcToolbarColors);var __decorate$25=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcBackgroundColors=class extends s$1{static get styles(){return[colorPickerStyles,bootstrapStyles,i$4` .color-container { color: #555; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid #ccc; padding: 7px 10px; border-radius: 4px; display: grid; grid-gap: 10px; grid-template-columns: 1fr 1fr; } .color-palette { display: flex; flex-direction: row; border: 1px solid rgb(204, 204, 204); border-radius: 5px; padding: 5px 7px; background-color: rgba(255, 255, 255, 0.8); } .color-box { min-width: 40px; min-height: 25px; position: relative; } .color-hex { position: relative; flex: 1 0 25px; font-weight: 400; font-family: var(--printess-text-font); } .color-box:last-of-type { margin-right: 0; } .color-picker { outline: none; border: none; min-width: 30px; } input { position: absolute; top: 0; left: 0; cursor: pointer; width: 30px; height: 25px; -webkit-appearance: none; appearance: none; } input[type=color i] { padding: 0; border-color: transparent; border-radius: 50%; color: transparent; background-color: transparent; } .color-box > button { position: absolute; top: 0px; left: 0px; z-index: 9; width: 30px; height: 25px; pointer-events: none; border-radius: 4px; border: 1px solid rgb(204, 204, 204); } .color-btn > button { height: 30px; width: 100%; } @media (max-width: ${config.mobileDeviceWidth}px) { .color-container { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } } `]}constructor(e){super(),this.colorSet={pagebar:"#ffffff",background:"#ffffff"},this.colorSet=e}returnColors(e){this.callback=e}setColors(e,t){const o=this.colorSet;o[e]=t,this.colorSet={...o}}render(){const e=this.colorSet;return x`
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("pagebar",e.target.value)} >
Pagebar Color
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("background",e.target.value)} >
Properties Background
`}};__decorate$25([e$3({attribute:!0,type:Object})],WcBackgroundColors.prototype,"colorSet",void 0),WcBackgroundColors=__decorate$25([e$4("wc-background-colors")],WcBackgroundColors);var __decorate$24=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcMobileColors=class extends s$1{static get styles(){return[colorPickerStyles,bootstrapStyles,i$4` .color-container { color: #555; font-family: var(--printess-text-font); font-size: 14px; width: 100%; outline: none; border: 1px solid #ccc; padding: 7px 10px; border-radius: 4px; display: grid; grid-gap: 10px; grid-template-columns: 1fr 1fr; } .color-palette { display: flex; flex-direction: row; border: 1px solid rgb(204, 204, 204); border-radius: 5px; padding: 5px 7px; background-color: rgba(255, 255, 255, 0.8); } .color-box { min-width: 40px; min-height: 25px; position: relative; } .color-hex { position: relative; flex: 1 0 25px; font-weight: 400; font-family: var(--printess-text-font); } .color-box:last-of-type { margin-right: 0; } .color-picker { outline: none; border: none; min-width: 30px; } input { position: absolute; top: 0; left: 0; cursor: pointer; width: 30px; height: 25px; -webkit-appearance: none; appearance: none; } input[type=color i] { padding: 0; border-color: transparent; border-radius: 50%; color: transparent; background-color: transparent; } .color-box > button { position: absolute; top: 0px; left: 0px; z-index: 9; width: 30px; height: 25px; pointer-events: none; border-radius: 4px; border: 1px solid rgb(204, 204, 204); } .color-btn > button { height: 30px; width: 100%; } @media (max-width: ${config.mobileDeviceWidth}px) { .color-container { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } } `]}constructor(e){super(),this.colorSet={panel:"#f8f8f8",buttonText:"#444444"},this.colorSet=e}returnColors(e){this.callback=e}setColors(e,t){const o=this.colorSet;o[e]=t,this.colorSet={...o}}render(){const e=this.colorSet;return x`
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("buttonText",e.target.value)} >
Button Text Color
this.callback&&this.callback(this.colorSet)} @input=${e=>this.setColors("panel",e.target.value)} >
Background
`}};__decorate$24([e$3({attribute:!0,type:Object})],WcMobileColors.prototype,"colorSet",void 0),WcMobileColors=__decorate$24([e$4("wc-mobile-colors")],WcMobileColors);var __decorate$23=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcAceEditor=class extends s$1{constructor(e,t,o){super(),this.key="",this.text="",this.mode="json",this.key=e,this.text=t,this.mode=o,this.attachShadow({mode:"open"}),this.shadowRoot?.appendChild(this.getTemplate())}getTemplate(){const e=document.createElement("template");return e.innerHTML='\n
\n
\n ',e.content.cloneNode(!0)}connectedCallback(){const e=this.key,t=this.mode,o=this.shadowRoot?.querySelector(".codeSnippet"),r=window.ace.edit(o,{theme:"ace/theme/tomorrow",mode:`ace/mode/${t}`,value:this.text,showPrintMargin:!1,readOnly:!1,fontSize:12,maxLines:30,minLines:"css"===t?10:1,highlightActiveLine:!0,highlightGutterLine:!1});r.on("blur",async function(){const o=r.getValue();if("json"===t)try{JSON.parse(o),sessionStorage.setItem(`translation.${e}`,o)}catch(e){console.error(e),alert(e)}if("css"===t)try{sessionStorage.setItem("customCss",o)}catch(e){console.log(e),alert(e)}}),r.renderer.attachToShadowRoot()}};__decorate$23([e$3({type:String})],WcAceEditor.prototype,"key",void 0),__decorate$23([e$3({type:String})],WcAceEditor.prototype,"text",void 0),__decorate$23([e$3({type:String})],WcAceEditor.prototype,"mode",void 0),WcAceEditor=__decorate$23([e$4("wc-ace-editor")],WcAceEditor);var __decorate$22=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcAdvancedStyles=class extends s$1{constructor(){super(...arguments),this.customCss="",this.selectedTheme="default",this.saving=!1}static get styles(){return[subscriptionStyles,bootstrapStyles,i$4` .card { margin: 0; } .settings { margin: 20px 10px 50px 0; } button.settings.red { display: flex; border: none; background-color: var(--printess-red); } button.settings.red:hover { background-color: var(--printess-redHover); } .custom-css { background-color: var(--printess-red); padding: 0 20px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .folder-button { background-color: transparent; border: none; padding: 2px 7px; } .pulse { box-shadow: 0 0 0 0 rgba(255, 255, 255, 1); animation: pulse-white 1s cubic-bezier(0.4, 0, 1, 1) infinite; } @keyframes pulse-white { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } } .css-icon { width: 30px; height: 30px; padding: 0 } #css-file { display: none; } .spinner, .spinner:after { border-radius: 50%; width: 2em; height: 2em; } .spinner { font-size: 6px; position: relative; border-top: 0.5em solid rgba(255,255,255, 0.2); border-right: 0.5em solid rgba(255,255,255, 0.2); border-bottom: 0.5em solid rgba(255,255,255, 0.2); border-left: 0.5em solid #ffffff; -webkit-transform: translateZ(0); -ms-transform: translateZ(0); transform: translateZ(0); -webkit-animation: load8 1.1s infinite linear; animation: load8 1.1s infinite linear; margin-right: 10px; } @-webkit-keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } `]}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async setSelectedTheme(e){this.selectedTheme=e;const t="customCssUrl"+("default"===this.selectedTheme?"":":"+this.selectedTheme);await this.loadUserSettings({keys:[t]})}async uploadCss(e){let t="customCss.css";"default"!==this.selectedTheme&&(t=await sha1hex$1(this.selectedTheme)+"_customCss.css");const o=await api.uploadFile(e,t);if(o){const e=JSON.stringify(o),t="default"===this.selectedTheme?"":":"+this.selectedTheme;this.writeUserSetting({key:"customCssUrl"+t,json:e})}}async loadUserSettings(e){const t=await api.readUserSettings(e);if(t instanceof ServerErrorResponse$2)this.showError(t);else{const e="customCssUrl"+("default"===this.selectedTheme?"":":"+this.selectedTheme);if(t[e]){const o=JSON.parse(t[e]),r=await fetch(o+"?param="+Math.random());let i="";r.ok&&(i=await r.text()),this.customCss=i}else this.customCss=""}}async writeUserSetting(e){const t=await api.writeUserSetting(e);t instanceof ServerErrorResponse$2&&this.showError(t)}connectedCallback(){sessionStorage.clear(),super.connectedCallback();const e="customCssUrl"+("default"===this.selectedTheme?"":":"+this.selectedTheme);this.loadUserSettings({keys:[e]})}loadAceEditor(){const e=Object.keys(sessionStorage).indexOf("customCss")>-1?sessionStorage.getItem("customCss"):this.customCss;return new WcAceEditor("custom",e||"","css")}readFile(){const e=new FileReader;e.onload=e=>this.customCss=e.target.result;const t=this.jsFile;t&&e.readAsText(t.files[0])}getStylesheet(e){const t=new Blob([`${e}`],{type:"text/css"});this.uploadCss(t)}saveCustomCss(){this.saving=!0;const e=Object.keys(sessionStorage).indexOf("customCss")>-1?sessionStorage.getItem("customCss"):this.customCss;this.customCss=e||"",this.getStylesheet(e||""),window.setTimeout(()=>{sessionStorage.removeItem("customCss"),this.saving=!1},2e3)}render(){return x`

Custom CSS ${"default"===this.selectedTheme?"for default Theme":"for Theme "+this.selectedTheme}

${this.loadAceEditor()}
`}};__decorate$22([e$3({type:String})],WcAdvancedStyles.prototype,"customCss",void 0),__decorate$22([e$3({type:String})],WcAdvancedStyles.prototype,"selectedTheme",void 0),__decorate$22([e$3({type:Boolean})],WcAdvancedStyles.prototype,"saving",void 0),__decorate$22([i$1("#css-file")],WcAdvancedStyles.prototype,"jsFile",void 0),WcAdvancedStyles=__decorate$22([e$4("wc-advanced-styles")],WcAdvancedStyles);var __decorate$21=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcBootstrapStyles=class extends s$1{static get styles(){return[subscriptionStyles,bootstrapStyles,i$4` .card { margin: 0; } select { font-size: 12px; min-width: 100px; margin-left: 10px; padding: 2px 15px; border-radius: 4px; font-weight: 400; text-align: center; border: 1px solid #ccc; font-family: var(--printess-text-font); background-color: var(--printess-lightpink); } .settings { margin: 20px 10px 70px 0; } .button-wrapper { display: flex; flex-direction: row; gap: 10px; margin: 10px 0 30px 0px; } .card-input { background-color: rgba(208, 4, 155, 0.04); } dl { grid-template-columns: 160px calc(100% - 160px); } dt { font-size: 14px; } dd { position: relative; } .dropdown { position: relative; height: 21px; line-height: 21px; display: flex; justify-content: space-between; align-items: center; } .dropdown-container { clear: both; position: absolute; left: 0; top: 46px; width: calc(100% - 22px); height: 0px; z-index: 999; border-radius: 4px; max-height: 40vh; overflow-y: auto; border: 1px solid #ccc; transition: height .4s ease, visibility .3s ease; background-color: white; } .version-dropdown { overflow: hidden; left: unset; right: 20px; top: 46px; width: 140px; } .dropdown-item { padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ccc; cursor: pointer; font-size: 14px; } .dropdown-item:hover { background-color: var(--printess-pink); color: white; } .color-btn { min-width: 70px; min-height: 25px; margin-right: 10px; } .custom-css { background-color: var(--printess-blue); padding: 0 20px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .css-icon { width: 30px; height: 30px; padding: 0 } #css-file { display: none; } @media (max-width: ${config.mobileDeviceWidth}px) { dl { grid-template-columns: 1fr; } dt { font-size: 12px; } dd { grid-column: unset; } .table-header { padding: 0 10px; } .dropdown-container { left: 10px; } .dropdown-item { flex-direction: column; align-items: flex-start; } } .menu { margin-right: 10px; background-color: var(--printess-lightpink); } .menu-entry { font-family: var(--printess-header-font); padding: 10px 20px 10px 10px; color: rgb(85, 85, 85); border-bottom: 1px solid var(--printess-pink); font-size: 14px; } .menu-entry:hover { outline: 1px solid var(--printess-lightpink); background-color: var(--printess-pinkHover); color: white; } .menu-entry.selected:hover { outline: none; } .selected { background-color: var(--printess-pink); color: white; } .selected:first-child { border-top: 1px solid var(--printess-lightpink); } `]}constructor(){super(),this.showAdvancedStyles=!1,this.showDropdown="none",this.selectedTheme="default",this.themeNames=["default"],this.showPrintess=!1,this.resetStyles=!1,this.backgroundColors={pagebar:"#ffffff",background:"#ffffff"},this.mobileColors={panel:"#f8f8f8",buttonText:"#444444"},this.toolbarColors={font:"#ffffff",background:"#6c757d",active:"#525960"},this.bootstrapStyles={theme:"default",sansserif:"system-ui",monospace:"SFMono-Regular",colors:{primary:{font:"#ffffff",btn:"#007bff",hover:"#0b5ed7"},secondary:{font:"#ffffff",btn:"#6c757d",hover:"#5c636a"},success:{font:"#ffffff",btn:"#198754",hover:"#157347"},danger:{font:"#ffffff",btn:"#dc3545",hover:"#bb2d3b"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"}}},this.as=new WcAdvancedStyles,this.as.style.width="100%"}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async uploadCss(e){let t="bootstrapCss.css";"default"!==this.selectedTheme&&(t=await sha1hex$1(this.selectedTheme)+"_bootstrapCss.css"),await api.uploadFile(e,t)}async loadThemeNames(){const e=await api.readUserSettings({keys:["userThemes"]});if(e instanceof ServerErrorResponse$2)this.showError(e);else if(e.userThemes){const t=JSON.parse(e.userThemes);Array.isArray(t)&&(t.includes("default")?this.themeNames=t:this.themeNames=["default",...t])}}async saveThemeNames(){await api.writeUserSetting({key:"userThemes",json:JSON.stringify(this.themeNames)})}setDefaultBootstrapStyle(){this.bootstrapStyles={theme:"default",sansserif:"system-ui",monospace:"SFMono-Regular",colors:{primary:{font:"#ffffff",btn:"#007bff",hover:"#0b5ed7"},secondary:{font:"#ffffff",btn:"#6c757d",hover:"#5c636a"},success:{font:"#ffffff",btn:"#198754",hover:"#157347"},danger:{font:"#ffffff",btn:"#dc3545",hover:"#bb2d3b"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"}}}}setDefaultBackgroundColors(){this.backgroundColors={pagebar:"#ffffff",background:"#ffffff"}}setDefaultToolbarColors(){this.toolbarColors={font:"#ffffff",background:"#6c757d",active:"#525960"}}setDefaultMobileColors(){this.mobileColors={panel:"#f8f8f8",buttonText:"#444444"}}async loadUserSettings(e){const t=await api.readUserSettings(e);if(t instanceof ServerErrorResponse$2)this.showError(t);else{const e="default"===this.selectedTheme?"":":"+this.selectedTheme;t["bootstrapStyles"+e]?(this.bootstrapStyles=JSON.parse(t["bootstrapStyles"+e]),this.bootstrapStyles.colors.success||(this.bootstrapStyles.colors={primary:this.bootstrapStyles.colors.primary,secondary:this.bootstrapStyles.colors.secondary,success:{font:"#ffffff",btn:"#198754",hover:"#157347"},danger:this.bootstrapStyles.colors.danger,light:this.bootstrapStyles.colors.light})):this.setDefaultBootstrapStyle(),t["backgroundColors"+e]?this.backgroundColors=JSON.parse(t["backgroundColors"+e]):this.setDefaultBackgroundColors(),t["toolbarColors"+e]?this.toolbarColors=JSON.parse(t["toolbarColors"+e]):this.setDefaultToolbarColors(),t["mobileColors"+e]?this.mobileColors=JSON.parse(t["mobileColors"+e]):this.setDefaultMobileColors()}}async writeUserSetting(e){const t=await api.writeUserSetting(e);t instanceof ServerErrorResponse$2&&this.showError(t)}connectedCallback(){sessionStorage.clear(),super.connectedCallback(),this.loadUserSettings({keys:["bootstrapStyles","backgroundColors","toolbarColors","mobileColors"]}),this.loadThemeNames()}getBootstrapStyles(e){this.callback=e}reloadEditor(){this.callback&&this.callback(this.selectedTheme)}toggleDropdown(e){this.showDropdown===e?this.showDropdown="none":this.showDropdown=e}setBsStyle(e){this.bootstrapStyles.theme=e,this.bootstrapStyles.sansserif=bsStyles[e].sansserif||this.bootstrapStyles.sansserif,this.bootstrapStyles.colors=bsThemes[e],this.backgroundColors={pagebar:bsStyles[e].background||"#ffffff",background:bsStyles[e].background||"#ffffff"},this.showDropdown="none"}setSansserifFont(e){this.bootstrapStyles.sansserif=e,this.showDropdown="none"}getComplexColors(){const{theme:e,sansserif:t,colors:o}=this.bootstrapStyles,r=new WcColorPickerComplex(e,t,o);return r.style.width="calc(100% - 22px)",r.returnColors(e=>this.bootstrapStyles.colors=e),r}getBackgroundColors(){const e=new WcBackgroundColors(this.backgroundColors);return e.style.width="calc(100% - 22px)",e.returnColors(e=>this.backgroundColors=e),e}getToolbarColors(){const e=new WcToolbarColors(this.toolbarColors);return e.style.width="calc(100% - 22px)",e.returnColors(e=>this.toolbarColors=e),e}getMobileColors(){const e=new WcMobileColors(this.mobileColors);return e.style.width="calc(100% - 22px)",e.returnColors(e=>this.mobileColors=e),e}async saveStylesheet(){const e=this.bootstrapStyles.theme,t=`\n :root {\n --bs-primary: ${this.bootstrapStyles.colors.primary.btn};\n --bs-secondary: ${this.bootstrapStyles.colors.secondary.btn};\n --bs-success: ${this.bootstrapStyles.colors.success.btn};\n --bs-danger: ${this.bootstrapStyles.colors.danger.btn};\n --bs-light: ${this.bootstrapStyles.colors.light.btn};\n --bs-font-sans-serif: ${this.bootstrapStyles.sansserif};\n --bs-body-bg: ${this.backgroundColors.background};\n\n --mobile-button-color: ${this.mobileColors.buttonText}!important;\n --mobile-panel-background: ${this.mobileColors.panel}!important;\n\n }\n .page-link {\n color: var(--bs-primary);\n background-color: ${this.bootstrapStyles.colors.primary.font};\n }\n .page-link:hover {\n color: ${this.bootstrapStyles.colors.primary.hover};\n }\n .btn-primary, .page-item.active .page-link {\n color: ${this.bootstrapStyles.colors.primary.font};\n background-color: var(--bs-primary);\n border-color: var(--bs-primary);\n }\n .btn-secondary {\n color: ${this.bootstrapStyles.colors.secondary.font};\n background-color: var(--bs-secondary);\n border-color: var(--bs-secondary);\n }\n .btn-success {\n color: ${this.bootstrapStyles.colors.success.font};\n background-color: var(--bs-success);\n border-color: var(--bs-success);\n }\n .btn-danger {\n color: ${this.bootstrapStyles.colors.danger.font};\n background-color: var(--bs-danger);\n border-color: var(--bs-danger);\n }\n .btn-light {\n color: ${this.bootstrapStyles.colors.light.font};\n background-color: var(--bs-light);\n border-color: var(--bs-light);\n }\n\n .btn-primary:hover {\n color: ${this.bootstrapStyles.colors.primary.font};\n background-color: ${this.bootstrapStyles.colors.primary.hover};\n border-color: ${this.bootstrapStyles.colors.primary.hover};\n }\n .btn-secondary:hover {\n color: ${this.bootstrapStyles.colors.secondary.font};\n background-color: ${this.bootstrapStyles.colors.secondary.hover};\n border-color: ${this.bootstrapStyles.colors.secondary.hover};\n }\n .btn-success:hover {\n color: ${this.bootstrapStyles.colors.success.font};\n background-color: ${this.bootstrapStyles.colors.success.hover};\n border-color: ${this.bootstrapStyles.colors.success.hover};\n }\n .btn-danger:hover {\n color: ${this.bootstrapStyles.colors.danger.font};\n background-color: ${this.bootstrapStyles.colors.danger.hover};\n border-color: ${this.bootstrapStyles.colors.danger.hover};\n }\n .btn-light:hover {\n color: ${this.bootstrapStyles.colors.light.font};\n background-color: ${this.bootstrapStyles.colors.light.hover};\n border-color: ${this.bootstrapStyles.colors.light.hover};\n }\n\n .btn-outline-primary {\n color: var(--bs-primary);\n border-color: var(--bs-primary);\n }\n .btn-outline-secondary {\n color: var(--bs-secondary);\n border-color: var(--bs-secondary);\n }\n .btn-outline-success {\n color: var(--bs-success);\n border-color: var(--bs-success);\n }\n .btn-outline-danger {\n color: var(--bs-danger);\n border-color: var(--bs-danger);\n }\n .btn-outline-light {\n color: var(--bs-light);\n border-color: var(--bs-light);\n }\n\n .btn-outline-primary:hover {\n color: ${this.bootstrapStyles.colors.primary.font};\n background-color: var(--bs-primary);\n border-color: var(--bs-primary);\n }\n .btn-outline-secondary:hover {\n color: ${this.bootstrapStyles.colors.secondary.font};\n background-color: var(--bs-secondary);\n border-color: var(--bs-secondary);\n }\n .btn-outline-success:hover {\n color: ${this.bootstrapStyles.colors.success.font};\n background-color: var(--bs-success);\n border-color: var(--bs-success);\n }\n .btn-outline-danger:hover {\n color: ${this.bootstrapStyles.colors.danger.font};\n background-color: var(--bs-danger);\n border-color: var(--bs-danger);\n }\n .btn-outline-light:hover {\n color: ${this.bootstrapStyles.colors.light.font};\n background-color: var(--bs-light);\n border-color: var(--bs-light);\n }\n\n .bg-primary {\n background-color: var(--bs-primary)!important;\n }\n .bg-secondary {\n background-color: var(--bs-secondary)!important;\n }\n .bg-success {\n background-color: var(--bs-success)!important;\n }\n .bg-danger {\n background-color: var(--bs-danger)!important;\n }\n .bg-light {\n background-color: var(--bs-light)!important;\n }\n\n .border-primary {\n border-color: var(--bs-primary) !important;\n }\n .border-secondary {\n border-color: var(--bs-secondary) !important;\n }\n .border-success {\n border-color: var(--bs-success) !important;\n }\n .border-danger {\n border-color: var(--bs-danger) !important;\n }\n .border-light {\n border-color: var(--bs-light) !important;\n }\n\n .text-primary {\n color: var(--bs-primary)!important;\n }\n .text-secondary {\n color: var(--bs-seondary)!important;\n }\n .text-success {\n color: var(--bs-success)!important;\n }\n .text-danger {\n color: var(--bs-danger)!important;\n }\n .text-light {\n color: var(--bs-light)!important;\n }\n\n #desktop-pagebar, .desktop-title-or-steps {\n background-color: ${this.backgroundColors.pagebar}!important;\n }\n\n ${"cyborg"===e||"superhero"===e?"\n .printess-font-dropdown img {\n filter: invert(1);\n }\n ":""}\n\n .tabs-navigation {\n background-color: ${this.toolbarColors.background}!important;\n }\n\n .tabs-navigation li.nav-item {\n color: ${this.toolbarColors.font}!important;\n }\n\n .tabs-navigation li.nav-item.selected {\n background-color: ${this.toolbarColors.active}!important;\n color: ${this.toolbarColors.font}!important;\n }\n\n .tabs-navigation a.nav-link {\n color: ${this.toolbarColors.font}!important;\n }\n\n .tabs-navigation li.nav-item.selected a.nav-link {\n color: ${this.toolbarColors.font}!important;\n }\n `;if("default"!==this.bootstrapStyles.theme){const e=await fetch(`https://editor.printess.com/v/nightly/printess-editor/bootstrap-themes/${this.bootstrapStyles.theme}.css`);if(!e.ok){const e="Cannot download bootstrap theme.";throw alert(e),new Error(e)}const o=await e.text(),r=new Blob([`\n @import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Neucha&family=Noto+Sans:wght@400;700&family=Nunito:wght@400;700&family=Roboto:wght@400;700&family=Source+Sans+Pro:wght@400;700&family=Ubuntu:wght@400;700&display=swap');\n ${o}\n ${t}\n `],{type:"text/css"});await this.uploadCss(r)}else{const e=new Blob([`\n @import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Neucha&family=Noto+Sans:wght@400;700&family=Nunito:wght@400;700&family=Roboto:wght@400;700&family=Source+Sans+Pro:wght@400;700&family=Ubuntu:wght@400;700&display=swap');\n ${t}\n `],{type:"text/css"});await this.uploadCss(e)}}async saveBsStyles(){const e=[],t="default"===this.selectedTheme?"":":"+this.selectedTheme;e.push(this.saveStylesheet()),e.push(this.writeUserSetting({key:"bootstrapStyles"+t,json:JSON.stringify(this.bootstrapStyles)})),e.push(this.writeUserSetting({key:"backgroundColors"+t,json:JSON.stringify(this.backgroundColors)})),e.push(this.writeUserSetting({key:"toolbarColors"+t,json:JSON.stringify(this.toolbarColors)})),e.push(this.writeUserSetting({key:"mobileColors"+t,json:JSON.stringify(this.mobileColors)})),await Promise.all(e),this.resetStyles||this.reloadEditor()}resetBootstrapStyles(){const e=new WcDialogResetBootstrapStyles;return e.showDialog(e=>{e&&(this.resetStyles=!0,this.bootstrapStyles={theme:"default",sansserif:"system-ui",monospace:"SFMono-Regular",colors:{primary:{font:"#ffffff",btn:"#007bff",hover:"#0b5ed7"},secondary:{font:"#ffffff",btn:"#6c757d",hover:"#5c636a"},success:{font:"#ffffff",btn:"#198754",hover:"#157347"},danger:{font:"#ffffff",btn:"#dc3545",hover:"#bb2d3b"},light:{font:"#000000",btn:"#f8f9fa",hover:"#f9fafb"}}},this.backgroundColors={pagebar:"#ffffff",background:"#ffffff"},this.toolbarColors={font:"#ffffff",background:"#6c757d",active:"#525960"},this.mobileColors={panel:"#f8f8f8",buttonText:"#444444"},this.saveBsStyles())}),e}setSelectedTheme(e){this.selectedTheme=e,this.as.setSelectedTheme(e);const t="default"===this.selectedTheme?"":":"+this.selectedTheme;this.loadUserSettings({keys:["bootstrapStyles"+t,"backgroundColors"+t,"toolbarColors"+t,"mobileColors"+t]}),this.dispatchEvent(new CustomEvent("theme-selected",{detail:e}))}async createNewTheme(){const e=prompt("Please enter new theme name.","theme1");e&&(this.themeNames=[...this.themeNames,e],await this.saveThemeNames())}async deleteSelectedTheme(){if("default"!==this.selectedTheme){if("yes"===prompt("Do you really want to delete the theme '"+this.selectedTheme+"'? Enter yes to delete.","no")){const e=":"+this.selectedTheme,t=[],o=this.themeNames.filter(e=>e!==this.selectedTheme);t.push(api.deleteUserSetting({key:"bootstrapStyles"+e})),t.push(api.deleteUserSetting({key:"backgroundColors"+e})),t.push(api.deleteUserSetting({key:"toolbarColors"+e})),t.push(api.deleteUserSetting({key:"mobileColors"+e})),t.push(api.writeUserSetting({key:"userThemes",json:JSON.stringify(o)})),await Promise.all(t),this.themeNames=o,this.selectedTheme="default"}}}render(){const{theme:e,sansserif:t}=this.bootstrapStyles;return x`

Bootstrap Themes

${config.claims.get("plan")?.has("large")&&config.isMobile?x` `:""}
${config.claims.get("plan")?.has("large")&&!config.isMobile?x` `:""}
Stylesheet:
Font Family:
Custom Font Family:
e==t).length?"":t} @input=${e=>this.setSansserifFont(e.target.value)} >
You need to provide the font family import manually in the "Advanced Styles" css to make it work.
${config.isMobile?x` Color Selection: `:x`
Font Color:
Main Color:
Hover Color:
`}
${this.getComplexColors()}
Background:
${this.getBackgroundColors()}
Mobile Colors:
${this.getMobileColors()}
Toolbar:
${this.getToolbarColors()}
this.showAdvancedStyles=!this.showAdvancedStyles}> Custom CSS
${this.showAdvancedStyles?this.as:""}
${"default"===this.selectedTheme?"":x` `}
`}};__decorate$21([e$3({type:Boolean})],WcBootstrapStyles.prototype,"showAdvancedStyles",void 0),__decorate$21([e$3({type:String})],WcBootstrapStyles.prototype,"showDropdown",void 0),__decorate$21([e$3({type:String})],WcBootstrapStyles.prototype,"selectedTheme",void 0),__decorate$21([e$3({type:Array})],WcBootstrapStyles.prototype,"themeNames",void 0),__decorate$21([e$3({type:Boolean})],WcBootstrapStyles.prototype,"showPrintess",void 0),__decorate$21([e$3({type:Boolean})],WcBootstrapStyles.prototype,"resetStyles",void 0),__decorate$21([e$3({type:Object})],WcBootstrapStyles.prototype,"backgroundColors",void 0),__decorate$21([e$3({type:Object})],WcBootstrapStyles.prototype,"mobileColors",void 0),__decorate$21([e$3({type:Object})],WcBootstrapStyles.prototype,"toolbarColors",void 0),__decorate$21([e$3({type:Object})],WcBootstrapStyles.prototype,"bootstrapStyles",void 0),WcBootstrapStyles=__decorate$21([e$4("wc-bootstrap-styles")],WcBootstrapStyles);var __decorate$20=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcProgress=class extends s$1{constructor(){super(...arguments),this.width=0,this.i=0}connectedCallback(){super.connectedCallback();const e=()=>{this.width>=100?(clearInterval(t),this.i=0):this.width++},t=setInterval(e,10);e()}render(){return x`
`}};__decorate$20([e$3({type:Number})],WcProgress.prototype,"width",void 0),__decorate$20([e$3({type:Number})],WcProgress.prototype,"i",void 0),WcProgress=__decorate$20([e$4("wc-progress")],WcProgress);let WcFileUploader=class extends s$1{static get styles(){return[userProfileStyles,settingsStyles,i$4` .card.green { background: transparent; margin-bottom: 0; } .settings.green { display: flex; margin-right: 10px; } .table-body { display: flex; padding: 10px; } .upload-wrapper { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; border: 2px dashed var(--printess-green); min-height: 200px; } .img-uploaded { position: relative; width: 100%; border: 1px solid #ccc; border-radius: 4px; padding: 0; display: flex; align-items: center; justify-content: center; background: rgb(50, 50, 50); min-height: 250px; } .upgrade-plan-info { color: #ccc; font-size: 20px; margin: 50px; text-align: center; } .link-to-plan { text-decoration: none; color: var(--printess-pink); cursor: pointer; } .delete-icon { position: absolute; top: 15px; right: 15px; height: 25px; cursor: pointer; padding: 0; } .upload-icon { width: 100px; height: 100px; margin-bottom: 20px; } .img-wrapper { width: 95%; display: flex; justify-content: center; align-items: center; padding: 10px 20px; } input[type="file"] { display: none; } .button-wrapper { display: flex; gap: 10px; margin: 10px 0 30px 0; } .upload-label { color: var(--printess-green); font-weight: 700; cursor: pointer } .custom-file-upload { background: var(--printess-green); padding: 7px 20px; border: none; border-radius: 4px; color: #fff; cursor: pointer; font-family: var(--printess-button-font); font-size: 14px; font-weight: 400; white-space: nowrap; cursor: pointer; } button.settings.green { border: none; } .custom-file-upload:hover, button.settings.green:hover { background: var(--printess-greenHover); } .spinner, .spinner:after { border-radius: 50%; width: 2em; height: 2em; } .spinner { font-size: 6px; position: relative; border-top: 0.5em solid rgba(255,255,255, 0.2); border-right: 0.5em solid rgba(255,255,255, 0.2); border-bottom: 0.5em solid rgba(255,255,255, 0.2); border-left: 0.5em solid #ffffff; -webkit-transform: translateZ(0); -ms-transform: translateZ(0); transform: translateZ(0); -webkit-animation: load8 1.1s infinite linear; animation: load8 1.1s infinite linear; margin-right: 10px; } .spinner.big { font-size: 26px; border-color: rgb(160 204 0 / 30%) rgb(160 204 0 / 30%) rgb(160 204 0 / 30%) rgb(160 204 0); margin: 0 10px 1px; } @-webkit-keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes load8 { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @media (max-width: ${config.mobileDeviceWidth}px) { .img-uploaded { max-height: 300px; } .custom-file-upload { font-size: 12px; padding: 4px 10px; } .upgrade-plan-info { font-size: 16px!important; margin: 20px; } } `]}showError(e){console.log("error msg: ",e.message,"error code: ",e.code)}async uploadLogo(e){const t=await api.uploadFile(e,"userLogo"),o=-1===e.type.indexOf("gif");if(t){const e={imageUrl:t+"?param="+Math.floor(100*Math.random()),showAnimation:o},r=JSON.stringify(e);if(this.writeUserSetting({key:"imageUpload",json:r}),window.parent)try{window.parent.postMessage({cmd:"newStartupLogo",imageUrl:t},"*")}catch(e){console.error(e)}this.showProgress=!0,window.setTimeout(()=>{this.loadingAnimation={imageUrl:t+"?param="+Math.floor(100*Math.random()),showAnimation:o},this.setLoadingAnimation(),this.uploading=!1},2e3),window.setTimeout(()=>this.showProgress=!1,2200)}}async deleteLogo(){const e=await api.deleteFile({name:"userLogo"});if(e instanceof ServerErrorResponse$2)this.showError(e);else{if(this.loadingAnimation={imageUrl:"https://editor.printess.com/v/nightly/printess-logo.svg",showAnimation:!0},window.parent)try{window.parent.postMessage({cmd:"newStartupLogo",imageUrl:""},"*")}catch(e){console.error(e)}this.callback&&this.callback({showAnimation:!0,imageUrl:""})}}async writeUserSetting(e){const t=await api.writeUserSetting(e);t instanceof ServerErrorResponse$2&&this.showError(t)}async readUserSettings(e){const t=await api.readUserSettings(e);t instanceof ServerErrorResponse$2?this.showError(t):(t.editorOptions&&(this.editorOptions=JSON.parse(t.editorOptions)),t.imageUpload&&(this.loadingAnimation=JSON.parse(t.imageUpload)))}async deleteUserSetting(){const e=await api.deleteUserSetting({key:"imageUpload"});e instanceof ServerErrorResponse$2?this.showError(e):this.deleteLogo()}connectedCallback(){super.connectedCallback(),this.readUserSettings({keys:["editorOptions","imageUpload"]}),this.renderForShopify="Shopify"==currentUser.displayName}constructor(e){super(),this.plan="",this.uploading=!1,this.showProgress=!1,this.editorOptions={name:"",version:"draft",editor:"nightly",mode:"buyer"},this.loadingAnimation={showAnimation:!0,imageUrl:""},this.renderForShopify=!1,this.plan=e}getFileUploader(e){this.callback=e}setLoadingAnimation(){this.callback&&this.callback(this.loadingAnimation)}readFile(e){const t=e?.name.substring(e.name.lastIndexOf("."))||"";if([".jpg",".jpeg",".png",".gif",".webp"].indexOf(t)<0)return void alert("File type not supported, please choose a different file.");this.uploading=!0;const o=new FileReader;o.onload=async()=>{await this.uploadLogo(e)},o.readAsDataURL(e)}uploadFile(e){if(e.preventDefault(),e.target){const t=e.target.files;if(t){const e=t[0];this.readFile(e)}}}dragoverHandler(e){e.preventDefault(),e.stopPropagation(),this.uploadWrapper.style.background="var(--printess-lightgreen)"}dropHandler(e){if(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files.length){const t=e.dataTransfer.files[0];this.readFile(t)}this.dragleaveHandler()}dragleaveHandler(){this.uploadWrapper.style.background="transparent"}getUploadedImage(){return new WcUploadedImage(this.loadingAnimation.imageUrl||"https://editor.printess.com/v/nightly/printess-logo.svg")}copyToClipboard(){navigator.clipboard.writeText(`https://editor.printess.com/${"current stable version"===this.editorOptions.editor?"":`v/${this.editorOptions.editor}/`}printess-editor/embed.html#${encodeURIComponent(JSON.stringify(this.loadingAnimation))}`).then(function(){},function(){})}render(){return x`

Logo

${"Pay as you go"===this.plan||"Small"===this.plan?x`

If you would like to add your own Logo to the Loading Animation you first need to upgrade your account to a higher plan location.hash="subscription"} class="link-to-plan">here.

`:x` ${this.getUploadedImage()} ${this.loadingAnimation.showAnimation||!this.loadingAnimation.imageUrl?x` `:""}
${this.showProgress?x``:""} `}
${"Pay as you go"===this.plan||"Small"===this.plan?x`
`:x`
`} `}};__decorate$20([e$3({type:String})],WcFileUploader.prototype,"plan",void 0),__decorate$20([e$3({type:Boolean})],WcFileUploader.prototype,"uploading",void 0),__decorate$20([e$3({type:Boolean})],WcFileUploader.prototype,"showProgress",void 0),__decorate$20([e$3({type:Object})],WcFileUploader.prototype,"editorOptions",void 0),__decorate$20([e$3({type:Object})],WcFileUploader.prototype,"loadingAnimation",void 0),__decorate$20([e$3({type:Boolean})],WcFileUploader.prototype,"renderForShopify",void 0),__decorate$20([i$1("div.upload-wrapper")],WcFileUploader.prototype,"uploadWrapper",void 0),WcFileUploader=__decorate$20([e$4("wc-file-uploader")],WcFileUploader);var __decorate$1$=function(e,t,o,r){var i,a=arguments.length,s=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,r);else for(var n=e.length-1;n>=0;n--)(i=e[n])&&(s=(a<3?i(s):a>3?i(t,o,s):i(t,o))||s);return a>3&&s&&Object.defineProperty(t,o,s),s};let WcEmbedCode=class extends s$1{static get styles(){return[settingsStyles,i$4` .embed-title { background-color: var(--printess-red); color: #fff; padding: 12px 20px; margin-top: 30px; font-size: 18px; font-weight: 400; line-height: 25px; border-top-right-radius: 4px; border-top-left-radius: 4px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .copy-icon { height: 26px; width: 26px; margin: 0; padding: 0; display: flex; cursor: pointer; } .embed-text { padding: 12px 20px; border: 0px; color: #555; outline: none; border-bottom: 2px solid var(--printess-red); background: rgba(210, 0, 100, 0.04); } code { white-space: pre-wrap; line-break: anywhere; } @media (max-width: ${config.mobileDeviceWidth}px) { .embed-title { font-size: 14px; line-height: 36px; padding: 0 10px; max-height: 36px; } .copy-icon { height: 20px; width: 20px; } .settings { margin-right: 10px; } } `]}constructor(e,t){super(),this.editorOptions={name:"",version:"draft",editor:"nightly",mode:"buyer"},this.loadingAnimation={showAnimation:!0,imageUrl:""},this.editorOptions=e,this.loadingAnimation=t.imageUrl&&t.imageUrl.indexOf("printess-logo.svg")>-1?this.loadingAnimation:t}copyToClipboard(e){let t="";t="code"===e?`\n\n