@kanorio/elements 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/README.md +4 -1
  2. package/dist/AudioPlayer-DKUAB5KE.js +2 -0
  3. package/dist/AudioPlayer-S7YF7A2E.js +2 -0
  4. package/dist/CustomerAccountPanel-DJKV7LT4.js +2 -0
  5. package/dist/CustomerAccountPanel-RWEHWBJY.js +2 -0
  6. package/dist/FormAddressField-C6VN7J6I.js +2 -0
  7. package/dist/FormAddressField-QR7ZCH77.js +2 -0
  8. package/dist/FormChoiceDropdown-SJXD26CC.js +2 -0
  9. package/dist/FormChoiceDropdown-U3NIOOHG.js +2 -0
  10. package/dist/FormFileField-LZDCXI2Z.js +2 -0
  11. package/dist/FormFileField-ONL4Q55V.js +2 -0
  12. package/dist/FormTaxIdField-K34MDUPW.js +2 -0
  13. package/dist/FormTaxIdField-XMK5WRQO.js +2 -0
  14. package/dist/KanorioAccount-EN3TM67X.js +2 -0
  15. package/dist/KanorioAccount-XGVSGVYN.js +2 -0
  16. package/dist/KanorioAnalytics-NEKTFQEE.js +2 -0
  17. package/dist/KanorioAnalytics-UMCUWQM7.js +2 -0
  18. package/dist/KanorioCurriculum-3QSCOHK7.js +2 -0
  19. package/dist/KanorioCurriculum-RUIGZ5X7.js +2 -0
  20. package/dist/KanorioForm-GUA5GEJY.js +2 -0
  21. package/dist/KanorioForm-KXV7D2TU.js +2 -0
  22. package/dist/KanorioLightbox-M72HNQQX.js +2 -0
  23. package/dist/KanorioLightbox-TQ3Q73TD.js +2 -0
  24. package/dist/KanorioLogin-5XFN3YEE.js +2 -0
  25. package/dist/KanorioLogin-AJHHVQGV.js +2 -0
  26. package/dist/KanorioMedia-ADKUDH5C.js +2 -0
  27. package/dist/KanorioMedia-DLBSXCKA.js +2 -0
  28. package/dist/KanorioReviews-42FZSXTI.js +2 -0
  29. package/dist/KanorioReviews-7LD5WKFG.js +2 -0
  30. package/dist/KanorioUnit-NWBX5DEI.js +2 -0
  31. package/dist/KanorioUnit-SIM3344J.js +2 -0
  32. package/dist/MediaPlayer-F43FPK4E.js +2 -0
  33. package/dist/MediaPlayer-JHFZFOOG.js +2 -0
  34. package/dist/{PDFViewerFull-KMUVT2BL.js → PDFViewerFull-CB44M7GW.js} +3 -3
  35. package/dist/{PDFViewerFull-FBLYNUDX.js → PDFViewerFull-INVHZL4V.js} +2 -2
  36. package/dist/VideoPlayer-FWZF4DQK.js +2 -0
  37. package/dist/VideoPlayer-LNS7XJ4C.js +2 -0
  38. package/dist/account.d.ts +165 -0
  39. package/dist/account.js +2 -0
  40. package/dist/analytics.d.ts +44 -0
  41. package/dist/analytics.js +2 -0
  42. package/dist/bot-protection.d.ts +297 -0
  43. package/dist/bot-protection.js +2 -0
  44. package/dist/chunk-2E6RCDAA.js +2 -0
  45. package/dist/chunk-2FSD3N7F.js +6 -0
  46. package/dist/chunk-2J5XQK4H.js +2 -0
  47. package/dist/chunk-2LOQXVFI.js +2 -0
  48. package/dist/chunk-2ONAW3CA.js +2 -0
  49. package/dist/chunk-33AQQY6T.js +69 -0
  50. package/dist/chunk-36YEGBKK.js +2 -0
  51. package/dist/chunk-4BBERZ6T.js +2 -0
  52. package/dist/chunk-4BEKWYEW.js +2 -0
  53. package/dist/chunk-4DPSNQEI.js +2 -0
  54. package/dist/chunk-4KA3HSRQ.js +2 -0
  55. package/dist/chunk-4MOCTNN7.js +2 -0
  56. package/dist/chunk-5AUWUK5R.js +2 -0
  57. package/dist/chunk-5G3PQI25.js +2 -0
  58. package/dist/chunk-5HWAL7VK.js +2 -0
  59. package/dist/chunk-63XJWMJG.js +2 -0
  60. package/dist/chunk-66XN5RR4.js +2 -0
  61. package/dist/chunk-6RZBXZFP.js +2 -0
  62. package/dist/chunk-763LNERD.js +2 -0
  63. package/dist/chunk-7XWBVRXP.js +15 -0
  64. package/dist/chunk-A4DPHHAP.js +42 -0
  65. package/dist/chunk-AF46NLXK.js +2 -0
  66. package/dist/chunk-AFNEGNVJ.js +2 -0
  67. package/dist/chunk-AQ6F6MIJ.js +2 -0
  68. package/dist/chunk-ARU5PTJV.js +2 -0
  69. package/dist/chunk-B7KLKVIM.js +2 -0
  70. package/dist/chunk-BGVTMWPN.js +2 -0
  71. package/dist/chunk-BKNL7ZCI.js +2 -0
  72. package/dist/chunk-BU7KUHZK.js +8 -0
  73. package/dist/chunk-C7HUM2EN.js +2 -0
  74. package/dist/chunk-CU2JJTXI.js +2 -0
  75. package/dist/{chunk-5U2SZE3H.js → chunk-CUQUEGX2.js} +2 -2
  76. package/dist/chunk-D7K3YCBR.js +2 -0
  77. package/dist/chunk-DLJDYXKL.js +2 -0
  78. package/dist/chunk-DTBRUBPG.js +2 -0
  79. package/dist/chunk-E77WGXYW.js +2 -0
  80. package/dist/chunk-EE4S6NRV.js +3 -0
  81. package/dist/chunk-ET57PWXC.js +2 -0
  82. package/dist/chunk-EZMTUAQX.js +2 -0
  83. package/dist/chunk-FFAWYDLJ.js +2 -0
  84. package/dist/chunk-FQCA2VGY.js +2 -0
  85. package/dist/chunk-FSY5GB5E.js +3 -0
  86. package/dist/chunk-G4U6BFZY.js +2 -0
  87. package/dist/chunk-GJY6AQIS.js +2 -0
  88. package/dist/chunk-GMW7AUSG.js +2 -0
  89. package/dist/chunk-GZCED6V3.js +2 -0
  90. package/dist/chunk-H2XQYT62.js +2 -0
  91. package/dist/chunk-H7VP4BYY.js +2 -0
  92. package/dist/chunk-HFYLTH5B.js +2 -0
  93. package/dist/chunk-IAXVJLJ3.js +2 -0
  94. package/dist/chunk-IXDKZO42.js +2 -0
  95. package/dist/chunk-J37D44SX.js +2 -0
  96. package/dist/chunk-JH5D6YJX.js +2 -0
  97. package/dist/chunk-JREL5347.js +2 -0
  98. package/dist/chunk-K2XZKV3Q.js +2 -0
  99. package/dist/chunk-K4VRRKYJ.js +2 -0
  100. package/dist/chunk-KBKDMTYF.js +2 -0
  101. package/dist/chunk-KDNGDR64.js +2 -0
  102. package/dist/chunk-KNNN5V3T.js +2 -0
  103. package/dist/chunk-LWKCGUHS.js +2 -0
  104. package/dist/chunk-LWRWKZBC.js +2 -0
  105. package/dist/chunk-LXNMHQFN.js +2 -0
  106. package/dist/chunk-MC63CLSM.js +2 -0
  107. package/dist/chunk-MIQK3T3Y.js +2 -0
  108. package/dist/chunk-MQ7PBFUM.js +4 -0
  109. package/dist/chunk-MWPRTK32.js +2 -0
  110. package/dist/chunk-MXGMJAWS.js +2 -0
  111. package/dist/chunk-N4BGAMWD.js +2 -0
  112. package/dist/chunk-N5PIQM4L.js +3 -0
  113. package/dist/chunk-NBDRYQZV.js +2 -0
  114. package/dist/chunk-NGRNPVON.js +2 -0
  115. package/dist/chunk-NSY72ZYX.js +15 -0
  116. package/dist/chunk-O2SYHUQF.js +2 -0
  117. package/dist/chunk-OIKRLEW6.js +2 -0
  118. package/dist/chunk-OTK4YNSG.js +2 -0
  119. package/dist/chunk-OU4IOHLN.js +15 -0
  120. package/dist/chunk-PR2NRUEI.js +2 -0
  121. package/dist/chunk-QGR3QAQB.js +3 -0
  122. package/dist/chunk-QOQQCCID.js +2 -0
  123. package/dist/chunk-RG5JA44V.js +2 -0
  124. package/dist/chunk-RKEHHJDU.js +2 -0
  125. package/dist/chunk-S2NFWI7C.js +69 -0
  126. package/dist/chunk-S7FE2XRA.js +2 -0
  127. package/dist/chunk-SUXTLVTX.js +2 -0
  128. package/dist/chunk-SVWEVSYJ.js +2 -0
  129. package/dist/chunk-TEUQV3AT.js +2 -0
  130. package/dist/chunk-U7H3W23Q.js +2 -0
  131. package/dist/chunk-U7KVGD47.js +2 -0
  132. package/dist/chunk-UIHBR4NU.js +3 -0
  133. package/dist/chunk-UM74DXPE.js +2 -0
  134. package/dist/chunk-VKSYPXNL.js +2 -0
  135. package/dist/chunk-VUTODQFX.js +2 -0
  136. package/dist/chunk-VYSRVTYI.js +2 -0
  137. package/dist/chunk-W32ZFOPN.js +2 -0
  138. package/dist/chunk-W63RJF6Q.js +2 -0
  139. package/dist/chunk-WM5S3YN5.js +2 -0
  140. package/dist/chunk-WP7UEAIB.js +2 -0
  141. package/dist/chunk-WXIUWMFR.js +2 -0
  142. package/dist/chunk-Z4A5NQWJ.js +2 -0
  143. package/dist/chunk-Z4OV6QHI.js +2 -0
  144. package/dist/curriculum.d.ts +20 -0
  145. package/dist/curriculum.js +2 -0
  146. package/dist/deliverables-BDS7WMBC.js +99 -0
  147. package/dist/deliverables-C5RD2ASE.js +131 -0
  148. package/dist/elements.css +1 -1
  149. package/dist/events-CJeBru-H.d.ts +11 -0
  150. package/dist/form.d.ts +775 -0
  151. package/dist/form.js +2 -0
  152. package/dist/forms-answers-address-7P6EVFY5.js +2 -0
  153. package/dist/forms-answers-address-IQV2Y56H.js +2 -0
  154. package/dist/forms-answers-phone-2VZ46OME.js +2 -0
  155. package/dist/forms-answers-phone-5PUB5WKD.js +2 -0
  156. package/dist/forms-answers-tax-id-D4GOUC6N.js +2 -0
  157. package/dist/forms-answers-tax-id-WJD7K3PG.js +2 -0
  158. package/dist/index.d.ts +17 -3045
  159. package/dist/index.js +1 -1
  160. package/dist/kanorio-elements.js +9 -73
  161. package/dist/lightbox-DEvsB5dB.d.ts +100 -0
  162. package/dist/lightbox.d.ts +5 -0
  163. package/dist/lightbox.js +2 -0
  164. package/dist/login.d.ts +14 -0
  165. package/dist/login.js +2 -0
  166. package/dist/media.d.ts +85 -0
  167. package/dist/media.js +2 -0
  168. package/dist/phone-input-Q5AV6KSW.js +2 -0
  169. package/dist/phone-input-T6QX2TDS.js +2 -0
  170. package/dist/provider-CMLzyAjJ.d.ts +1277 -0
  171. package/dist/provider.d.ts +4 -0
  172. package/dist/provider.js +2 -0
  173. package/dist/reviews.d.ts +42 -0
  174. package/dist/reviews.js +2 -0
  175. package/dist/unit.d.ts +118 -0
  176. package/dist/unit.js +2 -0
  177. package/dist/{vidstack-BmcqUMKx-XYI2YLUH.js → vidstack-BmcqUMKx-FXVV4FRB.js} +2 -2
  178. package/dist/{vidstack-GkTzay8D-PBE5ZIYA.js → vidstack-GkTzay8D-53C3FRCO.js} +2 -2
  179. package/dist/web-components.d.ts +13 -1
  180. package/dist/web-components.js +1 -1
  181. package/dist/wire-ofSodpi1.d.ts +176 -0
  182. package/package.json +46 -2
  183. package/dist/MediaPlayer-7IBSXL7Q.js +0 -2
  184. package/dist/MediaPlayer-HTXF4T2V.js +0 -2
  185. package/dist/chunk-2UVUNYL6.js +0 -2
  186. package/dist/chunk-3OGF7I4H.js +0 -2
  187. package/dist/chunk-5AWUTOK7.js +0 -2
  188. package/dist/chunk-DTDUK36B.js +0 -8
  189. package/dist/chunk-JZXJO62T.js +0 -15
  190. package/dist/chunk-LLHBSWTL.js +0 -2
  191. package/dist/chunk-NOCGHD2O.js +0 -2
  192. package/dist/chunk-S4ZA2INU.js +0 -415
  193. package/dist/chunk-TLBIYET7.js +0 -404
  194. package/dist/chunk-TLRFFLH4.js +0 -94
  195. package/dist/chunk-U3U5KVR6.js +0 -2
  196. package/dist/chunk-UBMXRFSK.js +0 -4
  197. package/dist/deliverables-FBCRGMTB.js +0 -93
  198. package/dist/deliverables-FMKPDHJH.js +0 -92
@@ -1,2 +0,0 @@
1
- import{m as B,o as W,p as U,z as Z}from"./chunk-5AWUTOK7.js";import{pg as Y}from"./chunk-S4ZA2INU.js";import{a as oe}from"./chunk-6LGTFWQS.js";import{c as te}from"./chunk-CDG7S4P5.js";var ne="/pdfjs",ge="https://js.kanorio.com/pdfjs",E=ne;function ue(e){E=e.replace(/\/+$/,"")}function re(e){return`${E}/${e}/pdf.worker.min.mjs`}function fe(e){return`${E}/${e}/cmaps/`}function me(e){return`${E}/${e}/standard_fonts/`}function he(e){let r=re(e.version);e.GlobalWorkerOptions.workerSrc!==r&&(e.GlobalWorkerOptions.workerSrc=r)}var I=0,m=null;function $(){if(typeof document>"u")return()=>{};let e=document.documentElement,r=document.body;if(I===0){let c=window.innerWidth-e.clientWidth;m={htmlOverflow:e.style.overflow,bodyOverflow:r.style.overflow,bodyPaddingRight:r.style.paddingRight},e.style.overflow="hidden",r.style.overflow="hidden",c>0&&(r.style.paddingRight=`${c}px`)}I+=1;let a=!1;return()=>{a||(a=!0,I-=1,!(I>0||!m)&&(e.style.overflow=m.htmlOverflow,r.style.overflow=m.bodyOverflow,r.style.paddingRight=m.bodyPaddingRight,m=null))}}var o=te(oe());var H=/\.(avif|gif|jpe?g|png|webp)$/i;function ie(e,r){let a=r?.trim()||B(e)||"image";return H.test(a)?a.replace(H,".jpg"):`${a}.jpg`}async function N(e,r){let a=W(e,{useCase:"lightbox-image",format:"jpeg"}),c=await fetch(a);if(!c.ok)throw new Error(`Failed to fetch image: ${c.status} ${c.statusText}`);let h=await c.blob(),f=document.createElement("a");f.href=URL.createObjectURL(h),f.download=ie(e,r),f.click(),URL.revokeObjectURL(f.href)}var se=1,ae=3,G=.2,ce=.95,le=.9,de="w-10 h-10 md:w-12 md:h-12 rounded-full bg-[color-mix(in_srgb,var(--media-fg)_10%,transparent)] hover:bg-[color-mix(in_srgb,var(--media-fg)_20%,transparent)] flex items-center justify-center transition-all",Ie=`${de} disabled:opacity-30 disabled:cursor-not-allowed`,ke="h-10 md:h-12 min-w-[50px] px-2 rounded-full text-[var(--media-fg)] text-xs md:text-sm font-medium tabular-nums text-center transition-colors enabled:hover:bg-[color-mix(in_srgb,var(--media-fg)_10%,transparent)] disabled:cursor-default";function F(e){return"touches"in e&&e.touches.length>0?{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}:"changedTouches"in e&&e.changedTouches.length>0?{clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}}function De({images:e,filenames:r,enableKeyboard:a=!1,onDownload:c,onShare:h}){let{ui:f}=Y(),{imageDownloadUrl:R}=Z(),A=(0,o.useCallback)(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(hover: hover) and (pointer: fine)").matches,[]),[x,X]=(0,o.useState)(!1),[u,w]=(0,o.useState)(0),[d,v]=(0,o.useState)(1),[y,L]=(0,o.useState)({x:0,y:0}),[k,j]=(0,o.useState)(!1),[D,z]=(0,o.useState)({x:0,y:0}),M=(0,o.useCallback)(()=>{v(t=>{let n=Math.min(t+G,ae);return Math.round(n*10)/10})},[]),_=(0,o.useCallback)(()=>{v(t=>{let n=Math.max(t-G,se),s=Math.round(n*10)/10;return s===1&&L({x:0,y:0}),s})},[]),g=(0,o.useCallback)(()=>{v(1),L({x:0,y:0})},[]),K=(0,o.useCallback)(t=>{w(t),X(!0),v(1),L({x:0,y:0})},[]),T=(0,o.useCallback)(()=>{X(!1),g()},[g]);(0,o.useEffect)(()=>{if(x)return $()},[x]);let S=(0,o.useCallback)(()=>{e.length<=1||(w(t=>t===0?t:t-1),g())},[e.length,g]),P=(0,o.useCallback)(()=>{e.length<=1||(w(t=>t===e.length-1?t:t+1),g())},[e.length,g]);(0,o.useEffect)(()=>{if(!x||!a)return;let t=n=>{let s=A(),l=n.metaKey||n.ctrlKey,i=n.key==="+"||n.key==="="||n.key==="NumpadAdd",p=n.key==="-"||n.key==="_"||n.key==="NumpadSubtract",O=n.key==="0"||n.key==="Numpad0";if(s&&(l&&(i||p||O)||i||p||O)){if(n.preventDefault(),i){M();return}if(p){_();return}g();return}switch(n.key){case"Escape":T();break;case"ArrowLeft":S();break;case"ArrowRight":P();break}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[x,a,T,S,P,M,_,g,A]);let b=(0,o.useMemo)(()=>{if(d<=1)return{maxOffsetX:0,maxOffsetY:0};let t=typeof window<"u"?window.innerWidth:1920,n=typeof window<"u"?window.innerHeight:1080,s=t*ce,l=n*le,i=s*d,p=l*d,O=Math.max(0,(i-s)/2),ee=Math.max(0,(p-l)/2);return{maxOffsetX:O,maxOffsetY:ee}},[d]),C=(0,o.useCallback)(t=>{if(d<=1)return;j(!0);let{clientX:n,clientY:s}=F(t);z({x:n-y.x,y:s-y.y})},[d,y]),J=(0,o.useCallback)(t=>{if(!k||d<=1)return;let{clientX:n,clientY:s}=F(t),l=n-D.x,i=s-D.y;l=Math.max(-b.maxOffsetX,Math.min(b.maxOffsetX,l)),i=Math.max(-b.maxOffsetY,Math.min(b.maxOffsetY,i)),L({x:l,y:i})},[k,d,D,b]),q=(0,o.useCallback)(()=>{j(!1)},[]),Q=(0,o.useCallback)(async()=>{let t=e[u];if(!t)return;if(c){let i=U(t);await c(i,u);return}let n=r?.[u],s=R(t,n);if(s){let i=document.createElement("a");i.href=s,i.rel="noopener",i.click();return}let l=U(t);await N(l,n)},[e,u,c,r,R]),V=(0,o.useCallback)(async()=>{let t=e[u];if(t){if(h){await h(t,u);return}if(navigator.share)try{await navigator.share({title:f.imageShareTitle,text:f.imageShareText,url:t})}catch{}else try{await navigator.clipboard.writeText(t)}catch{}}},[e,u,h]);return{lightboxOpen:x,lightboxIndex:u,zoomLevel:d,position:y,isDraggingLightbox:k,openLightbox:K,closeLightbox:T,setLightboxIndex:w,prevImage:S,nextImage:P,zoomIn:M,zoomOut:_,resetZoom:g,handleLightboxDragStart:C,handleLightboxDrag:J,handleLightboxDragEnd:q,handleDownload:Q,handleShare:V}}export{ge as a,ue as b,fe as c,me as d,he as e,$ as f,se as g,ae as h,de as i,Ie as j,ke as k,De as l};
2
- //# sourceMappingURL=chunk-3OGF7I4H.js.map
@@ -1,2 +0,0 @@
1
- import{a as q}from"./chunk-S4ZA2INU.js";import{a as xe}from"./chunk-6LGTFWQS.js";import{c as v}from"./chunk-CDG7S4P5.js";function Ze(e,t){return{locale:t,ui:e.ui,search:e.search,shop:e.shop,blog:e.blog,productInfo:e.productInfo,delivery:e.delivery,paymentMethods:e.orderStatus.methodTypes,cookieSettings:e.cookieConsent.settings,curriculum:{contentUnitsCount:e.account.contentUnitsCount,contentPreviewBadge:e.account.contentPreviewBadge,contentLocked:e.account.contentLocked,contentOptional:e.account.contentOptional,contentLoadError:e.account.contentLoadError,contentNoUnits:e.account.contentNoUnits}}}function Qe(e,t){let n=e;for(let[r,i]of Object.entries(t))n=n.replaceAll(`{${r}}`,i);return n}function K(e,t){if(e==null||e.length<=t)return e;let n=0;for(let r=0;n<e.length&&r<t;r++)n+=(e.codePointAt(n)??0)>65535?2:1;return e.slice(0,n)}var Re=["top-left","top","top-right","left","center","right","bottom-left","bottom","bottom-right"],we=["logo","text","image"],Z={min:5,max:50,default:20},Q={min:10,max:100,default:60},Ae=60,J={pages:!0,articles:!0,products:!1},E={enabled:!1,source:"logo",text:"",image:null,layout:"single",position:"bottom-right",size:Z.default,opacity:Q.default,apply:J,overlay:null,version:null,activatedAt:null,deactivatedAt:null},M={allowDownload:!0,keepCopyright:!0,deterrence:!1,watermark:E};function Y(e,t){return typeof e!="number"||!Number.isFinite(e)?t.default:Math.min(t.max,Math.max(t.min,Math.round(e)))}function X(e,t,n){return typeof e=="string"&&t.includes(e)?e:n}function Ie(e){let t=e&&typeof e=="object"?e:{},n=r=>typeof t[r]=="boolean"?t[r]:J[r];return{pages:n("pages"),articles:n("articles"),products:n("products")}}function Me(e){let t=e&&typeof e=="object"?e:{},n=t.overlay&&typeof t.overlay=="object"?t.overlay:null,r=n&&typeof n.url=="string"&&typeof n.width=="number"&&typeof n.height=="number"&&typeof n.key=="string"?{url:n.url,width:n.width,height:n.height,key:n.key}:null,i=Array.isArray(t.regenHistory)?t.regenHistory.filter(a=>typeof a=="string"&&!Number.isNaN(Date.parse(a))):void 0,o=$(t.scheduledAt);return{enabled:t.enabled===!0,source:X(t.source,we,E.source),text:typeof t.text=="string"?K(t.text,Ae):"",image:typeof t.image=="string"&&t.image?t.image:null,layout:t.layout==="tile"?"tile":"single",position:X(t.position,Re,E.position),size:Y(t.size,Z),opacity:Y(t.opacity,Q),apply:Ie(t.apply),overlay:r,version:typeof t.version=="string"&&t.version?t.version:null,activatedAt:$(t.activatedAt),deactivatedAt:$(t.deactivatedAt),...i&&i.length>0?{regenHistory:i}:{},...o?{scheduledAt:o}:{}}}function $(e){return typeof e=="string"&&!Number.isNaN(Date.parse(e))?e:null}function nt(e){let t=e&&typeof e=="object"?e:{},n=r=>typeof t[r]=="boolean"?t[r]:M[r];return{allowDownload:n("allowDownload"),keepCopyright:n("keepCopyright"),deterrence:n("deterrence"),watermark:Me(t.watermark)}}function rt(e){return e.allowDownload&&!e.deterrence}function it(e){return!e.deterrence}var y=v(xe());var ee=["24:9","21:9","16:9","4:3","1:1","4:5"],te=["16:9","4:3","1:1","3:4","4:5"],Se=["4:3","1:1","3:4"];function d(e){if(typeof e!="string")return null;let t=/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/.exec(e.trim());if(!t)return null;let n=Number(t[1]),r=Number(t[2]);if(!Number.isFinite(n)||!Number.isFinite(r)||n<=0||r<=0)return null;let i=n/r;return i<.25-1e-6||i>5+1e-6?null:i}function at(e){return e.desktop===null||e.tablet===null||e.mobile===null}var T={mobile:{fill:"absolute inset-0 h-full w-full",flow:"relative h-auto w-full"},tablet:{fill:"md:absolute md:inset-0 md:h-full",flow:"md:relative md:inset-auto md:h-auto"},desktop:{fill:"lg:absolute lg:inset-0 lg:h-full",flow:"lg:relative lg:inset-auto lg:h-auto"}};function st(e){let t=a=>a&&d(a)?"fill":"flow",n=t(e.mobile),r=t(e.tablet),i=t(e.desktop),o=[T.mobile[n]];return r!==n&&o.push(T.tablet[r]),i!==r&&o.push(T.desktop[i]),o.join(" ")}function Fe(e){switch(e??"standard"){case"compact":return"24:9";case"tall":return"16:9";default:return"21:9"}}var D={"page-main-visual:banner-profile":{tabletInherits:"desktop",devices:["desktop","tablet","mobile"],presets:ee,allowCustomRatio:!0},"page-main-visual:split-hero":{tabletInherits:"mobile",devices:["desktop","tablet","mobile"],presets:te,allowCustomRatio:!0},"page-main-visual:overlay-hero":{tabletInherits:"desktop",devices:["desktop","mobile"],presets:["16:9","4:5"],allowCustomRatio:!1,fixedHeight:!0},"image-text-split":{tabletInherits:"mobile",devices:["desktop","tablet","mobile"],presets:te,allowCustomRatio:!0,allowNatural:!0},"full-width-image":{tabletInherits:"desktop",devices:["desktop","tablet","mobile"],presets:ee,allowCustomRatio:!0,allowNatural:!0},"card-grid":{tabletInherits:"desktop",devices:["desktop"],presets:Se,allowCustomRatio:!1},"multi-link":{tabletInherits:"desktop",devices:["desktop"],presets:["4:3"],allowCustomRatio:!1}};function ne(e,t,n="desktop"){if(e==null)return{desktop:t,tablet:t,mobile:t};if(typeof e!="object")return{desktop:e,tablet:e,mobile:e};let r=e,i=r.desktop??t,o=r.mobile??i,a=r.tablet??(n==="mobile"?o:i);return{desktop:i,tablet:a,mobile:o}}function ke(e){let t=e.layout??"banner-profile";if(t==="overlay-hero")return{policy:D["page-main-visual:overlay-hero"],ratios:{desktop:"16:9",tablet:"16:9",mobile:"4:5"},fixedHeight:!0};if(t==="split-hero"){let o=D["page-main-visual:split-hero"],a=ne(e.imageRatio,"4:3",o.tabletInherits);return{policy:o,ratios:{desktop:a.desktop==="natural"||!d(a.desktop)?"4:3":a.desktop,tablet:a.tablet==="natural"||!d(a.tablet)?"4:3":a.tablet,mobile:a.mobile==="natural"||!d(a.mobile)?"4:3":a.mobile},fixedHeight:!1}}let n=D["page-main-visual:banner-profile"],r=Fe(e.bannerHeight),i=ne(e.imageRatio,r,n.tabletInherits);return{policy:n,ratios:{desktop:i.desktop==="natural"||!d(i.desktop)?r:i.desktop,tablet:i.tablet==="natural"||!d(i.tablet)?r:i.tablet,mobile:i.mobile==="natural"||!d(i.mobile)?r:i.mobile},fixedHeight:!1}}function Ce(e){let t=e.desktop,n=e.tablet,r=e.mobile;if(!t&&!n&&!r)return null;if(t&&t===n&&t===r)return[{device:"all",ratio:t}];let i=[];return t&&i.push({device:"desktop",ratio:t}),n&&n!==t&&n!==r&&i.push({device:"tablet",ratio:n}),r&&r!==t&&i.push({device:"mobile",ratio:r}),i.length>0?i:null}function ve(e){let{ratios:t}=ke(e??{});return Ce(t)??[{device:"all",ratio:"21:9"}]}var ct=ve();var S=.05;function re(e){return Math.min(1,Math.max(0,e))}function P(e){if(!e||typeof e!="object")return null;let{x:t,y:n}=e;return typeof t!="number"||typeof n!="number"||!Number.isFinite(t)||!Number.isFinite(n)?null:{x:re(t),y:re(n)}}function ie(e){if(!e||typeof e!="object")return null;let{x:t,y:n,w:r,h:i}=e;if(typeof t!="number"||typeof n!="number"||typeof r!="number"||typeof i!="number"||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i))return null;let o=Math.min(1,Math.max(S,r)),a=Math.min(1,Math.max(S,i)),s=Math.min(1-o,Math.max(0,t)),u=Math.min(1-a,Math.max(0,n));return{x:s,y:u,w:o,h:a}}function oe(e){if(!e||typeof e!="object")return null;let t=e;if(typeof t.ratio!="string"||!d(t.ratio))return null;let n=ie(t.rect);return n?{ratio:t.ratio.trim(),rect:n}:null}function $e(e){if(typeof e!="string")return;let t=e.trim();return/^#[0-9a-fA-F]{6}$/.test(t)?t.toLowerCase():void 0}function Ee(e){return Math.abs(e.x-.5)<.005&&Math.abs(e.y-.5)<.005}function _(e){let t=P(e?.focus);return!t||Ee(t)?null:t}function O(e){if(!e?.screens||typeof e.screens!="object")return!1;for(let t of["desktop","tablet","mobile"])if(oe(e.screens[t]))return!0;return!1}function Te(e,t,n){let r=P(e)??{x:.5,y:.5};if(!Number.isFinite(t)||t<=0||!Number.isFinite(n)||n<=0)return{x:0,y:0,w:1,h:1};if(t>=n){let s=Math.min(1,Math.max(S,n/t));return{x:Math.min(1-s,Math.max(0,r.x-s/2)),y:0,w:s,h:1}}let i=1,o=Math.min(1,Math.max(S,t/n));return{x:0,y:Math.min(1-o,Math.max(0,r.y-o/2)),w:i,h:o}}function De(e,t,n){if(!e)return!1;let r=d(e.ratio),i=d(t);if(!r||!i||Math.abs(r-i)/i>.01)return!1;if(n&&n.width>0&&n.height>0&&e.rect.h>0){let o=e.rect.w*n.width/(e.rect.h*n.height);if(Math.abs(o-i)/i>.02)return!1}return!0}function U(e){let{framing:t,device:n,targetRatio:r,tabletInherits:i="desktop"}=e,o=e.source??t?.source??null,a=t?.screens,s=n==="desktop"?["desktop"]:n==="mobile"?["mobile","desktop"]:i==="mobile"?["tablet","mobile","desktop"]:["tablet","desktop"],u=null,c=!1;for(let h of s){let g=oe(a?.[h]);if(g){if(De(g,r,o)){u=g;break}h===n&&(c=!0)}}if(u)return{ratio:r,rect:u.rect,derived:!1,ratioMismatchFallback:!1};let m=d(r)??16/9,l=o&&o.width>0&&o.height>0?o.width/o.height:m;return{ratio:r,rect:Te(t?.focus,l,m),derived:!0,ratioMismatchFallback:c}}function L(e,t){if(!t||!Number.isFinite(t.width)||!Number.isFinite(t.height)||t.width<=0||t.height<=0)return null;let n=ie(e);if(!n)return null;let r=Math.max(0,Math.round(n.x*t.width)),i=Math.max(0,Math.round(n.y*t.height)),o=Math.max(1,Math.round(n.w*t.width)),a=Math.max(1,Math.round(n.h*t.height)),s=Math.max(0,t.width-r-o),u=Math.max(0,t.height-i-a);return i<=1&&s<=1&&u<=1&&r<=1?null:{top:i,right:s,bottom:u,left:r}}function dt(e){let t=n=>`${Math.round(n*1e3)/10}%`;return`${t(e.x)} ${t(e.y)}`}function ae(e){let t=n=>(Math.round(n*100)/100).toFixed(2);return`${t(e.x)}x${t(e.y)}`}var se="asset:",Pe=/^asset:[a-z0-9]+$/;function _e(e){return Pe.test(e)}var ce="xu6i8N5WjaI_9HFe-hZzmg",ht=`https://img.kanorio.com/cdn-cgi/imagedelivery/${ce}`;var bt=String.raw`[^\s"'()<>?#\\]+`,Oe=String.raw`[A-Za-z0-9_.-]+`;function Ue(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var yt=String.raw`(?:[?#][^\s"'()<>\\]*)?`;var Le=new RegExp(String.raw`^https://(?:imagedelivery\.net|[a-z0-9-]+\.kanorio\.com/cdn-cgi/imagedelivery|img\.kanorio\.com/wm/[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)/${Ue(ce)}/(${Oe})(?:[/?#]|$)`);function We(e){return e?Le.exec(e)?.[1]??null:null}var Ne="mixed";function ze(e){return e&&e!==Ne?e:null}function xt(e,t){let n=e??"";if(!t?.name)return n;if(!n||n===t.name||t.formerNames?.includes(n))return t.name;let r=t.name.lastIndexOf("."),i=n.lastIndexOf(".");return r<=0||i<=0?n:`${n.slice(0,i)}${t.name.slice(r)}`}function Rt(e,t){if(t.assetId){let i=e[`${se}${t.assetId}`];if(i)return i}if(!t.url)return;if(_e(t.url))return e[t.url];let n=We(t.url);if(n)return e[n];let r=t.url.split(/[?#]/,1)[0];for(let[i,o]of Object.entries(e))if(!i.startsWith(se)&&r.endsWith(`/${i}`))return o}var p=85;function le(e){if(e)try{let t=new URL(e),n=t.pathname.split("/").filter(Boolean);return t.hostname==="imagedelivery.net"&&n.length>=2?n[1]:t.hostname.endsWith(".kanorio.com")&&n[0]==="cdn-cgi"&&n[1]==="imagedelivery"&&n.length>=4?n[3]:void 0}catch{return}}function je(e){return(e.split(/[?#]/,1)[0]??"").toLowerCase().endsWith(".svg")}function R(e){if(!e)return!1;try{let t=new URL(e);return!!(t.hostname==="imagedelivery.net"||t.hostname.endsWith(".kanorio.com")&&t.pathname.startsWith("/cdn-cgi/imagedelivery/"))}catch{return!1}}function He(e){try{let t=new URL(e);return t.searchParams.has("width")||t.searchParams.has("height")||t.searchParams.has("quality")||t.searchParams.has("fit")}catch{return!1}}function ue(e){switch(e){case"page-main-visual-background":return{width:1920,quality:p,fit:"cover"};case"page-main-visual-logo":return{width:600,height:600,quality:p,fit:"scale-down"};case"header-logo":return{width:600,height:600,quality:p,fit:"scale-down"};case"card-grid-carousel-image":return{width:800,quality:p,fit:"crop"};case"image-text-split-image":return{width:1200,quality:p,fit:"crop"};case"multi-image-carousel-image":return{width:1600,quality:p,fit:"scale-down"};case"lightbox-image":return{width:4096,quality:p,fit:"scale-down"};case"full-width-image":return{width:1920,quality:p,fit:"contain"};default:return{width:1920,quality:p,fit:"crop"}}}function z(e){try{let t=new URL(e),n=t.pathname.split("/").filter(Boolean);return t.hostname==="imagedelivery.net"&&n.length>=3?{baseUrl:`${t.protocol}//${t.hostname}`,accountHash:n[0],imageId:n[1],variant:n[2]||"public"}:t.hostname.endsWith(".kanorio.com")&&n[0]==="cdn-cgi"&&n[1]==="imagedelivery"&&n.length>=5?{baseUrl:`${t.protocol}//${t.hostname}/cdn-cgi/imagedelivery`,accountHash:n[2],imageId:n[3],variant:n[4]||"public"}:null}catch{return null}}function Ve(e,t){let{baseUrl:n,accountHash:r,imageId:i}=e,o=ue(t.useCase),a=t.width??o.width,s=t.height??o.height,u=p,c=t.fit??o.fit,m=t.format,l=[];if(t.trim){let{top:h,right:g,bottom:f,left:F}=t.trim;l.push(`trim=${Math.max(0,Math.round(h))};${Math.max(0,Math.round(g))};${Math.max(0,Math.round(f))};${Math.max(0,Math.round(F))}`)}return a&&l.push(`w=${a}`),s&&l.push(`h=${s}`),c&&l.push(`fit=${c}`),!t.trim&&t.focus&&a&&s&&(c==="crop"||c==="cover")&&l.push(`gravity=${ae(t.focus)}`),t.background&&/^#[0-9a-fA-F]{6}$/.test(t.background)&&l.push(`background=${encodeURIComponent(t.background)}`),l.push(`q=${u}`),m&&l.push(`f=${m}`),l.length>0?`${n}/${r}/${i}/${l.join(",")}`:`${n}/${r}/${i}/public`}function Ge(e){return ue(e).width??1920}function W(e,t){if(!R(e)||He(e)&&!t.format)return e;let n=z(e);return n?Ve(n,t):e}function Ct(e){if(!R(e))return e;let t=z(e);return t?`${t.baseUrl}/${t.accountHash}/${t.imageId}/public`:e}var Be=[400,800,1200,1600],qe="(max-width: 768px) 100vw, 960px";function vt(e){if(!R(e))return null;let t=z(e);if(!t)return null;let{baseUrl:n,accountHash:r,imageId:i}=t,o=p,a="scale-down",s=Be.map(c=>`${n}/${r}/${i}/w=${c},fit=${a},q=${o} ${c}w`).join(", ");return{src:`${n}/${r}/${i}/w=800,fit=${a},q=${o}`,srcSet:s,sizes:qe}}var Ke={mobile:[640,1080],tablet:[1024,1536],desktop:[1440,1920]},x={mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)"},de=["desktop","tablet","mobile"];function ge(e){let t={};for(let n of de){let r=e.ratios[n];if(!r){t[n]={ratio:null,rect:null};continue}let i=U({framing:e.framing,device:n,targetRatio:r,tabletInherits:e.tabletInherits,source:e.source});t[n]={ratio:r,rect:i.derived?null:i.rect}}return t}function N(e,t){return e.ratio!==t.ratio?!1:!e.rect||!t.rect?e.rect===t.rect:Math.abs(e.rect.x-t.rect.x)<5e-4&&Math.abs(e.rect.y-t.rect.y)<5e-4&&Math.abs(e.rect.w-t.rect.w)<5e-4&&Math.abs(e.rect.h-t.rect.h)<5e-4}function Ye(e,t){let n=Ke[e];return!t||t<=0||t>=n[n.length-1]?n:[...n.filter(r=>r<t),Math.round(t)]}function $t(e){let{src:t,framing:n,deviceRatios:r,tabletInherits:i="desktop"}=e;if(!t||!r)return"single";let o=r.mobile===r.desktop&&r.tablet===r.desktop,a=O(n);if(!a&&o)return"single";let s=R(t)&&!je(t);if(!a)return s?"picture":"single";let u=n?.source&&n.source.width>0&&n.source.height>0?n.source:null,c=ge({framing:n,ratios:r,tabletInherits:i,source:u});return de.some(l=>c[l].rect!==null)?!s||!u?"css-fallback":o&&N(c.desktop,c.tablet)&&N(c.desktop,c.mobile)?"single-trim":"picture":o||!s?"single":"picture"}function Et(e){let t=e.useCase??"general",n=e.width??Ge(t),r=d(e.ratio)??16/9,i=Math.max(1,Math.round(n/r)),o=e.framing?.source&&e.framing.source.width>0&&e.framing.source.height>0?e.framing.source:null,a=U({framing:e.framing,device:"desktop",targetRatio:e.ratio,tabletInherits:e.tabletInherits,source:o}),s=!a.derived&&o?L(a.rect,o):null;return{src:W(e.src,{useCase:t,width:n,height:i,fit:"crop",trim:s,focus:s?null:_(e.framing)}),width:n,height:i}}function Tt(e){let{src:t,useCase:n="general",ratios:r,framing:i,tabletInherits:o="desktop",maxWidth:a}=e;if(!R(t))return null;let s=i?.source&&i.source.width>0&&i.source.height>0?i.source:null,u=_(i),c=ge({framing:i,ratios:r,tabletInherits:o,source:s}),m=b=>{let{ratio:j,rect:H}=c[b],w=j?d(j)??16/9:null,V=H&&s?L(H,s):null,k=Ye(b,a),A=[],he=k.map(I=>{let B=w?W(t,{useCase:n,width:I,height:Math.max(1,Math.round(I/w)),fit:"crop",trim:V,focus:V?null:u}):W(t,{useCase:n,width:I,fit:"scale-down"});return A.push(B),`${B} ${I}w`}),C=k[k.length-1],G=s?s.width/s.height:null,be=w?Math.max(1,Math.round(C/w)):G?Math.max(1,Math.round(C/G)):null,ye=A[A.length-1];return{device:b,media:b==="desktop"?void 0:x[b],src:ye,srcSet:he.join(", "),sizes:e.sizes?.[b]??"100vw",width:C,height:be,urls:A}},l=m("mobile"),h=m("tablet"),g=m("desktop"),f=N(c.tablet,c.desktop)?null:h,F=f?[{media:x.mobile,href:l.src,imageSrcSet:l.srcSet,imageSizes:l.sizes},{media:x.tablet,href:f.src,imageSrcSet:f.srcSet,imageSizes:f.sizes},{media:x.desktop,href:g.src,imageSrcSet:g.srcSet,imageSizes:g.sizes}]:[{media:x.mobile,href:l.src,imageSrcSet:l.srcSet,imageSizes:l.sizes},{media:"(min-width: 768px)",href:g.src,imageSrcSet:g.srcSet,imageSizes:g.sizes}],fe=Array.from(new Set([...l.urls,...f?f.urls:[],...g.urls]));return{mobile:l,tablet:f,desktop:g,preloads:F,allVariantUrls:fe}}var pe=v(q()),Xe={protection:M,imageDownloadUrl:()=>null},me=(0,y.createContext)(Xe);function Ot({protection:e,websiteId:t,apiBase:n="",children:r}){let i=(0,y.useMemo)(()=>({protection:e??M,imageDownloadUrl:(o,a)=>{let s=le(o);if(!t||!s)return null;let u=`${n}/api/public/sites/${encodeURIComponent(t)}/images/${encodeURIComponent(s)}/download`,c=new URLSearchParams;a&&c.set("name",a);let m=c.toString();return m?`${u}?${m}`:u}}),[e,t,n]);return(0,pe.jsx)(me.Provider,{value:i,children:r})}function Ut(){return(0,y.useContext)(me)}export{Ze as a,Qe as b,at as c,st as d,ie as e,$e as f,_ as g,U as h,dt as i,ze as j,xt as k,Rt as l,le as m,je as n,W as o,Ct as p,vt as q,$t as r,Et as s,Tt as t,K as u,nt as v,rt as w,it as x,Ot as y,Ut as z};
2
- //# sourceMappingURL=chunk-5AWUTOK7.js.map