"use strict";var e=require("@gem-sdk/core");const t=e=>Object.keys(e??{}).filter(e=>["--d","--d-mobile","--d-tablet"].includes(e)).reduce((t,b)=>({...t,[b]:e?.[b]}),{}),b=e=>Object.keys(e??{}).filter(e=>["--bw","--bw-mobile","--bw-tablet","--bc","--bc-tablet","--bc-mobile","--b","--b-tablet","--b-mobile","--bs","--bs-tablet","--bs-mobile","--radius","--radius-tablet","--radius-mobile","--bblr","--bbrr","--btlr","--btrr","--bblr-tablet","--bbrr-tablet","--btlr-tablet","--btrr-tablet","--bblr-mobile","--bbrr-mobile","--btlr-mobile","--btrr-mobile"].includes(e)).reduce((t,b)=>({...t,[b]:e?.[b]}),{}),l=e=>Object.keys(e??{}).filter(e=>e.startsWith("--mt")||e.startsWith("--mb")||e.startsWith("--ml")||e.startsWith("--mr")).reduce((t,b)=>({...t,[b]:e?.[b]}),{}),r=(e,t)=>"tablet"===t?e?.tablet??e?.desktop:"mobile"===t?e?.mobile??e?.tablet??e?.desktop:e?.desktop;exports.createDialogKey=(e="",t="")=>({id:`dialog:${e}:${t}`,time:`dialog:${e}:${t}:time`}),exports.getBorderStyle=b,exports.getDisplayStyle=t,exports.getInnerStyle=e=>Object.keys(e??{}).filter(r=>!Object.keys(l(e)).includes(r)&&!Object.keys(t(e)).includes(r)&&!Object.keys(b(e)).includes(r)).reduce((t,b)=>({...t,[b]:e?.[b]}),{}),exports.getOverlayOpacity=e=>"number"!=typeof e||isNaN(e)?"string"==typeof e?parseFloat(e)+"%":"0%":e+"%",exports.getPropertyByDevice=r,exports.getWrapperDialogStyle=l,exports.heightStyle=(t,b)=>({...t?.desktop?e.makeStyle({h:"100%"}):b?.desktop?e.makeStyle({h:b.desktop}):e.makeStyle({minh:"300px"}),"--h-tablet":r(t,"tablet")?"100%":r(b,"tablet")??"300px","--h-mobile":r(t,"mobile")?"100%":r(b,"mobile")??"300px","--maxh":r(t,"desktop")?"100%":"","--maxh-tablet":r(t,"tablet")?"100%":"","--maxh-mobile":r(t,"mobile")?"100%":""}),exports.isMobile=e=>!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e),exports.isShowModal=(e,t=0)=>{let b=e?new Date(Number(e)):new Date,l=Date.now()-b.getTime();return Math.abs(l/24/60/60/1e3)>=t},exports.parseNumber=e=>{let t=parseFloat(e?.toString()??"0");return isNaN(t)?0:t},exports.pointerEventStyle=e=>Object.keys(e??{}).filter(e=>["--d","--d-mobile","--d-tablet"].includes(e)).reduce((t,b)=>({...t,[b.replace("--d","--pe")]:e?.[b]==="none"?"none":"auto"}),{}),exports.removeHeightPercentForContent=e=>({...e,"--h":e["--h"]?.includes("%")?"100%":e["--h"],"--h-tablet":e["--h-tablet"]?.includes("%")?"100%":e["--h-tablet"],"--h-mobile":e["--h-mobile"]?.includes("%")?"100%":e["--h-mobile"]});
