1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7044],{298:(e,t,n)=>{n.d(t,{t8:()=>K,Gb:()=>B,c2:()=>X,Oz:()=>J,bk:()=>V,YR:()=>O,sC:()=>G});var i=n(85283);let a=i.KC([i.Ik({source:i.eu("manual"),value:i.Yj().min(1)}),i.Ik({source:i.eu("screen")})]).describe("binding:string"),o=i.KC([i.Ik({source:i.eu("manual"),value:i.Ik({lat:i.ai().min(-90).max(90),lon:i.ai().min(-180).max(180),label:i.Yj().min(1)})}),i.Ik({source:i.eu("screen")})]).describe("binding:location"),r=i.Yj().regex(/^#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/).describe("color:hex"),l=i.KC([r,i.eu("transparent")]).describe("color:transparent"),s=i.Ik({offset:i.ai().min(0).max(1),color:i.Yj().regex(/^#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/)}),d=i.gM("type",[i.Ik({type:i.eu("solid"),color:i.Yj().regex(/^#[0-9a-fA-F]{6}([0-9a-fA-F]{2})?$/)}),i.Ik({type:i.eu("linear"),angle:i.ai().min(0).max(360),stops:i.YO(s).min(2).max(8)}),i.Ik({type:i.eu("radial"),cx:i.ai().min(0).max(1),cy:i.ai().min(0).max(1),r:i.ai().min(0).max(2),stops:i.YO(s).min(2).max(8)})]),c=i.KC([d,i.eu("transparent")]).describe("fill:transparent"),u={fontFamily:i.Yj().default("ui-sans-serif, system-ui, sans-serif"),fontFamilyId:i.Yj().nullable().default(null),fontWeight:i.Yj().default("600"),fontStyle:i.k5(["normal","italic"]).default("normal"),letterSpacing:i.ai().default(0),lineHeight:i.ai().default(1.1),textAlign:i.k5(["left","center","right"]).default("center"),verticalAlign:i.k5(["top","middle","bottom"]).default("middle"),padding:i.ai().min(0).max(256).default(0),cornerRadius:i.ai().min(0).max(2048).default(0),color:r,backgroundColor:c,autoFit:i.zM().default(!1),fontSize:i.ai().min(8).max(4e3).default(64)},h=i.Ik({face:i.k5(["analog","digital"]),format:i.k5(["12h","24h"]),showSeconds:i.zM(),showDate:i.zM(),timezone:a.describe("binding:timezone"),numerals:i.k5(["none","arabic","roman"]).default("arabic"),ticks:i.k5(["none","hours","all"]).default("hours"),bezelWidth:i.ai().min(0).max(64).default(4),smoothSeconds:i.zM().default(!0),secondHandColor:r.default("#ef4444"),dateFormat:i.k5(["short","long","weekday"]).default("short"),datePosition:i.k5(["inline","above","below"]).default("inline"),dateSizeRatio:i.ai().min(.2).max(1).default(.35),uppercaseDate:i.zM().default(!1),separatorBlink:i.zM().default(!1),showAmPm:i.zM().default(!0),ampmSize:i.k5(["inline","small"]).default("inline"),leadingZeroHour:i.zM().default(!1),...u}),m=i.Ik({location:o,units:i.k5(["metric","imperial"]),layout:i.k5(["current","current+forecast3"]),color:r,backgroundColor:i.KC([d,r,i.eu("transparent")])}),f=i.Ik({type:i.eu("video"),videoId:i.Yj().regex(/^[A-Za-z0-9_-]{11}$/)}),g=i.Ik({type:i.eu("playlist"),playlistId:i.Yj().regex(/^[A-Za-z0-9_-]{13,}$/)}),p=i.Ik({source:i.KC([f,g]),autoplay:i.zM(),mute:i.zM(),loop:i.zM(),controls:i.zM(),interactive:i.zM().default(!1)}),y=i.Ik({url:i.Yj().url(),refreshSec:i.ai().int().min(15).max(86400).nullable(),zoom:i.ai().int().min(25).max(200).default(100),interactive:i.zM().default(!1)}),x=i.Ik({timezone:a.describe("binding:timezone"),layout:i.k5(["stacked","inline","tearoff"]).default("stacked"),showWeekday:i.zM().default(!0),showMonth:i.zM().default(!0),showYear:i.zM().default(!0),showDayNumber:i.zM().default(!0),monthFormat:i.k5(["long","short"]).default("long"),weekdayFormat:i.k5(["long","short"]).default("long"),uppercase:i.zM().default(!1),dayNumberRatio:i.ai().min(.2).max(3).default(1.6),...u,autoFit:i.zM().default(!0),fontSize:i.ai().min(8).max(4e3).default(48)}),w=i.Ik({targetInstant:i.Yj().datetime(),showDays:i.zM().default(!0),showHours:i.zM().default(!0),showMinutes:i.zM().default(!0),showSeconds:i.zM().default(!0),labelStyle:i.k5(["none","short","long","stacked"]).default("short"),padWithZeros:i.zM().default(!0),doneMessage:i.Yj().default(""),...u,autoFit:i.zM().default(!0),fontSize:i.ai().min(8).max(4e3).default(64)}),b=i.Ik({label:i.Yj().min(1).max(40),timezone:i.Yj().min(1)}),S=i.Ik({zones:i.YO(b).min(1).max(6),format:i.k5(["12h","24h"]).default("24h"),showSeconds:i.zM().default(!1),showDate:i.zM().default(!1),dayOffsetIndicator:i.zM().default(!0),rowLayout:i.k5(["split","stacked"]).default("split"),dividers:i.zM().default(!0),...u,autoFit:i.zM().default(!0),fontSize:i.ai().min(8).max(4e3).default(24)}),v=i.Ik({documentId:i.Yj(),autoplay:i.zM(),loop:i.zM(),delayMs:i.ai().int().min(1e3).max(6e4),interactive:i.zM().default(!1)}),k=i.Ik({documentId:i.Yj(),gid:i.Yj(),interactive:i.zM().default(!1)}),M=i.Ik({documentId:i.Yj(),interactive:i.zM().default(!1)}),I=i.Ik({src:i.Yj(),view:i.k5(["MONTH","WEEK","AGENDA"]),timezone:a,showTitle:i.zM(),showNav:i.zM(),showTabs:i.zM(),showPrint:i.zM(),interactive:i.zM().default(!1)}),j=i.Ik({place:i.Yj(),zoom:i.ai().int().min(1).max(21),interactive:i.zM().default(!1)}),z=i.Ik({formId:i.Yj(),interactive:i.zM().default(!1)}),F=i.Ik({reportId:i.Yj(),pageId:i.Yj(),interactive:i.zM().default(!1)}),C=i.Ik({text:i.Yj().min(1).max(2e3).default("Breaking news: your message scrolls here."),direction:i.k5(["rtl","ltr"]).default("rtl"),speed:i.ai().min(10).max(1600).default(80),gap:i.ai().min(0).max(2048).default(64),separator:i.Yj().max(8).default("â¢"),...u}
1),D=i.Ik({mode:i.k5(["continuous","working"]).default("continuous"),incidentInstant:i.Yj().datetime(),showDays:i.zM().default(!0),showHours:i.zM().default(!0),showMinutes:i.zM().default(!0),showSeconds:i.zM().default(!1),labelStyle:i.k5(["none","short","long","stacked"]).default("short"),padWithZeros:i.zM().default(!0),workingDays:i.YO(i.ai().int().min(0).max(6)).default([1,2,3,4,5]),workStart:i.Yj().regex(/^\d{2}:\d{2}$/).default("08:00"),workEnd:i.Yj().regex(/^\d{2}:\d{2}$/).default("17:00"),lunchEnabled:i.zM().default(!1),lunchStart:i.Yj().regex(/^\d{2}:\d{2}$/).default("12:00"),lunchEnd:i.Yj().regex(/^\d{2}:\d{2}$/).default("13:00"),holidays:i.YO(i.Yj().regex(/^\d{4}-\d{2}-\d{2}$/)).default([]),timezone:i.Yj().default("UTC"),...u,autoFit:i.zM().default(!0),fontSize:i.ai().min(8).max(4e3).default(64)}),R=i.Ik({data:i.Yj().min(1).max(2048),fgColor:r.default("#000000"),bgColor:l.default("#FFFFFF"),margin:i.ai().int().min(0).max(10).default(4),errorCorrection:i.k5(["L","M","Q","H"]).default("M"),tracking:i.zM().default(!1),trackingId:i.Yj().min(1).optional()}),A=i.Ik({label:i.Yj().min(1).max(60).default("Tap to explore"),icon:i.Yj().nullable().default(null),background:c.default({type:"solid",color:"#5463FF"}),textColor:r.default("#FFFFFF"),cornerRadius:i.ai().min(0).max(2048).default(12),fontFamily:i.Yj().default("ui-sans-serif, system-ui, sans-serif"),fontFamilyId:i.Yj().nullable().default(null),fontWeight:i.Yj().default("600"),fontStyle:i.k5(["normal","italic"]).default("normal"),fontSize:i.ai().min(8).max(4e3).default(18),letterSpacing:i.ai().default(0),lineHeight:i.ai().default(1.2),textAlign:i.k5(["left","center","right"]).default("center"),targetDesignId:i.Yj().nullable().default(null),autoCloseSec:i.ai().int().min(5).max(900).nullable().default(30)}),$=i.Ik({feedUrl:i.Yj().url(),layout:i.k5(["list","ticker","card"]).default("list"),maxItems:i.ai().int().min(1).max(30).default(8),refreshSec:i.ai().int().min(60).max(86400).default(300),showSource:i.zM().default(!0),showDate:i.zM().default(!0),showSummary:i.zM().default(!0),showImage:i.zM().default(!0),cardRotateSec:i.ai().int().min(3).max(120).default(8),imagePosition:i.k5(["top","left","right"]).default("top"),imageSize:i.ai().min(15).max(80).default(45),tickerDirection:i.k5(["rtl","ltr"]).default("rtl"),tickerSpeed:i.ai().min(10).max(400).default(80),separator:i.Yj().max(8).default("â¢"),...u}),T=i.Ik({location:o,standard:i.k5(["us","european"]),layout:i.k5(["badge","badge+grid","badge+advice","badge+dominant"]),showLabel:i.zM()}),Y=i.Ik({location:o,layout:i.k5(["badge","badge+advice","badge+peak","badge+protection"]),showLabel:i.zM()}),E=i.Ik({location:o,layout:i.k5(["badge","badge+advice"]),showLabel:i.zM()}),P=i.Ik({base:i.Yj(),targets:i.YO(i.Yj()),layout:i.k5(["board","pair","converter","ticker"]),amount:i.ai(),pairIntervalSec:i.ai().min(2).max(120).default(6),tickerSpeed:i.ai().min(10).max(1600).default(60),tickerDirection:i.k5(["rtl","ltr"]).default("rtl"),showTrend:i.zM(),showLabel:i.zM(),fontFamily:i.Yj().default("ui-sans-serif, system-ui, sans-serif"),fontFamilyId:i.Yj().nullable().default(null),fontWeight:i.Yj().default("600"),fontStyle:i.k5(["normal","italic"]).default("normal"),textAlign:i.k5(["left","center","right"]).default("center"),color:r.default("#e5e7eb"),background:c.default({type:"solid",color:"#0f172a"}),fontSize:i.ai().min(8).max(4e3).default(28),letterSpacing:i.ai().default(0),lineHeight:i.ai().min(.5).max(3).default(1.2),padding:i.ai().min(0).max(256).default(16),cornerRadius:i.ai().min(0).max(2048).default(0)}),H=e=>Array.isArray(e)?e.filter(e=>"number"==typeof e||"string"==typeof e).map(String):[],U=i.vk(e=>{if(!e||"object"!=typeof e)return e;if("category"===e.mode){let t=e.categoryId;return{mode:"categories",categoryIds:null==t?[]:[String(t)]}}return"picked"===e.mode?{mode:"picked",productIds:H(e.productIds)}:"categories"===e.mode?{mode:"categories",categoryIds:H(e.categoryIds)}:e},i.gM("mode",[i.Ik({mode:i.eu("categories"),categoryIds:i.YO(i.Yj()).max(50)}),i.Ik({mode:i.eu("picked"),productIds:i.YO(i.Yj()).max(500)})])),W=i.Ik({sizeScale:i.ai().min(.4).max(3).default(1),fontWeight:i.Yj().nullable().default(null),fontFamily:i.Yj().nullable().default(null),fontFamilyId:i.Yj().nullable().default(null),color:r.nullable().default(null),italic:i.zM().nullable().default(null),transform:i.k5(["none","uppercase","capitalize"]).nullable().default(null),opacity:i.ai().min(0).max(100).default(100)}),L={sizeScale:1,fontWeight:null,fontFamily:null,fontFamilyId:null,color:null,italic:null,transform:null,opacity:100},N=i.Ik({source:i.vk(e=>null==e?"odoo":e,i.k5(["catalog","odoo"])),selection:U,layout:i.k5(["menu","grid","spotlight"]).default("menu"),maxItems:i.ai().int().min(1).max(500).default(20),sort:i.k5(["sequence","price","name"]).default("sequence"),sortDir:i.k5(["asc","desc"]).default("asc"),hideUnavailable:i.zM().default(!1),showCategoryHeadings:i.zM().default(!0),showTierLabels:i.zM().default(!0),refreshSec:i.ai().int().min(60).max(86400).default(300),columns:i.ai().int().min(1).max(6).default(3),menuColumns:i.ai().int().min(1).max(4).default(1),gapX:i.ai().min(0).max(320).default(12),gapY:i.ai().min(0).max(320).default(12),imageGap:i.ai().min(0).max(160).default(4),rowGap:i.ai().min(0).max(192).default(8),menuColumnGap:i.ai().min(0).max(1600).nullable().default(null),tierColumnWidth:i.ai().min(0).max(1600).nullable().default(null),showDescription:i.zM().default(!1),priceTaxMode:i.k5(["as-entered","with-tax","without-tax"]).default("as-entered"),taxNote:i.Yj().max(200).nullable().default(null),rowsPerPage:i.ai().int().min(1).max(100).nullable().default(null),pageRotateSec:i.ai().int().min(3).max(300).default(10),showPageIndicator:i.zM().default(!0),separator:i.k5(["dots","dashes","line","none"]).default("dots"),separatorOpacity:i.ai().int().min(0).max(100).default(35),rowDivider:i.k5(["none","line","zebra"]).default("none"),priceDecimals:i.KC([i.eu("auto"),i.eu(0),i.eu(2)]).default("auto"),currencyDisplay:i.k5(["symbol","code","none"]).default("symbol"),currencyPosition:i.k5(["before","after"]).default("before"),spotlightRotateSec:i.ai().int().min(3).max(120).default(8),showImage:i.zM().default(!0),imageSize:i.ai().int().min(20).max(100).default(100),showReference:i.zM().default(!1),stylePreset:i.Yj().nullable().default("
1classic"),parts:i.Ik({name:W.default(L),price:W.default(L),reference:W.default(L),heading:W.default(L),description:W.default(L),tierLabel:W.default(L)}).default({name:L,price:L,reference:L,heading:L,description:L,tierLabel:L}),...u});function G(e){return"catalog"===e?"catalog":"odoo"}function B(e){return null===e||e.includes("products")?"catalog":"odoo"}let O={id:"products",name:"Products",icon:"tags",category:"web",description:"Your products as a menu board, price list or product wall.",longDescription:"Displays selected products as a menu board, a photo grid, or a rotating spotlight. Prices are shown tax-inclusive. Turning this app on adds Products to your sidebar, where you manage them, their prices and their photos. Products can also come from a connected point of sale: connect Odoo and this app is unlocked for you, with Odoo as its source, whether or not you turn this on.",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Show a menu board, price list or product wall on your screens.",steps:["Turn this app on. Products appears in your sidebar.","Add your products under Products, or connect Odoo and read them straight from your POS.","Drop the Products app onto a design.","Choose its source, then pick categories or hand-pick products."]},keywords:["products","menu","price","catalog","retail","pos","odoo"],defaultSize:{width:480,height:640},minSize:{width:220,height:160},refreshMs:null,configSchema:N,bindings:[],defaultConfig:{source:"catalog",selection:{mode:"categories",categoryIds:[]},layout:"menu",maxItems:20,sort:"sequence",sortDir:"asc",hideUnavailable:!1,showCategoryHeadings:!0,showTierLabels:!0,refreshSec:300,columns:3,menuColumns:1,gapX:12,gapY:12,imageGap:4,rowGap:8,menuColumnGap:null,tierColumnWidth:null,showDescription:!1,priceTaxMode:"as-entered",taxNote:null,rowsPerPage:null,pageRotateSec:10,showPageIndicator:!0,separator:"dots",separatorOpacity:35,rowDivider:"none",priceDecimals:"auto",currencyDisplay:"symbol",currencyPosition:"before",spotlightRotateSec:8,showImage:!0,imageSize:100,showReference:!1,stylePreset:"classic",parts:{name:{sizeScale:1,fontWeight:null,fontFamily:null,fontFamilyId:null,color:null,italic:null,transform:null,opacity:100},price:{sizeScale:1,fontWeight:"700",fontFamily:null,fontFamilyId:null,color:null,italic:null,transform:null,opacity:100},reference:{sizeScale:.7,fontWeight:null,fontFamily:null,fontFamilyId:null,color:null,italic:null,transform:null,opacity:55},heading:{sizeScale:1.1,fontWeight:"700",fontFamily:null,fontFamilyId:null,color:null,italic:null,transform:null,opacity:85},description:{sizeScale:.85,fontWeight:null,fontFamily:null,fontFamilyId:null,color:null,italic:null,transform:null,opacity:100},tierLabel:{sizeScale:.7,fontWeight:null,fontFamily:null,fontFamilyId:null,color:null,italic:null,transform:null,opacity:100}},fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",letterSpacing:0,lineHeight:1.2,textAlign:"left",verticalAlign:"top",padding:16,cornerRadius:0,color:"#111827",backgroundColor:"transparent",autoFit:!1,fontSize:22}},q={...O,id:"odoo",name:"Odoo",brand:{logoKey:"odoo",tint:"#714B67"},category:"integration",vendor:"Odoo",unlocks:["products"],description:"Connect your Odoo point of sale so its catalog can reach your screens.",longDescription:"Connects Screenflex to the products, prices and photos already in your Odoo POS. Once connected you can drop the Products app onto any design and pick Odoo as its source, with no need to switch the Products app on separately. Prices are shown tax-inclusive, exactly as Odoo calculates them. Nothing is copied: edit a price in Odoo and the screens follow. If you would rather manage the products in Screenflex instead, you can import this catalog once and edit it here.",guide:{whenToUse:"Connect Odoo POS so its catalog can feed a menu board, price list or product wall.",steps:["Turn this connection on.","Fill in your Odoo URL, database, login and API key below, then Test connection.","Drop the Products app onto a design. Connecting Odoo unlocks it for you.","Set its Source to Odoo, then pick categories or hand-pick products."]},requirements:{kind:"api-key",provider:"odoo"},hidden:!0,configSchema:N,defaultConfig:{...O.defaultConfig,source:"odoo"}},K={clock:{id:"clock",name:"Clock",icon:"clock",category:"time",description:"Current time, ticking live.",longDescription:"Analog or digital clock with optional date line. Binds to the screen timezone by default so one design shows local time on every TV.",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Show the current time on a screen. Defaults to each screen's own timezone, so one design reads correctly on every TV.",steps:["Drop the Clock app onto a design in the studio.","Pick analog or digital, and optionally show the date line.","Leave the timezone bound to the screen, or override it per element."]},keywords:["time","clock","analog","digital","hours"],defaultSize:{width:320,height:320},minSize:{width:120,height:120},refreshMs:1e3,configSchema:h,bindings:["timezone"],defaultConfig:{face:"analog",format:"12h",showSeconds:!0,showDate:!1,timezone:{source:"screen"},color:"#111827",backgroundColor:"transparent",numerals:"arabic",ticks:"hours",bezelWidth:4,smoothSeconds:!0,secondHandColor:"#ef4444",dateFormat:"short",datePosition:"inline",dateSizeRatio:.35,uppercaseDate:!1,fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",letterSpacing:0,lineHeight:1.1,textAlign:"center",verticalAlign:"middle",padding:0,cornerRadius:0,separatorBlink:!1,showAmPm:!0,ampmSize:"inline",leadingZeroHour:!1,autoFit:!1,fontSize:64}},weather:{id:"weather",name:"Weather",icon:"cloud-sun",category:"weather",description:"Live conditions and 3-day forecast.",longDescription:"Shows current temperature, conditions, and a 3-day outlook. Bind to the screen location so each screen shows its own forecast.",vend
1or:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Display current conditions for a screen's location; ideal for lobbies and entrances.",steps:["Set a default unit system below (metric or imperial).","Drop the Weather app onto a design and it binds to the screen location."]},keywords:["weather","forecast","temperature","conditions"],defaultSize:{width:480,height:280},minSize:{width:240,height:160},refreshMs:9e5,configSchema:m,bindings:["location"],defaultConfig:{location:{source:"screen"},units:"metric",layout:"current+forecast3",color:"#0f172a",backgroundColor:"transparent"}},youtube:{id:"youtube",name:"YouTube",icon:"youtube",category:"video",description:"Embed a YouTube video or playlist.",longDescription:"Plays a public YouTube video or playlist via the standard IFrame Player API. No API key required.",vendor:"YouTube",brand:{logoKey:"youtube"},requirements:{kind:"public-link"},guide:{whenToUse:"Loop a brand video, trailer, or playlist for promos and ambient content (not live TV).",steps:["Copy the YouTube video or playlist URL.","Drop the YouTube app onto a design.","Paste the URL into the app's settings."]},keywords:["video","youtube","playlist","media"],defaultSize:{width:854,height:480},minSize:{width:320,height:180},refreshMs:null,configSchema:p,bindings:[],defaultConfig:{source:{type:"video",videoId:"dQw4w9WgXcQ"},autoplay:!0,mute:!0,loop:!0,controls:!1,interactive:!1}},web:{id:"web",name:"Web embed",icon:"globe",category:"web",description:"Embed any allowlisted URL.",longDescription:"Renders a third-party page (dashboard, status board, internal tool) inside a sandboxed iframe. Each URL must match one of your org's allowlist patterns before it can be placed in a design.",vendor:"Screenflex",requirements:{kind:"allowlist"},guide:{whenToUse:"Embed an approved web page or internal dashboard; limited to URLs your org allowlists.",steps:["Add the allowed URL pattern(s) in the Connection section below.","Drop the Web app onto a design and enter a URL that matches the allowlist."]},keywords:["web","iframe","embed","url","dashboard"],defaultSize:{width:640,height:360},minSize:{width:240,height:160},refreshMs:6e4,configSchema:y,bindings:[],defaultConfig:{url:"https://example.com",refreshSec:60,zoom:100,interactive:!1}},date:{id:"date",name:"Date",icon:"calendar",category:"time",description:"Todayâs date, big and legible.",longDescription:"A standalone calendar-style date display. Binds to the screen timezone by default so each TV shows its own local date.",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Display today's date on its own or alongside a clock.",steps:["Drop the Date app onto a design.","Choose a date format and (optionally) the screen timezone binding."]},keywords:["time","date","day","calendar"],defaultSize:{width:320,height:220},minSize:{width:120,height:80},refreshMs:6e4,configSchema:x,bindings:["timezone"],defaultConfig:{timezone:{source:"screen"},layout:"stacked",showWeekday:!0,showMonth:!0,showYear:!0,showDayNumber:!0,monthFormat:"long",weekdayFormat:"long",uppercase:!1,dayNumberRatio:1.6,fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",letterSpacing:0,lineHeight:1.1,textAlign:"center",verticalAlign:"middle",padding:0,cornerRadius:0,color:"#111827",backgroundColor:"transparent",autoFit:!0,fontSize:48}},countdown:{id:"countdown",name:"Countdown",icon:"timer",category:"time",description:"Count down to a moment.",longDescription:"Counts down to a fixed instant, the same moment worldwide. Shows a custom message when it reaches zero.",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Build anticipation for an event, sale, or shift change with a live countdown to a target time.",steps:["Drop the Countdown app onto a design.","Set the target date/time and the units to display."]},keywords:["time","countdown","timer","event","launch"],defaultSize:{width:460,height:160},minSize:{width:160,height:80},refreshMs:1e3,configSchema:w,bindings:[],defaultConfig:{targetInstant:"2027-01-01T00:00:00.000Z",showDays:!0,showHours:!0,showMinutes:!0,showSeconds:!0,labelStyle:"short",padWithZeros:!0,doneMessage:"",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",letterSpacing:0,lineHeight:1.1,textAlign:"center",verticalAlign:"middle",padding:0,cornerRadius:0,color:"#111827",backgroundColor:"transparent",autoFit:!0,fontSize:64}},worldclock:{id:"worldclock",name:"World Clock",icon:"globe-2",category:"time",description:"Times across the world.",longDescription:"A labeled list of clocks for multiple timezones, ideal for office
1s and trading floors. Each row shows a city and its current time.",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Show the time across multiple cities: lobbies, trading floors, distributed teams.",steps:["Drop the World Clock app onto a design.","Add each city / timezone you want to display."]},keywords:["time","world","clock","timezone","cities"],defaultSize:{width:360,height:320},minSize:{width:180,height:120},refreshMs:1e3,configSchema:S,bindings:[],defaultConfig:{zones:[{label:"New York",timezone:"America/New_York"},{label:"London",timezone:"Europe/London"},{label:"Tokyo",timezone:"Asia/Tokyo"}],format:"24h",showSeconds:!1,showDate:!1,dayOffsetIndicator:!0,rowLayout:"split",dividers:!0,fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",letterSpacing:0,lineHeight:1.1,textAlign:"left",verticalAlign:"middle",padding:8,cornerRadius:0,color:"#111827",backgroundColor:"transparent",autoFit:!0,fontSize:24}},gslides:{id:"gslides",name:"Google Slides",icon:"presentation",category:"google",description:"Auto-playing Google Slides slideshow.",longDescription:'Plays a link-shared Google Slides presentation as an auto-advancing slideshow. The deck must be shared as "Anyone with the link can view" (or published to the web).',vendor:"Google",brand:{logoKey:"google-slides"},requirements:{kind:"public-link"},guide:{whenToUse:"Run a Slides deck as an auto-advancing slideshow, the easiest way to reuse marketing or menu decks on screens.",steps:['In Google Slides, open Share and set "Anyone with the link" to Viewer (or File â Share â Publish to web).',"Copy the presentation link.","Drop the Google Slides app onto a design and paste the link."]},keywords:["google","slides","presentation","deck","slideshow"],defaultSize:{width:960,height:540},minSize:{width:320,height:180},refreshMs:null,configSchema:v,bindings:[],defaultConfig:{documentId:"",autoplay:!0,loop:!0,delayMs:5e3,interactive:!1}},gsheets:{id:"gsheets",name:"Google Sheets",icon:"sheet",category:"google",description:"Embed a public Google Sheet.",longDescription:'Displays a link-shared Google Sheet, for menus, schedules, and leaderboards. The sheet must be shared as "Anyone with the link can view".',vendor:"Google",brand:{logoKey:"google-sheets"},requirements:{kind:"public-link"},guide:{whenToUse:"Surface a live spreadsheet view (KPIs, rosters, price lists) that updates when the sheet does.",steps:['In Google Sheets, share as "Anyone with the link" â Viewer, or publish the range to the web.',"Copy the link.","Drop the Google Sheets app onto a design and paste the link."]},keywords:["google","sheets","spreadsheet","kpi","table"],defaultSize:{width:720,height:480},minSize:{width:280,height:180},refreshMs:3e5,configSchema:k,bindings:[],defaultConfig:{documentId:"",gid:"",interactive:!1}},gdocs:{id:"gdocs",name:"Google Docs",icon:"file-text",category:"google",description:"Embed a public Google Docs document.",longDescription:'Displays a link-shared Google Docs document. The doc must be shared as "Anyone with the link can view".',vendor:"Google",brand:{logoKey:"google-docs"},requirements:{kind:"public-link"},guide:{whenToUse:"Display a shared document (policies, menus, announcements) without re-authoring it.",steps:['In Google Docs, share as "Anyone with the link" â Viewer, or publish to the web.',"Copy the link.","Drop the Google Docs app onto a design and paste the link."]},keywords:["google","docs","document","text","announcement"],defaultSize:{width:560,height:720},minSize:{width:280,height:200},refreshMs:null,configSchema:M,bindings:[],defaultConfig:{documentId:"",interactive:!1}},gcalendar:{id:"gcalendar",name:"Google Calendar",icon:"calendar",category:"google",description:"Embed a public Google Calendar.",longDescription:"Shows a public Google Calendar, for events and room schedules. The calendar must be made public (Settings â Access permissions â Make available to public).",vendor:"Google",brand:{logoKey:"google-calendar"},requirements:{kind:"public-link"},guide:{whenToUse:"Show an upcoming-events agenda for a room or team from a shared Google Calendar.",steps:["In Google Calendar settings, make the calendar public (or use its embed link).","Copy the public/embed link.","Drop the Google Calendar app onto a design and paste the link."]},keywords:["google","calendar","agenda","events","schedule"],defaultSize:{width:800,height:600},minSize:{width:320,height:240},refreshMs:3e5,configSchema:I,bindings:["timezone"],defaultConfig:{src:"",view:"MONTH",timezone:{source:"screen"},showTitle:!0,showNav:!0,showTabs:!1,showPrint:!1,interactive:!1}},gmaps:{id:"gmaps",name:"Google Maps",icon:"map-pin",category:"google",description:"Embed a Google Map for a place.",longDescription:"Shows a Google Map centered on a place name, address, or coordinates, for wayfinding and store locators. No API key required for the basic embed.",vendor:"Google",brand:{logoKey:"google-maps"},requirements:{kind:"public-link"},guide:{whenToUse:"Embed a map or directions: wayfinding for lobbies, events, and store locators.",steps:["In Google Maps, choose Share â Embed a map and copy the link.","Drop the Google Maps app onto a design and paste the link."]},keywords:["google","maps","map","location","directions","wayfinding"],defaultSize:{width:640,height:480},minSize:{width:240,height:180},refreshMs:null,configSchema:j,bindings:[],defaultConfig:{place:"",zoom:13,interactive:!1}},gforms:{id:"gforms",name:"Google Forms",icon:"clipboard-list",category:"google",description:"Embed an interactive Google Form.",longDescription:"Displays a Google Form for kiosk sign-in or feedback. The form must be accepting responses and shared so anyone can respond.",vendor:"Google",brand:{logoKey:"google-forms"},requirements:{kind:"public-link"},guide:{whenToUse:"Put a survey or sign-up form on a touch screen or via QR for feedback and lead capture.",steps:["In Google Forms, click Send â link and copy the form URL.","Drop the Google Forms app onto a design and paste the link."]},keywords:["google","forms","survey","signup","feedback"],defaultSize:{width:640,height:760},minSize:{width:280,height:200},refreshMs:null,configSchema:z,bindings:[],defaultConfig:{formId:"",interactive:!1}}
1,glooker:{id:"glooker",name:"Looker Studio",icon:"bar-chart-3",category:"google",description:"Embed a Looker Studio dashboard.",longDescription:"Shows a Looker Studio (formerly Data Studio) report, for KPI dashboards. The report must have link sharing / embedding enabled.",vendor:"Google",brand:{logoKey:"looker-studio"},requirements:{kind:"public-link"},guide:{whenToUse:"Display a Looker Studio dashboard of live business metrics on ops or sales screens.",steps:['In Looker Studio, share the report so "Anyone with the link can view", then copy the embed/report link.',"Drop the Looker Studio app onto a design and paste the link."]},keywords:["google","looker","data studio","dashboard","metrics","bi"],defaultSize:{width:960,height:600},minSize:{width:320,height:240},refreshMs:3e5,configSchema:F,bindings:[],defaultConfig:{reportId:"",pageId:"",interactive:!1}},ticker:{id:"ticker",name:"Ticker",icon:"captions",category:"text",description:"A line of text that scrolls across the screen.",longDescription:"A horizontal scrolling text banner, like a news ticker. Set the message, speed and direction, the font and color, and the container background. Loops seamlessly so it is never empty.",vendor:"Screenflex",builtIn:!0,requirements:{kind:"none"},guide:{whenToUse:"Show a continuously scrolling announcement, headline, or alert across a strip of the screen.",steps:["Drop the Ticker app onto a design in the studio.","Type your message and pick a scroll direction and speed.","Style the text and the container background to match your design."]},keywords:["ticker","marquee","scroll","scrolling","news","crawl","headline","banner","text"],defaultSize:{width:640,height:96},minSize:{width:160,height:40},refreshMs:null,configSchema:C,bindings:[],defaultConfig:{text:"Breaking news: your message scrolls here.",direction:"rtl",speed:80,gap:64,separator:"â¢",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",letterSpacing:0,lineHeight:1.1,textAlign:"center",verticalAlign:"middle",padding:12,cornerRadius:0,color:"#111827",backgroundColor:"transparent",autoFit:!1,fontSize:32}},dayssince:{id:"dayssince",name:"Days Since",icon:"calendar-clock",category:"time",description:"Count up since a moment, such as days since the last incident.",longDescription:'Counts upward from a chosen moment, e.g. "days since the last incident". Continuous mode counts raw time; working-time mode counts only your working hours, days, and excludes holidays. Reset with one click when something happens.',vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Show a safety/quality streak: time elapsed since the last incident, accident, defect, or outage.",steps:["Drop the Days Since app onto a design.","Set the last-incident date/time (or hit Reset to now).","Pick Continuous or Working-time, and the units to display."]},keywords:["days since","incident","safety","streak","counter","elapsed","accident"],defaultSize:{width:460,height:160},minSize:{width:160,height:80},refreshMs:1e3,configSchema:D,bindings:[],defaultConfig:{mode:"continuous",incidentInstant:"2026-01-01T00:00:00.000Z",showDays:!0,showHours:!0,showMinutes:!0,showSeconds:!1,labelStyle:"short",padWithZeros:!0,workingDays:[1,2,3,4,5],workStart:"08:00",workEnd:"17:00",lunchEnabled:!1,lunchStart:"12:00",lunchEnd:"13:00",holidays:[],timezone:"UTC",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",letterSpacing:0,lineHeight:1.1,textAlign:"center",verticalAlign:"middle",padding:0,cornerRadius:0,color:"#111827",backgroundColor:"transparent",autoFit:!0,fontSize:64}},qr:{id:"qr",name:"QR Code",icon:"qr-code",category:"utility",description:"A scannable QR code linking to any URL or text, with optional scan tracking.",longDescription:"Generate a crisp, scannable QR code from a URL or any text. Pick the code and background colors to match your design, and the quiet-zone margin and error-correction level for reliable scanning on a screen. Turn on scan tracking to count how many people scan the code, see which screen drove each scan, and watch the totals over time from the QR analytics page.",vend
1or:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Let viewers scan to open a link: a menu, promo, sign-up, or contact page. Turn on tracking to see which screen drives the most scans.",steps:["Drop the QR Code app onto a design.","Paste the URL or text to encode.","Optionally adjust colors, margin, and error-correction.",'To measure scans, enter a web link, then switch on "Track scans" in the panel. Totals show on the dashboard and the QR analytics page.']},keywords:["qr","qr code","link","scan","url","barcode","tracking","analytics","metrics","scans"],defaultSize:{width:280,height:280},minSize:{width:96,height:96},refreshMs:null,configSchema:R,bindings:[],defaultConfig:{data:"https://screenflex.pro",fgColor:"#000000",bgColor:"#FFFFFF",margin:4,errorCorrection:"M",tracking:!1}},popup:{id:"popup",name:"Pop-up button",icon:"popup",category:"utility",description:"A tappable button that opens another design as a full-screen popup.",longDescription:"Places a button on your design. When a visitor taps it, one of your other designs opens full-screen as an interactive popup. While the popup is open the playlist pauses, and any Web, YouTube, or Google content inside the opened design can be navigated by touch. The popup closes when the visitor taps Close, or after a number of seconds with no interaction, and the playlist then resumes where it left off.",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Add touch interactivity: let a visitor open a richer design (menu, map, video, web page) on demand.",steps:["Drop the Pop-up button onto a design and style its label.","Pick the design it should open when tapped.","Optionally set how many seconds of inactivity before it closes by itself."]},keywords:["button","popup","pop-up","interactive","touch","open","overlay","kiosk"],defaultSize:{width:240,height:72},minSize:{width:120,height:48},refreshMs:null,configSchema:A,bindings:[],defaultConfig:{label:"Tap to explore",icon:null,background:{type:"solid",color:"#5463FF"},textColor:"#FFFFFF",cornerRadius:12,fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",fontSize:18,letterSpacing:0,lineHeight:1.2,textAlign:"center",targetDesignId:null,autoCloseSec:30}},rss:{id:"rss",name:"RSS feed",icon:"rss",category:"web",description:"Show headlines from an RSS or Atom feed.",longDescription:"Pulls items from an RSS or Atom feed and shows them as a headline list, a scrolling ticker, or a rotating card with an optional image. The feed URL must match one of your org allowlist patterns before it can be placed in a design.",vendor:"Screenflex",brand:{logoKey:"rss",tint:"#e2710d"},requirements:{kind:"allowlist"},guide:{whenToUse:"Show live headlines from a news source, a blog, or any RSS or Atom feed your org allowlists.",steps:["Add the allowed feed URL pattern(s) in the Connection section below.","Drop the RSS app onto a design and enter a feed URL that matches the allowlist.","Pick a layout (list, ticker, or card) and style the text and background."]},keywords:["rss","atom","feed","news","headlines","ticker","syndication"],defaultSize:{width:480,height:360},minSize:{width:240,height:120},refreshMs:null,configSchema:$,bindings:[],defaultConfig:{feedUrl:"https://feeds.bbci.co.uk/news/rss.xml",layout:"list",maxItems:8,refreshSec:300,showSource:!0,showDate:!0,showSummary:!0,showImage:!0,cardRotateSec:8,imagePosition:"top",imageSize:45,tickerDirection:"rtl",tickerSpeed:80,separator:"â¢",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",letterSpacing:0,lineHeight:1.2,textAlign:"left",verticalAlign:"top",padding:16,cornerRadius:0,color:"#111827",backgroundColor:"transparent",autoFit:!1,fontSize:22}},airquality:{id:"airquality",name:"Air Quality",icon:"air-quality",category:"weather",description:"Live air quality index for a screen location.",longDescription:"Shows the current Air Quality Index as a color-coded badge, with optional pollutant readings, the dominant pollutant, or a health advice line. Bind to the screen location so each screen shows its own air quality.",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Show local air quality for a screen location; useful for lobbies, schools, gyms, and outdoor venues.",steps:["Pick the AQI standard (US or European) and a layout below.","Drop the Air Quality app onto a design; it binds to the screen location."]},keywords:["air","quality","aqi","pollution","pm2.5","pm10","smog"],defaultSize:{width:480,height:280},minSize:{width:240,height:160},refreshMs:18e5,configSchema:T,bindings:["location"],defaultConfig:{location:{source:"screen"},standard:"us",layout:"badge",showLabel:!0}},uv:{id:"uv",name:"UV Index",icon:"uv",category:"weather",description:"Live solar UV index for a screen location.",longDescription:"Shows the current solar UV index as a color-coded badge, with optional sun-protection advice, today's UV peak, or a protection summary. Bind to the screen location so each screen shows its own UV level.",vend
1or:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Show the local UV level for a screen location; useful for pools, beaches, gyms, schools, and outdoor venues.",steps:["Pick a layout below.","Drop the UV Index app onto a design; it binds to the screen location."]},keywords:["uv","ultraviolet","sun","sunscreen","spf","index"],defaultSize:{width:480,height:280},minSize:{width:240,height:160},refreshMs:18e5,configSchema:Y,bindings:["location"],defaultConfig:{location:{source:"screen"},layout:"badge",showLabel:!0}},pollen:{id:"pollen",name:"Pollen",icon:"pollen",category:"weather",description:"Live pollen risk for a screen location (Europe).",longDescription:"Shows the current pollen risk as a color-coded chip: an overall level (Low to Very High) from the worst species present, plus the dominant pollen type, with optional allergy advice. Bind to the screen location so each screen shows its own pollen level. Pollen data is available for European locations.",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Show the local pollen risk for a screen location; useful for clinics, pharmacies, gyms, schools, and outdoor venues across Europe.",steps:["Pick a layout below.","Drop the Pollen app onto a design; it binds to the screen location."]},keywords:["pollen","allergy","hayfever","hay fever","grass","birch","ragweed"],defaultSize:{width:480,height:280},minSize:{width:240,height:160},refreshMs:18e5,configSchema:E,bindings:["location"],defaultConfig:{location:{source:"screen"},layout:"badge",showLabel:!0}},currencies:{id:"currencies",name:"Currencies",icon:"currencies",category:"utility",description:"Live foreign-exchange rates for a base currency.",longDescription:"Shows exchange rates from a base currency to one or more targets, with an optional day-over-day trend. Choose a rates board, a single pair, an amount converter, or a scrolling ticker. Rates are European Central Bank reference rates (updated each business day).",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Show exchange rates in lobbies, banks, travel desks, airports, and hotels.",steps:["Pick a base currency and the target currencies to show.","Choose a layout (board, pair, converter, or ticker).","Drop the Currencies app onto a design."]},keywords:["currency","currencies","exchange","rate","forex","fx","money"],defaultSize:{width:480,height:280},minSize:{width:240,height:160},refreshMs:216e5,configSchema:P,bindings:[],defaultConfig:{base:"USD",targets:["EUR","GBP","JPY"],layout:"board",amount:100,pairIntervalSec:6,tickerSpeed:60,tickerDirection:"rtl",showTrend:!0,showLabel:!0,fontFamily:"ui-sans-serif, system-ui, sans-serif",fontFamilyId:null,fontWeight:"600",fontStyle:"normal",textAlign:"center",color:"#e5e7eb",background:{type:"solid",color:"#0f172a"},fontSize:28,letterSpacing:0,lineHeight:1.2,padding:16,cornerRadius:0}},products:O,odoo:q,remote:{id:"remote",name:"Phone control",icon:"smartphone",category:"utility",description:'A "Scan to control" code that turns a visitor\'s phone into a trackpad for this screen.',longDescription:"Place the Scan to control code on a design. A visitor scans it and their phone becomes a trackpad for the screen: a cursor, taps, scrolling, next and previous through the playlist, and clicks inside embedded web pages where the player can deliver them. One phone controls a screen at a time; a session ends on Done, after 30 seconds without input, or after 5 minutes. No app to install, nothing to buy, works on every screen.",vendor:"Screenflex",requirements:{kind:"none"},guide:{whenToUse:"Let visitors browse a catalogue, a map or a web page on the big screen from their own phone, with no touch layer and no hardware on site.",steps:["Enable Phone control here.",'Drop the "Scan to control" app onto a design and publish it to the screens that should be controllable.','Add a text element next to the code if you want a caption, such as "Scan to control this screen".',"A visitor scans the code, and their phone shows a trackpad for that screen."]},keywords:["remote","phone","control","trackpad","qr","scan","interactive","cursor","touch"],defaultSize:{width:280,height:280},minSize:{width:96,height:96},refreshMs:null,configSchema:i.Ik({fgColor:r.default("#000000"),bgColor:l.default("#FFFFFF"),margin:i.ai().int().min(0).max(10).default(4),errorCorrection:i.k5(["L","M","Q","H"]).default("M")}),bindings:[],defaultConfig:{fgColor:"#000000",bgColor:"#FFFFFF",margin:4,errorCorrection:"M"}}};function X(e){return K[e]??null}function V(e){return!e.hidden&&"integration"!==e.category}function J(e){return Object.keys(K).filter(t=>K[t].unlocks?.includes(e)??!1)}}
1,1062:(e,t,n)=>{n.d(t,{s:()=>o});var i=n(1521),a=n(57536);function o(){let{families:e,loading:t}=(0,a.b)(),n=(0,i.useMemo)(()=>{let t=new Map;for(let n of e)t.set(n.id,n);return t},[e]);return(0,i.useMemo)(()=>({families:e,loading:t,getById:e=>e?n.get(e)??null:null,isKnownCustom:e=>!!e&&n.has(e),resolveFamilyName:(e,t)=>{if(!e)return t;let i=n.get(e);return i?i.name:t},resolveFace:(e,t,i)=>{let a=n.get(e);if(!a||0===a.faces.length)return null;let o=a.faces.find(e=>e.weight===t&&e.style===i);if(o)return o;let r=a.faces.filter(e=>e.style===i);if(r.length>0)return r.slice().sort((e,n)=>Math.abs(e.weight-t)-Math.abs(n.weight-t))[0];let l=a.faces.find(e=>e.weight===t);return l||a.faces[0]}}),[e,t,n])}},1296:(e,t,n)=>{function i(e,t){let n=[],i=[t];for(;i.length>0;){let t=i.pop();for(let a of e)a.parentId!==t||n.includes(a.id)||(n.push(a.id),i.push(a.id))}return n}function a(e,t){let n=new Map(e.map(e=>[e.id,e])),i=[],a=t;for(;a&&n.has(a)&&!i.includes(a);)i.push(a),a=n.get(a).parentId;return i}function o(e,t,n){let a=new Set([n,...i(t,n)]);return e.filter(e=>e.groupId&&a.has(e.groupId))}function r(e,t,n){return null!==n&&(n===t||i(e,t).includes(n))}function l(e,t,n){let i=a(e,t);if(null===n)return i[i.length-1]??null;let o=i.indexOf(n);return o<=0?null:i[o-1]}function s(e,t,n,i){let r=t.find(t=>t.id===e);if(!r)return[];if(!r.groupId)return[e];let s=a(n,r.groupId),d=i&&s.includes(i)?i:null,c=l(n,r.groupId,d);return c?o(t,n,c).map(e=>e.id):[e]}function d(e,t,n,i){if(0===e.length)return null;let a=null;for(let o of e){let e=t.find(e=>e.id===o);if(!e?.groupId)return null;let r=l(n,e.groupId,i);if(!r)return null;if(null===a)a=r;else if(a!==r)return null}return a}n.d(t,{C_:()=>l,Dp:()=>i,H3:()=>a,fI:()=>s,jV:()=>d,lS:()=>o,oH:()=>r})},2873:(e,t,n)=>{n.d(t,{R:()=>s});var i=n(73365),a=n(1521),o=n(74975),r=n(63453),l=n(55223);function s({width:e,height:t,config:n,now:d}){var c;let[u,h]=(0,a.useState)(()=>Date.now());(0,a.useEffect)(()=>{if(d)return;let e=setInterval(()=>h(Date.now()),1e3);return()=>clearInterval(e)},[d]);let m=d?d.getTime():u,f=Date.parse(n.targetInstant),g=Number.isFinite(f)?f:0,p=(0,l.rl)(g,m,n),y="transparent"===(c=n.backgroundColor)||null==c?null:"string"==typeof c?{type:"solid",color:c}:c,x=n.fontFamily??"ui-sans-serif, system-ui, sans-serif",w=`${"italic"===n.fontStyle?"italic ":""}${n.fontWeight??"600"}`,b=n.padding??0,S=Math.max(0,e-2*b),v=Math.max(0,t-2*b);if("stacked"===n.labelStyle&&!p.done){let a=(0,l.R6)(p,n),s=S/Math.max(1,a.length),d=Math.min(.5*v,.6*s),c=.3*d,u=b+(v-(d+1.4*c))/2;return(0,i.jsxs)(o.YJ,{name:"countdown-group",children:[y&&(0,i.jsx)(o.rw,{x:0,y:0,width:e,height:t,cornerRadius:n.cornerRadius??0,...(0,r.Bj)(y,e,t)}),a.map((e,t)=>{let a=b+s*t;return(0,i.jsxs)(o.YJ,{children:[(0,i.jsx)(o.EY,{x:a,y:u,width:s,text:e.value,fontSize:d,fontFamily:x,fontStyle:w,fill:n.color,align:"center"}),(0,i.jsx)(o.EY,{x:a,y:u+1.1*d,width:s,text:e.label.toUpperCase(),fontSize:c,fontFamily:x,fill:n.color,align:"center",opacity:.7})]},t)})]})}let k=(0,l.zt)(p,n),M=n.autoFit?(0,l.rc)(k,S,v):n.fontSize??64;return(0,i.jsxs)(o.YJ,{name:"countdown-group",children:[y&&(0,i.jsx)(o.rw,{x:0,y:0,width:e,height:t,cornerRadius:n.cornerRadius??0,...(0,r.Bj)(y,e,t)}),(0,i.jsx)(o.EY,{x:b,y:b,width:S,height:v,text:k,fontSize:M,fontFamily:x,fontStyle:w,fill:n.color,align:n.textAlign??"center",verticalAlign:n.verticalAlign??"middle",letterSpacing:n.letterSpacing??0,attrs:{"data-testid":"countdown-text","data-text":k}})]})}},6058:(e,t,n)=>{n.d(t,{bb:()=>a,l9:()=>l});var i=n(85283);let a=i.Yj().regex(/^#[0-9A-Fa-f]{6}$/,"Must be a valid hex color"),o=i.Yj().regex(/^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$/,"Must be a valid hex color (#RRGGBB or #RRGGBBAA)"),r=i.Ik({offset:i.ai().min(0).max(1),color:o}),l=i.gM("type",[i.Ik({type:i.eu("solid"),color:o}),i.Ik({type:i.eu("linear"),angle:i.ai().min(0).max(360),stops:i.YO(r).min(2).max(8)}),i.Ik({type:i.eu("radial"),cx:i.ai().min(0).max(1),cy:i.ai().min(0).max(1),r:i.ai().min(0).max(2),stops:i.YO(r).min(2).max(8)})])},12641:(e,t,n)=>{n.d(t,{w:()=>G});var i=n(73365),a=n(63751),o=n(27173),r=n(1296),l=n(74975),s=n(1521);
1function d(e){let[t,n]=(0,s.useState)(null),[i,a]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{a(!1),n(null);let t=new window.Image;t.crossOrigin="anonymous",t.onload=()=>n(t),t.onerror=()=>{a(!0),n(null)},t.src=e},[e]),{img:t,error:i}}function c(e,t,n,i,a){if(!i||!a)return{x:0,y:0,width:t,height:n};let o=t/n;switch(e){case"cover":{let e=0,r=0,l=i,s=a;return i/a>o?(s=a,e=(i-(l=a*o))/2):(l=i,r=(a-(s=i/o))/2),{x:0,y:0,width:t,height:n,crop:{x:e,y:r,width:l,height:s}}}case"contain":{let e=Math.min(t/i,n/a),o=i*e,r=a*e;return{x:(t-o)/2,y:(n-r)/2,width:o,height:r}}case"none":return{x:(t-i)/2,y:(n-a)/2,width:i,height:a};default:return{x:0,y:0,width:t,height:n}}}function u({element:e,onSelect:t,onDrillOrEdit:n,onDragStart:a,onSnapMove:o,onDragEnd:r,onTransformEnd:s}){let{img:h,error:m}=d(e.src),f=c(e.objectFit,e.width,e.height,h?.naturalWidth??0,h?.naturalHeight??0);return m?(0,i.jsxs)(l.YJ,{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,listening:!e.locked,draggable:!e.locked,onClick:t,onDblClick:n,onDblTap:n,onTap:t,onDragStart:a,onDragMove:e=>{let t=o(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>r(e.target.x(),e.target.y()),onTransformEnd:t=>{let n=t.target,i=n.scaleX(),a=n.scaleY();n.scaleX(1),n.scaleY(1),s(n.x(),n.y(),Math.max(5,e.width*Math.abs(i)),Math.max(5,e.height*Math.abs(a)),n.rotation())},children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"#1a1a1a",cornerRadius:e.cornerRadius,stroke:"#888",strokeWidth:1,dash:[4,4]}),(0,i.jsx)(l.EY,{x:0,y:e.height/2-8,width:e.width,height:16,text:`Image unavailable${e.name?` \xb7 ${e.name}`:""}`,fontSize:12,fill:"#aaa",align:"center",ellipsis:!0,wrap:"none",listening:!1})]}):(0,i.jsxs)(l.YJ,{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,clipFunc:t=>{t.rect(0,0,e.width,e.height)},listening:!e.locked,draggable:!e.locked,onClick:t,onDblClick:n,onDblTap:n,onTap:t,onDragStart:a,onDragMove:e=>{let t=o(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>r(e.target.x(),e.target.y()),onTransformEnd:t=>{let n=t.target,i=n.scaleX(),a=n.scaleY();n.scaleX(1),n.scaleY(1),s(n.x(),n.y(),Math.max(5,e.width*Math.abs(i)),Math.max(5,e.height*Math.abs(a)),n.rotation())},children:[(0,i.jsx)(l._V,{image:h??void 0,x:f.x,y:f.y,width:f.width,height:f.height,crop:f.crop,scaleX:e.flipX?-1:1,scaleY:e.flipY?-1:1,offsetX:e.flipX?f.width:0,offsetY:e.flipY?f.height:0,cornerRadius:e.cornerRadius}),(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"transparent"})]})}function h(e,t,n,i){let a=(0,s.useRef)(null),o=(0,s.useRef)(null),r=(0,s.useRef)(null),[l,d]=(0,s.use
1State)(null),[c,u]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{u(!1);let t=document.createElement("video");t.src=e,t.loop=i,t.crossOrigin="anonymous",t.autoplay=!0,t.style.display="none";let n=()=>{u(!0),d(null)};t.addEventListener("error",n),document.body.appendChild(t),a.current=t,t.play().catch(()=>{}),d(t);let l=()=>{o.current&&t.readyState>=2&&o.current.getLayer()?.batchDraw(),r.current=requestAnimationFrame(l)};return r.current=requestAnimationFrame(l),()=>{r.current&&cancelAnimationFrame(r.current),t.removeEventListener("error",n),t.pause(),t.parentNode&&document.body.removeChild(t)}},[e,i]),(0,s.useEffect)(()=>{let e=a.current;e&&(e.muted=t,e.volume=Number.isFinite(n)?Math.min(1,Math.max(0,n)):1)},[t,n,l]),{nodeRef:o,videoEl:l,error:c}}function m({element:e,onSelect:t,onDrillOrEdit:n,onDragStart:a,onSnapMove:o,onDragEnd:r,onTransformEnd:s}){let{nodeRef:d,videoEl:c,error:u}=h(e.src,e.muted,e.volume,!0),f=function(e,t,n,i,a){if(!i||!a)return{x:0,y:0,width:t,height:n};let o=t/n;switch(e){case"cover":{let e=0,r=0,l=i,s=a;return i/a>o?(s=a,e=(i-(l=a*o))/2):(l=i,r=(a-(s=i/o))/2),{x:0,y:0,width:t,height:n,crop:{x:e,y:r,width:l,height:s}}}case"contain":{let e=Math.min(t/i,n/a),o=i*e,r=a*e;return{x:(t-o)/2,y:(n-r)/2,width:o,height:r}}case"none":return{x:(t-i)/2,y:(n-a)/2,width:i,height:a};default:return{x:0,y:0,width:t,height:n}}}(e.objectFit,e.width,e.height,c?.videoWidth??0,c?.videoHeight??0);return u?(0,i.jsxs)(l.YJ,{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,listening:!e.locked,draggable:!e.locked,onClick:t,onDblClick:n,onDblTap:n,onTap:t,onDragStart:a,onDragMove:e=>{let t=o(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>r(e.target.x(),e.target.y()),onTransformEnd:t=>{let n=t.target,i=n.scaleX(),a=n.scaleY();n.scaleX(1),n.scaleY(1),s(n.x(),n.y(),Math.max(5,e.width*Math.abs(i)),Math.max(5,e.height*Math.abs(a)),n.rotation())},children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"#1a1a1a",stroke:"#888",strokeWidth:1,dash:[4,4]}),(0,i.jsx)(l.EY,{x:0,y:e.height/2-8,width:e.width,height:16,text:`Video unavailable${e.name?` \xb7 ${e.name}`:""}`,fontSize:12,fill:"#aaa",align:"center",ellipsis:!0,wrap:"none",listening:!1})]}):(0,i.jsxs)(l.YJ,{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,clipFunc:t=>{t.rect(0,0,e.width,e.height)},listening:!e.locked,draggable:!e.locked,onClick:t,onDblClick:n,onDblTap:n,onTap:t,onDragStart:a,onDragMove:e=>{let t=o(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>r(e.target.x(),e.target.y()),onTransformEnd:t=>{let n=t.target,i=n.scaleX(),a=n.scaleY();n.scaleX(1),n.scaleY(1),s(n.x(),n.y(),Math.max(5,e.width*Math.abs(i)),Math.max(5,e.height*Math.abs(a)),n.rotation())},children:[(0,i.jsx)(l._V,{ref:d,image:c??void 0,x:f.x,y:f.y,width:f.width,height:f.height,crop:f.crop}),(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"transparent"})]})}var f=n(63453),g=n(95334);function p({element:e,onSelect:t,onDrillOrEdit:n,onDragStart:o,onSnapMove:r,onDragEnd:d,onTransformEnd:c,stageScale:u}){let{nodeRef:h,editing:m,startEdit:y}=function(e,t){let n=(0,s.useRef)(null),[i,o]=(0,s.useState)(!1),r=(0,a.U)(e=>e.updateElement),l=(0,a.U)(e=>
1e.pushHistory),d=(0,g.f)();return{nodeRef:n,editing:i,startEdit:function(){if(e.locked)return;o(!0);let i=n.current;if(!i)return;let a=d(e.fontFamilyId,e.fontFamily),s=i.getStage(),c=s?.container().getBoundingClientRect()??{left:0,top:0},u=i.getAbsolutePosition(),h=c.left+u.x,m=c.top+u.y,g=getComputedStyle(document.documentElement).getPropertyValue("--primary").trim()||"#6366F1",p=s?.container()??null,y=document.createElement("textarea");y.value=e.content,y.setAttribute("aria-label","Edit text element"),y.style.cssText=` 2 position: fixed; 3 left: ${h}px; 4 top: ${m}px; 5 width: ${e.width*t}px; 6 min-height: ${e.fontSize*t}px; 7 font-size: ${e.fontSize*t}px; 8 font-family: '${a.replace(/'/g,"\\'")}'; 9 font-weight: ${e.fontWeight}; 10 font-style: ${e.fontStyle}; 11 color: ${e.color}; 12 background: ${"transparent"===e.backgroundColor?"transparent":(0,f.s3)(e.backgroundColor)}; 13 text-align: ${e.textAlign}; 14 line-height: ${e.lineHeight}; 15 letter-spacing: ${e.letterSpacing*t}px; 16 border: none; 17 outline: 2px solid ${g}; 18 resize: none; 19 overflow: hidden; 20 transform-origin: top left; 21 transform: rotate(${e.rotation}deg); 22 z-index: 9999; 23 padding: ${e.padding*t}px; 24 `,document.body.appendChild(y),y.focus(),y.select();let x=!1,w=(t,n)=>{!x&&(x=!0,t&&(l(),r(e.id,{content:y.value},{skipHistory:!0})),y.parentNode&&y.parentNode.removeChild(y),o(!1),n&&p&&p.focus?.({preventScroll:!0}))};y.addEventListener("blur",()=>w(!0,!1)),y.addEventListener("keydown",e=>{"Escape"===e.key&&(e.preventDefault(),w(!1,!0))})}}}(e,u),x=(0,s.useRef)(null),w=(0,g.f)()(e.fontFamilyId,e.fontFamily),b=e.backgroundColor&&"transparent"!==e.backgroundColor;return(0,i.jsxs)(i.Fragment,{children:[b&&(0,i.jsx)(l.rw,{ref:x,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,...(0,f.Bj)(e.backgroundColor,e.width,e.height,!1),opacity:e.opacity,listening:!1}),(0,i.jsx)(l.EY,{ref:h,id:e.id,x:e.x,y:e.y,width:e.width,rotation:e.rotation,opacity:m?0:e.opacity,text:e.content||"Double-click to edit",fontSize:e.fontSize,fontFamily:w,fontStyle:`${e.fontStyle} ${e.fontWeight}`,align:"justify"===e.textAlign?"left":e.textAlign,fill:e.content?e.color:"#9CA3AF",lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,padding:e.padding,listening:!e.locked,draggable:!e.locked,onClick:t,onTap:t,onDblClick:()=>{n()&&y()},onDblTap:()=>{n()&&y()},onDragStart:o,onDragMove:e=>{let t=r(e.target.x(),e.target.y());e.target.position(t),x.current?.position(t)},onDragEnd:e=>d(e.target.x(),e.target.y()),onTransform:function(){let e=h.current;e&&(e.setAttrs({width:Math.max(20,e.width()*e.scaleX()),scaleX:1,scaleY:1}),x.current?.setAttrs({width:e.width()}))},onTransformEnd:function(){let e=h.current;e&&c(e.x(),e.y(),e.width(),e.height(),e.rotation())}})]})}function y({element:e,isSelected:t,onSelect:n,onDrillOrEdit:a,onDragStart:o,onSnapMove:r,onDragEnd:s,onTransformEnd:d}){let c=(0,f.m3)(e),u="center"===c.centering,h={id:e.id,rotation:e.rotation,opacity:e.opacity,...(0,f.Bj)(e.fill,e.width,e.height,u),stroke:"transparent"===e.stroke?void 0:e.stroke,strokeWidth:e.strokeWidth,lineJoin:"round",listening:!e.locked,draggable:!e.locked,onClick:n,onTap:n,onDblClick:a,onDblTap:a,onDragStart:o,onDragMove:t=>{let n=r(u?t.target.x()-e.width/2:t.target.x(),u?t.target.y()-e.height/2:t.target.y());t.target.position({x:u?n.x+e.width/2:n.x,y:u?n.y+e.height/2:n.y})},onDragEnd:t=>{s(u?t.target.x()-e.width/2:t.target.x(),u?t.target.y()-e.height/2:t.target.y())},onTransformEnd:e=>{let t=e.target,n=Math.max(5,t.width()*t.scaleX()),i=Math.max(5,t.height()*t.scaleY());d(u?t.x()-n/2:t.x(),u?t.y()-i/2:t.y(),n,i,t.rotation()),t.scaleX(1),t.scaleY(1)}},m=u?e.x+e.width/2:e.x,g=u?e.y+e.height/2:e.y;switch(c.geometry.kind){case"rect":return(0,i.jsx)(l.rw,{...h,x:m,y:g,width:e.width,height:e.height,cornerRadius:c.geometry.cornerRadius});case"circle":return(0,i.jsx)(l.jl,{...h,x:m,y:g,radius:Math.min(e.width,e.height)/2});case"ellipse":return(0,i.jsx)(l.Pp,{...h,x:m,y:g,radiusX:e.width/2,radiusY:e.height/2});case"regularPolygon":return(0,i.jsx)(l.Rp,{...h,x:m,y:g,sides:c.geometry.sides,radius:Math.min(e.width,e.height)/2});case"star":return(0,i.jsx)(l.FE,{...h,x:m,y:g,numPoints:c.geometry.numPoints,innerRadius:Math.min(e.width,e.height)/2*c.geometry.innerRadiusRatio,outerRadius:Math.min(e.width,e.height)/2});case"polygon":return(0,i.jsx)(l.N1,{...h,x:m,y:g,points:c.geometry.points,closed:!0});case"line":return(0,i.jsx)(l.N1,{...h,x:m,y:g,points:c.geometry.points,closed:!1}
24);case"arrow":return(0,i.jsx)(l.i3,{...h,x:m,y:g,points:c.geometry.points,pointerLength:c.geometry.pointerLength,pointerWidth:c.geometry.pointerWidth});case"path":return(0,i.jsx)(l.wA,{...h,x:m,y:g,data:c.geometry.d})}}function x(e){let[t,n]=(0,s.useState)(null);return(0,s.useEffect)(()=>{if(!e)return void n(null);let t=new window.Image;return t.crossOrigin="anonymous",t.src=e,t.onload=()=>n(t),()=>{t.onload=null}},[e]),{img:t}}function w({element:e,onSelect:t,onDrillOrEdit:n,onDragStart:o,onSnapMove:r,onDragEnd:s,onTransformEnd:d}){let c=(0,a.U)(t=>t.mediaById[e.mediaFileId]),u=(0,a.U)(t=>t.previewPageByElementId[e.id]??0),h=c?.pages??[],m=e.pages.length>0,f=m?Math.min(Math.max(0,u),e.pages.length-1):0,g=m?e.pages[f]:null,p=g?h.find(e=>e.page===g.page):null,{img:y}=x(p?.url??null);if(!c||!m||!p)return(0,i.jsx)(l.YJ,{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,listening:!e.locked,draggable:!e.locked,onClick:t,onDblClick:n,onDblTap:n,onTap:t,onDragStart:o,onDragMove:e=>{let t=r(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>s(e.target.x(),e.target.y()),onTransformEnd:t=>{let n=t.target,i=n.scaleX(),a=n.scaleY();n.scaleX(1),n.scaleY(1),d(n.x(),n.y(),Math.max(5,e.width*Math.abs(i)),Math.max(5,e.height*Math.abs(a)),n.rotation())},children:(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:e.backgroundColor,cornerRadius:e.cornerRadius,stroke:"#888",strokeWidth:1,dash:[4,4]})});let b=function(e,t,n,i,a){if(!i||!a)return{x:0,y:0,width:t,height:n};switch(e){case"fill":return{x:0,y:0,width:t,height:n};case"none":return{x:(t-i)/2,y:(n-a)/2,width:i,height:a};case"cover":{let e=Math.max(t/i,n/a),o=i*e,r=a*e;return{x:(t-o)/2,y:(n-r)/2,width:o,height:r}}default:{let e=Math.min(t/i,n/a),o=i*e,r=a*e;return{x:(t-o)/2,y:(n-r)/2,width:o,height:r}}}}(e.objectFit,e.width,e.height,p.widthPx||(y?.naturalWidth??1),p.heightPx||(y?.naturalHeight??1));return(0,i.jsxs)(l.YJ,{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,clipFunc:t=>{t.rect(0,0,e.width,e.height)},listening:!e.locked,draggable:!e.locked,onClick:t,onDblClick:n,onDblTap:n,onTap:t,onDragStart:o,onDragMove:e=>{let t=r(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>s(e.target.x(),e.target.y()),onTransformEnd:t=>{let n=t.target,i=n.scaleX(),a=n.scaleY();n.scaleX(1),n.scaleY(1),d(n.x(),n.y(),Math.max(5,e.width*Math.abs(i)),Math.max(5,e.height*Math.abs(a)),n.rotation())},children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:e.backgroundColor,cornerRadius:e.cornerRadius}),(0,i.jsx)(l._V,{image:y??void 0,x:b.x,y:b.y,width:b.width,height:b.height,cornerRadius:e.cornerRadius}),(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"transparent"})]})}var b=n(78919),S=n(69894),v=n(2873),k=n(75896),M=n(46638),I=n(42353),j=n(86367),z=n(1062);function F(e,t){return e?.source==="manual"?e.value:e?.source==="screen"?t?.timezone??void 0:void 0}function C({element:e,isSelected:t,onSelect:n,onDrillOrEdit:a,onDragStart:o,onSnapMove:r,onDragEnd:d,onTransformEnd:c,context:u}){let h="clock"===e.appId?e.config:null,m=h?F(h.timezone,u):void 0,f="date"===e.appId?e.config:null,g=f?F(f.timezone,u):void 0,p="countdown"===e.appId?e.config:null,y="worldclock"===e.appId?e.config:null,x="ticker"===e.appId?e.config:null,w="dayssince"===e.appId?e.config:null,D=e.config??{},{families:R}=(0,z.s)();return(0,s.useEffect)(()=>{if("clock"!==e.appId&&"date"!==e.appId&&"countdown"!==e.appId&&"worldclock"!==e.appId&&"ticker"!==e.appId&&"dayssince"!==e.appId||!D.fontFamilyId)return;let t=R.find(e=>e.id===D.fontFamilyId);if(!t)return;let n=Number(D.fontWeight??"600"),i=D.fontStyle??"normal",a=t.faces.find(e=>e.weight===n&&e.style===i)??t.faces.find(e=>400===e.weight&&"normal"===e.style)??t.faces[0];if(a)return(0,j.yg)({family:t.name,weight:a.weight,style:a.style,url:a.webUrl})},[e.appId,D.fontFamilyId,D.fontWeight,D.fontStyle,R]),(0,i.jsxs)(l.YJ,{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,listening:!e.locked,draggable:!e.locked,onClick:n,onDblClick:a,onDblTap:a,onTap:n,onDragStart:o,onDragMove:e=>{let t=r(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>d(e.target.x(),e.target.y()),onTransformEnd:e=>{let t=e.target,n=Math.max(20,t.width()*t.scaleX()),i=Math.max(20,t.height()*t.scaleY());c(t.x(),t.y(),n,i,t.rotation()),t.scaleX(1),t.scaleY(1)},children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"rgba(0,0,0,0)"}),h&&(0,i.jsx)(b._d,{width:e.width,height:e.height,config:h,resolvedTz:m}),f&&(0,i.jsx)(S.W,{width:e.width,height:e.height,config:f,resolvedTz:g}),p&&(0,i.jsx)(v.R,{width:e.width,height:e.height,config:p}),y&&(0,i.jsx)(k.a,{width:e.width,height:e.height,config:y}),x&&(0,i.jsx)(M.k,{width:e.width,height:e.height,config:x}),w&&(0,i.jsx)(I.l,{width:e.width,height:e.height,config:w})]})}var D=n(61194),R=n(85362);function A({element:e,isSelected:t,onSelect:n,onDrillOrEdit:a,onDragStart:o,onSnapMove:r,onDragEnd:d,onTransformEnd:c}){let u=(0,R.E)(e.src,{hasHeaderRow:e.hasHeaderRow,delimiter:e.delimiter,columns:e.columns}),h=(0,g.f)()(e.fontFamilyId,e.fontFamily),m="transparent"===e.backgroundColor?void 0:e.backgroundColor,[f,p]=(0,s.use
24State)(0),y=Math.max(2,e.pageIntervalSec);(0,s.useEffect)(()=>{let e=setInterval(()=>p(e=>e+1),1e3*y);return()=>clearInterval(e)},[y]),(0,s.useEffect)(()=>{p(0)},[e.src]);let x={id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,listening:!e.locked,draggable:!e.locked,onClick:n,onTap:n,onDblClick:a,onDblTap:a,onDragStart:o,onDragMove:e=>{let t=r(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>d(e.target.x(),e.target.y()),onTransformEnd:t=>{let n=t.target,i=n.scaleX(),a=n.scaleY();n.scaleX(1),n.scaleY(1),c(n.x(),n.y(),Math.max(5,e.width*Math.abs(i)),Math.max(5,e.height*Math.abs(a)),n.rotation())}};if("ready"!==u.status||0===u.model.columns.length)return(0,i.jsxs)(l.YJ,{...x,children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:m??"#ffffff",cornerRadius:e.cornerRadius,stroke:"#888",strokeWidth:1,dash:[4,4]}),(0,i.jsx)(l.EY,{x:0,y:e.height/2-8,width:e.width,align:"center",text:"error"===u.status?"Could not read CSV":"Loading CSV...",fontSize:13,fill:"#888"})]});let{columns:w,rows:b}=u.model,S=e.padding,v=Math.max(0,e.width-2*S),k=v/w.length,M=e.fontSize*e.lineHeight+8,I=e.showHeader?M:0,j=e.rowsPerPage??(0,D.bB)({boxHeight:e.height,padding:S,showHeader:e.showHeader,headerHeight:M,rowHeight:M}),z=(0,D.Lp)(b.length,j),F=(0,D.QV)(b,f%Math.max(1,z),j),C=e.headerBold?"bold":e.fontWeight;return(0,i.jsxs)(l.YJ,{...x,clipFunc:t=>{t.rect(0,0,e.width,e.height)},children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:m??"#ffffff",cornerRadius:e.cornerRadius}),e.showHeader&&(0,i.jsxs)(l.YJ,{x:S,y:S,children:["transparent"!==e.headerBackground&&(0,i.jsx)(l.rw,{x:0,y:0,width:v,height:I,fill:e.headerBackground}),w.map((t,n)=>(0,i.jsx)(l.EY,{x:n*k+4,y:6,width:Math.max(0,k-8),height:I,text:e.headerUppercase?t.label.toUpperCase():t.label,fontFamily:h,fontSize:e.fontSize,fontStyle:C,fill:e.headerColor,align:t.align,letterSpacing:e.letterSpacing,ellipsis:!0,wrap:"none"},t.key))]}),(0,i.jsxs)(l.YJ,{x:S,y:S+I,children:[F.map((t,n)=>{let a=n*M,o=e.striped&&n%2==1&&"transparent"!==e.stripeColor;return(0,i.jsxs)(l.YJ,{y:a,children:[o&&(0,i.jsx)(l.rw,{x:0,y:0,width:v,height:M,fill:e.stripeColor}),w.map((n,a)=>(0,i.jsx)(l.EY,{x:a*k+4,y:4,width:Math.max(0,k-8),height:M,text:t[n.index]??"",fontFamily:h,fontSize:e.fontSize,fontStyle:e.fontWeight,fill:e.color,align:n.align,letterSpacing:e.letterSpacing,ellipsis:!0,wrap:"none"},n.key)),e.showRowLines&&(0,i.jsx)(l.N1,{points:[0,M,v,M],stroke:"#e5e7eb",strokeWidth:1})]},n)}),e.showColumnLines&&w.slice(1).map((e,t)=>(0,i.jsx)(l.N1,{points:[(t+1)*k,-I,(t+1)*k,F.length*M],stroke:"#e5e7eb",strokeWidth:1},e.key))]}),(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"transparent"})]})}function $(e){let t=0;for(let n of e)t+=Math.max(0,n);return t}function T({element:e,onSelect:t,onDrillOrEdit:n,onDragStart:a,onSnapMove:o,onDragEnd:r,onTransformEnd:d}){let c=e.items,u=c.map(e=>e.durationMs),[h,m]=(0,s.useState)(0);(0,s.useEffect)(()=>{if(c.length<=1)return;let t=function(e,t,n){let i=e.length;if(0===i)return 1/0;let a=$(e);if(a<=0||!n&&t>=a)return 1/0;let o=n?(t%a+a)%a:Math.max(0,t),r=0;for(let t=0;t<i;t++)if(o<(r+=Math.max(0,e[t])))return r-o;return 1/0}(u,h,e.loop);if(!isFinite(t))return;let n=setTimeout(()=>m(e=>e+Math.max(1,t)),Math.max(50,Math.min(t,6e4)));return()=>clearTimeout(n)},[h,c.length,e.loop,u.join(",")]),(0,s.useEffect)(()=>{m(0)},[c.map(e=>e.id).join(",")]);let f=function(e,t,n){let i,a=e.length;if(0===a)return 0;let o=$(e);if(o<=0)return 0;if(n)i=(t%o+o)%o;else{if(t>=o)return a-1;i=Math.max(0,t)}let r=0;for(let t=0;t<a;t++)if(i<(r+=Math.max(0,e[t])))return t;return a-1}(u,h,e.loop),g=c[f],p={id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,listening:!e.locked,draggable:!e.locked,onClick:t,onTap:t,onDblClick:n,onDblTap:n,onDragStart:a,onDragMove:e=>{let t=o(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>r(e.target.x(),e.target.y()),onTransformEnd:t=>{let n=t.target,i=n.scaleX(),a=n.scaleY();n.scaleX(1),n.scaleY(1),d(n.x(),n.y(),Math.max(5,e.width*Math.abs(i)),Math.max(5,e.height*Math.abs(a)
24),n.rotation())}},y="transparent"===e.backgroundColor?void 0:e.backgroundColor;return 0===c.length?(0,i.jsxs)(l.YJ,{...p,children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"#1a1a1a",stroke:"#888",strokeWidth:1,dash:[4,4]}),(0,i.jsx)(l.EY,{x:0,y:e.height/2-8,width:e.width,align:"center",text:"Add slides",fontSize:13,fill:"#888"})]}):(0,i.jsxs)(l.YJ,{...p,clipFunc:t=>{t.rect(0,0,e.width,e.height)},children:[y&&(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:y}),g&&(0,i.jsx)(Y,{element:e,slide:g},g.id),(0,i.jsx)(l.rw,{x:8,y:8,width:44,height:18,cornerRadius:9,fill:"rgba(0,0,0,0.55)",listening:!1}),(0,i.jsx)(l.EY,{x:8,y:11,width:44,align:"center",text:`${f+1}/${c.length}`,fontSize:11,fill:"#fff",listening:!1}),(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"transparent"})]})}function Y({element:e,slide:t}){return"video"===t.mediaType?(0,i.jsx)(P,{element:e,slide:t}):(0,i.jsx)(E,{element:e,slide:t})}function E({element:e,slide:t}){let{img:n}=d(t.src);if(!n)return null;let a=c(e.objectFit,e.width,e.height,n.naturalWidth,n.naturalHeight);return(0,i.jsx)(l._V,{image:n,x:a.x,y:a.y,width:a.width,height:a.height,crop:a.crop})}function P({element:e,slide:t}){let{nodeRef:n,videoEl:a}=h(t.src,e.muted,e.volume,!0);if(!a)return null;let o=c(e.objectFit,e.width,e.height,a.videoWidth,a.videoHeight);return(0,i.jsx)(l._V,{ref:n,image:a,x:o.x,y:o.y,width:o.width,height:o.height,crop:o.crop})}var H=n(77378),U=n(16361);function W({element:e,isSelected:t,onSelect:n,onDrillOrEdit:a,onDragStart:o,onSnapMove:r,onDragEnd:d,onTransformEnd:c}){let u=function(e,t,n,i){let[a,o]=(0,s.useState)({status:"loading"});return(0,s.useEffect)(()=>{if(!e)return void o({status:"error"});let a=!0;return o({status:"loading"}),fetch(e).then(e=>{if(!e.ok)throw Error(String(e.status));return e.text()}).then(e=>{let r,l;a&&o({status:"ready",drawList:(r=(0,U.oN)(e,{hasHeaderRow:t.hasHeaderRow,delimiter:t.delimiter}),l=(0,H.LJ)(r,{labelColumn:t.labelColumn,valueColumns:t.valueColumns,seriesColors:t.seriesColors,mode:t.mode,aggregate:t.aggregate}),(0,H.kA)(l,{chartType:t.chartType,orientation:t.orientation,showXAxis:t.showXAxis,showYAxis:t.showYAxis,showGridLines:t.showGridLines,showLegend:t.showLegend,title:t.title,fontSize:t.fontSize,color:t.color,yMin:t.yMin,yMax:t.yMax,innerRadius:t.innerRadius},n,i))})}).catch(()=>{a&&o({status:"error"})}),()=>{a=!1}},[e,JSON.stringify(t),n,i]),a}(e.src,{hasHeaderRow:e.hasHeaderRow,delimiter:e.delimiter,labelColumn:e.labelColumn,valueColumns:e.valueColumns,seriesColors:e.seriesColors,mode:e.mode,aggregate:e.aggregate,chartType:e.chartType,orientation:e.orientation,showXAxis:e.showXAxis,showYAxis:e.showYAxis,showGridLines:e.showGridLines,showLegend:e.showLegend,title:e.title,fontSize:e.fontSize,color:e.color,yMin:e.yMin,yMax:e.yMax,innerRadius:e.innerRadius},e.width,e.height),h=(0,g.f)()(e.fontFamilyId,e.fontFamily),m="transparent"===e.backgroundColor?void 0:e.backgroundColor,f={id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,listening:!e.locked,draggable:!e.locked,onClick:n,onTap:n,onDblClick:a,onDblTap:a,onDragStart:o,onDragMove:e=>{let t=r(e.target.x(),e.target.y());e.target.position(t)},onDragEnd:e=>d(e.target.x(),e.target.y()),onTransformEnd:t=>{let n=t.target,i=n.scaleX(),a=n.scaleY();n.scaleX(1),n.scaleY(1),c(n.x(),n.y(),Math.max(5,e.width*Math.abs(i)),Math.max(5,e.height*Math.abs(a)),n.rotation())}};if("ready"!==u.status)return(0,i.jsxs)(l.YJ,{...f,children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:m??"#ffffff",cornerRadius:e.cornerRadius,stroke:"#888",strokeWidth:1,dash:[4,4]}),(0,i.jsx)(l.EY,{x:0,y:e.height/2-8,width:e.width,align:"center",text:"error"===u.status?"Could not read CSV":"Loading CSV...",fontSize:13,fill:"#888"})]});let{drawList:p}=u,y=e.fontWeight;return(0,i.jsxs)(l.YJ,{...f,clipFunc:t=>{t.rect(0,0,e.width,e.height)},children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:m??"#ffffff",cornerRadius:e.cornerRadius}),p.segments.map((e,t)=>(0,i.jsx)(l.N1,{points:[e.x1,e.y1,e.x2,e.y2],stroke:e.color,strokeWidth:1},`seg-${t}`)),p.areas.map((e,t)=>(0,i.jsx)(l.N1,{points:e.points,closed:!0,fill:e.color,opacity:.3,stroke:"transparent",strokeWidth:0},`area-${t}`)),p.lines.map((e,t)=>(0,i.jsx)(l.N1,{points:e.points,stroke:e.color,strokeWidth:e.width},`line-${t}`)),p.rects.map((e,t)=>(0,i.jsx)(l.rw,{x:e.x,y:e.y,width:e.w,height:e.h,fill:e.color},`rect-${t}`)),p.arcs.map((e,t)=>(0,i.jsx)(l.l5,{x:e.cx,y:e.cy,innerRadius:e.rInner,outerRadius:e.rOuter,angle:(e.endAngle-e.startAngle)*180/Math.PI,rotation:180*e.startAngle/Math.PI-90,fill:e.color},`arc-${t}`)),p.labels.map((e,t)=>{let n=(0,H.qv)(e);return(0,i.jsx)(l.EY,{x:n.x,y:n.y,width:n.width,height:n.height,text:e.text,fontSize:e.fontSize,fontFamily:h,fontStyle:y,fill:e.color,align:n.align,verticalAlign:n.verticalAlign,wrap:"none"},`lbl-${t}`)}),p.legend.map((t,n)=>(0,i.jsxs)(l.YJ,{children:[(0,i.jsx)(l.rw,{x:t.x,y:t.y,width:t.size,height:t.size,fill:t.color}),(0,i.jsx)(l.EY,{x:t.x+t.size+4,y:t.y,text:t.label,fontSize:t.fontSize,fontFamily:h,fontStyle:y,fill:e.color,verticalAlign:"top"})]},`legend-${n}`)),(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:"transparent"})]})}function L(e,t,n,i,a){if(!i||!a)return{x:0,y:0,width:t,height:n};switch(e){case"fill":return{x:0,y:0,width:t,height:n};case"none":return{x:(t-i)/2,y:(n-a)/2,width:i,height:a};case"cover":{let e=Math.max(t/i,n/a),o=i*e,r=a*e;return{x:(t-o)/2,y:(n-r)/2,width:o,height:r}}default:{let e=Math.min(t/i,n/a),o=i*e,r=a*e;return{x:(t-o)/2,y:(n-r)/2,width:o,height:r}}}}function N({element:e}){let t=(0,a.U)(t=>t.mediaById[e.mediaFileId]),n=t?.pages??[],o=e.pages,r=o.length>0,d=o.reduce((e,t)=>
24e+t.durationMs,0),c=Math.max(0,e.pageTransitionMs),u="crossfade"===e.pageTransition&&c>0,h=(0,s.useRef)("u">typeof performance?performance.now():0),[m,f]=(0,s.useState)(0),[g,p]=(0,s.useState)(null),[y,w]=(0,s.useState)(0);(0,s.useEffect)(()=>{if(!r||d<=0)return;let e=0,t=()=>{let n=((performance.now()-h.current)%d+d)%d,i=0,a=0;for(let e=0;e<o.length;e++){if(n<i+o[e].durationMs){a=e;break}i+=o[e].durationMs}let r=n-i;u&&r<c&&o.length>1?(f((a-1+o.length)%o.length),p(a),w(r/c)):(f(a),p(null),w(0)),e=requestAnimationFrame(t)};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[r,d,o,u,c]);let b=r?o[Math.min(m,o.length-1)]:null,S=null!=g&&r?o[g]:null,v=b?n.find(e=>e.page===b.page)??null:null,k=S?n.find(e=>e.page===S.page)??null:null,{img:M}=x(v?.url??null),{img:I}=x(k?.url??null);if(!t||"ready"!==t.processingStatus||!r||!v)return(0,i.jsx)(l.YJ,{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,listening:!1,children:(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:e.backgroundColor,cornerRadius:e.cornerRadius})});let j=L(e.objectFit,e.width,e.height,v.widthPx||(M?.naturalWidth??1),v.heightPx||(M?.naturalHeight??1)),z=k?L(e.objectFit,e.width,e.height,k.widthPx||(I?.naturalWidth??1),k.heightPx||(I?.naturalHeight??1)):null;return(0,i.jsxs)(l.YJ,{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,opacity:e.opacity,clipFunc:t=>{t.rect(0,0,e.width,e.height)},listening:!1,children:[(0,i.jsx)(l.rw,{x:0,y:0,width:e.width,height:e.height,fill:e.backgroundColor,cornerRadius:e.cornerRadius}),M&&(0,i.jsx)(l._V,{image:M,x:j.x,y:j.y,width:j.width,height:j.height,cornerRadius:e.cornerRadius,opacity:1-y}),I&&z&&(0,i.jsx)(l._V,{image:I,x:z.x,y:z.y,width:z.width,height:z.height,cornerRadius:e.cornerRadius,opacity:y})]})}function G({elements:e,selectedIds:t,stageScale:n,stagePos:l,stageRef:s,onElementDragMove:d,onElementDragEnd:c,previewMode:h=!1,appContext:f}){let g,x,b,S,v,k,M,I,{sorted:j,handleSelect:z,handleDoubleClick:F,handleDragStart:D,handleDragEnd:R,handleTransformEnd:$}=(g=(0,a.U)(e=>
24e.pushHistory),x=(0,a.U)(e=>e.updateElement),b=(0,a.U)(e=>e.updateElements),S=(0,a.U)(e=>e.setSelection),v=(0,a.U)(e=>e.groups),k=(0,a.U)(e=>e.enteredGroupId),M=(0,a.U)(e=>e.enterGroup),I=(0,a.U)(e=>e.resetDrill),{sorted:[...e].sort((e,t)=>e.zIndex-t.zIndex),handleSelect:function(n,i){if(i?.evt?.button===2)return;let a=i?.evt?.altKey?[n]:(0,r.fI)(n,e,v,k),o=e.find(e=>e.id===n),l=!!o?.groupId&&!!k&&null!==(0,r.C_)(v,o.groupId,k);k&&!l&&I(),i?.evt?.shiftKey?a.some(e=>t.includes(e))?S(t.filter(e=>!a.includes(e))):S([...t,...a]):S(a)},handleDoubleClick:function(t){let n=e.find(e=>e.id===t);if(!n?.groupId)return!0;let i=(0,r.C_)(v,n.groupId,k);if(!i)return!0;M(i);let a=(0,r.fI)(t,e,v,i);return S(a),1===a.length&&a[0]===t},handleDragStart:function(n){let i=(0,o.al)([n],e);i.some(e=>t.includes(e))||S(i),g()},handleDragEnd:function(t,n,i){let a=e.find(e=>e.id===t);if(a?.groupId){let t=n-a.x,o=i-a.y;b(e.filter(e=>e.groupId===a.groupId).map(e=>({id:e.id,changes:{x:e.x+t,y:e.y+o}})),{skipHistory:!0})}else x(t,{x:n,y:i},{skipHistory:!0})},handleTransformEnd:function(e,t,n,i,a,o){x(e,{x:t,y:n,width:i,height:a,rotation:(o%360+360)%360},{skipHistory:!0})}});return(0,i.jsx)(i.Fragment,{children:j.map(e=>{if(e.hidden)return null;let a={isSelected:t.includes(e.id),onSelect:t=>z(e.id,t??{}),onDrillOrEdit:()=>F(e.id),onDragStart:()=>D(e.id),onSnapMove:(t,n)=>d(e.id,t,n,e.width,e.height),onDragEnd:(t,n)=>{R(e.id,t,n),c()},onTransformEnd:(t,n,i,a,o)=>$(e.id,t,n,i,a,o)};switch(e.type){case"image":return(0,i.jsx)(u,{element:e,...a,stageRef:s},e.id);case"video":return(0,i.jsx)(m,{element:e,...a},e.id);case"text":return(0,i.jsx)(p,{element:e,...a,stageScale:n,stagePos:l},e.id);case"shape":return(0,i.jsx)(y,{element:e,...a},e.id);case"pdf":return h?(0,i.jsx)(N,{element:e},e.id):(0,i.jsx)(w,{element:e,...a},e.id);case"app":return(0,i.jsx)(C,{element:e,...a,context:f??null},e.id);case"table":return(0,i.jsx)(A,{element:e,...a},e.id);case"slider":return(0,i.jsx)(T,{element:e,...a},e.id);case"chart":return(0,i.jsx)(W,{element:e,...a},e.id);default:return null}})})}},16361:(e,t,n)=>{n.d(t,{oN:()=>r});let i=[",",";"," ","|"];function a(e){return 65279===e.charCodeAt(0)?e.slice(1):e}function o(e){return e.length>2e3?e.slice(0,2e3):e}function r(e,t){let n=t.delimiter&&"auto"!==t.delimiter?t.delimiter:function(e){let t=function(e){let t=!1;for(let n=0;n<e.length;n++){let i=e[n];if('"'===i){if(t&&'"'===e[n+1]){n++;continue}t=!t}else if(!t&&("\n"===i||"\r"===i))return e.slice(0,n)}return e}(a(e)),n=",",o=0;for(let e of i){let i=function(e,t){let n=!1,i=0;for(let a=0;a<e.length;a++){let o=e[a];if('"'===o){if(n&&'"'===e[a+1]){a++;continue}n=!n}else!n&&o===t&&i++}return i}(t,e);i>o&&(n=e,o=i)}return n}(e),r=function(e,t){let n=a(e),i=[],o=[],r="",l=!1,s=!1,d=()=>{o.push(r),r=""},c=()=>{o.push(r),r="",i.push(o),o=[],s=!1};for(let e=0;e<n.length;e++){let i=n[e];if(s=!0,l){'"'===i?'"'===n[e+1]?(r+='"',e++):l=!1:r+=i;continue}if('"'===i){l=!0;continue}if(i===t){d();continue}if("\r"===i){"\n"===n[e+1]&&e++,c();continue}if("\n"===i){c();continue}r+=i}return(s||r.length>0||o.length>0)&&c(),i}(e,n);if(0===r.length)return{headers:[],rows:[],truncated:!1};let l=!1,s=r[0].length,d=Math.min(s,256);s>256&&(l=!0);let c=r[0].slice(0,d).map(o),u=t.hasHeaderRow?c:Array.from({length:d},(e,t)=>`col${t+1}`),h=+!!t.hasHeaderRow,m=[];for(let e=h;e<r.length;e++){if(m.length>=5e3){l=!0;break}let t=r[e],n=Array(d);for(let e=0;e<d;e++)n[e]=o(t[e]??"");m.push(n)}return{headers:u,rows:m,truncated:l}}},24913:(e,t,n)=>{n.d(t,{G:()=>r});var i=n(94377),a=n(28658);function o(e,t){return`/organizations/${e}/spaces/${t}/catalog`}let r={listProducts:async(e,t,n)=>{let r={};n?.page&&(r.page=String(n.page)),n?.pageSize&&(r.pageSize=String(n.pageSize)),n?.search&&(r.search=n.search),n?.categoryId&&(r.categoryId=n.categoryId),n?.available!==void 0&&(r.available=n.available?"true":"false");let l=await i.u.get(`${o(e,t)}/products`,{params:r});return(0,a.mT)(l)},getProduct:async(e,t,n)=>{let r=await i.u.get(`${o(e,t)}/products/${n}`);return(0,a.oA)(r,"product")},createProduct:async(e,t,n)=>{let r=await i.u.post(`${o(e,t)}/products`,n);return(0,a.oA)(r,"product")},getImageFolder:async(e,t)=>{let n=await i.u.get(`${o(e,t)}/products/image-folder`);return(0,a.mT)(n)},updateProduct:async(e,t,n,r)=>{let l=await i.u.patch(`${o(e,t)}/products/${n}`,r);return(0,a.oA)(l,"product")},deleteProduct:async(e,t,n)=>{await i.u.delete(`${o(e,t)}/products/${n}`)},reorderProducts:async(e,t,n)=>{let r=await i.u.post(`${o(e,t)}/products/reorder`,{ids:n});return(0,a.oA)(r,"products")},bulkUpdate:async(e,t,n)=>{let r=await i.u.patch(`${o(e,t)}/products/bulk`,n);return(0,a.mT)(r)},bulkDelete:async(e,t,n)=>{let r=await i.u.delete(`${o(e,t)}/products/bulk`,{data:{ids:n}});return(0,a.mT)(r)},listCategories:async(e,t)=>{let n=await i.u.get(`${o(e,t)}/categories`);return(0,a.oA)(n,"categories")},createCategory:async(e,t,n)=>{let r=await i.u.post(`${o(e,t)}/categories`,n);return(0,a.oA)(r,"category")},updateCategory:async(e,t,n,r)=>{let l=await i.u.patch(`${o(e,t)}/categories/${n}`,r);return(0,a.oA)(l,"category")}
24,deleteCategory:async(e,t,n)=>{await i.u.delete(`${o(e,t)}/categories/${n}`)},reorderCategories:async(e,t,n)=>{let r=await i.u.post(`${o(e,t)}/categories/reorder`,{ids:n});return(0,a.oA)(r,"categories")},getSettings:async(e,t)=>{let n=await i.u.get(`${o(e,t)}/settings`);return(0,a.oA)(n,"settings")},updateSettings:async(e,t,n)=>{let r=await i.u.patch(`${o(e,t)}/settings`,n);return(0,a.oA)(r,"settings")},previewImport:async(e,t,n)=>{let r=await i.u.post(`${o(e,t)}/import/preview`,{csv:n});return(0,a.mT)(r)},commitImport:async(e,t,n)=>{let r=await i.u.post(`${o(e,t)}/import/commit`,{csv:n});return(0,a.mT)(r)},importOdoo:async(e,t)=>{let n=await i.u.post(`${o(e,t)}/import/odoo`,{});return(0,a.mT)(n)}}},27173:(e,t,n)=>{n.d(t,{AZ:()=>s,C:()=>o,EH:()=>c,Go:()=>r,K2:()=>function e(t,n,a){let r=[...t].sort((e,t)=>e.zIndex-t.zIndex),l=new Set((0,i.lS)(r,a,n).map(e=>e.id)),s=r.filter(e=>l.has(e.id));if(s.length<2)return t;let d=r.filter(e=>!l.has(e.id)),c=s[s.length-1],u=d.filter(e=>e.zIndex<c.zIndex).length;d.splice(u,0,...s);let h=d.map((e,t)=>({...e,zIndex:t*o}));for(let t of(0,i.Dp)(a,n))h=e(h,t,a);return h},al:()=>d,oe:()=>a,wC:()=>u});var i=n(1296);let a=50,o=10;function r(e){return JSON.parse(JSON.stringify(e))}let l=new Set(["x","y","width","height","rotation"]);function s(e){let t={...e};for(let e of l)"number"==typeof t[e]&&(t[e]=Math.round(100*t[e])/100);return t}function d(e,t){let n=new Set;for(let i of e){let e=t.find(e=>e.id===i);if(e)if(e.groupId)for(let i of t)i.groupId===e.groupId&&n.add(i.id);else n.add(i)}return[...n]}function c(e,t){let n=new Map(t.map(e=>[e.id,e])),i=(e,t)=>{let i=t,a=new Set;for(;i&&!a.has(i);){if(e.has(i))return i;a.add(i),i=n.get(i)?.parentId??null}return null},a=t;for(;;){let t=new Set(a.map(e=>e.id)),n=new Map,o=e=>{e&&n.set(e,(n.get(e)??0)+1)};for(let n of e)o(i(t,n.groupId));for(let e of a)o(i(t,e.parentId));let r=a.filter(e=>(n.get(e.id)??0)>=2);if(r.length===a.length)break;a=r}if(a.length===t.length)return{elements:e,groups:t};let o=new Set(a.map(e=>e.id));return{elements:e.map(e=>e.groupId&&!o.has(e.groupId)?{...e,groupId:i(o,e.groupId)}:e),groups:a.map(e=>e.parentId&&!o.has(e.parentId)?{...e,parentId:i(o,e.parentId)}:e)}}function u(e){return 0===e.length?0:Math.max(...e.map(e=>e.zIndex))+o}},28191:(e,t,n)=>{n.d(t,{Y:()=>o,y:()=>a});let i=new Set;function a(e){return i.add(e),()=>{i.delete(e)}}function o(){for(let e of i)e()}},42353:(e,t,n)=>{n.d(t,{l:()=>s});var i=n(73365),a=n(1521),o=n(74975),r=n(63453),l=n(55223);function s({width:e,height:t,config:n,now:d}){var c;let u,[h,m]=(0,a.useState)(()=>Date.now());(0,a.useEffect)(()=>{if(d)return;let e=setInterval(()=>m(Date.now()),1e3);return()=>clearInterval(e)},[d]);let f=d?d.getTime():h,g={...n,doneMessage:""},p=(0,l.rl)((u=Date.parse(n.incidentInstant),"working"===n.mode?(0,l.D)(u,f,n):(0,l.sU)(u,f)),0,g),y="transparent"===(c=n.backgroundColor)||null==c?null:"string"==typeof c?{type:"solid",color:c}:c,x=n.fontFamily??"ui-sans-serif, system-ui, sans-serif",w=`${"italic"===n.fontStyle?"italic ":""}${n.fontWeight??"600"}`,b=n.padding??0,S=Math.max(0,e-2*b),v=Math.max(0,t-2*b);if("stacked"===n.labelStyle&&!p.done){let a=(0,l.R6)(p,g),s=S/Math.max(1,a.length),d=Math.min(.5*v,.6*s),c=.3*d,u=b+(v-(d+1.4*c))/2;return(0,i.jsxs)(o.YJ,{name:"dayssince-group",children:[y&&(0,i.jsx)(o.rw,{x:0,y:0,width:e,height:t,cornerRadius:n.cornerRadius??0,...(0,r.Bj)(y,e,t)}),a.map((e,t)=>{let a=b+s*t;return(0,i.jsxs)(o.YJ,{children:[(0,i.jsx)(o.EY,{x:a,y:u,width:s,text:e.value,fontSize:d,fontFamily:x,fontStyle:w,fill:n.color,align:"center"}),(0,i.jsx)(o.EY,{x:a,y:u+1.1*d,width:s,text:e.label.toUpperCase(),fontSize:c,fontFamily:x,fill:n.color,align:"center",opacity:.7})]},t)})]})}let k=(0,l.zt)(p,g),M=n.autoFit?(0,l.rc)(k,S,v):n.fontSize??64;return(0,i.jsxs)(o.YJ,{name:"dayssince-group",children:[y&&(0,i.jsx)(o.rw,{x:0,y:0,width:e,height:t,cornerRadius:n.cornerRadius??0,...(0,r.Bj)(y,e,t)}),(0,i.jsx)(o.EY,{x:b,y:b,width:S,height:v,text:k,fontSize:M,fontFamily:x,fontStyle:w,fill:n.color,align:n.textAlign??"center",verticalAlign:n.verticalAlign??"middle",letterSpacing:n.letterSpacing??0,attrs:{"data-testid":"dayssince-text","data-text":k}})]})}}
24,46638:(e,t,n)=>{n.d(t,{k:()=>d});var i=n(73365),a=n(1521),o=n(74975),r=n(63453),l=n(55223),s=n(99521);function d({width:e,height:t,config:n,animate:c=!0}){var u;let h="transparent"===(u=n.backgroundColor)||null==u?null:"string"==typeof u?{type:"solid",color:u}:u,m=n.fontFamily??"ui-sans-serif, system-ui, sans-serif",f=`${"italic"===n.fontStyle?"italic ":""}${n.fontWeight??"600"}`,g=n.letterSpacing??0,p=n.fontSize??32,y=n.padding??0,x=Math.max(0,t-2*y),w="top"===n.verticalAlign?y:"bottom"===n.verticalAlign?t-y-p:y+(x-p)/2,b=n.separator?` ${n.separator} `:" ",S=`${n.text}${b}`,v=(0,a.useRef)(null),k=(0,a.useRef)(null),M=(0,a.useRef)(null);(0,a.useEffect)(()=>{let n=v.current;if(n)return n.getClientRect=(i={})=>{let a={x:0,y:0,width:e,height:t};return i.skipTransform||!n._transformedRect?a:n._transformedRect(a,i.relativeTo)},()=>{delete n.getClientRect}},[e,t]);let I=function(e,t){let[n,i]=(0,a.useState)(0);return(0,a.useLayoutEffect)(()=>{let t=()=>{let t=e.current;if(!t)return;let n=t.text();t.text(`${n} `),t.text(n),i(t.getTextWidth())};return t(),(0,s.L)(t)},t),n}(k,[S,m,f,p,g]),j=I+n.gap;return(0,a.useEffect)(()=>{if(!c||I<=0||j<=0||n.speed<=0){M.current?.x(0),M.current?.getLayer()?.batchDraw();return}let e=0,t=performance.now(),i=a=>{let o=(0,l.ox)(a-t,n.speed,j,n.direction),r=M.current;r&&(r.x(-o),r.getLayer()?.batchDraw()),e=requestAnimationFrame(i)};return e=requestAnimationFrame(i),()=>cancelAnimationFrame(e)},[c,j,n.speed,n.direction]),(0,i.jsxs)(o.YJ,{ref:v,name:"ticker-group",clipX:0,clipY:0,clipWidth:e,clipHeight:t,children:[h&&(0,i.jsx)(o.rw,{x:0,y:0,width:e,height:t,cornerRadius:n.cornerRadius??0,...(0,r.Bj)(h,e,t)}),(0,i.jsx)(o.EY,{ref:k,text:S,fontSize:p,fontFamily:m,fontStyle:f,letterSpacing:g,opacity:0,listening:!1}),(0,i.jsx)(o.YJ,{ref:M,y:w,children:Array.from({length:(0,l.nT)(e,j)}).map((e,t)=>(0,i.jsx)(o.EY,{x:t*j,text:S,fontSize:p,fontFamily:m,fontStyle:f,fill:n.color,letterSpacing:g,...0===t?{attrs:{"data-testid":"ticker-text","data-text":S}}:{}},t))})]})}},51795:(e,t,n)=>{function i(e){if(!e||"string"!=typeof e)return"#";if(e.startsWith("/")&&!e.startsWith("//")&&!e.startsWith("/\\"))return e;try{let t=new URL(e);if("http:"===t.protocol||"https:"===t.protocol)return t.toString()}catch{}return"#"}function a(e){if(!e||"#"===e)return;let t=document.createElement("a");t.href=e,t.target="_blank",t.rel="noopener noreferrer",document.body.appendChild(t),t.click(),t.remove()}function o(e,t){try{let n=new URL(e,window.location.origin);return n.searchParams.set("dl","1"),t&&n.searchParams.set("name",t),n.toString()}catch{return e}}function r(e,t){if(!e||"#"===e)return;let n=o(e,t),i=document.createElement("a");i.href=n,i.download=t??"",i.rel="noopener noreferrer",document.body.appendChild(i),i.click(),i.remove()}function l(e){if(!e||"string"!=typeof e)return null;try{let t=new URL(e);if("http:"===t.protocol||"https:"===t.protocol)return t.toString()}catch{}return null}n.d(t,{B1:()=>o,Is:()=>r,V3:()=>a,YK:()=>l,vH:()=>i})},55223:(e,t,n)=>{function i(e){return e?!function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return!1}}(e)?"UTC":e:"UTC"}function a(e,t){let n=Object.fromEntries(new Intl.DateTimeFormat("en-US",{timeZone:i(t),hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(e).map(e=>[e.type,e.value])),a=Number(n.hour);return{h:24===a?0:a,m:Number(n.minute),s:Number(n.second),ms:e.getMilliseconds()}}function o(e,t,n,i={}){let a=i.heightFraction??.7,r=i.widthFactor??.6,l=i.floor??8,s=n*a,d=e.length>0?t/(e.length*r):s;return Math.max(l,Math.min(s,d))}n.d(t,{vy:()=>eq,Au:()=>ep,VK:()=>ey,WD:()=>eG,Ur:()=>eK,kW:()=>_,H7:()=>Z,qz:()=>c,iv:()=>U,eh:()=>Y,P_:()=>eX,R6:()=>f,sy:()=>u,IO:()=>K,nl:()=>H,q2:()=>M,PQ:()=>q,un:()=>eW,rl:()=>h,sU:()=>L,PY:()=>ev,cu:()=>en,u3:()=>eL,rc:()=>o,IW:()=>T,Id:()=>D,m:()=>A,tT:()=>$,XS:()=>R,DF:()=>C,ej:()=>eb,zt:()=>p,L2:()=>es,$g:()=>ej,CE:()=>ew,G1:()=>eR,Bh:()=>eD,XE:()=>l,Xq:()=>eI,ls:()=>j,BE:()=>W,nT:()=>P,ox:()=>E,sz:()=>eN,tR:()=>eZ,IC:()=>s,kd:()=>eg,xX:()=>eY,li:()=>e$,HV:()=>eT,YZ:()=>a,$K:()=>ef,Mt:()=>ee,ku:()=>eS,KW:()=>B,kA:()=>eH,be:()=>eP,j:()=>eU,Mz:()=>el,Gs:()=>eC,RF:()=>eV,VW:()=>e_,Jy:()=>em,rr:()=>eB,zb:()=>eJ,gJ:()=>eA,XJ:()=>O,sq:()=>eo,D9:()=>ea,b7:()=>er,D:()=>G});let r=["XII","I","II","III","IV","V","VI","VII","VIII","IX","X","XI"];function l(e,t){return"roman"===t?r[e]:String(0===e?12:e)}function s(e,t){let n=e*("roman"===t?.13:.16);return{fontSize:n,radius:e-.95*n}}function d(e,t,n){return new Intl.DateTimeFormat("en-US",{timeZone:t,...n}).format(e)}
24function c(e,t,n){let a=i(t),o=e=>n.uppercase?e.toUpperCase():e;if("inline"===n.layout){let t={};return n.showWeekday&&(t.weekday=n.weekdayFormat),n.showMonth&&(t.month=n.monthFormat),n.showDayNumber&&(t.day="numeric"),n.showYear&&(t.year="numeric"),{inline:o(d(e,a,t))}}let r={};if(n.showWeekday&&(r.weekday=o(d(e,a,{weekday:n.weekdayFormat}))),n.showDayNumber&&(r.dayNumber=d(e,a,{day:"numeric"})),n.showMonth||n.showYear){let t={};n.showMonth&&(t.month=n.monthFormat),n.showYear&&(t.year="numeric"),r.monthYear=o(d(e,a,t))}return r}function u(e,t){let n=Math.round(.3*t),i=t-n,a=Math.round(.045*e),o=Math.round(.06*t),r=Math.round(.035*t);return{headerH:n,monthFontSize:Math.max(8,Math.min(.42*n,.15*e)),dayFontSize:Math.max(10,Math.min(.66*i,.6*e)),weekdayFontSize:Math.max(8,Math.min(.18*i,.16*e)),ring:{w:a,h:o,y:r,radius:Math.min(a,o)/2,x1:Math.round(.34*e-a/2),x2:Math.round(.66*e-a/2)},month:{y:r+o,height:Math.max(0,n-(r+o))},day:{y:n+Math.round(.04*i),height:Math.round(.6*i)},weekday:{y:n+Math.round(.66*i),height:Math.round(.3*i)}}}function h(e,t,n){let i=Math.max(0,e-t),a=[["days",864e5,n.showDays],["hours",36e5,n.showHours],["minutes",6e4,n.showMinutes],["seconds",1e3,n.showSeconds]],o={days:0,hours:0,minutes:0,seconds:0},r=i,l=!1;for(let[e,t,n]of a)if(l){let i=Math.floor(r/t);r-=i*t,n&&(o[e]=i)}else if(n){let n=Math.floor(r/t);o[e]=n,r-=n*t,l=!0}return{...o,done:e-t<=0}}function m(e,t){return t?String(e).padStart(2,"0"):String(e)}function f(e,t){let n=[];return t.showDays&&n.push({value:m(e.days,t.padWithZeros),label:"days"}),t.showHours&&n.push({value:m(e.hours,t.padWithZeros),label:"hours"}),t.showMinutes&&n.push({value:m(e.minutes,t.padWithZeros),label:"minutes"}),t.showSeconds&&n.push({value:m(e.seconds,t.padWithZeros),label:"seconds"}),n}let g={days:"d",hours:"h",minutes:"m",seconds:"s"};function p(e,t){var n;return e.done?t.doneMessage.trim()?t.doneMessage:y(f({days:0,hours:0,minutes:0,seconds:0,done:!0},n=t),n):y(f(e,t),t)}function y(e,t){return"none"===t.labelStyle?e.map(e=>e.value).join(":"):"long"===t.labelStyle?e.map(e=>`${e.value} ${e.label}`).join(" "):e.map(e=>`${e.value}${g[e.label]}`).join(" ")}let x=new Map,w=new Map;function b(e,t,n){let i=e.get(t);if(!i&&(i=n(),e.set(t,i),e.size>32)){let t=e.keys().next().value;void 0!==t&&e.delete(t)}return i}function S(e,t,n,i,a){let o,r,l=Date.UTC(e,t,n,Math.floor(i/60),i%60,0),s=(24===(r=Number((o=Object.fromEntries(b(x,a,()=>new Intl.DateTimeFormat("en-US",{timeZone:a,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})).formatToParts(new Date(l)).map(e=>[e.type,e.value]))).hour))&&(r=0),Date.UTC(Number(o.year),Number(o.month)-1,Number(o.day),r,Number(o.minute),Number(o.second))-l);return l-s}function v(e,t){let n=Object.fromEntries(b(w,t,()=>new Intl.DateTimeFormat("en-CA",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit"})).formatToParts(new Date(e)).map(e=>[e.type,e.value]));return{y:Number(n.year),mZero:Number(n.month)-1,d:Number(n.day)}}function k(e,t){let{y:n,mZero:i,d:a}=v(e,t);return Math.floor(Date.UTC(n,i,a)/864e5)}function M(e,t,n){let a=t.length?i(t[0].timezone):"UTC",o=k(e.getTime(),a);return t.map(t=>{let a=i(t.timezone),r=new Intl.DateTimeFormat("en-US",{timeZone:a,hour12:"12h"===n.format,hour:"12h"===n.format?"numeric":"2-digit",minute:"2-digit",second:n.showSeconds?"2-digit":void 0}).format(e),l={label:t.label,time:r};if(n.showDate&&(l.date=new Intl.DateTimeFormat("en-US",{timeZone:a,month:"short",day:"numeric"}).format(e)),n.dayOffsetIndicator){let t=k(e.getTime(),a)-o;l.offset=0===t?"":t>0?`+${t}`:`${t}`}return l})}let I=new Set(["gslides","gsheets","gdocs","gcalendar","gmaps","gforms","glooker"]);function j(e){return I.has(e)}function z(e){return"string"==typeof e?e.trim():""}function F(e,t){let n=z(e);if(!n)return null;let i=n.match(t);return i?i[1]:/[/?#]/.test(n)?null:n}let C=e=>F(e,/\/presentation\/d\/([a-zA-Z0-9-_]+)/),D=e=>F(e,/\/document\/d\/([a-zA-Z0-9-_]+)/),R=e=>F(e,/\/spreadsheets\/d\/([a-zA-Z0-9-_]+)/),A=e=>F(e,/\/forms\/d\/e\/([a-zA-Z0-9-_]+)/),$=e=>F(e,/\/reporting\/([a-zA-Z0-9-_]+)/),T=e=>z(e)||null;function Y(e,t,n){switch(e){case"gslides":{let e=z(t.documentId);if(!e)return null;let n=t.autoplay?"true":"false",i=t.loop?"true":"false",a=Number.isFinite(t.delayMs)?Number(t.delayMs):5e3;return`https://docs.google.com/presentation/d/${e}/embed?start=${n}&loop=${i}&delayms=${a}`}case"gsheets":{let e=z(t.documentId);if(!e)return null;let n=z(t.gid);return`https://docs.google.com/spreadsheets/d/${e}/preview${n?`#gid=${n}`:""}`}case"gdocs":{let e=z(t.documentId);if(!e)return null;return`https://docs.google.com/document/d/${e}/preview`}case"gforms":{let e=z(t.formId);if(!e)return null;return`https://docs.google.com/forms/d/e/${e}/viewform?embedded=true`}case"glooker":{let e=z(t.reportId);if(!e)return null;let n=z(t.pageId);return`https://lookerstudio.google.com/embed/reporting/${e}${n?`/page/${n}`:""}`}case"gmaps":{let e=z(t.place);if(!e)return null;let n=Number.isFinite(t.zoom)?Number(t.zoom):13;return`https://www.google.com/maps?q=${encodeURIComponent(e)}&z=${n}&output=embed`}case"gcalendar":{var i;let e=z(t.src);if(!e)return null;let a=(i=t.timezone,i?"manual"===i.source?i.value||null:n??null:null),o=new URLSearchParams;return o.set("src",e),o.set("mode",z(t.view)||"MONTH"),a&&o.set("ctz",a),o.set("showTitle",t.showTitle?"1":"0"),o.set("showNav",t.showNav?"1":"0"),o.set("showTabs",t.showTabs?"1":"0"),o.set("showPrint",t.showPrint?"1":"0"),o.set("showCalendars","0"),`https://calendar.google.com/calendar/embed?${o.toString()}`}default:return null}}function E(e,t,n,i){if(n<=0||t<=0)return 0;let a=(t*e/1e3%n+n)%n;return"rtl"===i?a:n-a}function P(e,t){return t<=0?2:Math.max(2,Math.ceil((e+t)/t)+1)}function H(e,t,n){let{h:i,m:o,s:r}=a(e,t),l="12h"===n.format,s=l?(i+11)%12+1:i,d=l&&!n.leadingZeroHour?String(s):String(s).padStart(2,"0"),c=String(o).padStart(2,"0");return{hh:d,mm:c,ss:n.showSeconds?String(r).padStart(2,"0"):void 0,ampm:l&&n.showAmPm?i<12?"AM":"PM":void 0}}function U(e,t,n){let a;if(!n.showDate)return null;let o=i(t);return a="weekday"===n.dateFormat?new Intl.DateTimeFormat("en-US",{timeZone:o,weekday:"long"}).format(e):"long"===n.dateFormat?new Intl.DateTimeFormat("en-US",{timeZone:o,weekday:"short",month:"short",day:"numeric",year:"numeric"}).format(e):new Intl.DateTimeFormat("en-US",{timeZone:o,month:"short",day:"numeric",year:"numeric"}).format(e),n.uppercaseDate?a.toUpperCase():a}function W(e){let t,n,i,a,{w:o,h:r,cfg:l,pieces:s,dateStr:d}=e,c=e.nowSecond??(void 0!==s.ss?Number(s.ss):new Date().getSeconds()),u=Math.max(0,o-2*l.padding),h=Math.max(0,r-2*l.padding),m=l.autoFit?Math.min(u/5,h/1.5):l.fontSize,f=m*l.dateSizeRatio,g=!l.separatorBlink||c%2==0,p="inline"===l.ampmSize&&!!s.ampm,y=(i=g?":":" ",a=`${s.hh}${i}${s.mm}`,s.ss&&(a+=`${i}${s.ss}`),p&&s.ampm&&(a+=` ${s.ampm}`),a),x="small"===l.ampmSize&&!!s.ampm,w=s.ampm??"",b=!!d&&"inline"!==l.datePosition,S="inline"===l.datePosition&&d?`${y} ${d}`:y,v=[];"above"===l.datePosition&&b&&d?(v.push({text:d,fontSize:f}),v.push({text:S,fontSize:m})):"below"===l.datePosition&&b&&d?(v.push({text:S,fontSize:m}),v.push({text:d,fontSize:f})):v.push({text:S,fontSize:m});let k=v.reduce((e,t)=>
24e+t.fontSize*l.lineHeight,0),M=t="top"===l.verticalAlign?l.padding:"bottom"===l.verticalAlign?r-l.padding-k:l.padding+(h-k)/2,I=v.map((e,t)=>(t>0&&(M+=v[t-1].fontSize*l.lineHeight),{text:e.text,x:l.padding,y:M,fontSize:e.fontSize,align:l.textAlign,width:u}));return x&&(n={text:w,x:l.padding,y:t,fontSize:.45*m,align:"left"===l.textAlign?"right":"left",width:u,isAmpm:!0}),{timeFontSize:m,dateFontSize:f,rows:I,ampmRow:n}}function L(e,t){return Number.isFinite(e)?Math.max(0,t-e):0}function N(e){let t=/^(\d{2}):(\d{2})$/.exec(e);return t?60*Number(t[1])+Number(t[2]):NaN}function G(e,t,n){if(!Number.isFinite(e)||t<=e||0===n.workingDays.length)return 0;let i=N(n.workStart),a=N(n.workEnd);if(!Number.isFinite(i)||!Number.isFinite(a)||a<=i)return 0;let o=n.lunchEnabled,r=o?N(n.lunchStart):NaN,l=o?N(n.lunchEnd):NaN,s=o&&Number.isFinite(r)&&Number.isFinite(l)&&l>r,d=new Set(n.holidays),c=new Set(n.workingDays),u=v(e,n.timezone),h=v(t,n.timezone),m=new Date(Date.UTC(u.y,u.mZero,u.d)),f=Date.UTC(h.y,h.mZero,h.d),g=0;for(;m.getTime()<=f;){let o=m.getUTCFullYear(),u=m.getUTCMonth(),h=m.getUTCDate(),f=m.getUTCDay();if(c.has(f)&&!d.has(function(e,t,n){let i=String(t+1).padStart(2,"0"),a=String(n).padStart(2,"0");return`${e}-${i}-${a}`}(o,u,h))){let d=S(o,u,h,i,n.timezone),c=S(o,u,h,a,n.timezone),m=Math.max(d,e),f=Math.min(c,t);if(f>m){let e=f-m;if(s){let t=S(o,u,h,r,n.timezone);e-=Math.max(0,Math.min(f,S(o,u,h,l,n.timezone))-Math.max(m,t))}g+=Math.max(0,e)}}m.setUTCDate(m.getUTCDate()+1)}return g}function B(e,t){if(!e)return"";let n=Date.parse(e);if(Number.isNaN(n))return"";let i=Math.floor(Math.max(0,t-n)/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;let a=Math.floor(i/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return`${o}d ago`}function O(e,t=200){let n=e.trim();if(n.length<=t)return n;let i=n.slice(0,t),a=i.lastIndexOf(" "),o=a>0?i.slice(0,a):i;return`${o.trimEnd()}...`}function q(e,t,n){return n<=0?0:Math.floor(e/(1e3*Math.max(1,t)))%n}function K(e,t){let n=` ${t} `;return e.map(e=>e.title).filter(Boolean).join(n)}function X(e,t){let n=e[0];for(let i of e)t>=i.min&&(n=i);return n}let V=[{min:0,category:"Good",bg:"#00e400",fg:"#1a1a1a",advice:"Air quality is satisfactory and poses little or no risk."},{min:51,category:"Moderate",bg:"#ffff00",fg:"#1a1a1a",advice:"Unusually sensitive people should consider limiting prolonged outdoor exertion."},{min:101,category:"Unhealthy for Sensitive Groups",bg:"#ff7e00",fg:"#1a1a1a",advice:"Sensitive groups should limit prolonged outdoor exertion."},{min:151,category:"Unhealthy",bg:"#ff0000",fg:"#ffffff",advice:"Everyone should limit prolonged outdoor exertion."},{min:201,category:"Very Unhealthy",bg:"#8f3f97",fg:"#ffffff",advice:"Health alert: everyone should avoid prolonged outdoor exertion."},{min:301,category:"Hazardous",bg:"#7e0023",fg:"#ffffff",advice:"Emergency conditions: everyone should avoid all outdoor exertion."}],J=[{min:0,category:"Good",bg:"#50f0e6",fg:"#1a1a1a",advice:"Air quality is good; enjoy your usual outdoor activities."},{min:20,category:"Fair",bg:"#50ccaa",fg:"#1a1a1a",advice:"Air quality is fair; very sensitive people should consider reducing intense outdoor activity."},{min:40,category:"Moderate",bg:"#f0e641",fg:"#1a1a1a",advice:"Sensitive groups should reduce prolonged or intense outdoor activity."},{min:60,category:"Poor",bg:"#ff5050",fg:"#ffffff",advice:"Sensitive groups should avoid outdoor activity; others should reduce it."},{min:80,category:"Very poor",bg:"#960032",fg:"#ffffff",advice:"Everyone should reduce outdoor activity; sensitive groups should stay indoors."},{min:100,category:"Extremely poor",bg:"#7d2181",fg:"#ffffff",advice:"Everyone should avoid outdoor physical activity."}];function Z(e,t){return X("european"===t?J:V,e)}function _(e,t){return Z(e,t).advice}let Q={pm2_5:"PM2.5",pm10:"PM10",o3:"O3",no2:"NO2",so2:"SO2",co:"CO"};function ee(e){return Q[e]}let et=["pm2_5","pm10","o3","no2","so2","co"];function en(e){let t=null,n=-1/0;for(let i of et){let a=e[i];"number"==typeof a&&Number.isFinite(a)&&a>n&&(n=a,t=i)}return t}let ei=[{min:0,category:"Low",bg:"#3ea72d",fg:"#1a1a1a",advice:"No protection needed; you can safely stay outside.",spf:0,protection:"No protection needed"},{min:3,category:"Moderate",bg:"#fff300",fg:"#1a1a1a",advice:"Seek shade near midday and wear sunscreen and a hat.",spf:30,protection:"Hat, sunglasses, SPF 30"},{min:6,category:"High",bg:"#f18b00",fg:"#1a1a1a",advice:"Reduce sun exposure from 10am to 4pm; cover up, wear a hat, and use sunscreen.",spf:30,protection:"Shade, hat, sunglasses, SPF 30"},{min:8,category:"Very High",bg:"#e53210",fg:"#ffffff",advice:"Minimize sun exposure midday; shade, a hat, and sunscreen are a must.",spf:50,protection:"Shade, hat, cover up, SPF 50"},{min:11,category:"Extreme",bg:"#b567a4",fg:"#ffffff",advice:"Avoid the sun from 10am to 4pm; unprotected skin can burn within minutes.",spf:50,protection:"Avoid sun, full cover, SPF 50"}];function ea(e){return X(ei,e)}function eo(e){return ea(e).advice}function er(e){let t=ea(e);
24return{spf:t.spf,protection:t.protection}}function el(e){return Math.max(0,Math.round(e))}function es(e){let t=(Math.round(e)%24+24)%24;return`${t%12==0?12:t%12}${t<12?"am":"pm"}`}let ed=[{level:0,category:"None",bg:"#9aa0a6",fg:"#ffffff",advice:"No significant pollen detected."},{level:1,category:"Low",bg:"#3ea72d",fg:"#1a1a1a",advice:"Low pollen; most people are unaffected."},{level:2,category:"Moderate",bg:"#fff300",fg:"#1a1a1a",advice:"Moderate pollen; sensitive people may notice symptoms."},{level:3,category:"High",bg:"#f18b00",fg:"#1a1a1a",advice:"High pollen; limit time outdoors and keep windows closed."},{level:4,category:"Very High",bg:"#e53210",fg:"#ffffff",advice:"Very high pollen; stay indoors if sensitive and keep windows closed."}],ec={alder:{moderate:15,high:50,veryHigh:90},birch:{moderate:30,high:50,veryHigh:90},grass:{moderate:30,high:50,veryHigh:150},mugwort:{moderate:10,high:50,veryHigh:150},olive:{moderate:30,high:50,veryHigh:200},ragweed:{moderate:10,high:50,veryHigh:150}},eu={alder:"Alder",birch:"Birch",grass:"Grass",mugwort:"Mugwort",olive:"Olive",ragweed:"Ragweed"},eh=["alder","birch","grass","mugwort","olive","ragweed"];function em(e){return eu[e]}function ef(e){return e.advice}function eg(e){let t=0,n=-1/0,i=null;for(let a of eh){let o=e[a];if("number"!=typeof o||!Number.isFinite(o)||o<=0)continue;let r=function(e,t){if(!Number.isFinite(t)||t<=0)return 0;let n=ec[e];return t>=n.veryHigh?4:t>=n.high?3:t>=n.moderate?2:1}(a,o);(r>t||r===t&&o>n)&&(t=r,n=o,i=a)}return{band:ed[t],dominant:i}}
24let ep={AED:{symbol:"د.Ø¥",name:"United Arab Emirates Dirham",decimals:2},AFN:{symbol:"Ø",name:"Afghan Afghani",decimals:2},ALL:{symbol:"L",name:"Albanian Lek",decimals:2},AMD:{symbol:"Ö",name:"Armenian Dram",decimals:2},ANG:{symbol:"Æ",name:"Netherlands Antillean Gulden",decimals:2},AOA:{symbol:"Kz",name:"Angolan Kwanza",decimals:2},ARS:{symbol:"$",name:"Argentine Peso",decimals:2},AUD:{symbol:"$",name:"Australian Dollar",decimals:2},AWG:{symbol:"Æ",name:"Aruban Florin",decimals:2},AZN:{symbol:"â¼",name:"Azerbaijani Manat",decimals:2},BAM:{symbol:"ÐÐ",name:"Bosnia and Herzegovina Convertible Mark",decimals:2},BBD:{symbol:"$",name:"Barbadian Dollar",decimals:2},BDT:{symbol:"à§³",name:"Bangladeshi Taka",decimals:2},BHD:{symbol:"د.ب",name:"Bahraini Dinar",decimals:2},BIF:{symbol:"Fr",name:"Burundian Franc",decimals:0},BMD:{symbol:"$",name:"Bermudian Dollar",decimals:2},BND:{symbol:"$",name:"Brunei Dollar",decimals:2},BOB:{symbol:"Bs.",name:"Bolivian Boliviano",decimals:2},BRL:{symbol:"R$",name:"Brazilian Real",decimals:2},BSD:{symbol:"$",name:"Bahamian Dollar",decimals:2},BTN:{symbol:"Nu.",name:"Bhutanese Ngultrum",decimals:2},BWP:{symbol:"P",name:"Botswana Pula",decimals:2},BYN:{symbol:"Br",name:"Belarusian Ruble",decimals:2},BZD:{symbol:"$",name:"Belize Dollar",decimals:2},CAD:{symbol:"$",name:"Canadian Dollar",decimals:2},CDF:{symbol:"Fr",name:"Congolese Franc",decimals:2},CHF:{symbol:"CHF",name:"Swiss Franc",decimals:2},CLP:{symbol:"$",name:"Chilean Peso",decimals:0},CNH:{symbol:"\xa5",name:"Chinese Renminbi Yuan Offshore",decimals:2},CNY:{symbol:"\xa5",name:"Chinese Renminbi Yuan",decimals:2},COP:{symbol:"$",name:"Colombian Peso",decimals:2},CRC:{symbol:"â¡",name:"Costa Rican Col\xf3n",decimals:2},CUP:{symbol:"$",name:"Cuban Peso",decimals:2},CVE:{symbol:"$",name:"Cape Verdean Escudo",decimals:2},CZK:{symbol:"KÄ",name:"Czech Koruna",decimals:2},DJF:{symbol:"Fdj",name:"Djiboutian Franc",decimals:0},DKK:{symbol:"kr.",name:"Danish Krone",decimals:2},DOP:{symbol:"$",name:"Dominican Peso",decimals:2},DZD:{symbol:"د.ج",name:"Algerian Dinar",decimals:2},EGP:{symbol:"ج.Ù
",name:"Egyptian Pound",decimals:2},ERN:{symbol:"Nfk",name:"Eritrean Nakfa",decimals:2},ETB:{symbol:"Br",name:"Ethiopian Birr",decimals:2},EUR:{symbol:"â¬",name:"Euro",decimals:2},FJD:{symbol:"$",name:"Fijian Dollar",decimals:2},FKP:{symbol:"\xa3",name:"Falkland Pound",decimals:2},GBP:{symbol:"\xa3",name:"British Pound",decimals:2},GEL:{symbol:"â¾",name:"Georgian Lari",decimals:2},GGP:{symbol:"\xa3",name:"Guernsey Pound",decimals:2},GHS:{symbol:"âµ",name:"Ghanaian Cedi",decimals:2},GIP:{symbol:"\xa3",name:"Gibraltar Pound",decimals:2},GMD:{symbol:"D",name:"Gambian Dalasi",decimals:2},GNF:{symbol:"Fr",name:"Guinean Franc",decimals:0},GTQ:{symbol:"Q",name:"Guatemalan Quetzal",decimals:2},GYD:{symbol:"$",name:"Guyanese Dollar",decimals:2},HKD:{symbol:"$",name:"Hong Kong Dollar",decimals:2},HNL:{symbol:"L",name:"Honduran Lempira",decimals:2},HTG:{symbol:"G",name:"Haitian Gourde",decimals:2},HUF:{symbol:"Ft",name:"Hungarian Forint",decimals:2},IDR:{symbol:"Rp",name:"Indonesian Rupiah",decimals:2},ILS:{symbol:"âª",name:"Israeli New Shekel",decimals:2},IMP:{symbol:"\xa3",name:"Isle of Man Pound",decimals:2},INR:{symbol:"â¹",name:"Indian Rupee",decimals:2},IQD:{symbol:"ع.د",name:"Iraqi Dinar",decimals:2},IRR:{symbol:"ï·¼",name:"Iranian Rial",decimals:2},ISK:{symbol:"kr.",name:"Icelandic Kr\xf3na",decimals:0},JEP:{symbol:"\xa3",name:"Jersey Pound",decimals:2},JMD:{symbol:"$",name:"Jamaican Dollar",decimals:2},JOD:{symbol:"د.ا",name:"Jordanian Dinar",decimals:2},JPY:{symbol:"\xa5",name:"Japanese Yen",decimals:0},KES:{symbol:"KSh",name:"Kenyan Shilling",decimals:2},KGS:{symbol:"som",name:"Kyrgyzstani Som",decimals:2},KHR:{symbol:"á",name:"Cambodian Riel",decimals:2},KMF:{symbol:"Fr",name:"Comorian Franc",decimals:0},KPW:{symbol:"â©",name:"North Korean Won",decimals:2},KRW:{symbol:"â©",name:"South Korean Won",decimals:0},KWD:{symbol:"د.Ù",name:"Kuwaiti Dinar",decimals:2},KYD:{symbol:"$",name:"Cayman Islands Dollar",decimals:2},KZT:{symbol:"â¸",name:"Kazakhstani Tenge",decimals:2}
24,LAK:{symbol:"â",name:"Lao Kip",decimals:2},LBP:{symbol:"Ù.Ù",name:"Lebanese Pound",decimals:2},LKR:{symbol:"â¨",name:"Sri Lankan Rupee",decimals:2},LRD:{symbol:"$",name:"Liberian Dollar",decimals:2},LSL:{symbol:"L",name:"Lesotho Loti",decimals:2},LYD:{symbol:"Ù.د",name:"Libyan Dinar",decimals:2},MAD:{symbol:"د.Ù
.",name:"Moroccan Dirham",decimals:2},MDL:{symbol:"L",name:"Moldovan Leu",decimals:2},MGA:{symbol:"Ar",name:"Malagasy Ariary",decimals:2},MKD:{symbol:"ден",name:"Macedonian Denar",decimals:2},MMK:{symbol:"K",name:"Myanmar Kyat",decimals:2},MNT:{symbol:"â®",name:"Mongolian T\xf6gr\xf6g",decimals:2},MOP:{symbol:"P",name:"Macanese Pataca",decimals:2},MRO:{symbol:"UM",name:"Mauritanian Ouguiya",decimals:2},MRU:{symbol:"UM",name:"Mauritanian Ouguiya",decimals:2},MUR:{symbol:"â¨",name:"Mauritian Rupee",decimals:2},MVR:{symbol:"MVR",name:"Maldivian Rufiyaa",decimals:2},MWK:{symbol:"MK",name:"Malawian Kwacha",decimals:2},MXN:{symbol:"$",name:"Mexican Peso",decimals:2},MYR:{symbol:"RM",name:"Malaysian Ringgit",decimals:2},MZN:{symbol:"MTn",name:"Mozambican Metical",decimals:2},NAD:{symbol:"$",name:"Namibian Dollar",decimals:2},NGN:{symbol:"â¦",name:"Nigerian Naira",decimals:2},NIO:{symbol:"C$",name:"Nicaraguan C\xf3rdoba",decimals:2},NOK:{symbol:"kr",name:"Norwegian Krone",decimals:2},NPR:{symbol:"Rs.",name:"Nepalese Rupee",decimals:2},NZD:{symbol:"$",name:"New Zealand Dollar",decimals:2},OMR:{symbol:"ر.ع.",name:"Omani Rial",decimals:2},PAB:{symbol:"B/.",name:"Panamanian Balboa",decimals:2},PEN:{symbol:"S/",name:"Peruvian Sol",decimals:2},PGK:{symbol:"K",name:"Papua New Guinean Kina",decimals:2},PHP:{symbol:"â±",name:"Philippine Peso",decimals:2}
24,PKR:{symbol:"â¨",name:"Pakistani Rupee",decimals:2},PLN:{symbol:"zÅ",name:"Polish ZÅoty",decimals:2},PYG:{symbol:"â²",name:"Paraguayan Guaran\xed",decimals:0},QAR:{symbol:"ر.Ù",name:"Qatari Riyal",decimals:2},RON:{symbol:"Lei",name:"Romanian Leu",decimals:2},RSD:{symbol:"RSD",name:"Serbian Dinar",decimals:2},RUB:{symbol:"â½",name:"Russian Ruble",decimals:2},RWF:{symbol:"FRw",name:"Rwandan Franc",decimals:0},SAR:{symbol:"ر.س",name:"Saudi Riyal",decimals:2},SBD:{symbol:"$",name:"Solomon Islands Dollar",decimals:2},SCR:{symbol:"â¨",name:"Seychellois Rupee",decimals:2},SDG:{symbol:"\xa3",name:"Sudanese Pound",decimals:2},SEK:{symbol:"kr",name:"Swedish Krona",decimals:2},SGD:{symbol:"$",name:"Singapore Dollar",decimals:2},SHP:{symbol:"\xa3",name:"Saint Helenian Pound",decimals:2},SLE:{symbol:"Le",name:"New Leone",decimals:2},SOS:{symbol:"Sh",name:"Somali Shilling",decimals:2},SRD:{symbol:"$",name:"Surinamese Dollar",decimals:2},SSP:{symbol:"\xa3",name:"South Sudanese Pound",decimals:2},STN:{symbol:"Db",name:"S\xe3o Tom\xe9 and Pr\xedncipe Second Dobra",decimals:2},SVC:{symbol:"â¡",name:"Salvadoran Col\xf3n",decimals:2},SYP:{symbol:"\xa3S",name:"Syrian Pound",decimals:2},SZL:{symbol:"E",name:"Swazi Lilangeni",decimals:2},THB:{symbol:"฿",name:"Thai Baht",decimals:2},TJS:{symbol:"Ð
Ð",name:"Tajikistani Somoni",decimals:2},TMT:{symbol:"m",name:"Turkmenistani Manat",decimals:2}
24,TND:{symbol:"د.ت",name:"Tunisian Dinar",decimals:2},TOP:{symbol:"T$",name:"Tongan PaÊ»anga",decimals:2},TRY:{symbol:"âº",name:"Turkish Lira",decimals:2},TTD:{symbol:"$",name:"Trinidad and Tobago Dollar",decimals:2},TWD:{symbol:"$",name:"New Taiwan Dollar",decimals:2},TZS:{symbol:"Sh",name:"Tanzanian Shilling",decimals:2},UAH:{symbol:"â´",name:"Ukrainian Hryvnia",decimals:2},UGX:{symbol:"USh",name:"Ugandan Shilling",decimals:0},USD:{symbol:"$",name:"United States Dollar",decimals:2},UYU:{symbol:"$U",name:"Uruguayan Peso",decimals:2},UZS:{symbol:"so'm",name:"Uzbekistan Som",decimals:2},VES:{symbol:"Bs",name:"Venezuelan Bol\xedvar Soberano",decimals:2},VND:{symbol:"â«",name:"Vietnamese Äá»ng",decimals:0},VUV:{symbol:"Vt",name:"Vanuatu Vatu",decimals:0},WST:{symbol:"T",name:"Samoan Tala",decimals:2},XAF:{symbol:"CFA",name:"Central African CFA Franc",decimals:0},XAG:{symbol:"oz t",name:"Silver (Troy Ounce)",decimals:2},XAU:{symbol:"oz t",name:"Gold (Troy Ounce)",decimals:2},XCD:{symbol:"$",name:"East Caribbean Dollar",decimals:2},XCG:{symbol:"Cg",name:"Caribbean Guilder",decimals:2},XDR:{symbol:"SDR",name:"Special Drawing Rights",decimals:2},XOF:{symbol:"Fr",name:"West African CFA Franc",decimals:0},XPD:{symbol:"oz t",name:"Palladium",decimals:2},XPF:{symbol:"Fr",name:"CFP Franc",decimals:0},XPT:{symbol:"oz t",name:"Platinum",decimals:2},YER:{symbol:"ï·¼",name:"Yemeni Rial",decimals:2},ZAR:{symbol:"R",name:"South African Rand",decimals:2},ZMW:{symbol:"K",name:"Zambian Kwacha",decimals:2},ZWG:{symbol:"ZiG",name:"Zimbabwe Gold",decimals:2}},ey=Object.keys(ep).sort();function ex(e,t){if(!Number.isFinite(e))return"-";let n=e.toFixed(t),i=n.startsWith("-"),a=i?n.slice(1):n,o=a.indexOf("."),r=-1===o?a:a.slice(0,o),l=-1===o?"":a.slice(o),s=r.replace(/\B(?=(\d{3})+(?!\d))/g,",");return`${i?"-":""}${s}${l}`}function ew(e,t){let n;if(!Number.isFinite(e))return"-";let i=Math.abs(e);return n=i>=100?2:i>=.01||0===e?4:6,ex(e,n)}function eb(e,t){let n=ep[t],i=ex(e,n?n.decimals:2);return n?`${n.symbol}${i}`:`${i} ${t}`}function eS(e,t){if(void 0===t||!Number.isFinite(t)||0===t||!Number.isFinite(e))return{dir:"flat",pct:0};let n=Math.round((e-t)/t*1e4)/100;return n>0?{dir:"up",pct:n}:n<0?{dir:"down",pct:n}:{dir:"flat",pct:0}}function ev(e){let t=Number.isFinite(e)&&e>0?e:28,n=e=>Math.round(t*e);return{header:n(.6),label:n(.66),rate:Math.round(t),code:n(.72),bigRate:n(2),eq:n(.66),trend:n(.48),ticker:n(.8)}}let ek=new Set(["clock","date","countdown","worldclock","ticker","dayssince","qr","remote"]),eM=new Set(["qr","remote"]);function eI(e){return!ek.has(e)||eM.has(e)}function ej(e,t,n={}){let i,a=n.decimals??"auto",o=n.currencyDisplay??"symbol",r=n.currencyPosition??"before",l="auto"===a?2:a;try{i=new Intl.NumberFormat("en-US",{minimumFractionDigits:l,maximumFractionDigits:l}).format(e)}catch{i=e.toFixed(l)}if("none"===o)return i;let s=t,d=!1;if("symbol"===o)try{let e=new Intl.NumberFormat("en-US",{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:0}).format(0).replace(/[\d\s., ]/g,"");e&&e!==t&&(s=e,d=!0)}catch{s=t}return"after"===r?`${i}\u00A0${s}`:d?`${s}${i}`:`${s}\u00A0${i}`}function ez(e){let t=e.prices;return t&&t.length>0?t[0].amount:e.price??0}function eF(e,t,n="asc"){if("sequence"===t)return"desc"===n?[...e].reverse():e;let i=[...e];return"price"===t?i.sort((e,t)=>ez(e)-ez(t)):i.sort((e,t)=>e.name.toLowerCase().localeCompare(t.name.toLowerCase(),"en-US")),"desc"===n?i.reverse():i}function eC(e){let t=e.boxHeight-2*e.padding-(e.footerHeight??0);return e.rowHeight>0&&t>0?Math.max(1,Math.floor(t/e.rowHeight)):1}function eD(e,t,n,i){let a=Math.max(0,e-2*t);return n<=0?a:(a-i*(n-1))/n}function eR(e){let t=e.showImage?e.tileWidth*(e.imageSize/100)+e.imageGap:0,n=null==e.referenceFontSize?0:1.2*e.referenceFontSize,i=e.hasDescription?e.nameFontSize*e.descriptionScale*1.2:0,a=Math.max(0,e.tierCount-1)*e.priceFontSize*1.2;return t+1.2*e.nameFontSize+1.2*e.priceFontSize+n+i+a}function eA(e){let t=e.boxHeight-2*e.padding-(e.footerHeight??0),n=e.tileHeight+e.gapY;return n>0&&t>0?Math.max(1,Math.floor(t/n)):1}function e$(e,t,n,i){let a=Math.max(1,Math.floor(t)),o=Math.max(1,Math.floor(n));if(0===e.length)return[];let r=i?.tierLabelsFor,l=[],s=[],d=()=>{s.length>0&&(l.push(s),s=[])},c=0;for(let t of e){if(c++,0===t.products.length)continue;let e=0,n=null!=t.heading,i=r?r(t.products):[null],o=1!==i.length||null!==i[0],l=o;for(;e<t.products.length;){let r=a-s.length,u=+!!n+ +!!l;if(u>0&&r<u+1&&s.length>0||0===u&&r<1){d();continue}n&&(s.push({kind:"heading",key:`h${c}-${e}`,text:t.heading}),n=!1),l&&(s.push({kind:"tierHeader",key:`t${c}-${e}`,labels:i}),l=!1);let h=Math.min(Math.max(1,a-s.length),t.products.length-e);for(let n=0;n<h;n++)s.push({kind:"product",key:`p${c}-${e+n}
24`,product:t.products[e+n]});e+=h,s.length>=a&&e<t.products.length&&(d(),n=null!=t.heading,l=o)}}d();let u=[];for(let e=0;e<l.length;e+=o)u.push({columns:l.slice(e,e+o)});return u}function eT(e,t,n){let i=Math.max(1,Math.floor(Math.max(1,t))*Math.floor(Math.max(1,n))),a=[],o=[],r=0;for(let t of e){let e=0;for(;e<t.products.length;){r>=i&&(a.push({sections:o}),o=[],r=0);let n=Math.min(i-r,t.products.length-e);o.push({...t,products:t.products.slice(e,e+n)}),r+=n,e+=n}}return o.length>0&&a.push({sections:o}),a}function eY(e,t,n){return t<=1?0:Math.floor(Math.max(0,e)/(1e3*Math.max(1,n)))%t}let eE={sizeScale:1,fontWeight:null,fontFamily:null,fontFamilyId:null,color:null,italic:null,transform:null,opacity:100};function eP(e,t){let n=e?.parts?.[t]??eE,i=e?.fontSize??22,a=n.sizeScale??1,o=null!=n.fontFamily;return{fontSize:Math.max(1,Math.round(i*a)),fontFamily:n.fontFamily??e?.fontFamily??"ui-sans-serif, system-ui, sans-serif",fontFamilyId:o?n.fontFamilyId??null:e?.fontFamilyId??null,fontWeight:n.fontWeight??e?.fontWeight??"600",italic:n.italic??e?.fontStyle==="italic",color:n.color??("string"==typeof e?.color?e.color:"#111827"),opacity:Math.min(1,Math.max(0,(n.opacity??100)/100)),transform:n.transform??"none"}}function eH(e){let t=e?.menuColumnGap;return"number"==typeof t&&Number.isFinite(t)?Math.max(0,Math.round(t)):Math.round((e?.fontSize??22)*1.5)}function eU(e,t){let n=e?.tierColumnWidth;if("number"==typeof n&&Number.isFinite(n))return Math.max(0,Math.round(n));let i=e?.fontSize??22,a=t?.62*t.length*i:0;return Math.min(400,Math.round(Math.max(3.5*i,a)))}function eW(e,t,n){return e>0&&!(t<=0)&&n>0?Math.max(0,Math.min(e,.7*n/t)):Math.max(0,e)}function eL(e,t){return e?.showDescription===!0&&t.some(e=>"string"==typeof e.description&&""!==e.description.trim())}function eN(e,t,n){var i;let a=eP(e,"description");return(i={fontSize:t,lineHeight:e?.lineHeight??1.2,rowGap:Math.max(0,e?.rowGap??8),hasDescription:n,descriptionScale:t>0?a.fontSize/t:1}).fontSize*i.lineHeight+(i.hasDescription?i.fontSize*i.descriptionScale*i.lineHeight:0)+i.rowGap}let eG=8;function eB(e){if(!e?.taxNote)return 0;let t=eP(e,"description"),n=e?.lineHeight??1.2;return t.fontSize*n+eG}let eO=e=>({sizeScale:1,fontWeight:null,fontFamily:null,fontFamilyId:null,color:null,italic:null,transform:null,opacity:100,...e}),eq=[{id:"classic",label:"Classic menu",patch:{separator:"dots",separatorOpacity:35,rowDivider:"none",rowGap:8,parts:{name:eO({}),price:eO({fontWeight:"700"}),reference:eO({sizeScale:.7,opacity:55}),heading:eO({sizeScale:1.1,fontWeight:"700",opacity:85}),description:eO({sizeScale:.85}),tierLabel:eO({sizeScale:.7})}}},{id:"bold-price",label:"Bold price",patch:{separator:"none",rowDivider:"none",rowGap:14,parts:{name:eO({fontWeight:"500"}),price:eO({sizeScale:1.4,fontWeight:"800",color:"#B45309"}),reference:eO({sizeScale:.65,opacity:45}),heading:eO({sizeScale:1.2,fontWeight:"700",opacity:90}),description:eO({sizeScale:.85}),tierLabel:eO({sizeScale:.7})}}},{id:"bistro",label:"Bistro",patch:{separator:"dashes",separatorOpacity:30,rowDivider:"none",rowGap:18,showReference:!1,parts:{name:eO({fontWeight:"500",opacity:90}),price:eO({fontWeight:"600"}),reference:eO({sizeScale:.65,opacity:45}),heading:eO({sizeScale:1.15,fontWeight:"700",transform:"uppercase",opacity:70}),description:eO({sizeScale:.85}),tierLabel:eO({sizeScale:.7})}}},{id:"minimal",label:"Minimal",patch:{separator:"none",rowDivider:"line",rowGap:10,parts:{name:eO({fontWeight:"500"}),price:eO({fontWeight:"500",opacity:75}),reference:eO({sizeScale:.65,opacity:40}),heading:eO({sizeScale:1.05,fontWeight:"600",opacity:60}),description:eO({sizeScale:.85}),tierLabel:eO({sizeScale:.7})}}}];function eK(e,t){let n=eq.find(e=>e.id===t);return n?{...e,...n.patch,stylePreset:n.id}:e}function eX(e,t,n){if(0===e.length)return[];if(!n.showCategoryHeadings||t&&"picked"===t.mode)return[{categoryId:null,heading:null,products:e}];let i=t&&"categories"===t.mode?t.categoryIds:[],a=new Map,o=[],r=[];for(let t of e){if(null==t.categoryId){r.push(t);continue}let e=String(t.categoryId);a.has(e)||(a.set(e,[]),o.push(e)),a.get(e).push(t)}let l=[];for(let e of i)a.has(e)&&!l.includes(e)&&l.push(e);for(let e of o)l.includes(e)||l.push(e);let s=l.map(e=>{let t=a.get(e);return{categoryId:e,heading:t[0].categoryName??null,products:t}});return r.length>0&&s.push({categoryId:null,heading:null,products:r}),s}function eV(e){let t=[];for(let n of e)for(let e of n.prices??[])if(t.includes(e.label)||t.push(e.label),t.length>=6)return t.slice(0,6);return 0===t.length?[null]:t}function eJ(e,t){return(e.prices??[]).find(e=>e.label===t)?.amount??null}function eZ(e){return e&&"object"==typeof e?"picked"===e.mode?{mode:"picked",productIds:Array.isArray(e.productIds)?e.productIds.map(String):[]}:"category"===e.mode?{mode:"categories",categoryIds:null==e.categoryId?[]:[String(e.categoryId)]}:{mode:"categories",categoryIds:Array.isArray(e.categoryIds)?e.categoryIds.map(String):[]}:{mode:"categories",categoryIds:[]}}function e_(e,t,n){let i=n.hideUnavailable?e.filter(e=>!1!==e.available):e;if(t&&"picked"===t.mode){let e=new Map(i.map(e=>[String(e.id),e]));return eF(t.productIds.map(t=>e.get(t)).filter(e=>null!=e),n.sort,n.sortDir).slice(0,n.maxItems)}let a=t&&"categories"===t.mode?t.categoryIds:[];return eF(0===a.length?i:i.filter(e=>e.categoryIds.some(e=>
24a.includes(String(e)))),n.sort,n.sortDir).slice(0,n.maxItems)}},57536:(e,t,n)=>{n.d(t,{b:()=>s});var i=n(1521),a=n(42271),o=n(77032),r=n(42967),l=n(28191);function s(){let e=(0,a.useAuthStore)(e=>e.currentOrg?.id??""),[t,n]=(0,i.useState)([]),[s,d]=(0,i.useState)(!1),[c,u]=(0,i.useState)(null),h=(0,i.useCallback)(async()=>{if(e){d(!0),u(null);try{n(await o.p.list(e))}catch(e){u((0,r.CK)(e))}finally{d(!1)}}},[e]);return(0,i.useEffect)(()=>{h()},[h]),(0,i.useEffect)(()=>(0,l.y)(()=>{h()}),[h]),{families:t,loading:s,error:c,refetch:h}}},61194:(e,t,n)=>{n.d(t,{Lp:()=>r,QV:()=>l,S1:()=>a,bB:()=>o});let i=/^[-+]?(\d{1,3}(,\d{3})*|\d+)(\.\d+)?%?$/;function a(e,t,n){let a=new Map;e.forEach((e,t)=>{a.has(e)||a.set(e,t)});let o=(e,t)=>"auto"===t?!function(e,t){let n=0;for(let a=0;a<e.length&&n<20;a++){let o=(e[a][t]??"").trim();if(""!==o&&(n++,!i.test(o)))return!1}return n>0}(n,e)?"left":"right":t;if(0===t.length)return e.map((e,t)=>({key:e,index:t,label:e,align:o(t,"auto")}));let r=[];for(let e of t){if(!e.visible)continue;let t=a.get(e.key);void 0!==t&&r.push({key:e.key,index:t,label:e.labelOverride??e.key,align:o(t,e.align)})}return r}function o(e){return Math.max(1,Math.floor((e.boxHeight-2*e.padding-(e.showHeader?e.headerHeight:0))/Math.max(1,e.rowHeight)))}function r(e,t){return t<=0?1:Math.max(1,Math.ceil(e/t))}function l(e,t,n){let i=r(e.length,n),a=(t%i+i)%i*n;return e.slice(a,a+n)}},63453:(e,t,n)=>{n.d(t,{HI:()=>i,s3:()=>l,Bj:()=>o,jY:()=>d,oJ:()=>c,c6:()=>u,wz:()=>h,m3:()=>r});let i={type:"solid",color:"#FFFFFF"};function a(e){let t=[];for(let n of e)t.push(n.offset,n.color);return t}function o(e,t,n,i=!1){let r=i?-t/2:0,l=i?-n/2:0;switch(e.type){case"solid":return{fill:e.color,fillPriority:"color"};case"linear":{var s;let i,o,d,c,u,h,m,{start:f,end:g}=(s=e.angle,o=Math.cos(i=(90-s)*Math.PI/180),c=Math.abs(t*o)+Math.abs(n*(d=Math.sin(i))),u=t/2,h=n/2,{start:{x:u-o*(m=c/2),y:h-d*m},end:{x:u+o*m,y:h+d*m}});return{fillLinearGradientStartPoint:{x:f.x+r,y:f.y+l},fillLinearGradientEndPoint:{x:g.x+r,y:g.y+l},fillLinearGradientColorStops:a(e.stops),fillPriority:"linear-gradient"}}case"radial":{let i={x:e.cx*t+r,y:e.cy*n+l};return{fillRadialGradientStartPoint:i,fillRadialGradientStartRadius:0,fillRadialGradientEndPoint:i,fillRadialGradientEndRadius:e.r*Math.max(t,n),fillRadialGradientColorStops:a(e.stops),fillPriority:"radial-gradient"}}}}function r(e){let t=e.width,n=e.height;switch(e.shapeType){case"rectangle":return{centering:"topLeft",geometry:{kind:"rect",cornerRadius:e.cornerRadius}};case"circle":return{centering:"center",geometry:{kind:"circle"}};case"triangle":return{centering:"center",geometry:{kind:"regularPolygon",sides:3}};case"star":return{centering:"center",geometry:{kind:"star",numPoints:5,innerRadiusRatio:.5}};case"arrow":return{centering:"topLeft",geometry:{kind:"arrow",points:[0,n/2,t,n/2],pointerLength:20,pointerWidth:20}};case"line":return{centering:"topLeft",geometry:{kind:"line",points:[0,n/2,t,n/2]}};case"ellipse":return{centering:"center",geometry:{kind:"ellipse"}};case"diamond":return{centering:"topLeft",geometry:{kind:"polygon",points:[t/2,0,t,n/2,t/2,n,0,n/2]}};case"pentagon":return{centering:"center",geometry:{kind:"regularPolygon",sides:5}};case"hexagon":return{centering:"center",geometry:{kind:"regularPolygon",sides:6}};case"octagon":return{centering:"center",geometry:{kind:"regularPolygon",sides:8}};case"cross":{let e=t/3,i=n/3;return{centering:"topLeft",geometry:{kind:"polygon",points:[e,0,2*e,0,2*e,i,t,i,t,2*i,2*e,2*i,2*e,n,e,n,e,2*i,0,2*i,0,i,e,i]}}}case"blockArrow":{let e=.6*t,i=.2*n,a=.8*n;return{centering:"topLeft",geometry:{kind:"polygon",points:[0,i,e,i,e,0,t,n/2,e,n,e,a,0,a]}}}case"chevron":{let e=.5*t;return{centering:"topLeft",geometry:{kind:"polygon",points:[0,0,e,0,t,n/2,e,n,0,n,e,n/2]}}}case"rectCallout":{let e=.85*n;return{centering:"topLeft",geometry:{kind:"polygon",points:[0,0,t,0,t,e,.28*t,e,.24*t,n,.2*t,e,0,e]}}}case"banner":{let e=.08*t;return{centering:"topLeft",geometry:{kind:"polygon",points:[0,0,t,0,t-e,n/2,t,n,0,n,e,n/2]}}}case"speechBubble":{let e=.7*n,i=Math.max(2,Math.min(20,Math.min(t,e)/4));return{centering:"topLeft",geometry:{kind:"path",d:`M ${i} 0 H ${t-i} Q ${t} 0 ${t} ${i} V ${e-i} Q ${t} ${e} ${t-i} ${e} H ${.4*t} L ${.22*t} ${n} L ${.3*t} ${e} H ${i} Q 0 ${e} 0 ${e-i} V ${i} Q 0 0 ${i} 0 Z`}}}default:{let t=e.shapeType;throw Error(`Unreachable: ${String(t)}`)}}}function l(e){if("solid"===e.type)return e.color;let t=e.stops.map(e=>`${e.color} ${(100*e.offset).toFixed(2)}%`).join(", ");return"linear"===e.type?`linear-gradient(${180-e.angle}deg, ${t})`:`radial-gradient(circle at ${(100*e.cx).toFixed(1)}% ${(100*e.cy).toFixed(1)}%, ${t})`}var s=n(85482);function d(e,t){let n=(0,s.Ay)(0,t);n.addData(e),n.make();let i=n.getModuleCount(),a=[];for(let e=0;e<i;e++){let t=[];for(let a=0;a<i;a++)t.push(n.isDark(e,a));a.push(t)}return a}function c(e){let{width:t,height:n,matrix:i,margin:a,bgColor:o}=e,r=Math.min(t,n),l=(t-r)/2,s=(n-r)/2,d="transparent"!==o?{x:l,y:s,size:r}:null,c=i.length;if(0===c)return{plate:d,path:""};let u=r/(c+2*a),h=e=>Math.round(1e3*e)/1e3,m=[];for(let e=0;e<c;e++){let t=0;for(;t<c;){if(!i[e][t]){t++;continue}let n=t;for(;t<c&&i[e][t];)t++;let o=l+(a+n)*u,r=s+(a+e)*u;m.push(`M${h(o)} ${h(r)}h${h((t-n)*u)}v${h(u)}h${h(-(t-n)*u)}z`)}}return{plate:d,path:m.join("")}}function u(e,t){let n=t?.redirectBase;if(!e.tracking||!e.trackingId||!n)return e.data;let i=n.replace(/\/+$/,""),a=`${i}/r/${e.trackingId}`;return t?.screenId?`${a}?s=${encodeURIComponent(t.screenId)}`:a}function h(e){if(e?.remoteInviteUrl)return e.remoteInviteUrl;let t=(e?.redirectBase??"").replace(/\/+$/,"");return`${t}/remote`}},63751:(e,t,n)=>{n.d(t,{U:()=>d});var i=n(2074),a=n(63453),o=n(27173),r=n(1296);function l(e,t,n,i){let a=[...e].sort((e,t)=>
24e.zIndex-t.zIndex),l=(0,o.wC)(t),s=new Map,d=[],c=a.map((e,t)=>{var a;let c=null;return e.groupId&&(c=(e=>{let t=(0,r.H3)(n,e);for(let e=t.length-1;e>=0;e--){let i=t[e];if(s.has(i))continue;let a=crypto.randomUUID();s.set(i,a);let o=n.find(e=>e.id===i),r=o?.parentId??null;d.push({id:a,name:o?.name?`${o.name} copy`:null,parentId:r?s.get(r)??null:null})}return s.get(e)})(e.groupId)),"app"!==(a={...(0,o.Go)(e),id:crypto.randomUUID(),x:e.x+i.dx,y:e.y+i.dy,zIndex:l+t*o.C,groupId:c,name:i.renameCopies&&e.name?`${e.name} copy`:e.name}).type||"qr"!==a.appId||a.config?.tracking!==!0?a:{...a,config:{...a.config,trackingId:crypto.randomUUID()}}}),u=(0,o.EH)(c,d);return{copies:u.elements,newGroups:u.groups}}var s=n(91514);let d=(0,i.v)((e,t)=>({...{canvas:{width:1920,height:1080,background:a.HI,orientation:"landscape"},setCanvas:n=>{t().pushHistory(),e(e=>({canvas:{...e.canvas,...n},isDirty:!0}))},resizeCanvasScaled:(n,i)=>{t().pushHistory(),e(e=>({canvas:{...e.canvas,...n},elements:i,isDirty:!0}))}},...function(e,t){function n(){let n=t(),i=function(e,t){let n=null;for(let i of e)if("video"===i.type){let e=i.mediaFileId,a=e?t[e]?.duration??null:null;"number"==typeof a&&(null===n||a>n)&&(n=a)}else if("pdf"===i.type){let e=i.pages.reduce((e,t)=>e+(t.durationMs??0),0)/1e3;e>0&&(null===n||e>n)&&(n=e)}return null===n?null:Math.ceil(n)}(n.elements,n.mediaById);i!==n.maxContentDuration&&e({maxContentDuration:i})}return{elements:[],addElement:i=>{t().pushHistory(),e(e=>({elements:[...e.elements,{...i,zIndex:(0,o.wC)(e.elements)}],selectedIds:[i.id],isDirty:!0})),n()},updateElement:(i,a,r)=>{r?.skipHistory||t().pushHistory();let l=(0,o.AZ)(a);e(e=>({elements:e.elements.map(e=>e.id===i?{...e,...l}:e),isDirty:!0})),r?.skipHistory||n()},replaceElement:(i,a)=>{t().pushHistory(),e(e=>({elements:e.elements.map(e=>e.id===i?a:e),isDirty:!0})),n()},updateElements:(i,a)=>{a?.skipHistory||t().pushHistory();let r=new Map(i.map(({id:e,changes:t})=>[e,(0,o.AZ)(t)]));e(e=>({elements:e.elements.map(e=>r.has(e.id)?{...e,...r.get(e.id)}:e),isDirty:!0})),a?.skipHistory||n()},deleteElement:i=>{t().pushHistory(),e(e=>({...(0,o.EH)(e.elements.filter(e=>e.id!==i),e.groups),selectedIds:e.selectedIds.filter(e=>e!==i),isDirty:!0})),n()},deleteElements:i=>{t().pushHistory();let a=new Set(i);e(e=>({...(0,o.EH)(e.elements.filter(e=>!a.has(e.id)),e.groups),selectedIds:[],isDirty:!0})),n()},duplicateElement:e=>t().duplicateElements([e]),duplicateElements:i=>{0!==i.length&&(t().pushHistory(),e(e=>{let t=new Set((0,o.al)(i,e.elements));if(0===t.size)return{};let{copies:n,newGroups:a}=l(e.elements.filter(e=>t.has(e.id)),e.elements,e.groups,{dx:20,dy:20,renameCopies:!0});return{elements:[...e.elements,...n],groups:a.length>0?[...e.groups,...a]:e.groups,selectedIds:n.map(e=>e.id),isDirty:!0}}),n())},pasteElements:(i,a,o)=>{0!==i.length&&(t().pushHistory(),e(e=>{let{copies:t,newGroups:n}=l(i,e.elements,e.groups,{dx:a,dy:o});return{elements:[...e.elements,...t],groups:n.length>0?[...e.groups,...n]:e.groups,selectedIds:t.map(e=>e.id),isDirty:!0}}),n())},reorderElement:(n,i)=>{t().pushHistory(),e(e=>{let t,a=[...e.elements].sort((e,t)=>e.zIndex-t.zIndex),r=Array.isArray(n)?n:[n],l=0,s=new Set;for(let e of r){let t=a.find(t=>t.id===e);t&&(t.groupId?a.filter(e=>e.groupId===t.groupId).forEach(e=>{e.locked?l++:s.add(e.id)}):t.locked?l++:s.add(e))}if(l>0&&window.dispatchEvent(new CustomEvent("editor:toast",{detail:{message:`Skipped ${l} locked element${1===l?"":"s"}`,type:"info"}})),0===s.size)return{};let d=a.map((e,t)=>s.has(e.id)?t:-1).filter(e=>-1!==e),c=d[0],u=d[d.length-1],h=a.filter(e=>s.has(e.id)),m=a.filter(e=>!s.has(e.id));if("front"===i)t=m.length;else if("back"===i)t=0;else if("forward"===i){let e=a.slice(u+1).find(e=>!s.has(e.id));if(!e)return{};t=m.findIndex(t=>t.id===e.id)+1}else{let e=[...a].slice(0,c).reverse().find(e=>!s.has(e.id));if(!e)return{};t=m.findIndex(t=>t.id===e.id)}return m.splice(t,0,...h),{elements:e.elements.map(e=>{let t=m.findIndex(t=>t.id===e.id);return -1!==t?{...e,zIndex:t*o.C}:e}),isDirty:!0}})},reorderElementTo:(n,i)=>{t().pushHistory(),e(e=>{let t,a=[...e.elements].sort((e,t)=>
24e.zIndex-t.zIndex),r=a.findIndex(e=>e.id===n);if(-1===r)return{};let[l]=a.splice(r,1);if(null===i)t=0;else{let e=a.findIndex(e=>e.id===i);t=e<0?a.length:e+1}return a.splice(t,0,l),{elements:a.map((e,t)=>({...e,zIndex:t*o.C})),isDirty:!0}})},toggleLock:t=>{let n=new Set(t);e(e=>{let t=e.elements.map(e=>n.has(e.id)?{...e,locked:!e.locked}:e),i=new Set(t.filter(e=>e.locked&&n.has(e.id)).map(e=>e.id));return{elements:t,selectedIds:e.selectedIds.filter(e=>!i.has(e)),isDirty:!0}})},toggleHidden:t=>{let n=new Set(t);e(e=>({elements:e.elements.map(e=>n.has(e.id)?{...e,hidden:!e.hidden}:e),selectedIds:e.selectedIds.filter(t=>!n.has(t)||!e.elements.find(e=>e.id===t)?.hidden),isDirty:!0}))}}}(e,t),...{groups:[],groupElements:n=>{let i=t(),a=new Set(n),l=new Map(i.elements.map(e=>[e.id,e])),s=i.enteredGroupId,d=new Set,c=[];for(let e of n){let t=l.get(e);if(!t)continue;let n=t.groupId?(0,r.C_)(i.groups,t.groupId,s):null;if(!n){c.push(e);continue}(0,r.lS)(i.elements,i.groups,n).every(e=>a.has(e.id))?d.add(n):c.push(e)}if(d.size+c.length<2)return;t().pushHistory();let u=crypto.randomUUID(),h=new Set(c);e(e=>{let t=e.elements.map(e=>h.has(e.id)?{...e,groupId:u}:e),n=[...e.groups.map(e=>d.has(e.id)?{...e,parentId:u}:e),{id:u,name:null,parentId:s}],i=(0,o.EH)(t,n);return{elements:(0,o.K2)(i.elements,u,i.groups),groups:i.groups,isDirty:!0}})},ungroupElements:n=>{let i=t().groups.find(e=>e.id===n);if(!i)return;t().pushHistory();let a=i.parentId;e(e=>{let t=e.elements.map(e=>e.groupId===n?{...e,groupId:a}:e),i=e.groups.filter(e=>e.id!==n).map(e=>e.parentId===n?{...e,parentId:a}:e),r=(0,o.EH)(t,i);return{elements:r.elements,groups:r.groups,isDirty:!0}})},reorderGroupTo:(n,i)=>{t().pushHistory(),e(e=>{let t=[...e.elements].sort((e,t)=>e.zIndex-t.zIndex),a=t.filter(e=>e.groupId===n);if(0===a.length)return{};let r=t.filter(e=>e.groupId!==n),l=null===i?-1:r.findIndex(e=>e.id===i),s=null===i?0:l<0?r.length:l+1;return r.splice(s,0,...a),{elements:r.map((e,t)=>({...e,zIndex:t*o.C})),isDirty:!0}})},moveInTree:n=>{let i=t();if("group"===n.kind&&(0,r.oH)(i.groups,n.id,n.parentId))return;let a="element"===n.kind?i.elements.find(e=>e.id===n.id)?.groupId??null:i.groups.find(e=>e.id===n.id)?.parentId??null;t().pushHistory(),e(e=>{let t="element"===n.kind?e.elements.map(e=>e.id===n.id?{...e,groupId:n.parentId}:e):e.elements,i="group"===n.kind?e.groups.map(e=>e.id===n.id?{...e,parentId:n.parentId}:e):e.groups,l=new Set("group"===n.kind?(0,r.lS)(t,i,n.id).map(e=>e.id):[n.id]);if(l.size>0){let e=[...t].sort((e,t)=>e.zIndex-t.zIndex),i=e.filter(e=>l.has(e.id)),a=e.filter(e=>!l.has(e.id)),r=n.beforeId?a.findIndex(e=>e.id===n.beforeId):-1,s=r>=0?r+1:a.length;a.splice(s,0,...i),t=a.map((e,t)=>({...e,zIndex:t*o.C}))}let s=(0,o.EH)(t,i),d=s.elements;return n.parentId&&s.groups.some(e=>e.id===n.parentId)&&(d=(0,o.K2)(d,n.parentId,s.groups)),a&&a!==n.parentId&&s.groups.some(e=>e.id===a)&&(d=(0,o.K2)(d,a,s.groups)),{elements:d,groups:s.groups,isDirty:!0}})},renameGroup:(n,i)=>{t().pushHistory(),e(e=>({groups:e.groups.map(e=>e.id===n?{...e,name:i}:e),isDirty:!0}))},makeGroupContiguous:n=>{t().pushHistory(),e(e=>({elements:(0,o.K2)(e.elements,n,e.groups),isDirty:!0}))}},...{selectedIds:[],setSelection:t=>e({selectedIds:t}),addToSelection:t=>e(e=>({selectedIds:e.selectedIds.includes(t)?e.selectedIds:[...e.selectedIds,t]})),clearSelection:()=>e({selectedIds:[]})},...{zoom:.5,panX:0,panY:0,collapsedGroupIds:[],toggleGroupCollapsed:t=>e(e=>({collapsedGroupIds:e.collapsedGroupIds.includes(t)?e.collapsedGroupIds.filter(e=>e!==t):[...e.collapsedGroupIds,t]})),enteredGroupId:null,enterGroup:t=>e({enteredGroupId:t}),exitGroup:()=>e(e=>e.enteredGroupId?{enteredGroupId:(0,r.H3)(e.groups,e.enteredGroupId)[1]??null}:{}),resetDrill:()=>e({enteredGroupId:null}),setZoom:t=>e({zoom:Math.max(.05,Math.min(4,t))}),setPan:(t,n)=>e({panX:t,panY:n}),fitToScreen:(n,i)=>{let a=t().canvas,o=.9*Math.min(n/a.width,i/a.height),r=(n-a.width*o)/2,l=(i-a.height*o)/2;e({zoom:o,panX:r,panY:l})}},...{past:[],future:[],pushHistory:()=>{e(e=>{let t={elements:(0,o.Go)(e.elements),canvas:{...e.canvas},groups:(0,o.Go)(e.groups),title:e.title,maxContentDuration:e.maxContentDuration};return{past:[...e.past,t].slice(-o.oe),future:[]}})},undo:()=>{e(e=>{if(0===e.past.length)return{};let t=e.past[e.past.length-1],n={elements:(0,o.Go)(e.elements),canvas:{...e.canvas},groups:(0,o.Go)(e.groups),title:e.title,maxContentDuration:e.maxContentDuration};return{past:e.past.slice(0,-1),future:[n,...e.future],elements:t.elements,canvas:t.canvas,groups:t.groups,title:t.title,maxContentDuration:t.maxContentDuration,isDirty:!0}})},redo:()=>{e(e=>{if(0===e.future.length)return{};let t=e.future[0],n={elements:(0,o.Go)(e.elements),canvas:{...e.canvas},groups:(0,o.Go)(e.groups),title:e.title,maxContentDuration:e.maxContentDuration};return{past:[...e.past,n],future:e.future.slice(1),elements:t.elements,canvas:t.canvas,groups:t.groups,title:t.title,maxContentDuration:t.maxContentDuration,isDirty:!0}})}},...{contentId:null,title:"",contentStatus:"draft",maxContentDuration:null,isDirty:!1,isSaving:!1,lastSavedAt:null,clipboard:[],setClipboard:t=>e({clipboard:t}),initEditor:({contentId:t,title:n,status:i,canvas:a,elements:r,groups:l})=>e({contentId:t,title:n,contentStatus:i,canvas:a,...(0,o.EH)(r,l),selectedIds:[],past:[],future:[],isDirty:!1,isSaving:!1}),setTitle:n=>{t().pushHistory(),e({title:n,isDirty:!0})}
24,setMaxContentDuration:n=>{t().pushHistory(),e({maxContentDuration:n,isDirty:!0})},setContentStatus:t=>e({contentStatus:t}),setIsSaving:t=>e({isSaving:t}),markSaved:()=>e({isDirty:!1,isSaving:!1,lastSavedAt:new Date}),resetEditor:()=>e({contentId:null,title:"",contentStatus:"draft",maxContentDuration:null,elements:[],groups:[],mediaById:{},inFlightMediaIds:new Set,selectedIds:[],collapsedGroupIds:[],enteredGroupId:null,past:[],future:[],isDirty:!1,isSaving:!1,lastSavedAt:null,clipboard:[]})},...{mediaById:{},inFlightMediaIds:new Set,previewPageByElementId:{},setElementPreviewPage:(t,n)=>e(e=>({previewPageByElementId:{...e.previewPageByElementId,[t]:n}})),addMediaToCache:t=>e(e=>({mediaById:{...e.mediaById,[t.id]:t}})),hydrateMediaForContent:async i=>{let a=t(),o=a.mediaById,r=a.inFlightMediaIds,l=Array.from(new Set(i.flatMap(e=>("pdf"===e.type||"video"===e.type)&&e.mediaFileId?[e.mediaFileId]:"slider"===e.type?e.items.map(e=>e.mediaFileId).filter(Boolean):[]))).filter(e=>!o[e]&&!r.has(e));if(0===l.length)return;let{useAuthStore:d}=await Promise.resolve().then(n.bind(n,42271)),c=d.getState(),u=c.currentOrg?.id,h=c.currentSpace?.id;if(u&&h){e(e=>{let t=new Set(e.inFlightMediaIds);for(let e of l)t.add(e);return{inFlightMediaIds:t}});try{let t=await Promise.all(l.map(e=>
24s.L.getFile(u,h,e).catch(()=>null)));e(e=>{let n={...e.mediaById};for(let e of t)e&&(n[e.id]=e);let i=new Set(e.inFlightMediaIds);for(let e of l)i.delete(e);return{mediaById:n,inFlightMediaIds:i}})}catch{e(e=>{let t=new Set(e.inFlightMediaIds);for(let e of l)t.delete(e);return{inFlightMediaIds:t}})}}}}}))},67606:(e,t,n)=>{n.d(t,{B:()=>eu});var i=n(73365),a=n(1521);n(74975),n(78919),n(69894),n(2873),n(75896),n(46638),n(42353);var o=n(63453),r=n(61157);function l({width:e,height:t,payload:n,config:r}){let s=r.errorCorrection??"M",d=r.margin??4,c=r.bgColor??"#FFFFFF",u=(0,a.useMemo)(()=>(0,o.oJ)({width:e,height:t,matrix:(0,o.jY)(n||" ",s),margin:d,bgColor:c}),[e,t,n,s,d,c]);return(0,i.jsxs)("svg",{width:e,height:t,viewBox:`0 0 ${e} ${t}`,shapeRendering:"crispEdges",style:{display:"block"},"aria-hidden":"true",children:[u.plate&&(0,i.jsx)("rect",{x:u.plate.x,y:u.plate.y,width:u.plate.size,height:u.plate.size,fill:c}),(0,i.jsx)("path",{d:u.path,fill:r.fgColor??"#000000"})]})}function s({width:e,height:t,config:n}){let a=(0,o.c6)(n,{redirectBase:r.R.NEXT_PUBLIC_API_URL});return(0,i.jsx)(l,{width:e,height:t,payload:a,config:n})}function d({width:e,height:t,config:n}){return(0,i.jsx)(l,{width:e,height:t,payload:(0,o.wz)({redirectBase:r.R.NEXT_PUBLIC_API_URL}),config:n})}var c=n(1062),u=n(86367);let h={left:"flex-start",center:"center",right:"flex-end"};function m({config:e}){let{families:t,resolveFamilyName:n}=(0,c.s)();(0,a.useEffect)(()=>{if(!e.fontFamilyId)return;let n=t.find(t=>t.id===e.fontFamilyId);if(!n)return;let i=Number(e.fontWeight??"600"),a=e.fontStyle??"normal",o=n.faces.find(e=>e.weight===i&&e.style===a)??n.faces.find(e=>400===e.weight&&"normal"===e.style)??n.faces[0];if(o)return(0,u.yg)({family:n.name,weight:o.weight,style:o.style,url:o.webUrl})},[e.fontFamilyId,e.fontWeight,e.fontStyle,t]);let o=n(e.fontFamilyId??null,e.fontFamily??"ui-sans-serif, system-ui, sans-serif");return(0,i.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:h[e.textAlign??"center"],gap:8,background:function(e){if(!e||"transparent"===e)return"transparent";if("string"==typeof e)return e;if("solid"===e.type)return e.color;if("linear"===e.type&&Array.isArray(e.stops)){let t=e.stops.map(e=>`${e.color} ${Math.round(100*e.offset)}%`).join(", ");return`linear-gradient(${e.angle??0}deg, ${t})`}if("radial"===e.type&&Array.isArray(e.stops)){let t=e.stops.map(e=>`${e.color} ${Math.round(100*e.offset)}%`).join(", ");return`radial-gradient(circle, ${t})`}return"transparent"}(e.background),color:e.textColor??"#FFFFFF",borderRadius:e.cornerRadius??12,fontFamily:o,fontWeight:e.fontWeight??"600",fontStyle:e.fontStyle??"normal",fontSize:e.fontSize??18,letterSpacing:e.letterSpacing??0,lineHeight:e.lineHeight??1.2,textAlign:e.textAlign??"center",padding:"0 12px",boxShadow:"0 0 0 1px rgba(130, 130, 150, 0.4), 0 2px 8px rgba(0, 0, 0, 0.22)",overflow:"hidden",userSelect:"none"},children:(0,i.jsx)("span",{children:e.label||"Tap to explore"})})}let f={sunny:"âï¸","partly-cloudy":"â
",cloudy:"âï¸",rain:"\uD83C\uDF27ï¸",thunderstorm:"âï¸",snow:"âï¸",fog:"\uD83C\uDF2Bï¸"};function g({config:e,context:t}){let n=e??{},o=(0,a.useMemo)(()=>(function(e,t){if(e.location?.source==="manual"){let t=e.location.value;return Number.isFinite(t?.lat)&&Number.isFinite(t?.lon)?{lat:t.lat,lon:t.lon}:null}let n=t?.location;if(!n)return null;let i="number"==typeof n.lon?n.lon:"number"==typeof n.lng?n.lng:null;return"number"!=typeof n.lat||null===i?null:{lat:n.lat,lon:i}})(n,t),[n,t]),r=o?`${o.lat},${o.lon}`:"none",l=n.units??"metric",[s,d]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(!o){d(null),u(!1);return}let e=new AbortController;return fetch(`/apps/weather?lat=${encodeURIComponent(o.lat)}&lon=${encodeURIComponent(o.lon)}&units=${encodeURIComponent(l)}`,{credentials:"include"}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{e.signal.aborted||(d(t.data),u(!1))}).catch(t=>{e.signal.aborted||"AbortError"===t.name||u(!0)}),()=>e.abort()},[r,l]);let h={width:"100%",height:"100%",background:function(e){if(!e||"transparent"===e)return"transparent";if("string"==typeof e)return e;if("solid"===e.type)return e.color;if("linear"===e.type&&Array.isArray(e.stops)){let t=e.stops.map(e=>`${e.color} ${Math.round(100*e.offset)}%`).join(", ");return`linear-gradient(${e.angle??0}deg, ${t})`}if("radial"===e.type&&Array.isArray(e.stops)){let t=e.stops.map(e=>`${e.color} ${Math.round(100*e.offset)}%`).join(", ");return`radial-gradient(circle, ${t})`}return"transparent"}(n.backgroundColor),color:n.color??"#111",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",fontFamily:'-apple-system, system-ui, "
24Segoe UI", Roboto, sans-serif',padding:16,overflow:"hidden",boxSizing:"border-box"};if(!o)return(0,i.jsx)("div",{style:h,children:(0,i.jsx)(p,{title:"No location set",hint:"Pick a place in the Weather panel."})});if(c&&!s)return(0,i.jsx)("div",{style:h,children:(0,i.jsx)(p,{title:"Weather unavailable",hint:"Couldnât reach the weather service."})});if(!s)return(0,i.jsx)("div",{style:h});let m=s.current,y="imperial"===l?`${Math.round(m.tempF)}\xb0F`:`${Math.round(m.tempC)}\xb0C`,x=f[m.condition]??"?";return(0,i.jsxs)("div",{style:h,children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:16},children:[(0,i.jsx)("div",{style:{fontSize:48,lineHeight:1},children:x}),(0,i.jsx)("div",{style:{fontSize:64,fontWeight:600,lineHeight:1},children:y}),(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",fontSize:14},children:[(0,i.jsx)("div",{children:m.condition}),(0,i.jsxs)("div",{children:["Humidity ",m.humidity,"%"]})]})]}),"current+forecast3"===n.layout&&s.forecast&&(0,i.jsx)("div",{style:{display:"flex",gap:12,marginTop:16},children:s.forecast.slice(0,3).map((e,t)=>{let n="imperial"===l?`${Math.round(9*e.maxC/5+32)}\xb0`:`${Math.round(e.maxC)}\xb0`;return(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:12},children:[(0,i.jsx)("div",{style:{fontSize:24,lineHeight:1},children:f[e.condition]??"?"}),(0,i.jsx)("div",{children:n})]},t)})})]})}function p({title:e,hint:t}){return(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6,textAlign:"center",maxWidth:260},children:[(0,i.jsxs)("svg",{width:28,height:28,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",style:{opacity:.5},children:[(0,i.jsx)("path",{d:"M2 2l20 20"}),(0,i.jsx)("path",{d:"M5.78 5.78A4 4 0 0 0 9 13h9a4 4 0 0 0 .76-7.93"}),(0,i.jsx)("path",{d:"M14 5a4 4 0 0 1 4.7 3"})]}),(0,i.jsx)("div",{style:{fontSize:13,fontWeight:500,opacity:.85,lineHeight:1.2},children:e}),t&&(0,i.jsx)("div",{style:{fontSize:11,opacity:.55,lineHeight:1.3},children:t})]})}var y=n(55223);let x=["pm2_5","pm10","o3","no2"];function w({config:e,context:t}){let n=e??{},o=(0,a.useMemo)(()=>(function(e,t){if(e.location?.source==="manual"){let t=e.location.value;return Number.isFinite(t?.lat)&&Number.isFinite(t?.lon)?{lat:t.lat,lon:t.lon,label:t.label??null}:null}let n=t?.location;if(!n)return null;let i="number"==typeof n.lon?n.lon:"number"==typeof n.lng?n.lng:null;return"number"!=typeof n.lat||null===i?null:{lat:n.lat,lon:i,label:n.label??null}})(n,t),[n,t]),r=o?`${o.lat},${o.lon}`:"none",[l,s]=(0,a.useState)(null),[d,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(!o){s(null),c(!1);return}let e=new AbortController;return fetch(`/apps/airquality?lat=${encodeURIComponent(o.lat)}&lon=${encodeURIComponent(o.lon)}`,{credentials:"include"}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{e.signal.aborted||(s(t.data),c(!1))}).catch(t=>{e.signal.aborted||"AbortError"===t.name||c(!0)}),()=>e.abort()},[r]);let u="european"===n.standard?"european":"us";if(!o)return(0,i.jsx)(S,{bg:"#1f2937",fg:"#e5e7eb",children:(0,i.jsx)(v,{title:"No location set"})});if(d&&!l)return(0,i.jsx)(S,{bg:"#1f2937",fg:"#e5e7eb",children:(0,i.jsx)(v,{title:"Air quality unavailable"})});if(!l)return(0,i.jsx)(S,{bg:"#1f2937",fg:"#e5e7eb"});let h="european"===u?l.eu:l.us,m=(0,y.H7)(h.aqi,u),f="european"===u?"EU AQI":"US AQI";return(0,i.jsxs)(S,{bg:m.bg,fg:m.fg,children:[n.showLabel&&o.label&&(0,i.jsx)("div",{style:{fontSize:14,opacity:.85,alignSelf:"flex-start",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.label}),(0,i.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4},children:[(0,i.jsx)("div",{style:{fontSize:72,fontWeight:700,lineHeight:1},children:Math.round(h.aqi)}),(0,i.jsx)("div",{style:{fontSize:16,fontWeight:600},children:m.category}),(0,i.jsx)(b,{layout:n.layout,standard:u,reading:h,pollutants:l.pollutants})]}),(0,i.jsx)("div",{style:{fontSize:12,opacity:.8,alignSelf:"flex-start"},children:f})]})}function b({layout:e,standard:t,reading:n,pollutants:a}){if("badge+advice"===e)return(0,i.jsx)("div",{style:{fontSize:13,textAlign:"center",maxWidth:320,opacity:.95},children:(0,y.kW)(n.aqi,t)});if("badge+dominant"===e){let e=(0,y.cu)(n.sub);return e?(0,i.jsxs)("div",{style:{fontSize:13,opacity:.95},children:["Main: ",(0,y.Mt)(e)," ",Math.round(a[e])," ug/m3"]}):null}return"badge+grid"===e?(0,i.jsx)("div",{style:{display:"flex",gap:14,marginTop:6},children:x.map(e=>(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:12},children:[(0,i.jsx)("div",{style:{opacity:.8},children:(0,y.Mt)(e)}),(0,i.jsx)("div",{style:{fontWeight:600},children:Math.round(a[e])})]},e))}):null}function S({bg:e,fg:t,children:n}){return(0,i.jsx)("div",{style:{width:"100%",height:"100%",background:e,color:t,display:"flex",flexDirection:"column",fontFamily:'-apple-system, system-ui, "
24Segoe UI", Roboto, sans-serif',padding:16,overflow:"hidden",boxSizing:"border-box"},children:n})}function v({title:e}){return(0,i.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:500,opacity:.85,textAlign:"center"},children:e})}function k({config:e,context:t}){let n=e??{},o=(0,a.useMemo)(()=>(function(e,t){if(e.location?.source==="manual"){let t=e.location.value;return Number.isFinite(t?.lat)&&Number.isFinite(t?.lon)?{lat:t.lat,lon:t.lon,label:t.label??null}:null}let n=t?.location;if(!n)return null;let i="number"==typeof n.lon?n.lon:"number"==typeof n.lng?n.lng:null;return"number"!=typeof n.lat||null===i?null:{lat:n.lat,lon:i,label:n.label??null}})(n,t),[n,t]),r=o?`${o.lat},${o.lon}`:"none",[l,s]=(0,a.useState)(null),[d,c]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{if(!o){s(null),c(!1);return}let e=new AbortController;return fetch(`/apps/uv?lat=${encodeURIComponent(o.lat)}&lon=${encodeURIComponent(o.lon)}`,{credentials:"include"}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{e.signal.aborted||(s(t.data),c(!1))}).catch(t=>{e.signal.aborted||"AbortError"===t.name||c(!0)}),()=>e.abort()},[r]),!o)return(0,i.jsx)(I,{bg:"#1f2937",fg:"#e5e7eb",children:(0,i.jsx)(j,{title:"No location set"})});if(d&&!l)return(0,i.jsx)(I,{bg:"#1f2937",fg:"#e5e7eb",children:(0,i.jsx)(j,{title:"UV index unavailable"})});if(!l)return(0,i.jsx)(I,{bg:"#1f2937",fg:"#e5e7eb"});let u=(0,y.Mz)(l.uv),h=(0,y.D9)(u);return(0,i.jsxs)(I,{bg:h.bg,fg:h.fg,children:[n.showLabel&&o.label&&(0,i.jsx)("div",{style:{fontSize:14,opacity:.85,alignSelf:"flex-start",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.label}),(0,i.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4},children:[(0,i.jsx)("div",{style:{fontSize:72,fontWeight:700,lineHeight:1},children:u}),(0,i.jsx)("div",{style:{fontSize:16,fontWeight:600},children:h.category}),(0,i.jsx)(M,{layout:n.layout,value:u,peak:l.peak})]}),(0,i.jsx)("div",{style:{fontSize:12,opacity:.8,alignSelf:"flex-start"},children:"UV index"})]})}function M({layout:e,value:t,peak:n}){if("badge+advice"===e)return(0,i.jsx)("div",{style:{fontSize:13,textAlign:"center",maxWidth:320,opacity:.95},children:(0,y.sq)(t)});if("badge+peak"===e)return(0,i.jsxs)("div",{style:{fontSize:13,opacity:.95},children:["Peak ",(0,y.Mz)(n.value)," at ",(0,y.L2)(n.hour)]});if("badge+protection"===e){let{spf:e,protection:n}=(0,y.b7)(t);return(0,i.jsxs)("div",{style:{fontSize:13,textAlign:"center",opacity:.95},children:[e>0&&(0,i.jsxs)("span",{style:{fontWeight:600},children:["SPF ",e,"+ "]}),n]})}return null}function I({bg:e,fg:t,children:n}){return(0,i.jsx)("div",{style:{width:"100%",height:"100%",background:e,color:t,display:"flex",flexDirection:"column",fontFamily:'-apple-system, system-ui, "Segoe UI", Roboto, sans-serif',padding:16,overflow:"hidden",boxSizing:"border-box"},children:n})}function j({title:e}){return(0,i.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:500,opacity:.85,textAlign:"center"},children:e})}function z({config:e,context:t}){let n=e??{},o=(0,a.useMemo)(()=>(function(e,t){if(e.location?.source==="manual"){let t=e.location.value;return Number.isFinite(t?.lat)&&Number.isFinite(t?.lon)?{lat:t.lat,lon:t.lon,label:t.label??null}:null}let n=t?.location;if(!n)return null;let i="number"==typeof n.lon?n.lon:"number"==typeof n.lng?n.lng:null;return"number"!=typeof n.lat||null===i?null:{lat:n.lat,lon:i,label:n.label??null}})(n,t),[n,t]),r=o?`${o.lat},${o.lon}`:"none",[l,s]=(0,a.useState)(null),[d,c]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{if(!o){s(null),c(!1);return}let e=new AbortController;return fetch(`/apps/pollen?lat=${encodeURIComponent(o.lat)}&lon=${encodeURIComponent(o.lon)}`,{credentials:"include"}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{e.signal.aborted||(s(t.data),c(!1))}).catch(t=>{e.signal.aborted||"AbortError"===t.name||c(!0)}),()=>e.abort()}
24,[r]),!o)return(0,i.jsx)(F,{bg:"#1f2937",fg:"#e5e7eb",children:(0,i.jsx)(C,{title:"No location set"})});if(d&&!l)return(0,i.jsx)(F,{bg:"#1f2937",fg:"#e5e7eb",children:(0,i.jsx)(C,{title:"Pollen unavailable"})});if(!l)return(0,i.jsx)(F,{bg:"#1f2937",fg:"#e5e7eb"});if(!l.available)return(0,i.jsx)(F,{bg:"#1f2937",fg:"#e5e7eb",children:(0,i.jsx)(C,{title:"Pollen not available here"})});let{band:u,dominant:h}=(0,y.kd)(l.species);return(0,i.jsxs)(F,{bg:u.bg,fg:u.fg,children:[n.showLabel&&o.label&&(0,i.jsx)("div",{style:{fontSize:14,opacity:.85,alignSelf:"flex-start",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.label}),(0,i.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:4},children:[(0,i.jsx)("div",{style:{fontSize:44,fontWeight:700,lineHeight:1.05,textAlign:"center"},children:u.category}),h&&(0,i.jsxs)("div",{style:{fontSize:16,fontWeight:600},children:[(0,y.Jy)(h)," pollen"]}),"badge+advice"===n.layout&&(0,i.jsx)("div",{style:{fontSize:13,textAlign:"center",maxWidth:320,opacity:.95},children:(0,y.$K)(u)})]}),(0,i.jsx)("div",{style:{fontSize:12,opacity:.8,alignSelf:"flex-start"},children:"Pollen"})]})}function F({bg:e,fg:t,children:n}){return(0,i.jsx)("div",{style:{width:"100%",height:"100%",background:e,color:t,display:"flex",flexDirection:"column",fontFamily:'-apple-system, system-ui, "Segoe UI", Roboto, sans-serif',padding:16,overflow:"hidden",boxSizing:"border-box"},children:n})}function C({title:e}){return(0,i.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:500,opacity:.85,textAlign:"center"},children:e})}var D=n(99521);function R({text:e,fontSize:t,speed:n,direction:o,gapMultiplier:r,wrapStyle:l}){let s=(0,a.useRef)(null),d=(0,a.useRef)(null),c=(0,a.useRef)(null),[u,h]=(0,a.useState)(0),[m,f]=(0,a.useState)(0),g=Math.round(t*r);(0,a.useLayoutEffect)(()=>{let e=()=>{h(c.current?.offsetWidth??0),f(s.current?.offsetWidth??0)};return e(),(0,D.L)(e)},[e,g]),(0,a.useEffect)(()=>{if(u<=0||n<=0){d.current&&(d.current.style.transform="translateX(0px)");return}let e=0,t=0,i=a=>{0===t&&(t=a);let r=(0,y.ox)(a-t,n,u,o);d.current&&(d.current.style.transform=`translateX(${-r}px)`),e=requestAnimationFrame(i)};return e=requestAnimationFrame(i),()=>cancelAnimationFrame(e)},[u,n,o]);let p=u>0?(0,y.nT)(m,u):2;return(0,i.jsx)("div",{ref:s,style:{overflow:"hidden",width:"100%",whiteSpace:"nowrap",...l},children:(0,i.jsx)("div",{ref:d,style:{display:"inline-flex",willChange:"transform"},children:Array.from({length:p}).map((t,n)=>(0,i.jsx)("span",{ref:0===n?c:void 0,style:{paddingRight:g,flex:"none"},children:e},n))})})}function A({config:e}){var t,n;let o=e??{},{base:r,targets:l}=(0,a.useMemo)(()=>{let e,t;return e=(o.base||"USD").toUpperCase(),t=Array.isArray(o.targets)?Array.from(new Set(o.targets.map(e=>e.toUpperCase()))).filter(t=>t&&t!==e):[],{base:e,targets:t}},[o]),s=`${r}:${l.join(",")}`,[d,h]=(0,a.useState)(null),[m,f]=(0,a.useState)(!1),{families:g,resolveFamilyName:p}=(0,c.s)();(0,a.useEffect)(()=>{if(!o.fontFamilyId)return;let e=g.find(e=>e.id===o.fontFamilyId);if(!e)return;let t=Number(o.fontWeight??"600"),n=o.fontStyle??"normal",i=e.faces.find(e=>e.weight===t&&e.style===n)??e.faces.find(e=>400===e.weight&&"normal"===e.style)??e.faces[0];if(i)return(0,u.yg)({family:e.name,weight:i.weight,style:i.style,url:i.webUrl})},[o.fontFamilyId,o.fontWeight,o.fontStyle,g]);let x=p(o.fontFamilyId??null,o.fontFamily??"ui-sans-serif, system-ui, sans-serif");(0,a.useEffect)(()=>{if(0===l.length){h(null),f(!1);return}let e=new AbortController;return fetch(`/apps/currencies?base=${encodeURIComponent(r)}&symbols=${encodeURIComponent(l.join(","))}`,{credentials:"include"}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{e.signal.aborted||(h(t.data),f(!1))}).catch(t=>{e.signal.aborted||"AbortError"===t.name||f(!0)}),()=>e.abort()},[s]);let w=(o.layout??"board")==="pair"&&l.length>1,b=1e3*Math.max(2,o.pairIntervalSec??6),[S,v]=(0,a.useState)(0);(0,a.useEffect)(()=>
24{if(!w)return void v(0);let e=window.setInterval(()=>v(e=>e+1),b);return()=>window.clearInterval(e)},[w,b]);let k=(t=o,n=x,{width:"100%",height:"100%",background:function(e){if(!e||"transparent"===e)return"transparent";if("string"==typeof e)return e;if("solid"===e.type)return e.color;if("linear"===e.type&&Array.isArray(e.stops)){let t=e.stops.map(e=>`${e.color} ${Math.round(100*e.offset)}%`).join(", ");return`linear-gradient(${e.angle??0}deg, ${t})`}if("radial"===e.type&&Array.isArray(e.stops)){let t=e.stops.map(e=>`${e.color} ${Math.round(100*e.offset)}%`).join(", ");return`radial-gradient(circle, ${t})`}return"transparent"}(t.background??{type:"solid",color:"#0f172a"}),color:t.color??"#e5e7eb",display:"flex",flexDirection:"column",fontFamily:n,fontWeight:t.fontWeight??"600",fontStyle:t.fontStyle??"normal",letterSpacing:t.letterSpacing??0,lineHeight:t.lineHeight??1.2,textAlign:t.textAlign??"center",padding:t.padding??16,borderRadius:t.cornerRadius??0,overflow:"hidden",boxSizing:"border-box"}),M=(0,y.PY)(o.fontSize??28);return 0===l.length?(0,i.jsx)(Y,{style:k,children:(0,i.jsx)(E,{title:"No currencies selected"})}):m&&!d?(0,i.jsx)(Y,{style:k,children:(0,i.jsx)(E,{title:"Rates unavailable"})}):d?(0,i.jsx)(Y,{style:k,children:(0,i.jsx)($,{cfg:o,base:r,targets:l,data:d,sizes:M,pairTick:S})}):(0,i.jsx)(Y,{style:k})}function $({cfg:e,base:t,targets:n,data:a,sizes:o,pairTick:r}){let l=e.layout??"board",s=e.showTrend??!0,d=e.amount??100,c=n.filter(e=>Number.isFinite(a.rates[e])).map(e=>({code:e,rate:a.rates[e],trend:(0,y.ku)(a.rates[e],a.prev?.rates[e])}));if("pair"===l){let e=c.length?c[r%c.length]:void 0;return e?(0,i.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6},children:[(0,i.jsxs)("div",{style:{fontSize:o.eq,opacity:.8},children:["1 ",t," ="]}),(0,i.jsx)("div",{style:{fontSize:o.bigRate,lineHeight:1,fontVariantNumeric:"tabular-nums"},children:(0,y.CE)(e.rate,e.code)}),(0,i.jsx)("div",{style:{fontSize:o.code},children:e.code}),s&&(0,i.jsx)(T,{trend:e.trend,size:o.trend})]}):(0,i.jsx)(E,{title:"No currencies selected"})}if("ticker"===l){let n=String.fromCharCode(160),a=`${n.repeat(4)}â¢${n.repeat(4)}`,r=`${c.map(e=>`1 ${t} = ${(0,y.CE)(e.rate,e.code)} ${e.code}`).join(a)}${a}`;return(0,i.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",overflow:"hidden"},children:(0,i.jsx)(R,{text:r,fontSize:o.ticker,speed:e.tickerSpeed??60,direction:"ltr"===e.tickerDirection?"ltr":"rtl",gapMultiplier:1.5,wrapStyle:{fontSize:o.ticker}})})}let u=e.showLabel?"converter"===l?`${d} ${t} =`:`1 ${t} =`:null;return(0,i.jsxs)(i.Fragment,{children:[u&&(0,i.jsx)("div",{style:{fontSize:o.header,opacity:.8,marginBottom:8},children:u}),(0,i.jsx)("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:6},children:c.map(e=>(0,i.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12},children:[(0,i.jsxs)("span",{style:{fontSize:o.label,opacity:.85},children:[y.Au[e.code]?.symbol??""," ",e.code]}),(0,i.jsxs)("span",{style:{display:"flex",alignItems:"baseline",gap:8},children:[(0,i.jsx)("span",{style:{fontSize:o.rate,fontVariantNumeric:"tabular-nums"},children:"converter"===l?(0,y.ej)(d*e.rate,e.code):(0,y.CE)(e.rate,e.code)}),s&&(0,i.jsx)(T,{trend:e.trend,size:o.trend})]})]},e.code))})]})}function T({trend:e,size:t}){if("flat"===e.dir)return(0,i.jsx)("span",{style:{fontSize:t,opacity:.6},children:"--"});let n="up"===e.dir?"#34d399":"#f87171",a="up"===e.dir?"â²":"â¼";return(0,i.jsxs)("span",{style:{fontSize:t,color:n},children:[a," ",Math.abs(e.pct).toFixed(2),"%"]})}function Y({style:e,children:t}){return(0,i.jsx)("div",{style:e,children:t})}function E({title:e}){return(0,i.jsx)("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:500,opacity:.85,textAlign:"center"},children:e})}var P=n(51795);function H({config:e}){var t;let n=e??{},o=(0,P.YK)(n.url),r=(0,a.useRef)(null),[l,s]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{if(s(!1),!o)return;let e=window.setTimeout(()=>s(!0),6e3);return()=>window.clearTimeout(e)},[o]),(0,a.useEffect)(()=>
24{if(!o||!n.refreshSec||n.refreshSec<=0)return;let e=window.setInterval(()=>{let e=r.current;e&&(e.src=o)},1e3*n.refreshSec);return()=>window.clearInterval(e)},[o,n.refreshSec]),!o)return(0,i.jsx)(U,{label:"No web page set"});let d="number"==typeof(t=n.zoom)&&Number.isFinite(t)?Math.min(2,Math.max(.25,t/100)):1,c=`${100/d}%`;return(0,i.jsxs)("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",background:"#0a0b12"},children:[(0,i.jsx)("iframe",{ref:r,src:o,title:"Web embed",onLoad:()=>s(!0),sandbox:"allow-scripts allow-same-origin allow-forms",style:{position:"absolute",top:0,left:0,width:c,height:c,border:0,display:"block",transform:1===d?void 0:`scale(${d})`,transformOrigin:"0 0",pointerEvents:"none"}}),!l&&(0,i.jsx)(U,{label:"Loadingâ¦",spinner:!0,overlay:!0})]})}function U({label:e,spinner:t,overlay:n}){return(0,i.jsxs)("div",{style:{position:n?"absolute":"relative",inset:n?0:void 0,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:12,background:"rgba(10, 11, 18, 0.92)",color:"rgba(245,246,250,0.64)"},children:[t?(0,i.jsx)("div",{className:"animate-spin",style:{width:28,height:28,borderRadius:"50%",border:"3px solid rgba(255,255,255,0.14)",borderTopColor:"#6366f1"}}):(0,i.jsxs)("svg",{width:40,height:40,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":!0,children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,i.jsx)("path",{d:"M3 12h18"}),(0,i.jsx)("path",{d:"M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18"})]}),(0,i.jsx)("span",{style:{fontSize:13,letterSpacing:.2},children:e})]})}function W({ready:e,label:t}){return(0,i.jsxs)("div",{"aria-hidden":!0,style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",gap:10,alignItems:"center",justifyContent:"center",overflow:"hidden",background:"#0b0b0c",opacity:+!e,transition:"opacity 280ms ease",pointerEvents:"none"},children:[(0,i.jsxs)("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",children:[(0,i.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"rgba(255,255,255,0.14)",strokeWidth:"2"}),(0,i.jsx)("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",children:(0,i.jsx)("animateTransform",{attributeName:"transform",type:"rotate",from:"0 12 12",to:"360 12 12",dur:"0.8s",repeatCount:"indefinite"})}),(0,i.jsx)("path",{d:"M10 8.8l5 3.2-5 3.2z",fill:"rgba(255,255,255,0.9)"})]}),t&&(0,i.jsx)("span",{style:{color:"rgba(255,255,255,0.6)",fontSize:12,fontWeight:500,letterSpacing:.2,whiteSpace:"nowrap"},children:t})]})}let L=null;function N({config:e}){let t=e??{},n=(0,a.useRef)(`yt-${Math.random().toString(36).slice(2)}`),[o,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=!1;r(!1);let i=null;return(L||(L=new Promise(e=>{if(window.YT&&window.YT.Player)return e();let t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{t&&t(),e()};let n=document.createElement("script");n.src="https://www.youtube.com/iframe_api",document.head.appendChild(n)}))).then(()=>{if(e)return;let a=t.source,o={autoplay:+!!t.autoplay,mute:+!!t.mute,controls:+!!t.controls,loop:+!!t.loop,playsinline:1,modestbranding:1,rel:0};a?.type==="playlist"&&(o.listType="playlist",o.list=a.playlistId);let l={width:"100%",height:"100%",playerVars:o,events:{onReady:n=>{t.mute&&n.target.mute(),t.autoplay&&n.target.playVideo(),e||r(!0)},onStateChange:e=>{t.loop&&e.data===window.YT.PlayerState.ENDED&&a?.type==="video"&&(e.target.seekTo(0),e.target.playVideo())},onError:()=>{e||r(!0)}}};a?.type==="video"&&a.videoId&&(l.videoId=a.videoId),i=new window.YT.Player(n.current,l)}),()=>{e=!0;try{i?.destroy?.()}catch{}}},[JSON.stringify(t.source),t.autoplay,t.mute,t.loop,t.controls]),(0,i.jsxs)("div",{style:{position:"relative",width:"100%",height:"100%",pointerEvents:"none"},children:[(0,i.jsx)("div",{id:n.current,style:{width:"100%",height:"100%"}}),(0,i.jsx)(W,{ready:o,label:"Loading YouTubeâ¦"})]})}var G=n(298);function B({appId:e,config:t,screenTz:n}){let o=(0,y.eh)(e,t??{},n),r=(0,a.useRef)(null),[l,s]=(0,a.useState)(!1),d=(0,G.c2)(e)?.refreshMs??null;return((0,a.useEffect)(()=>
24{if(s(!1),!o)return;let e=window.setTimeout(()=>s(!0),6e3);return()=>window.clearTimeout(e)},[o]),(0,a.useEffect)(()=>{if(!d||!o)return;let e=window.setInterval(()=>{r.current&&(r.current.src=o)},d);return()=>window.clearInterval(e)},[o,d]),o)?(0,i.jsxs)("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",background:"var(--color-bg-panel, #0b0c14)"},children:[(0,i.jsx)("iframe",{ref:r,src:o,title:"Google embed",onLoad:()=>s(!0),referrerPolicy:"no-referrer-when-downgrade",sandbox:"allow-scripts allow-same-origin allow-forms",style:{position:"absolute",inset:0,width:"100%",height:"100%",border:0,display:"block",pointerEvents:"none"}}),!l&&(0,i.jsx)(O,{label:"Loadingâ¦",overlay:!0})]}):(0,i.jsx)(O,{label:"Not configured"})}function O({label:e,overlay:t}){return(0,i.jsx)("div",{style:{position:t?"absolute":"relative",inset:t?0:void 0,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(10,11,18,0.92)",color:"rgba(245,246,250,0.64)",fontSize:13,fontFamily:"var(--font-sans, sans-serif)"},children:e})}var q=n(42271);function K({config:e}){var t;let n=e??{},r=n.feedUrl??"",l=n.layout??"list",s=n.maxItems??8,d=Math.max(60,n.refreshSec??300),h=!1!==n.showDate,m=!1!==n.showSummary,f=!1!==n.showSource,g=!1!==n.showImage,p=n.cardRotateSec??8,x=n.imagePosition??"top",w=n.imageSize??45,b=n.textAlign??"left",S="ltr"===n.tickerDirection?"ltr":"rtl",v="number"==typeof n.tickerSpeed?n.tickerSpeed:80,k=n.separator??"â¢",M="number"==typeof n.fontSize?n.fontSize:22,I=n.fontFamilyId??null,{families:j}=(0,c.s)();(0,a.useEffect)(()=>{if(!I)return;let e=j.find(e=>e.id===I);if(!e)return;let t=e.faces.map(t=>(0,u.yg)({family:e.name,weight:t.weight,style:t.style,url:t.webUrl}));return()=>{for(let e of t)e()}},[I,j]);let z=(0,q.useAuthStore)(e=>e.currentOrgId),[F,C]=(0,a.useState)([]),[D,A]=(0,a.useState)(!1),[$,T]=(0,a.useState)(()=>Date.now()),Y=(0,a.useRef)(0),E=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!r)return;let e=new AbortController,t=()=>{fetch(`/apps/rss?url=${encodeURIComponent(r)}&max=${encodeURIComponent(s)}`,{credentials:"include",...z?{headers:{"x-org-id":z}}:{}}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{e.signal.aborted||(C(t.data.items??[]),A(!1))}).catch(t=>{e.signal.aborted||"AbortError"===t.name||A(!0)})};t();let n=setInterval(t,1e3*d);return()=>{e.abort(),clearInterval(n)}},[r,s,d,z]),(0,a.useEffect)(()=>{let e=setInterval(()=>{let e=Date.now();T(e),null!==E.current&&(Y.current+=e-E.current),E.current=e},1e3);return()=>clearInterval(e)},[]);let P={width:"100%",height:"100%",background:(t=n.backgroundColor)&&"transparent"!==t?"string"==typeof t?t:(0,o.s3)(t):"transparent",color:n.color??"#111827",fontFamily:n.fontFamily??'-apple-system, system-ui, "Segoe UI", Roboto, sans-serif',fontStyle:"italic"===n.fontStyle?"italic":"normal",fontSize:n.fontSize??22,padding:n.padding??16,overflow:"hidden",boxSizing:"border-box",display:"flex",flexDirection:"column"};if(!r)return(0,i.jsx)("div",{style:P,children:(0,i.jsx)(X,{text:"No feed URL set. Enter a URL in the RSS panel."})});if(D&&0===F.length)return(0,i.jsx)("div",{style:P,children:(0,i.jsx)(X,{text:"Feed unavailable."})});if(0===F.length)return(0,i.jsx)("div",{style:P,children:(0,i.jsx)(X,{text:"No items yet."})});if("ticker"===l){let e=`${(0,y.IO)(F,k)} ${k}`;return(0,i.jsx)("div",{style:{...P,justifyContent:"center"},children:(0,i.jsx)(R,{text:e,speed:v,direction:S,fontSize:M,gapMultiplier:1.2})})}if("card"===l){let e=(0,y.PQ)(Y.current,p,F.length),t=F[e]??F[0],n="left"===x||"right"===x,a=g&&t.image?(0,i.jsx)("img",{src:t.image,alt:"",style:{objectFit:"cover",borderRadius:4,flexShrink:0,...n?{width:`${w}%`,height:"100%"}:{width:"100%",height:`${w}%`}}}):null,o=(0,i.jsxs)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:8,textAlign:b,overflow:"hidden"},children:[(0,i.jsx)("div",{style:{fontWeight:700,lineHeight:1.25,flex:"none"},children:t.title}),m&&t.summary&&(0,i.jsx)("div",{style:{fontSize:"0.8em",opacity:.8,lineHeight:1.35,flex:1,overflow:"hidden"},children:(0,y.XJ)(t.summary,200)}),(f&&t.source||h&&t.isoDate)&&(0,i.jsxs)("div",{style:{fontSize:"0.72em",opacity:.55,marginTop:"auto",display:"flex",gap:8,justifyContent:"right"===b?"flex-end":"center"===b?"center":"flex-start"},children:[f&&t.source&&(0,i.jsx)("span",{children:t.source}),h&&t.isoDate&&(0,i.jsx)("span",{children:(0,y.KW)(t.isoDate,$)})]})]});return(0,i.jsx)("div",{style:{...P,flexDirection:n?"row":"column",gap:8,alignItems:"stretch"},children:"right"===x?(0,i.jsxs)(i.Fragment,{children:[o,a]}):(0,i.jsxs)(i.Fragment,{children:[a,o]})})}return(0,i.jsx)("div",{style:{...P,gap:10},children:F.map((e,t)=>{let n=f&&e.source||h&&e.isoDate;return(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:2,textAlign:b},children:[(0,i.jsx)("div",{style:{fontWeight:600,lineHeight:1.25},children:e.title}),m&&e.summary&&(0,i.jsx)("div",{style:{fontSize:"0.8em",opacity:.75,lineHeight:1.3},children:(0,y.XJ)(e.summary,140)}),n&&(0,i.jsxs)("div",{style:{fontSize:"0.72em",opacity:.55,display:"flex",gap:6,justifyContent:"right"===b?"flex-end":"center"===b?"center":"flex-start"},children:[f&&e.source?e.source:"",f&&e.source&&h&&e.isoDate?" ⢠":"",h&&e.isoDate?(0,y.KW)(e.isoDate,$):""]})]},t)})})}function X({text:e}){return(0,i.jsx)("div",{style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center",opacity:.5,fontSize:"0.8em",textAlign:"center"},children:e})}var V=n(74562),J=n(95397),Z=n(24913),_=n(91514);async function Q(e,t,n,i){let[a,o]=await Promise.all([Z.G.listCategories(e,t),Z.G.getSettings(e,t).catch(()=>null)]),r=o?.currency??"USD",l=[],s=1,d=1/0;for(;l.length<Math.min(d,500);){let n=await Z.G.listProducts(e,t,{page:s,pageSize:100});if(l.push(...n.products),d=n.total,0===n.products.length)break;s+=1}let c=l.map(e=>({...e,price:e.prices[0]?.amount??0,categoryIds:null==e.categoryId?[]:[e.categoryId]})),u=(0,y.VW)(c,n,{sort:"sequence",sortDir:"asc",hideUnavailable:!1,maxItems:500}),h=Array.from(new Set(u.map(e=>e.imageMediaFileId).filter(e=>!!e))),m=h.filter(e=>!i.has(e));if(m.length>0)for(let[n,a]of(await Promise.all(m.map(n=>_.L.getFile(e,t,n).then(e=>[n,e.thumbnailUrl??e.url]).catch(()=>[n,null])))))null!=a&&i.set(n,a);let f=new Map(h.map(e=>[e,i.get(e)??null]));return{products:u.map(e=>({id:e.id,name:e.name,reference:e.sku,price:e.price,currency:r,categoryId:e.categoryId,imageUrl:e.imageMediaFileId?f.get(e.imageMediaFileId)??null:null,available:e.available,description:e.description,prices:e.prices,taxRate:e.taxR
24ate,taxIncluded:e.taxIncluded})),categories:a.map(e=>({id:e.id,name:e.name})),currency:r,fetchedAt:new Date().toISOString(),cached:!1}}function ee(e){return{fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.italic?"italic":"normal",color:e.color,opacity:e.opacity,textTransform:"none"===e.transform?void 0:e.transform}}function et(e){return 1===e.length&&null===e[0]}function en(e){let t=(0,y.zb)(e,null);return null!=t?t:e.prices&&0!==e.prices.length?null:e.price??null}function ei(e,t,n){let i=(0,J.LO)(n,t.taxRate,t.taxIncluded??!0,e.priceTaxMode??"as-entered");return(0,y.$g)(i,t.currency,{decimals:e.priceDecimals,currencyDisplay:e.currencyDisplay,currencyPosition:e.currencyPosition})}function ea({element:e}){var t;let n=e.config??{},r=(0,y.tR)(n.selection),l=n.layout??"menu",s=n.maxItems??20,d=n.sort??"sequence",h=n.sortDir??"asc",m=Math.max(1,n.columns??3),f=Math.max(1,n.menuColumns??1),g=Math.max(0,n.gapX??12),p=Math.max(0,n.gapY??12),x=Math.max(0,n.rowGap??8),w=(0,y.kA)(n),b=Math.min(40,Math.max(0,n.imageGap??4)),S=Math.min(100,Math.max(20,n.imageSize??100)),v=Math.max(3,n.spotlightRotateSec??8),k=Math.max(3,n.pageRotateSec??10),M=!1!==n.showImage,I=!0===n.showReference,j=!0===n.showDescription,z=n.padding??16,F=n.fontFamilyId??null,C=e.height??640,D=e.width??480,{families:R}=(0,c.s)();(0,a.useEffect)(()=>{if(!F)return;let e=R.find(e=>e.id===F);if(!e)return;let t=e.faces.map(t=>(0,u.yg)({family:e.name,weight:t.weight,style:t.style,url:t.webUrl}));return()=>{for(let e of t)e()}},[F,R]);let A=(0,G.sC)(n.source),{data:$,error:T}=function(e){let t=(0,q.useAuthStore)(e=>e.currentOrgId),n=(0,q.useAuthStore)(e=>e.currentOrg),i=(0,q.useAuthStore)(e=>e.currentSpace),[o,r]=(0,a.useState)(null),[l,s]=(0,a.useState)(!1),[d,c]=(0,a.useState)(!1),u=(0,a.useRef)(new Map),{source:h,max:m,layout:f,refreshSec:g}=e,p=(0,y.tR)(e.selection),x="picked"===p.mode&&0===p.productIds.length,w="picked"===p.mode?[...p.productIds].sort().join(","):"",b="categories"===p.mode?p.categoryIds.join(",")||"all":"";return((0,a.useEffect)(()=>{if(x){r(null),s(!1),c(!1);return}if("catalog"===h){if(!n||!i)return;let e=!1,t=()=>{c(!0),Q(n.id,i.id,p,u.current).then(t=>{e||(r(t),s(!1),c(!1))}).catch(()=>{e||(s(!0),c(!1))})};t();let a=g&&g>0?setInterval(t,1e3*g):null;return()=>{e=!0,a&&clearInterval(a)}}let e=new AbortController,a=new URLSearchParams;"picked"===p.mode?a.set("ids",w):p.categoryIds.length>0&&a.set("categories",p.categoryIds.join(",")),a.set("max",String(m)),f&&a.set("layout",f);let o=()=>{c(!0),fetch(`/apps/odoo/products?${a.toString()}`,{credentials:"include",...t?{headers:{"x-org-id":t}}:{}}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(t=>{e.signal.aborted||(r(t.data),s(!1),c(!1))}).catch(t=>{e.signal.aborted||"AbortError"===t.name||(s(!0),c(!1))})};o();let l=g&&g>0?setInterval(o,1e3*g):null;return()=>{e.abort(),l&&clearInterval(l)}},[h,w,b,m,f,g,t,n,i,x]),x)?{data:null,error:!1,loading:!1}:{data:o,error:l,loading:d}}({source:A,selection:n.selection,max:s,layout:l,refreshSec:n.refreshSec}),Y=(0,a.useMemo)(()=>{if(!$)return[];let e=new Map($.categories.map(e=>[e.id,e.name])),t=$.products.map(t=>({...t,categoryName:null==t.categoryId?null:e.get(t.categoryId)??null,categoryIds:null==t.categoryId?[]:[t.categoryId],description:t.description??null,prices:t.prices??[],taxRate:t.taxRate??null,taxIncluded:t.taxIncluded??!0}));return(0,y.VW)(t,r,{sort:d,sortDir:h,hideUnavailable:!0===n.hideUnavailable,maxItems:s})},[$,r,d,h,n.hideUnavailable,s]),E=(0,y.be)(n,"name"),P=(0,y.be)(n,"price"),H=(0,y.be)(n,"reference"),U=(0,y.be)(n,"heading"),W=(0,y.be)(n,"description"),L=(0,y.be)(n,"tierLabel"),N=!1!==n.showTierLabels,B=(0,y.u3)(n,Y),O=(0,y.P_)(Y,r,{showCategoryHeadings:!1!==n.showCategoryHeadings}),K=new Map,X=new Map,V=1,J="";for(let e of O){let t=(0,y.RF)(e.products);for(let i of(X.set(e.categoryId,t),V=Math.max(V,et(t)?1:t.length),e.products))for(let a of(K.set(i.id,e),t)){let e=(0,y.zb)(i,a);if(null==e)continue;let t=ei(n,i,e);t.length>J.length&&(J=t)}}let Z=(D-2*z-(f-1)*w)/f,_=(0,y.un)((0,y.j)(n,J),V,Z),eo=(0,y.rr)(n),eu=(0,y.sz)(n,Math.max(E.fontSize,P.fontSize),B),eh=n.rowsPerPage??(0,y.Gs)({boxHeight:C,padding:z,rowHeight:eu,footerHeight:eo}
24),em=(0,y.li)(O,eh,f,N?{tierLabelsFor:y.RF}:void 0),ef=E.fontSize>0?W.fontSize/E.fontSize:1,eg=(0,y.G1)({tileWidth:(0,y.Bh)(D,z,m,g),showImage:M,imageSize:S,imageGap:b,nameFontSize:E.fontSize,priceFontSize:P.fontSize,referenceFontSize:I?H.fontSize:null,hasDescription:B,descriptionScale:ef,tierCount:V}),ep=(0,y.HV)(O,n.rowsPerPage??(0,y.gJ)({boxHeight:C,tileHeight:eg,padding:z,gapY:p,footerHeight:eo}),m),ey="grid"===l?ep.length:em.length,ex=function(e,t){let[n,i]=(0,a.useState)(0);return(0,a.useEffect)(()=>{if(e<=1)return void i(0);let t=Date.now(),n=setInterval(()=>i(Date.now()-t),500);return()=>clearInterval(n)},[e,t]),(0,y.xX)(n,e,t)}("spotlight"===l?1:ey,k),[ew,eb]=(0,a.useState)(0);(0,a.useEffect)(()=>{eb(0)},[Y.length]),(0,a.useEffect)(()=>{if("spotlight"!==l||Y.length<=1)return;let e=setInterval(()=>{eb(e=>(e+1)%Y.length)},1e3*v);return()=>clearInterval(e)},[l,Y.length,v]);let eS={width:"100%",height:"100%",background:(t=n.backgroundColor)&&"transparent"!==t?"string"==typeof t?t:(0,o.s3)(t):"transparent",color:n.color??"#111827",fontFamily:n.fontFamily??"ui-sans-serif, system-ui, sans-serif",fontStyle:"italic"===n.fontStyle?"italic":"normal",fontWeight:n.fontWeight??"600",fontSize:n.fontSize??22,letterSpacing:n.letterSpacing??0,lineHeight:n.lineHeight??1.2,textAlign:n.textAlign??"left",padding:z,borderRadius:n.cornerRadius??0,overflow:"hidden",boxSizing:"border-box",display:"flex",flexDirection:"column"};if(T)return(0,i.jsx)("div",{style:eS,"data-testid":"products-unavailable",children:(0,i.jsx)(ec,{text:"odoo"===A?"Odoo catalog unavailable. Check Odoo in Settings.":"Products unavailable. Check Products in Settings."})});if(("picked"!==r.mode||0!==r.productIds.length)&&null===$)return null;if(0===Y.length)return(0,i.jsx)("div",{style:eS,children:(0,i.jsx)(ec,{text:"No products"})});if("grid"===l){let e=ep[Math.min(ex,ep.length-1)]??ep[0];return(0,i.jsxs)("div",{style:{...eS,display:"block"},children:[e.sections.map((e,t)=>{let a=X.get(e.categoryId)??[null];return(0,i.jsxs)("div",{children:[e.heading&&(0,i.jsx)("div",{"data-testid":"products-heading",style:{...ee(U),marginTop:0===t?0:x,marginBottom:x},children:e.heading}),(0,i.jsx)("div",{"data-testid":"products-grid",style:{display:"grid",gridTemplateColumns:`repeat(${m}, 1fr)`,columnGap:g,rowGap:p,alignContent:"start"},children:e.products.map(e=>(0,i.jsx)(el,{product:e,cfg:n,nameStyle:E,priceStyle:P,refStyle:H,descriptionStyle:W,showDescription:j,tierLabels:a,tierLabelStyle:L,showImage:M,showReference:I,imageSize:S,imageGap:b},e.id))})]},`${e.categoryId??"none"}-${t}`)}),(0,i.jsx)(es,{cfg:n,pageCount:ep.length,pageIndex:ex}),(0,i.jsx)(ed,{cfg:n,style:W})]})}if("spotlight"===l){let e=Y[ew]??Y[0],t=M&&!!e.imageUrl,a=I&&e.reference,o=(0,y.RF)([e]);return(0,i.jsxs)("div",{style:{...eS,alignItems:"center",justifyContent:"center"},children:[t?(0,i.jsx)("img",{src:e.imageUrl,alt:"",style:{maxWidth:`${70*S/100}%`,maxHeight:`${55*S/100}%`,objectFit:"contain",borderRadius:8}}):null,(0,i.jsx)("div",{"data-testid":"products-name",style:{...ee(E),textAlign:"center",marginTop:16*!!t},children:e.name}),j&&e.description&&(0,i.jsx)("div",{"data-testid":"products-description",style:{...ee(W),textAlign:"center",marginTop:8},children:e.description}),a&&(0,i.jsx)("div",{"data-testid":"products-reference",style:{...ee(H),marginTop:16},children:e.reference}),et(o)?(0,i.jsx)("div",{"data-testid":"products-price",style:{...ee(P),marginTop:16},children:ei(n,e,en(e)??0)}):(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:16},children:o.map((t,a)=>{let o=(0,y.zb)(e,t);return(0,i.jsxs)("div",{"data-testid":"products-tier-cell",style:{display:"flex"},children:[null!=o&&null!=t&&N&&(0,i.jsx)("span",{style:{...ee(L),marginRight:4},children:t}),null!=o&&(0,i.jsx)("span",{style:{...ee(P)},children:ei(n,e,o)})]},a)})}),(0,i.jsx)(ed,{cfg:n,style:W})]})}let ev=em[Math.min(ex,em.length-1)]??em[0];return(0,i.jsxs)("div",{style:eS,children:[(0,i.jsx)("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:ev.columns.map((e,t)=>(0,i.jsx)("div",{"data-testid":"products-column",style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",marginRight:t===ev.columns.length-1?0:w},children:e.map((e,t)=>{let a=0===t?0:x;if("heading"===e.kind)return(0,i.jsx)("div",{"data-testid":"products-heading",style:{...ee(U),marginTop:a},children:e.text},e.key);if("tierHeader"===e.kind)return(0,i.jsxs)("div",{style:{display:"flex",marginTop:a},children:[(0,i.jsx)("div",{style:{flex:1}}),e.labels.map((e,t)=>(0,i.jsx)("div",{"data-testid":"products-tier-header",style:{...ee(L),width:_,flexShrink:0,textAlign:"right"},children:e},t))]},e.key);let o=K.get(e.product.id)??null,r=o?X.get(o.categoryId)??[null]:[null];return(0,i.jsx)(er,{product:e.product,cfg:n,nameStyle:E,priceStyle:P,refStyle:H,descriptionStyle:W,showDescription:j,showReference:I,tierLabels:r,tierColumnWidth:_,marginTop:a,zebra:"zebra"===n.rowDivider&&t%2==1},e.key)})},t))}),(0,i.jsx)(es,{cfg:n,pageCount:em.length,pageIndex:ex}),(0,i.jsx)(ed,{cfg:n,style:W})]})}function eo({separator:e,opacity:t}){let n={flex:1,marginLeft:8,marginRight:8,minWidth:12};return"none"===e?(0,i.jsx)("div",{"data-testid":"products-spacer",style:n}):(0,i.jsx)("div",{"data-testid":"products-leader",style:{...n,opacity:t/100,transform:"translateY(-3px)",borderBottomWidth:1,borderBottomColor:"currentColor",borderBottomStyle:"dashes"===e?"dashed":"line"===e?"solid":"dotted"}})}function er({product:e,cfg:t,nameStyle:n,priceStyle:a,refStyle:o,descriptionStyle:r,showDescription:l,showReference:s,tierLabels:d,tierColumnWidth:c,marginTop:u,zebra:h}){let m=t.rowDivider??"none",f=et(d);return(0,i.jsxs)("div",{"data-testid":"products-row",style:{display:"flex",flexDirection:"column",marginTop:u,borderBottomWidth:+("line"===m),borderBottomStyle:"solid",borderBottomColor:"currentColor",paddingBottom:4*("line"===m),background:h?"rgba(128,128,128,0.08)":"transparent"},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"baseline"},children:[(0,i.jsxs)("div",{"data-testid":"products-name",style:{...ee(n),minWidth:0,flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[(0,i.jsx)("span",{children:e.name}),s&&e.reference&&(0,i.jsx)("span",{"data-testid":"products-reference",style:{...ee(o),marginLeft:6},children:e.reference})]}),(0,i.jsx)(eo,{separator:t.separator??"dots",opacity:t.separatorOpacity??35}),f?(0,i.jsx)("div",{"data-testid":"products-price",style:{...ee(a),flexShrink:0,fontVariantNumeric:"tabular-nums"},children:ei(t,e,en(e)??0)}):d.map((n,o)=>{let r=(0,y.zb)(e,n);return(0,i.jsx)("div",{"data-testid":"products-tier-cell",style:{...ee(a),width:c,flexShrink:0,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:null!=r?ei(t,e,r):""},o)})]}),l&&e.description&&(0,i.jsx)("div",{"data-testid":"products-description",style:{...ee(r),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.description})]})}function el({product:e,cfg:t,nameStyle:n,priceStyle:a,refStyle:o,descriptionStyle:r,showDescription:l,tierLabels:s,tierLabelStyle:d,showImage:c,showReference:u,imageSize:h=100,imageGap:m=4}){let f=`${h}%`,g=et(s);return(0,i.jsxs)("div",{"data-testid":"products-tile",style:{display:"flex",flexDirection:"column",minWidth:0},children:[c&&e.imageUrl?(0,i.jsx)("img",{src:e.imageUrl,alt:"",style:{width:f,alignSelf:"center",aspectRatio:"1 / 1",objectFit:"cover",borderRadius:6}}):c?(0,i.jsx)("div",{style:{width:f,alignSelf:"center",aspectRatio:"1 / 1",borderRadius:6,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(128,128,128,0.12)",opacity:.5},children:(0,i.jsx)(V.A,{size:20})}):null,(0,i.jsx)("div",{"data-testid":"products-name",style:{...ee(n),overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:c?m:0},children:e.name}),l&&e.description&&(0,i.jsx)("div",{"data-testid":"products-description",style:{...ee(r),marginTop:4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.description}),u&&e.reference&&(0,i.jsx)("div",{"data-testid":"products-reference",style:{...ee(o),marginTop:4},children:e.reference}),g?(0,i.jsx)("div",{"data-testid":"products-price",style:{...ee(a),marginTop:4},children:ei(t,e,en(e)??0)}):(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",marginTop:4},children:s.map((n,o)=>{let r=(0,y.zb)(e,n);return(0,i.jsxs)("div",{"data-testid":"products-tier-cell",style:{display:"flex"},children:[null!=r&&null!=n&&!1!==t.showTierLabels&&(0,i.jsx)("span",{style:{...ee(d),marginRight:4},children:n}),null!=r&&(0,i.jsx)("span",{style:{...ee(a)},children:ei(t,e,r)})]},o)})})]})}function es({cfg:e,pageCount:t,pageIndex:n}){return!1===e.showPageIndicator||t<=1?null:(0,i.jsx)("div",{"data-testid":"products-page-indicator",style:{display:"flex",justifyContent:"center",marginTop:8,flexShrink:0},children:Array.from({length:t},(e,t)=>(0,i.jsx)("div",{style:{width:6,height:6,borderRadius:3,marginLeft:6*(0!==t),background:"currentColor",opacity:t===n?.8:.25}},t))})}function ed({cfg:e,style:t}){return e.taxNote?(0,i.jsx)("div",{"data-testid":"products-tax-note",style:{...ee(t),marginTop:y.WD,textAlign:"center",flexShrink:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.taxNote}):null}function ec({text:e}){return(0,i.jsx)("div",{style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center",opacity:.5,fontSize:"0.8em",textAlign:"center"},children:e})}function eu({element:e,context:t}){return"clock"===e.appId||"date"===e.appId||"countdown"===e.appId||"worldclock"===e.appId||"ticker"===e.appId||"dayssince"===e.appId?null:(0,i.jsxs)("div",{style:{position:"absolute",left:e.x,top:e.y,width:e.width,height:e.height,transform:`rotate(${e.rotation}deg)`,opacity:e.opacity,zIndex:e.zIndex,pointerEvents:"none"},children:["qr"===e.appId&&(0,i.jsx)(s,{width:e.width,height:e.height,config:e.config}),"remote"===e.appId&&(0,i.jsx)(d,{width:e.width,height:e.height,config:e.config}),"popup"===e.appId&&(0,i.jsx)(m,{config:e.config}),"weather"===e.appId&&(0,i.jsx)(g,{config:e.config,context:t}),"airquality"===e.appId&&(0,i.jsx)(w,{config:e.config,context:t}),"uv"===e.appId&&(0,i.jsx)(k,{config:e.config,context:t}),"pollen"===e.appId&&(0,i.jsx)(z,{config:e.config,context:t}),"currencies"===e.appId&&(0,i.jsx)(A,{config:e.config}),"web"===e.appId&&(0,i.jsx)(H,{config:e.config}),"youtube"===e.appId&&(0,i.jsx)(N,{config:e.config}),"rss"===e.appId&&(0,i.jsx)(K,{config:e.config}
24),("products"===e.appId||"odoo"===e.appId)&&(0,i.jsx)(ea,{element:e}),(0,y.ls)(e.appId)&&(0,i.jsx)(B,{appId:e.appId,config:e.config,screenTz:t.timezone})]})}},69894:(e,t,n)=>{n.d(t,{W:()=>d});var i=n(73365),a=n(1521),o=n(74975),r=n(63453),l=n(55223);function s(e){return"transparent"===e||null==e?null:"string"==typeof e?{type:"solid",color:e}:e}function d({width:e,height:t,config:n,resolvedTz:h,now:m}){let[f,g]=(0,a.useState)(()=>new Date);(0,a.useEffect)(()=>{if(m)return;let e=setInterval(()=>g(new Date),6e4);return()=>clearInterval(e)},[m]);let p=h??(n.timezone?.source==="manual"?n.timezone.value:"UTC"),y=(0,l.qz)(m??f,p,n),x=s(n.backgroundColor),w=n.fontFamily??"ui-sans-serif, system-ui, sans-serif",b=`${"italic"===n.fontStyle?"italic ":""}${n.fontWeight??"600"}`,S=n.letterSpacing??0,v=n.padding??0,k=Math.max(0,e-2*v),M=Math.max(0,t-2*v);return(0,i.jsxs)(o.YJ,{name:"date-group",children:[x&&"tearoff"!==n.layout&&(0,i.jsx)(o.rw,{x:0,y:0,width:e,height:t,cornerRadius:n.cornerRadius??0,...(0,r.Bj)(x,e,t)}),"tearoff"===n.layout?(0,i.jsx)(u,{w:e,h:t,cfg:n,lines:y,fontFamily:w,fontStyleProp:b,letterSpacing:S}):"inline"===n.layout&&y.inline?(0,i.jsx)(o.EY,{x:v,y:v,width:k,height:M,text:y.inline,fontSize:n.autoFit?(0,l.rc)(y.inline,k,M):n.fontSize??48,fontFamily:w,fontStyle:b,fill:n.color,align:n.textAlign,verticalAlign:n.verticalAlign??"middle",letterSpacing:S,attrs:{"data-testid":"date-text","data-text":y.inline}}):(0,i.jsx)(c,{w:e,h:t,cfg:n,lines:y,fontFamily:w,fontStyleProp:b,letterSpacing:S})]})}function c({w:e,h:t,cfg:n,lines:a,fontFamily:r,fontStyleProp:l,letterSpacing:s}){let d=n.padding??0,u=Math.max(0,e-2*d),h=Math.max(0,t-2*d),m=n.autoFit?Math.min(u/6,h/4):n.fontSize??48,f=m*n.dayNumberRatio,g=[];a.weekday&&g.push({text:a.weekday,fontSize:m}),a.dayNumber&&g.push({text:a.dayNumber,fontSize:f}),a.monthYear&&g.push({text:a.monthYear,fontSize:m});let p=n.lineHeight??1.1,y=g.reduce((e,t)=>e+t.fontSize*p,0),x="top"===n.verticalAlign?d:"bottom"===n.verticalAlign?t-d-y:d+(h-y)/2;return(0,i.jsx)(i.Fragment,{children:g.map((e,t)=>{let a=x;return x+=e.fontSize*p,(0,i.jsx)(o.EY,{x:d,y:a,width:u,text:e.text,fontSize:e.fontSize,fontFamily:r,fontStyle:l,fill:n.color,align:n.textAlign,letterSpacing:s,attrs:0===t?{"data-testid":"date-text","data-text":e.text}:void 0},t)})})}function u({w:e,h:t,cfg:n,lines:a,fontFamily:d,fontStyleProp:c,letterSpacing:h}){let m=(0,l.sy)(e,t),f=n.cornerRadius??0,g=s(n.backgroundColor)??{type:"solid",color:"#ffffff"},p="solid"===g.type?g.color:"#ffffff",y=n.color;return(0,i.jsxs)(o.YJ,{name:"date-tearoff",children:[(0,i.jsx)(o.rw,{x:0,y:0,width:e,height:t,cornerRadius:f,...(0,r.Bj)(g,e,t),shadowColor:"#000000",shadowBlur:.05*Math.min(e,t),shadowOpacity:.18,shadowOffsetY:.012*t}),(0,i.jsx)(o.rw,{x:0,y:0,width:e,height:m.headerH,cornerRadius:[f,f,0,0],fill:y}),(0,i.jsx)(o.rw,{x:m.ring.x1,y:m.ring.y,width:m.ring.w,height:m.ring.h,cornerRadius:m.ring.radius,fill:p}),(0,i.jsx)(o.rw,{x:m.ring.x2,y:m.ring.y,width:m.ring.w,height:m.ring.h,cornerRadius:m.ring.radius,fill:p}),a.monthYear&&(0,i.jsx)(o.EY,{x:0,y:m.month.y,width:e,height:m.month.height,text:a.monthYear,fontSize:m.monthFontSize,fontFamily:d,fontStyle:c,fill:p,align:"center",verticalAlign:"middle",letterSpacing:h}),a.dayNumber&&(0,i.jsx)(o.EY,{x:0,y:m.day.y,width:e,height:m.day.height,text:a.dayNumber,fontSize:m.dayFontSize,fontFamily:d,fontStyle:c,fill:y,align:"center",verticalAlign:"middle",letterSpacing:h,attrs:{"data-testid":"date-text","data-text":a.dayNumber}}),a.weekday&&(0,i.jsx)(o.EY,{x:0,y:m.weekday.y,width:e,height:m.weekday.height,text:a.weekday,fontSize:m.weekdayFontSize,fontFamily:d,fill:y,opacity:.7,align:"center",verticalAlign:"middle",letterSpacing:h})]})}},75896:(e,t,n)=>{n.d(t,{a:()=>s});var i=n(73365),a=n(1521),o=n(74975),r=n(63453),l=n(55223);function s({width:e,height:t,config:n,now:d}){var c;let[u,h]=(0,a.useState)(()=>new Date);(0,a.useEffect)(()=>{if(d)return;let e=setInterval(()=>h(new Date),1e3);return()=>clearInterval(e)},[d]);let m=(0,l.q2)(d??u,n.zones??[],n),f="transparent"===(c=n.backgroundColor)||null==c?null:"string"==typeof c?{type:"solid",color:c}:c,g=n.padding??8,p=Math.max(0,e-2*g),y=Math.max(0,t-2*g)/Math.max(1,m.length),x=n.fontFamily??"ui-sans-serif, system-ui, sans-serif",w=`${"italic"===n.fontStyle?"italic ":""}${n.fontWeight??"600"}`,b=n.letterSpacing??0,S="stacked"===n.rowLayout,v=S?Math.min(.32*y,28):Math.min(.42*y,32),k=S?Math.min(.42*y,36
24):v,M=Math.max(8,Math.round(.7*v));return(0,i.jsxs)(o.YJ,{name:"worldclock-group",children:[f&&(0,i.jsx)(o.rw,{x:0,y:0,width:e,height:t,cornerRadius:n.cornerRadius??0,...(0,r.Bj)(f,e,t)}),m.map((e,t)=>{let a=g+y*t,r=e.offset?`${e.time} ${e.offset}`:e.time,l=!!e.date;return(0,i.jsxs)(o.YJ,{children:[n.dividers&&t>0&&(0,i.jsx)(o.N1,{points:[g,a,g+p,a],stroke:n.color,strokeWidth:1,opacity:.2}),S?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.EY,{x:g,y:Math.round(a+.1*y),width:p,text:e.label,fontSize:v,fontFamily:x,fill:n.color,opacity:.7,align:"left",letterSpacing:b}),(0,i.jsx)(o.EY,{x:g,y:Math.round(a+.45*y),width:p,text:r,fontSize:k,fontFamily:x,fontStyle:w,fill:n.color,align:"left",letterSpacing:b,attrs:0===t?{"data-testid":"worldclock-row","data-text":r}:void 0}),l&&(0,i.jsx)(o.EY,{x:g,y:Math.round(a+.74*y),width:p,text:e.date,fontSize:M,fontFamily:x,fill:n.color,align:"left",opacity:.6,letterSpacing:b})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.EY,{x:g,y:a,width:.55*p,height:y,text:e.label,fontSize:v,fontFamily:x,fill:n.color,align:"left",verticalAlign:"middle",letterSpacing:b}),l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.EY,{x:g+.45*p,y:Math.round(a+.14*y),width:.55*p,text:r,fontSize:k,fontFamily:x,fontStyle:w,fill:n.color,align:"right",letterSpacing:b,attrs:0===t?{"data-testid":"worldclock-row","data-text":r}:void 0}),(0,i.jsx)(o.EY,{x:g+.45*p,y:Math.round(a+.56*y),width:.55*p,text:e.date,fontSize:M,fontFamily:x,fill:n.color,align:"right",opacity:.6,letterSpacing:b})]}):(0,i.jsx)(o.EY,{x:g+.45*p,y:a,width:.55*p,height:y,text:r,fontSize:k,fontFamily:x,fontStyle:w,fill:n.color,align:"right",verticalAlign:"middle",letterSpacing:b,attrs:0===t?{"data-testid":"worldclock-row","data-text":r}:void 0})]})]},t)})]})}},77032:(e,t,n)=>{n.d(t,{p:()=>o});var i=n(94377),a=n(28658);let o={list:async e=>{let t=await i.u.get(`/organizations/${e}/fonts`);return(0,a.oA)(t,"families")},upload:async(e,t)=>{let n=new FormData;for(let e of t)n.append("files",e);let o=await i.u.post(`/organizations/${e}/fonts/upload`,n,{headers:{"Content-Type":"multipart/form-data"},timeout:0});return(0,a.oA)(o,"results")},renameFamily:async(e,t,n)=>{let o=await i.u.patch(`/organizations/${e}/fonts/families/${t}`,{name:n});return(0,a.oA)(o,"family")},deleteFamily:async(e,t)=>{await i.u.delete(`/organizations/${e}/fonts/families/${t}`)},familyUsage:async(e,t)=>{let n=await i.u.get(`/organizations/${e}/fonts/families/${t}/usage`);return(0,a.oA)(n,"count")},updateFace:async(e,t,n)=>{let o=await i.u.patch(`/organizations/${e}/fonts/faces/${t}`,n);return(0,a.oA)(o,"face")},deleteFace:async(e,t)=>{await i.u.delete(`/organizations/${e}/fonts/faces/${t}`)},listGoogleCatalog:async e=>{let t=await i.u.get(`/organizations/${e}/fonts/google/catalog`);return(0,a.oA)(t,"families")},importGoogle:async(e,t)=>{let n=await i.u.post(`/organizations/${e}/fonts/google/import`,t);return(0,a.mT)(n)}}},77378:(e,t,n)=>{n.d(t,{qv:()=>g,LJ:()=>o,Or:()=>w,kA:()=>f,M2:()=>x});let i=["#2563eb","#16a34a","#f59e0b","#dc2626","#7c3aed","#0891b2","#db2777","#65a30d","#ea580c","#4f46e5"];function a(e,t){return t||i[e%i.length]}function o(e,t){var n,i,o;let r=(n=e.headers,i=t.labelColumn,n.indexOf(i)),l=e.rows.map(e=>r>=0?e[r]??"":""),s=t.valueColumns.map((n,i)=>{var o;let r=(o=e.headers,o.indexOf(n));return{name:n,color:a(i,t.seriesColors[i]),values:e.rows.map(e=>(function(e){if(null==e)return null;let t=e.trim().replace(/,/g,"");if(""===t)return null;let n=Number(t);return Number.isFinite(n)?n:null})(r>=0?e[r]:void 0))}});if("aggregate"===t.mode){let e,n,i;return o=t.aggregate.op,e=[],n=new Map,l.forEach((t,i)=>{n.has(t)||(n.set(t,[]),e.push(t)),n.get(t).push(i)}),i=s.map(t=>({name:t.name,color:t.color,values:e.map(e=>{let i=n.get(e);if("count"===o)return i.length;let a=i.map(e=>t.values[e]).filter(e=>null!=e);if("count"===o)return a.length;if(0===a.length)return null;switch(o){case"sum":return a.reduce((e,t)=>e+t,0);case"avg":return a.reduce((e,t)=>e+t,0)/a.length;case"min":return Math.min(...a);case"max":return Math.max(...a)}})})),{labels:e,series:i}}return{labels:l,series:s}}function r(e,t,n=5,i={}){let a=i.zeroBaseline??!0,o=Math.min(e,t),s=Math.max(e,t);o===s&&(s=o+1),a&&(o>0&&(o=0),s<0&&(s=0));let d=l(s-o,!1),c=l(d/Math.max(1,n-1),!0),u=Number((Math.floor(o/c)*c).toFixed(10)),h=Number((Math.ceil(s/c)*c).toFixed(10)),m=[];for(let e=u;e<=h+.5*c;e+=c)m.push(Number(e.toFixed(10)));return{ticks:m,niceMin:u,niceMax:h}}function l(e,t){let n=Math.floor(Math.log10(e||1)),i=e/Math.pow(10,n);return(t?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)}function s(e,t,n,i){let a=t-e||1,o=i-n;return t=>n+(t-e)/a*o}function d(e,t,n,i=.2){let a=n-t,o=e>0?a/e:a,r=o*(1-i),l=(o-r)/2;return{bandStart:e=>t+e*o+l,bandWidth:r}}let c="#9ca3af",u="#e5e7eb";function h(e){return Math.abs(e)>=1e3?`${(e/1e3).toFixed(+(e%1e3!=0))}k`:Number.isInteger(e)?String(e):e.toFixed(1)}function m(e,t,n,i,a){let o=n,r=.9*i;for(let n of t)e.legend.push({x:o,y:a,size:r,label:n.label,color:n.color,fontSize:.9*i}),o+=r+.4*i+n.label.length*i*.55+i}function f(e,t,n,i){if(0===e.labels.length||0===e.series.length)return{rects:[],areas:[],lines:[],segments:[],labels:[],legend:[],arcs:[]};let o=t.fontSize,l=t.title?1.8*o:0,f=t.showLegend?1.8*o:0,g=t.showXAxis?1.6*o:0,p=t.showYAxis?3*o:0,y={left:o+p,right:n-o,top:o+l,bottom:i-o-g-f},x=e.series.flatMap(e=>e.values).filter(e=>null!=e),w=x.length?Math.min(...x):0,b=x.length?Math.max(...x):1,S="bar"===t.chartType,{ticks:v,niceMin:k,niceMax:M}=r(t.yMin??w,t.yMax??b,5,{zeroBaseline:S}),I=s(k,M,y.bottom,y.top),j=e=>Math.min(y.bottom,Math.max(y.top,I(e))),z={rects:[],areas:[],lines:[],segments:[],labels:[],legend:[],arcs:[]};if(t.title&&z.labels.push({x:n/2,y:o,text:t.title,align:"center",baseline:"top",color:t.color,fontSize:1.2*o}),"bar"===t.chartType&&"horizontal"===t.orientation){let n=r(t.yMin??w,t.yMax??b),i=s(n.niceMin,n.niceMax,y.left,y.right),a=i(Math.max(n.niceMin,Math.min(0,n.niceMax)));if(t.showXAxis||t.showGridLines)for(let e of n.ticks){let n=i(e);t.showGridLines&&z.segments.push({x1:n,y1:y.top,x2:n,y2:y.bottom,color:u}),t.showXAxis&&z.labels.push({x:n,y:y.bottom+.4*o,text:h(e),align:"center",baseline:"top",color:t.color,fontSize:o})}t.showYAxis&&z.segments.push({x1:y.left,y1:y.top,x2:y.left,y2:y.bottom,color:c}),t.showXAxis&&z.segments.push({x1:y.left,y1:y.bottom,x2:y.right,y2:y.bottom,color:c});let l=d(e.labels.length,y.top,y.bottom,.25);
24t.showYAxis&&e.labels.forEach((e,n)=>{z.labels.push({x:y.left-.4*o,y:l.bandStart(n)+l.bandWidth/2,text:e,align:"right",baseline:"middle",color:t.color,fontSize:o})});let f=e.series.length,p=l.bandWidth/f;return e.series.forEach((e,t)=>{e.values.forEach((n,o)=>{if(null==n)return;let r=Math.min(y.right,Math.max(y.left,i(n))),s=l.bandStart(o)+t*p;z.rects.push({x:Math.min(r,a),y:s,w:Math.abs(a-r),h:.9*p,color:e.color})})}),t.showLegend&&m(z,e.series.map(e=>({label:e.name,color:e.color})),y.left,o,y.bottom+g+.4*o),z}if("pie"===t.chartType){let n=e.series[0];if(!n)return z;let i=e.labels.map((e,t)=>({label:e,value:n.values[t]})).filter(e=>null!=e.value&&e.value>0),r=i.reduce((e,t)=>e+t.value,0);if(r<=0)return z;let l=(y.left+y.right)/2,s=(y.top+y.bottom)/2,d=Math.max(0,Math.min(y.right-y.left,y.bottom-y.top)/2-.5*o),c=d*Math.min(.9,Math.max(0,t.innerRadius??0)),u=0;return i.forEach((e,t)=>{let n,i=e.value/r,h=u,m=u+i*Math.PI*2,f=a(t);z.arcs.push({cx:l,cy:s,rOuter:d,rInner:c,startAngle:h,endAngle:m,color:f});let g=(h+m)/2,p=c+(d-c)*.6,y=l+p*Math.sin(g),x=s-p*Math.cos(g);z.labels.push({x:y,y:x,text:`${Math.round(100*i)}%`,align:"center",baseline:"middle",color:(n=f.replace("#","")).length<6?"#ffffff":.2126*(parseInt(n.slice(0,2),16)/255)+.7152*(parseInt(n.slice(2,4),16)/255)+.0722*(parseInt(n.slice(4,6),16)/255)>.6?"#1f2937":"#ffffff",fontSize:o}),u=m}),t.showLegend&&m(z,i.map((e,t)=>({label:e.label,color:a(t)})),y.left,o,y.bottom+.4*o),z}if(t.showYAxis||t.showGridLines)for(let e of v){let n=I(e);t.showGridLines&&z.segments.push({x1:y.left,y1:n,x2:y.right,y2:n,color:u}),t.showYAxis&&z.labels.push({x:y.left-.4*o,y:n,text:h(e),align:"right",baseline:"middle",color:t.color,fontSize:o})}t.showYAxis&&z.segments.push({x1:y.left,y1:y.top,x2:y.left,y2:y.bottom,color:c}),t.showXAxis&&z.segments.push({x1:y.left,y1:y.bottom,x2:y.right,y2:y.bottom,color:c});let{bandStart:F,bandWidth:C}=d(e.labels.length,y.left,y.right,.25),D=I(Math.max(k,Math.min(0,M)));if(t.showXAxis&&e.labels.forEach((e,n)=>{z.labels.push({x:F(n)+C/2,y:y.bottom+.4*o,text:e,align:"center",baseline:"top",color:t.color,fontSize:o})}),"bar"===t.chartType){let t=C/e.series.length;e.series.forEach((e,n)=>{e.values.forEach((i,a)=>{if(null==i)return;let o=j(i),r=F(a)+n*t;z.rects.push({x:r,y:Math.min(o,D),w:.9*t,h:Math.abs(D-o),color:e.color})})})}else e.series.forEach(e=>{let n=[];if(e.values.forEach((e,t)=>{null!=e&&n.push(F(t)+C/2,j(e))}),0!==n.length){if("area"===t.chartType){let t=[...n];t.push(n[n.length-2],D,n[0],D),z.areas.push({points:t,color:e.color,width:0})}z.lines.push({points:n,color:e.color,width:2})}});return t.showLegend&&m(z,e.series.map(e=>({label:e.name,color:e.color})),y.left,o,y.bottom+g+.4*o),z}function g(e){let t=Math.max(1,e.text.length*e.fontSize),n=1.4*e.fontSize;return{x:"center"===e.align?e.x-t/2:"right"===e.align?e.x-t:e.x,y:"middle"===e.baseline?e.y-n/2:"bottom"===e.baseline?e.y-n:e.y,width:t,height:n,align:e.align,verticalAlign:e.baseline}}var p=n(98561);function y(e){return{id:e.id,x:e.x,y:e.y,width:e.width,height:e.height,zIndex:e.zIndex,rotation:e.rotation,opacity:e.opacity,locked:e.locked,hidden:e.hidden,groupId:e.groupId,name:e.name,mediaFileId:e.mediaFileId,src:e.src,sha256:e.sha256,sizeBytes:e.sizeBytes,hasHeaderRow:e.hasHeaderRow,delimiter:e.delimiter,fontFamily:e.fontFamily,fontFamilyId:e.fontFamilyId??null,color:e.color,backgroundColor:e.backgroundColor,padding:e.padding,cornerRadius:e.cornerRadius}}function x(e){let t=e.columns.map(e=>e.key).filter(Boolean),n=t[0]??"label",i=t.slice(1,2);return p.OR.parse({...y(e),type:"chart",chartType:"bar",orientation:"vertical",labelColumn:n,valueColumns:i.length?i:t[0]?[t[0]]:["value"]})}function w(e){return p.Yw.parse({...y(e),type:"table",columns:[]})}},78919:(e,t,n)=>{n.d(t,{_d:()=>d});var i=n(73365),a=n(74975),o=n(1521),r=n(63453),l=n(55223);function s(e){return"transparent"===e||null==e?null:"string"==typeof e?{type:"solid",color:e}:e}function d({width:e,height:t,config:n,resolvedTz:c,now:u}){var h;let m=n.numerals??"arabic",f=n.ticks??"hours",g=n.bezelWidth??4,p=n.smoothSeconds??!0,y=n.secondHandColor??"#ef4444",x=function(e,t=!1){let[n,i]=(0,o.useState)(()=>new Date);return(0,o.useEffect)(()=>
24{if(!e)return;if(!t){let e=setInterval(()=>i(new Date),1e3);return()=>clearInterval(e)}let n=0,a=()=>{i(new Date),n=requestAnimationFrame(a)};return n=requestAnimationFrame(a),()=>cancelAnimationFrame(n)},[e,t]),n}(!u,p&&n.showSeconds&&"analog"===n.face),w=u??x,b=(h=n.timezone,c??(h?.source==="manual"?h.value:"UTC"));if("digital"===n.face){let o={format:n.format,showSeconds:n.showSeconds,showDate:n.showDate,dateFormat:n.dateFormat??"short",datePosition:n.datePosition??"inline",dateSizeRatio:n.dateSizeRatio??.35,uppercaseDate:n.uppercaseDate??!1,separatorBlink:n.separatorBlink??!1,showAmPm:n.showAmPm??!0,ampmSize:n.ampmSize??"inline",leadingZeroHour:n.leadingZeroHour??!1,textAlign:n.textAlign??"center",verticalAlign:n.verticalAlign??"middle",padding:n.padding??0,lineHeight:n.lineHeight??1.1,autoFit:n.autoFit??!0,fontSize:n.fontSize??96},d=(0,l.nl)(w,b,o),c=(0,l.iv)(w,b,o),u=(0,l.BE)({w:e,h:t,cfg:o,pieces:d,dateStr:c}),h=s(n.backgroundColor),m=n.fontFamily??"ui-sans-serif, system-ui, sans-serif",f=n.fontWeight??"600",g=n.fontStyle??"normal",p=n.letterSpacing??0,y=`${"italic"===g?"italic ":""}${f}`;return(0,i.jsxs)(a.YJ,{name:"clock-digital-group",children:[h&&(0,i.jsx)(a.rw,{x:0,y:0,width:e,height:t,cornerRadius:n.cornerRadius??0,...(0,r.Bj)(h,e,t)}),u.rows.map((e,t)=>(0,i.jsx)(a.EY,{x:e.x,y:e.y,width:e.width,text:e.text,fontSize:e.fontSize,fontFamily:m,fontStyle:y,fill:n.color,align:e.align,letterSpacing:p,attrs:0===t?{"data-testid":"clock-digital-text","data-text":e.text}:void 0},`row-${t}`)),u.ampmRow&&(0,i.jsx)(a.EY,{x:u.ampmRow.x,y:u.ampmRow.y,width:u.ampmRow.width,text:u.ampmRow.text,fontSize:u.ampmRow.fontSize,fontFamily:m,fontStyle:y,fill:n.color,align:u.ampmRow.align,letterSpacing:p})]})}let{h:S,m:v,s:k,ms:M}=(0,l.YZ)(w,b),I=p?k+M/1e3:k,j=e/2,z=t/2,F=Math.min(e,t)/2-Math.max(g,2),{fontSize:C,radius:D}=(0,l.IC)(F,m),R=s(n.backgroundColor);return(0,i.jsxs)(a.YJ,{name:"clock-analog-group",attrs:{"data-testid":"clock-analog-group"},children:[R&&(0,i.jsx)(a.jl,{x:j,y:z,radius:F,...(0,r.Bj)(R,2*F,2*F,!0)}),g>0&&(0,i.jsx)(a.jl,{x:j,y:z,radius:F,stroke:n.color,strokeWidth:g}),"all"===f&&Array.from({length:60}).map((e,t)=>{if(t%5==0)return null;let o=t*Math.PI/30,r=F-.04*F,l=F-.4*g;return(0,i.jsx)(a.N1,{points:[j+Math.sin(o)*r,z-Math.cos(o)*r,j+Math.sin(o)*l,z-Math.cos(o)*l],stroke:n.color,strokeWidth:1,opacity:.6},`min-${t}`)}),"none"!==f&&Array.from({length:12}).map((e,t)=>{let o=t*Math.PI/6,r=F-.09*F,l=F-.4*g;return(0,i.jsx)(a.N1,{points:[j+Math.sin(o)*r,z-Math.cos(o)*r,j+Math.sin(o)*l,z-Math.cos(o)*l],stroke:n.color,strokeWidth:Math.max(2,.018*F),lineCap:"round"},`hr-${t}`)}),"none"!==m&&Array.from({length:12}).map((e,t)=>{let o=t*Math.PI/6,r=j+Math.sin(o)*D-C,s=z-Math.cos(o)*D-.5*C,d=(0,l.XE)(t,m);return(0,i.jsx)(a.EY,{x:r,y:s,width:2*C,height:C,text:d,fontSize:C,fontFamily:"roman"===m?"Times, serif":"ui-sans-serif, system-ui",fontStyle:"600",fill:n.color,align:"center",verticalAlign:"middle"},`num-${t}`)}),(0,i.jsx)(a.N1,{points:[j,z,j+Math.sin(Math.PI/6*(S%12+v/60))*F*.5,z-Math.cos(Math.PI/6*(S%12+v/60))*F*.5],stroke:n.color,strokeWidth:Math.max(3,.04*F),lineCap:"round"}),(0,i.jsx)(a.N1,{points:[j,z,j+Math.sin(Math.PI/30*(v+k/60))*F*.78,z-Math.cos(Math.PI/30*(v+k/60))*F*.78],stroke:n.color,strokeWidth:Math.max(2,.025*F),lineCap:"round"}),n.showSeconds&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.N1,{points:[j-Math.sin(I*Math.PI/30)*F*.18,z+Math.cos(I*Math.PI/30)*F*.18,j+Math.sin(I*Math.PI/30)*F*.92,z-Math.cos(I*Math.PI/30)*F*.92],stroke:y,strokeWidth:Math.max(1,.012*F),lineCap:"round"}),(0,i.jsx)(a.jl,{x:j,y:z,radius:Math.max(2,.02*F),fill:y})]}),(0,i.jsx)(a.jl,{x:j,y:z,radius:Math.max(3,.035*F),fill:n.color})]})}}
24,85362:(e,t,n)=>{n.d(t,{E:()=>r});var i=n(1521),a=n(16361),o=n(61194);function r(e,t){let[n,r]=(0,i.useState)({status:"loading"});return(0,i.useEffect)(()=>{if(!e)return void r({status:"error"});let n=!0;return r({status:"loading"}),fetch(e).then(e=>{if(!e.ok)throw Error(String(e.status));return e.text()}).then(e=>{n&&r({status:"ready",model:function(e,t){let{headers:n,rows:i,truncated:r}=(0,a.oN)(e,{hasHeaderRow:t.hasHeaderRow,delimiter:t.delimiter});return{columns:(0,o.S1)(n,t.columns,i),rows:i,truncated:r}}(e,t)})}).catch(()=>{n&&r({status:"error"})}),()=>{n=!1}},[e,t.hasHeaderRow,t.delimiter,JSON.stringify(t.columns)]),n}},86367:(e,t,n)=>{n.d(t,{Jd:()=>s,Nr:()=>o,b$:()=>l,yg:()=>d});var i=n(61157);let a=new Map,o="screenflex:fontloaded",r=/^[A-Za-z0-9 _\-]{1,80}$/;function l(e){return"string"==typeof e&&r.test(e)}function s(e){let t;if("string"!=typeof e||!e)return!1;try{let n=new URL(i.R.NEXT_PUBLIC_API_URL);if((t=new URL(e,n)).origin!==n.origin)return!1}catch{return!1}return("http:"===t.protocol||"https:"===t.protocol)&&t.pathname.startsWith("/uploads/fonts/")}function d(e){var t,n,i;if("u"<typeof document||!l(e.family)||!s(e.url))return()=>{};let r=(t=e.family,n=e.weight,i=e.style,`${t}__${n}__${i}`),d=a.get(r);if(d)return d.count+=1,()=>c(r);let u=e.family.replace(/'/g,"\\'"),h=encodeURI(e.url),m=document.createElement("style");return m.dataset.fontKey=r,m.textContent=`@font-face { font-family: '${u}'; font-weight: ${e.weight}; font-style: ${e.style}; font-display: swap; src: url('${h}') format('woff2'); }`,document.head.appendChild(m),a.set(r,{count:1,styleNode:m,face:null}),"u">typeof FontFace&&document.fonts&&new FontFace(e.family,`url('${h}') format('woff2')`,{weight:String(e.weight),style:e.style,display:"swap"}).load().then(t=>{let n=a.get(r);n&&(document.fonts.add(t),n.face=t,window.dispatchEvent(new CustomEvent(o,{detail:{family:e.family,weight:e.weight,style:e.style}})))}).catch(()=>{}),()=>c(r)}function c(e){let t=a.get(e);if(t)if(t.count<=1){if(t.styleNode?.remove(),t.face&&document.fonts)try{document.fonts.delete(t.face)}catch{}a.delete(e)}else t.count-=1}},95334:(e,t,n)=>{n.d(t,{V:()=>o,f:()=>r});var i=n(1521);let a=(0,i.createContext)((e,t)=>t),o=a.Provider;function r(){return(0,i.useContext)(a)}},95397:(e,t,n)=>{n.d(t,{G7:()=>s,eA:()=>l,LO:()=>d});var i=n(85283),a=n(58560);let o=i.Ik({label:i.Yj().max(12).nullable(),amount:i.ai().min(0)}),r=i.YO(o).min(1).max(6),l=i.Ik({name:i.Yj().trim().min(1).max(200),description:i.Yj().max(300).nullable().optional(),sku:i.Yj().trim().max(64).nullable().optional(),categoryId:i.Yj().nullable().optional(),prices:r,taxRate:i.ai().min(0).max(100).nullable().optional(),taxIncluded:i.zM().optional(),imageMediaFileId:i.Yj().nullable().optional(),available:i.zM().default(!0),sequence:i.ai().int().default(0)});i.Ik({name:i.Yj().trim().min(1).max(200).optional(),description:i.Yj().max(300).nullable().optional(),sku:i.Yj().trim().max(64).nullable().optional(),categoryId:i.Yj().nullable().optional(),prices:r.optional(),taxRate:i.ai().min(0).max(100).nullable().optional(),taxIncluded:i.zM().optional(),imageMediaFileId:i.Yj().nullable().optional(),available:i.zM().optional(),sequence:i.ai().int().optional()}),i.Ik({page:a.ai().int().min(1).optional(),pageSize:a.ai().int().min(1).max(100).optional(),search:i.Yj().trim().max(200).optional(),categoryId:i.Yj().optional(),available:i.k5(["true","false"]).optional()}),i.Ik({name:i.Yj().trim().min(1).max(200),sequence:i.ai().int().default(0)}),i.Ik({name:i.Yj().trim().min(1).max(200).optional(),sequence:i.ai().int().optional()}),i.Ik({ids:i.YO(i.Yj()).min(0).max(5e3)}),i.Ik({ids:i.YO(i.Yj()).min(1).max(5e3),categoryId:i.Yj().nullable().optional(),available:i.zM().optional(),adjustPricePercent:i.ai().min(-100).max(1e3).optional()}),i.Ik({ids:i.YO(i.Yj()).min(1).max(50)});let s=i.Ik({currency:i.Yj().trim().length(3).optional(),defaultTaxRate:i.ai().min(0).max(100).nullable().optional(),defaultTaxIncluded:i.zM().optional()});function d(e,t,n,i){if("as-entered"===i||null==t||!(t>0))return e;let a=1+t/100;return"with-tax"===i?n?e:e*a:n?e/a:e}i.Ik({csv:i.Yj().min(1).max(2e6)})},97044:(e,t,n)=>{n.d(t,{ElementRenderer:()=>r.w,ReadOnlyCanvas:()=>u});var i=n(73365),a=n(1521),o=n(74975),r=n(12641),l=n(67606),s=n(63453);let d=(...e)=>({}),c={location:null,timezone:null};function u({content:e,fill:t=!1,previewMode:n=!1}){let h=(0,a.useRef)(null),[m,f]=(0,a.useState)({width:0,height:0,scale:1});return(0,a.useEffect)(()=>
24{function n(){if(!h.current)return;let n=h.current.clientWidth,i=h.current.clientHeight;if(n&&i)if(t){let t=n/e.canvas.width;f({width:n,height:Math.round(e.canvas.height*t),scale:t})}else{let t=e.canvas.width/e.canvas.height,a=n,o=n/t;o>i&&(o=i,a=i*t),f({width:Math.floor(a),height:Math.floor(o),scale:Math.floor(a)/e.canvas.width})}}n();let i=new ResizeObserver(n);return h.current&&i.observe(h.current),()=>i.disconnect()},[e.canvas.width,e.canvas.height,t]),(0,i.jsx)("div",{ref:h,className:"w-full h-full flex items-center justify-center overflow-hidden",children:m.width>0&&(0,i.jsxs)("div",{className:"relative",style:{width:m.width,height:m.height},children:[(0,i.jsx)(o.BI,{width:m.width,height:m.height,scaleX:m.scale,scaleY:m.scale,listening:!1,children:(0,i.jsxs)(o.Wd,{listening:!1,children:[(0,i.jsx)(o.rw,{x:0,y:0,width:e.canvas.width,height:e.canvas.height,...(0,s.Bj)(e.canvas.background,e.canvas.width,e.canvas.height)}),(0,i.jsx)(r.w,{elements:e.elements,selectedIds:[],stageScale:m.scale,stagePos:{x:0,y:0},stageRef:{current:null},onElementDragMove:d,onElementDragEnd:d,previewMode:n})]})}),(0,i.jsx)("div",{className:"absolute top-0 left-0 pointer-events-none",style:{width:e.canvas.width,height:e.canvas.height,transform:`scale(${m.scale})`,transformOrigin:"top left"},children:[...e.elements].sort((e,t)=>e.zIndex-t.zIndex).map(e=>e.hidden||"app"!==e.type?null:(0,i.jsx)(l.B,{element:e,context:c},e.id))})]})})}},98561:(e,t,n)=>{n.d(t,{B_:()=>I,OR:()=>b,Yw:()=>x});var i=n(85283),a=n(6058);let o=i.Ik({id:i.Yj().min(1),x:i.ai(),y:i.ai(),width:i.ai().positive(),height:i.ai().positive(),zIndex:i.ai().int(),rotation:i.ai().min(0).max(360).default(0),opacity:i.ai().min(0).max(1).default(1),locked:i.zM().default(!1),hidden:i.zM().default(!1),groupId:i.Yj().nullable().default(null),name:i.Yj().nullable().default(null)}),r=i.k5(["fill","contain","cover","none"]).default("cover"),l=i.Yj().optional(),s=i.ai().int().nonnegative().optional(),d=o.extend({type:i.eu("image"),src:i.Yj().url(),mediaFileId:i.Yj().nullable().default(null),sha256:l,sizeBytes:s,objectFit:r,cornerRadius:i.ai().min(0).default(0),flipX:i.zM().default(!1),flipY:i.zM().default(!1)}),c=o.extend({type:i.eu("video"),src:i.Yj().url(),mediaFileId:i.Yj().nullable().default(null),sha256:l,sizeBytes:s,muted:i.zM().default(!1),loop:i.zM().default(!0),autoplay:i.zM().default(!0),volume:i.ai().min(0).max(1).default(1),playbackRate:i.ai().min(.25).max(4).default(1),objectFit:r}),u=o.extend({type:i.eu("text"),content:i.Yj().default(""),fontSize:i.ai().min(1).max(4e3).default(48),fontFamily:i.Yj().default("Arial"),fontFamilyId:i.Yj().nullable().optional(),fontWeight:i.Yj().default("400"),fontStyle:i.k5(["normal","italic"]).default("normal"),textAlign:i.k5(["left","center","right","justify"]).default("left"),color:a.bb.default("#000000"),backgroundColor:i.KC([a.l9,i.eu("transparent")]).default("transparent"),lineHeight:i.ai().min(.5).max(5).default(1.2),letterSpacing:i.ai().default(0),textDecoration:i.k5(["none","underline","line-through"]).default("none"),padding:i.ai().min(0).default(0)}),h=i.k5(["rectangle","circle","triangle","star","arrow","line","ellipse","diamond","pentagon","hexagon","octagon","cross","blockArrow","chevron","rectCallout","speechBubble","banner"]),m=o.extend({type:i.eu("shape"),shapeType:h,fill:a.l9,stroke:i.Yj().default("transparent"),strokeWidth:i.ai().min(0).default(0),cornerRadius:i.ai().min(0).default(0)}),f=i.Ik({page:i.ai().int().min(1),durationMs:i.ai().int().min(100)}),g=i.Ik({page:i.ai().int().min(1),url:i.Yj(),sha256:i.Yj(),size:i.ai().int().min(0)}),p=o.extend({type:i.eu("pdf"),mediaFileId:i.Yj().min(1),pages:i.YO(f).min(0),expandedPages:i.YO(g).optional(),pageTransition:i.k5(["none","crossfade"]).default("crossfade"),pageTransitionMs:i.ai().int().min(0).max(2e3).default(300),objectFit:r,backgroundColor:i.Yj().default("#FFFFFF"),cornerRadius:i.ai().min(0).default(0),needsReview:i.zM().optional()}),y=i.Ik({key:i.Yj(),visible:i.zM().default(!0),labelOverride:i.Yj().nullable().default(null),align:i.k5(["auto","left","center","right"]).default("auto")}),x=o.extend({type:i.eu("table"),mediaFileId:i.Yj().min(1),src:i.Yj().url(),sha256:l,sizeBytes:s,hasHeaderRow:i.zM().default(!0),delimiter:i.k5(["auto",",",";"," ","|"]).default("auto"),columns:i.YO(y).default([]),rowsPerPage:i.ai().int().min(1).nullable().default(null),pageIntervalSec:i.ai().int().min(2).max(120).default(8),pageTransition:i.k5(["none","fade"]).default("fade"),showHeader:i.zM().default(!0),headerBold:i.zM().default(!0),headerUppercase:i.zM().default(!1),headerColor:a.bb.default("#111827"),headerBackgroun
24d:i.KC([a.bb,i.eu("transparent")]).default("transparent"),striped:i.zM().default(!0),stripeColor:i.KC([a.bb,i.eu("transparent")]).default("#f8fafc"),showRowLines:i.zM().default(!0),showColumnLines:i.zM().default(!1),fontFamily:i.Yj().default("Arial"),fontFamilyId:i.Yj().nullable().optional(),fontWeight:i.Yj().default("400"),fontSize:i.ai().min(1).max(4e3).default(18),color:a.bb.default("#111827"),lineHeight:i.ai().min(.5).max(5).default(1.3),letterSpacing:i.ai().default(0),padding:i.ai().min(0).default(12),cornerRadius:i.ai().min(0).default(0),backgroundColor:i.KC([a.bb,i.eu("transparent")]).default("#ffffff")}),w=a.bb,b=o.extend({type:i.eu("chart"),mediaFileId:i.Yj().min(1),src:i.Yj().url(),sha256:l,sizeBytes:s,hasHeaderRow:i.zM().default(!0),delimiter:i.k5(["auto",",",";"," ","|"]).default("auto"),chartType:i.k5(["bar","line","area","pie"]).default("bar"),orientation:i.k5(["vertical","horizontal"]).default("vertical"),innerRadius:i.ai().min(0).max(.9).default(0),labelColumn:i.Yj().min(1),valueColumns:i.YO(i.Yj().min(1)).min(1),mode:i.k5(["raw","aggregate"]).default("raw"),aggregate:i.Ik({op:i.k5(["sum","avg","count","min","max"]).default("sum"),groupBy:i.Yj().nullable().default(null)}).default({op:"sum",groupBy:null}),seriesColors:i.YO(w).default([]),title:i.Yj().default(""),showLegend:i.zM().default(!0),showXAxis:i.zM().default(!0),showYAxis:i.zM().default(!0),showGridLines:i.zM().default(!0),yMin:i.ai().nullable().default(null),yMax:i.ai().nullable().default(null),fontFamily:i.Yj().default("Arial"),fontFamilyId:i.Yj().nullable().optional(),fontWeight:i.Yj().default("400"),fontSize:i.ai().min(1).max(4e3).default(14),color:a.bb.default("#111827"),backgroundColor:i.KC([a.bb,i.eu("transparent")]).default("#ffffff"),padding:i.ai().min(0).default(16),cornerRadius:i.ai().min(0).default(0)}),S=i.Ik({id:i.Yj().min(1),mediaFileId:i.Yj().min(1),src:i.Yj().url(),mediaType:i.k5(["image","video"]),durationMs:i.ai().int().min(100).default(8e3),useVideoDuration:i.zM().default(!0),sha256:l,sizeBytes:s}),v=o.extend({type:i.eu("slider"),items:i.YO(S).default([]),transition:i.k5(["none","fade"]).default("fade"),transitionMs:i.ai().int().min(0).max(2e3).default(600),objectFit:r,backgroundColor:i.KC([a.bb,i.eu("transparent")]).default("transparent"),loop:i.zM().default(!0),muted:i.zM().default(!1),volume:i.ai().min(0).max(1).default(1)}),k=i.k5(["clock","weather","youtube","web","date","countdown","worldclock","gslides","gsheets","gdocs","gcalendar","gmaps","gforms","glooker","ticker","dayssince","qr","popup","rss","airquality","uv","pollen","currencies","products","odoo","remote"]),M=o.extend({type:i.eu("app"),appId:k,config:i.g1(i.Yj(),i.L5())}),I=i.gM("type",[d,c,u,m,p,x,b,v,M])},99521:(e,t,n)=>{n.d(t,{L:()=>a});var i=n(86367);function a(e){let t=!0,n=()=>{t&&e()};return window.addEventListener(i.Nr,n),document.fonts?.ready.then(n).catch(()=>{}),()=>{t=!1,window.removeEventListener(i.Nr,n)}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.