@behold/widget 0.5.124 → 0.5.126

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 (108) hide show
  1. package/dist/{Branding-C74BWVr5.js → Branding-BjzXb_RS.js} +1 -1
  2. package/dist/ElasticCarousel-BN3V5b-i.js +1 -0
  3. package/dist/{ErrorMessage-Bjo6dhZv.js → ErrorMessage-Bab_CfBr.js} +1 -1
  4. package/dist/{GalleryWall-prSkljjY.js → GalleryWall-T_W9C-jp.js} +1 -1
  5. package/dist/{Grid-BIccDeLo.js → Grid-DC8Fqqgv.js} +1 -1
  6. package/dist/{PopoverGallery-DllXW8CW.js → PopoverGallery-BmqjPro2.js} +1 -1
  7. package/dist/Widget.d.ts.map +1 -0
  8. package/dist/{base-C_SbMAnY.js → base-D4jTYQxz.js} +1 -1
  9. package/dist/{caret-right-CN2RPSyP.js → caret-right-CSBbJCRm.js} +1 -1
  10. package/dist/elements/AlbumPost.d.ts.map +1 -0
  11. package/dist/elements/BaseElement.d.ts.map +1 -0
  12. package/dist/elements/BasePost.d.ts.map +1 -0
  13. package/dist/elements/BaseWidget.d.ts.map +1 -0
  14. package/dist/elements/Branding.d.ts.map +1 -0
  15. package/dist/elements/Image.d.ts.map +1 -0
  16. package/dist/elements/ImagePost.d.ts.map +1 -0
  17. package/dist/elements/PopoverGallery.d.ts.map +1 -0
  18. package/dist/elements/PopoverGallerySlide.d.ts.map +1 -0
  19. package/dist/elements/PopoverSlideAlbum.d.ts.map +1 -0
  20. package/dist/elements/PopoverSlideVideo.d.ts.map +1 -0
  21. package/dist/elements/Video.d.ts.map +1 -0
  22. package/dist/elements/VideoPost.d.ts.map +1 -0
  23. package/dist/index-UzP-A0W0.js +1 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +2 -2
  26. package/dist/lib/RGBStringToHSLArray.d.ts.map +1 -0
  27. package/dist/lib/createElement.d.ts.map +1 -0
  28. package/dist/lib/debugLog.d.ts.map +1 -0
  29. package/dist/lib/detectPlatform.d.ts.map +1 -0
  30. package/dist/lib/getLoadingColorString.d.ts.map +1 -0
  31. package/dist/lib/getMedianHSL.d.ts.map +1 -0
  32. package/dist/lib/gyre.d.ts.map +1 -0
  33. package/dist/lib/hurdyGurdy.d.ts.map +1 -0
  34. package/dist/lib/popoverScroller.d.ts.map +1 -0
  35. package/dist/lib/trapFocus.d.ts.map +1 -0
  36. package/dist/lib/utils.d.ts.map +1 -0
  37. package/dist/polyfills/replaceChildren.d.ts.map +1 -0
  38. package/dist/widgets/ElasticCarousel.d.ts.map +1 -0
  39. package/dist/widgets/ErrorMessage.d.ts.map +1 -0
  40. package/dist/widgets/GalleryWall.d.ts.map +1 -0
  41. package/dist/widgets/Grid.d.ts.map +1 -0
  42. package/package.json +2 -2
  43. package/dist/ElasticCarousel-C_vNaPZ1.js +0 -1
  44. package/dist/appendLicense.d.ts +0 -2
  45. package/dist/appendLicense.d.ts.map +0 -1
  46. package/dist/index-Bx4SLolj.js +0 -1
  47. package/dist/src/Widget.d.ts.map +0 -1
  48. package/dist/src/elements/AlbumPost.d.ts.map +0 -1
  49. package/dist/src/elements/BaseElement.d.ts.map +0 -1
  50. package/dist/src/elements/BasePost.d.ts.map +0 -1
  51. package/dist/src/elements/BaseWidget.d.ts.map +0 -1
  52. package/dist/src/elements/Branding.d.ts.map +0 -1
  53. package/dist/src/elements/Image.d.ts.map +0 -1
  54. package/dist/src/elements/ImagePost.d.ts.map +0 -1
  55. package/dist/src/elements/PopoverGallery.d.ts.map +0 -1
  56. package/dist/src/elements/PopoverGallerySlide.d.ts.map +0 -1
  57. package/dist/src/elements/PopoverSlideAlbum.d.ts.map +0 -1
  58. package/dist/src/elements/PopoverSlideVideo.d.ts.map +0 -1
  59. package/dist/src/elements/Video.d.ts.map +0 -1
  60. package/dist/src/elements/VideoPost.d.ts.map +0 -1
  61. package/dist/src/index.d.ts.map +0 -1
  62. package/dist/src/lib/RGBStringToHSLArray.d.ts.map +0 -1
  63. package/dist/src/lib/createElement.d.ts.map +0 -1
  64. package/dist/src/lib/debugLog.d.ts.map +0 -1
  65. package/dist/src/lib/detectPlatform.d.ts.map +0 -1
  66. package/dist/src/lib/getLoadingColorString.d.ts.map +0 -1
  67. package/dist/src/lib/getMedianHSL.d.ts.map +0 -1
  68. package/dist/src/lib/gyre.d.ts.map +0 -1
  69. package/dist/src/lib/hurdyGurdy.d.ts.map +0 -1
  70. package/dist/src/lib/popoverScroller.d.ts.map +0 -1
  71. package/dist/src/lib/trapFocus.d.ts.map +0 -1
  72. package/dist/src/lib/utils.d.ts.map +0 -1
  73. package/dist/src/polyfills/replaceChildren.d.ts.map +0 -1
  74. package/dist/src/widgets/ElasticCarousel.d.ts.map +0 -1
  75. package/dist/src/widgets/ErrorMessage.d.ts.map +0 -1
  76. package/dist/src/widgets/GalleryWall.d.ts.map +0 -1
  77. package/dist/src/widgets/Grid.d.ts.map +0 -1
  78. /package/dist/{src/Widget.d.ts → Widget.d.ts} +0 -0
  79. /package/dist/{src/elements → elements}/AlbumPost.d.ts +0 -0
  80. /package/dist/{src/elements → elements}/BaseElement.d.ts +0 -0
  81. /package/dist/{src/elements → elements}/BasePost.d.ts +0 -0
  82. /package/dist/{src/elements → elements}/BaseWidget.d.ts +0 -0
  83. /package/dist/{src/elements → elements}/Branding.d.ts +0 -0
  84. /package/dist/{src/elements → elements}/Image.d.ts +0 -0
  85. /package/dist/{src/elements → elements}/ImagePost.d.ts +0 -0
  86. /package/dist/{src/elements → elements}/PopoverGallery.d.ts +0 -0
  87. /package/dist/{src/elements → elements}/PopoverGallerySlide.d.ts +0 -0
  88. /package/dist/{src/elements → elements}/PopoverSlideAlbum.d.ts +0 -0
  89. /package/dist/{src/elements → elements}/PopoverSlideVideo.d.ts +0 -0
  90. /package/dist/{src/elements → elements}/Video.d.ts +0 -0
  91. /package/dist/{src/elements → elements}/VideoPost.d.ts +0 -0
  92. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  93. /package/dist/{src/lib → lib}/RGBStringToHSLArray.d.ts +0 -0
  94. /package/dist/{src/lib → lib}/createElement.d.ts +0 -0
  95. /package/dist/{src/lib → lib}/debugLog.d.ts +0 -0
  96. /package/dist/{src/lib → lib}/detectPlatform.d.ts +0 -0
  97. /package/dist/{src/lib → lib}/getLoadingColorString.d.ts +0 -0
  98. /package/dist/{src/lib → lib}/getMedianHSL.d.ts +0 -0
  99. /package/dist/{src/lib → lib}/gyre.d.ts +0 -0
  100. /package/dist/{src/lib → lib}/hurdyGurdy.d.ts +0 -0
  101. /package/dist/{src/lib → lib}/popoverScroller.d.ts +0 -0
  102. /package/dist/{src/lib → lib}/trapFocus.d.ts +0 -0
  103. /package/dist/{src/lib → lib}/utils.d.ts +0 -0
  104. /package/dist/{src/polyfills → polyfills}/replaceChildren.d.ts +0 -0
  105. /package/dist/{src/widgets → widgets}/ElasticCarousel.d.ts +0 -0
  106. /package/dist/{src/widgets → widgets}/ErrorMessage.d.ts +0 -0
  107. /package/dist/{src/widgets → widgets}/GalleryWall.d.ts +0 -0
  108. /package/dist/{src/widgets → widgets}/Grid.d.ts +0 -0
@@ -1 +1 @@
1
- import{B as t,a as e,h as o,s,c as i,t as a,b as r,f as h,i as n,e as l}from"./index-Bx4SLolj.js";function d(t){if(!t)return t;let[e,o,s]=t.split(",");e/=255,o/=255,s/=255;const i=Math.max(e,o,s),a=i-Math.min(e,o,s),r=a?i===e?(o-s)/a:i===o?2+(s-e)/a:4+(e-o)/a:0;return[60*r<0?60*r+360:60*r,100*(a?i<=.5?a/(2*i-a):a/(2-(2*i-a)):0),100*(2*i-a)/2]}function c(t,e){const o=(s=t,i=e="tone"===e?"dominant":e,s.filter(t=>t[i]).map(t=>t[i])).map(t=>d(t).join(","));var s,i;return[p(f(o,0)),p(f(o,1)),p(f(o,2))]}function p(t){const e=[...t];e.sort(function(t,e){return t-e});const o=Math.floor((e.length-1)/2);return e.length%2?e[o]:(e[o]+e[o+1])/2}function f(t,e){return t.map(t=>parseInt(t.split(",")[e]))}class b extends t{label="BaseWidget";shadow;styleEl;contents;stylesAdded;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),this.handleKeydown=this.handleKeydown.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleFocusout=this.handleFocusout.bind(this),this.handleShadowFocusout=this.handleShadowFocusout.bind(this),this.onGlobalStateChange(()=>{e(this,{"keyboard-nav":this.globalState.keyboardNavEnabled})}),this.onConnect(()=>{this.styleEl=document.createElement("style"),e(this,{"keyboard-nav":this.globalState.keyboardNavEnabled}),this.addEventListener("focus",this.handleFocus),this.addEventListener("focusout",this.handleFocusout),this.shadow.addEventListener("focusout",this.handleShadowFocusout),this.addEventListener("keydown",this.handleKeydown)})}focusPreviousPost(){this.dispatchEvent(new CustomEvent("post-focus-previous"))}focusNextPost(){this.dispatchEvent(new CustomEvent("post-focus-next"))}handleKeydown(t){"ArrowLeft"===t.key&&t.shiftKey&&this.focusPreviousPost(),"ArrowRight"===t.key&&t.shiftKey&&this.focusNextPost(),this.shadow.activeElement&&this.classList.remove("has-focus")}handleFocus(t){this.shadow.activeElement||this.classList.add("has-focus")}handleFocusout(){this.classList.remove("has-focus")}handleShadowFocusout(t){t.relatedTarget===this&&this.classList.add("has-focus")}renderWidget(t,e){this.stylesAdded&&this.contents?this.contents.replaceWith(t):(this.contents=t,this.styleEl.beholdReplaceChildren(...e.map(t=>t.toString())),this.shadow.beholdReplaceChildren(this.contents,this.styleEl),this.stylesAdded=!0)}}function m(t){return t?`hsl(${t[0]}, ${t[1]}%, ${t[2]}%, ${Math.max(1*Math.random(),.3)})`:""}class v extends t{label="BasePost";post;widgetSettings;feedMetadata;medianPaletteHSL;hasRowGap=!1;isLastRow=!1;onClick;previewLoadingColors=null;backgroundIsHidden=!1;backgroundColor;aspectRatio;index;totalPosts;t;o;constructor(){super(),this.onPropChange(this.i,["post","widgetSettings","feedMetadata","medianPaletteHSL","hasRowGap","isLastRow","previewLoadingColors","aspectRatio","index","totalPosts"],["post","widgetSettings","feedMetadata","medianPaletteHSL","index","totalPosts"]),this.h=this.h.bind(this),this.hideBackground=this.hideBackground.bind(this),this.onConnect(()=>{this.onResize(this,this,this.l)})}i({changedProp:t,oldValue:e,newValue:s}){switch(t){case"post":o(s,e,["colorPalette"])&&this.p();break;case"widgetSettings":o(s,e,["loadingColor","loadingColorTone"])&&this.p(),this.t&&o(s,e,["linkTarget"])&&s?.onPostClick?.toLowerCase().includes("link")&&this.t.setAttribute("target",s.linkTarget),this.t&&o(s,e,["customLinkURL"])&&"customLink"===s.onPostClick&&this.t.setAttribute("href",s.customLinkURL),o(s,e,["hoverOverlayColor","hoverOverlayCustomColor","hoverOverlayOpacity"])&&this.m(),this.v();break;case"previewLoadingColors":s?(this.style.backgroundColor="",this.p()):this.backgroundIsHidden&&this.hideBackground();break;case"hasRowGap":case"isLastRow":this.v()}}m(){let t="rgba(0, 0, 0, 0.3)",e=this.widgetSettings.hoverOverlayCustomColor??"0,0,0",o=this.widgetSettings.hoverOverlayOpacity??65;if("auto"===this.widgetSettings.hoverOverlayColor){const e=d(this.post.colorPalette?.dominant||"100,100,100").map(t=>Math.round(t));t=`hsl(${e[0]} ${Math.min(e[1],50)}% ${Math.min(e[2],40)}% / ${o/100})`}if("custom"===this.widgetSettings.hoverOverlayColor){const s=e.split(",");t=`hsl(${s[0]} ${s[1]}% ${s[2]}% / ${o/100})`}s(this,{"--overlay-color":t})}v(){e(this,{post:!0,"post--hover-icon":"showIcon"===this.widgetSettings.onHover,"post--hover-caption":"showCaption"===this.widgetSettings.onHover,"post--has-row-gap":this.hasRowGap,"post--last-row":this.isLastRow}),this.m(),this.p()}renderPost(t){let e="div",o=this.post.permalink;this.v(),"linkToProfile"===this.widgetSettings.onPostClick&&this.feedMetadata.username&&(o=`https://instagram.com/${this.feedMetadata.username}`),"customLink"===this.widgetSettings.onPostClick&&this.widgetSettings.customLinkURL&&(o=this.widgetSettings?.customLinkURL),this.widgetSettings.onPostClick.toLowerCase().includes("link")&&(e="a"),this.widgetSettings.onPostClick.toLowerCase().includes("popup")&&(e="button");let s=null;if("showCaption"===this.widgetSettings.onHover){const t=i({contents:this.post.prunedCaption?.length?this.post.prunedCaption:this.post.caption,classes:"post-caption__inner"});s=i({contents:t,classes:"post-caption"})}let a="image";switch(this.post?.mediaType){case"VIDEO":a=this.post.isReel?"reel":"video";break;case"CAROUSEL_ALBUM":a="album";break;default:a="image"}this.t=i({type:e,contents:[t,s||""],attributes:{draggable:"false","aria-label":`${a}, post ${this.index+1} of ${this.totalPosts}`,tabindex:-1,..."a"===e?{href:o,target:this.widgetSettings.linkTarget}:{}},listeners:{..."button"===e?{click:this.h}:{}}}),this.beholdReplaceChildren(this.t)}hideBackground(){this.backgroundIsHidden=!0,this.previewLoadingColors||(this.style.backgroundColor="transparent")}p(){const t=function(t,e,o,s){let i="";switch(t){case"dominant":case"vibrant":case"muted":case"vibrantLight":case"mutedLight":case"vibrantDark":case"mutedDark":i=e?`rgb(${e[t]})`:m(s);break;case"tone":if(o){const t=o.split(",");if(e){const o=(a=d(e.dominant)[2]-s[2],Math.log(Math.abs(a))/Math.log(1.6)*Math.sign(a));i=`hsl(${t[0]},${t[1]}%,${parseInt(t[2])+o}%)`}else i=`hsl(${t[0]},${t[1]}%,${t[2]}%, ${Math.max(1*Math.random(),.3)})`}else i=m(s)}var a;return i}(this.previewLoadingColors?this.previewLoadingColors:this.widgetSettings.loadingColor,this.post.colorPalette,this.widgetSettings.loadingColorTone,this.medianPaletteHSL);this.backgroundColor=t,s(this,{"--post-background-color":t})}l(t){const o=t?.borderBoxSize?.[0]?.inlineSize||t?.contentRect?.width||0;s(this,{"--post-width":o+"px","--post-height":(t?.borderBoxSize?.[0]?.blockSize||t?.contentRect?.height||0)+"px"});let i="xlarge";o<600&&(i="large"),o<400&&(i="medium"),o<250&&(i="small"),o<175&&(i="xsmall"),["xsmall","small","medium","large","xlarge"].forEach(t=>{e(this,{[`post--${t}`]:t===i})})}h(){this.onClick&&this.onClick(this)}focus(){this.t.focus()}}class u extends t{label="Image";sizes;mediaUrl;aspectRatio;showLoader=!1;lazy=!0;u;k;G={isLoaded:!1,isVisible:!1,didError:!1,shouldPreload:!1,loaderIsShowing:!1,imageSrc:null,sizeObj:null};F;constructor(){super(),this.onPropChange(this._,["sizes","mediaUrl","aspectRatio","showLoader"],["sizes","mediaUrl","aspectRatio"]),this.onLocalStateChange(this.P,this.G),this.C=this.C.bind(this),this.L=this.L.bind(this),this.S=this.S.bind(this),this.F=a(this.l,50,this),this.preload=this.preload.bind(this),this.onConnect(()=>{const t=this.aspectRatio?300:this.sizes?.full.height??300,e=this.aspectRatio?300*this.aspectRatio:this.sizes?.full.width??300;this.style.aspectRatio=this.aspectRatio?`${this.aspectRatio}`:`${e}/${t}`;let o=this.sizes?.full.height?r(e,t):this.mediaUrl??r(e,t);this.u=i({type:"img",attributes:{alt:"",role:"presentation",height:t+"px",width:e+"px",tabindex:-1,src:o,draggable:"false"},listeners:{load:this.L,error:this.S}}),this.showLoader?(this.k=i({classes:"ldr"}),this.beholdReplaceChildren(this.k,this.u)):this.beholdReplaceChildren(this.u),this.lazy||this.preload(),h(),this.raf(()=>{this.onResize(this,this,this.F),this.onIntersection(this,this.C)},"connect")}),this.onDisconnect(()=>{this.updateLocalState({isVisible:!1,isLoaded:!1}),this.u&&(this.u.removeEventListener("load",this.L),this.u.removeEventListener("error",this.S))})}_({changedProp:t,oldValue:e,newValue:o}){switch(t){case"showLoader":!e&&o&&this.u&&(this.k=i({classes:"ldr"}),this.beholdReplaceChildren(this.k,this.u));break;case"sizes":if(n(e,o))return;this.updateLocalState({isLoaded:!1,sizeObj:this.u?.isConnected?this.M(this.offsetWidth,this.offsetHeight):null})}}P({changedProps:t,newState:o}){if(t.includes("loaderIsShowing")&&this.k&&e(this.k,{"ldr--visible":o.loaderIsShowing&&!o.isLoaded}),t.includes("imageSrc")&&this.u&&(o.isVisible||o.shouldPreload)&&o.imageSrc!==this.u.src&&(this.u.src=o.imageSrc),t.includes("sizeObj")&&!o.didError){const t=this.mediaUrl;this.updateLocalState({imageSrc:o.sizeObj?.mediaUrl??t})}}C(t){t.isIntersecting?(this.updateLocalState({isVisible:!0}),!this.localState.isLoaded&&this.showLoader&&this.to(()=>{this.updateLocalState({loaderIsShowing:!0})},50,"loader"),this.localState.imageSrc&&this.u.src!==this.localState.imageSrc&&(this.u.src=this.localState.imageSrc)):this.updateLocalState({isVisible:!1})}l(t){let e=t.borderBoxSize?t.borderBoxSize[0].inlineSize:t.contentRect.width||0,o=t.borderBoxSize?t.borderBoxSize[0].blockSize:t.contentRect.height||0;const s=this.M(e,o);(!this.localState.sizeObj?.width||this.localState.sizeObj?.width<s?.width||this.localState.sizeObj?.height<s?.height)&&this.updateLocalState({sizeObj:s})}L(){this.u.src!==this.localState.imageSrc&&!this.localState.shouldPreload&&this.sizes?.full.height||(this.cancelTo("loader"),this.updateLocalState({isLoaded:!0,loaderIsShowing:!1}),this.dispatchEvent(new Event("load")),this.classList.add("is-loaded"))}S(){this.localState.imageSrc===this.mediaUrl||this.localState.didError||(this.updateLocalState({didError:!0}),this.updateLocalState({imageSrc:this.mediaUrl}))}M(t,e){if(this.sizes)return this.sizes?Object.values(this.sizes).reduce(function(o,s){return Math.abs(s.width/2-t)<Math.abs(o.width/2-t)||Math.abs(s.height/2-e)<Math.abs(o.height/2-e)?s:o}):null}preload(){this.localState.isLoaded||(this.localState.imageSrc&&this.localState.sizeObj&&this.u.src!==this.localState.imageSrc?this.u.src=this.localState.imageSrc:this.updateLocalState({shouldPreload:!0}))}static register(t="behold-image"){return customElements.get(t)||customElements.define(t,u),t}}class g extends v{label="ImagePost";u;constructor(){super(),u.register(),this.onPropChange(this._,["post","widgetSettings","aspectRatio"],null,this.R)}_({changedProp:t,oldValue:e,newValue:s}){switch(t){case"widgetSettings":o(s,e,["onHover","onPostClick"])&&this.R();break;case"post":case"aspectRatio":this.R()}}R(){this.cancelTo("imageLoad");const{sizes:t,mediaUrl:e}=this.post;this.u=i({type:"behold-image",props:{sizes:t,mediaUrl:e,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0}}),this.u.addEventListener("load",t=>{this.to(this.hideBackground,600,"imageLoad")}),this.renderPost(this.u)}static register(t="behold-image-post"){return customElements.get(t)||customElements.define(t,g),t}}class y extends t{label="Video";mediaUrl;sizes;autoplay;aspectRatio;lazy=!0;renderPlaceholder;B;V;$;u;constructor(){super(),this.B=this.autoplay||!1,this.V=!1,this.j=this.j.bind(this),this.C=this.C.bind(this),this.U=this.U.bind(this),this.I=this.I.bind(this),this.H=this.H.bind(this),this.O=this.O.bind(this),this.T=this.T.bind(this),this.preload=this.preload.bind(this),this.A=this.A.bind(this),this.onPropChange(({changedProp:t,newValue:e})=>{this.localState.shouldPreload&&this.mediaUrl&&l("video",this.mediaUrl),"autoplay"===t&&(e?this.play():this.pause())},["mediaUrl","sizes","autoplay","aspectRatio","renderPlaceholder"],["mediaUrl","sizes","renderPlaceholder"]),this.onLocalStateChange(()=>{},{isMuted:!0,isLoaded:!1,shouldPreload:!1}),this.onConnect(()=>{document.addEventListener("visibilitychange",this.H),this.onLoop(this.j,15),this.onIntersection(this,this.C),this.render()}),this.onDisconnect(()=>{document.removeEventListener("visibilitychange",this.H),this.$&&(this.$.removeEventListener("play",this.O),this.$.removeEventListener("pause",this.T),this.$.removeEventListener("loadeddata",this.U))})}get isPlaying(){return this.B||!1}get Y(){return!!(this.$.currentTime>0&&!this.$.paused&&!this.$.ended&&this.$.readyState>2)}get paused(){return this.$?.paused}get muted(){return this.$?.muted}get isLoaded(){return this.localState.isLoaded}render(){this.$=i({type:"video",attributes:{loop:!0,playsinline:!0,crossorigin:"anonymous",tabIndex:-1,disablePictureInPicture:!0,disableremoteplayback:!0,height:this.sizes?.full.height||100,width:this.sizes?.full.width||100},props:{muted:this.localState.isMuted,autoplay:this.autoplay||!1},listeners:{play:this.O,pause:this.T,error:this.I}}),this.renderPlaceholder&&(this.u=i({type:"img",attributes:{height:this.sizes.full.height,width:this.sizes.full.width,src:r(this.sizes.full.width,this.sizes.full.height)}}),this.beholdReplaceChildren(this.u)),this.lazy||this.A()}async j(){if(this.$&&this.isLoaded){if(!this.V&&this.B&&!this.Y)try{this.V=!0,await this.$.play(),this.V=!1}catch(t){this.V=!1}!this.B&&this.Y&&(this.$.pause(),this.V=!1)}}A(){this.$?this.$.src!==this.mediaUrl&&(this.$.addEventListener("loadeddata",this.U,{once:!0}),this.$.src=this.mediaUrl,this.$.load()):this.autoplay||this.pause()}C(t){t.isIntersecting&&this.$?this.$.src!==this.mediaUrl&&(this.$.addEventListener("loadeddata",this.U,{once:!0}),this.$.src=this.mediaUrl,this.$.load()):this.autoplay||this.pause()}U(){this.updateLocalState({isLoaded:!0}),this.autoplay||(this.$.currentTime=.25,this.$.pause()),this.dispatchEvent(new Event("load")),this.beholdReplaceChildren(this.$),h(),this.raf(()=>{this.classList.add("is-loaded")},"_handleVideoLoad")}I(){this.dispatchEvent(new Event("error"))}O(){this.dispatchEvent(new Event("play"))}T(){this.dispatchEvent(new Event("pause"))}play(){this.B=!0}pause(){this.B=!1}mute(){this.updateLocalState({isMuted:!0}),this.$&&(this.$.muted=!0)}unmute(){this.updateLocalState({isMuted:!1}),this.$&&(this.$.muted=!1)}H(){document.hidden&&(this.pause(),this.$&&this.$.pause()),!document.hidden&&this.autoplay&&this.play()}preload(){!this.localState.isLoaded&&this.mediaUrl?l("video",this.mediaUrl):this.updateLocalState({shouldPreload:!0})}static register(t="behold-video"){return customElements.get(t)||customElements.define(t,y),t}}class w extends v{label="VideoPost";D;$;u;constructor(){super(),this.onPropChange(this._,["post","widgetSettings","aspectRatio"],null,this.R),y.register(),u.register(),this.W=this.W.bind(this),this.K=this.K.bind(this),this.onDisconnect(()=>{this.removeEventListener("mouseover",this.W),this.removeEventListener("mouseleave",this.K)})}_({changedProp:t,oldValue:e,newValue:s}){switch(t){case"widgetSettings":o(e,s,["onHover","onPostClick","previewVideosOnHover","autoplayVideos"])&&this.R();break;case"post":case"aspectRatio":this.R()}}W(){this.widgetSettings.previewVideosOnHover&&this.$&&(this.u?.remove(),this.$?.play())}K(){this.widgetSettings.autoplayVideos||this.$?.pause()}R(){this.cancelTo("mediaLoad");const{sizes:t,mediaUrl:e,thumbnailUrl:o}=this.post;this.D=document.createDocumentFragment(),(this.widgetSettings.previewVideosOnHover||this.widgetSettings.autoplayVideos)&&e||!t.full.mediaUrl&&!o&&e?(this.u=this.widgetSettings.autoplayVideos?null:i({type:"behold-image",classes:"video-thumbnail",props:{sizes:t,mediaUrl:o,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0},listeners:{mouseover:this.W,mouseleave:this.K}}),this.$=i({type:"behold-video",style:{visibility:this.widgetSettings.autoplayVideos?"":"hidden"},props:{mediaUrl:e,sizes:t,autoplay:this.widgetSettings.autoplayVideos,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),renderPlaceholder:!1,lazy:this.widgetSettings.lazyLoadMedia??!0},listeners:{mouseover:this.W,mouseleave:this.K}}),this.$.addEventListener("load",()=>{this.to(()=>{this.hideBackground(),this.$.style.visibility=""},600,"mediaLoad")}),this.$.addEventListener("error",()=>{this.raf(()=>{this.u=i({type:"behold-image",props:{sizes:t,mediaUrl:o,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0}}),this.u.addEventListener("load",()=>{this.to(this.hideBackground,600,"mediaLoad")}),this.renderPost(this.u)},"mediaError")}),this.u?this.D.beholdReplaceChildren(this.$,this.u):this.D.beholdReplaceChildren(this.$),this.renderPost(this.D)):(this.u=i({type:"behold-image",props:{sizes:t,mediaUrl:o,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0}}),this.u.addEventListener("load",()=>{this.to(this.hideBackground,600,"mediaLoad")}),this.renderPost(this.u))}static register(t="behold-video-post"){return customElements.get(t)||customElements.define(t,w),t}}class z extends v{label="AlbumPost";N;constructor(){super(),u.register(),y.register(),this.onPropChange(this._,["post","widgetSettings"],null,this.R)}_({changedProp:t,oldValue:e,newValue:s}){switch(t){case"widgetSettings":o(s,e,["onHover","onPostClick"])&&this.R();break;case"post":case"aspectRatio":this.R()}}R(){this.cancelTo("mediaLoad");let{sizes:t,mediaUrl:e,children:o}=this.post;if(!t.full.mediaUrl&&!e){const s=o.reduce((t,e)=>"VIDEO"===e.mediaType?e.sizes.full.mediaUrl||e.thumbnailUrl?e:t:e.sizes.full.mediaUrl||e.mediaUrl?e:t);t=s.sizes,e=s.thumbnailUrl??s.mediaUrl}this.post.mediaUrlIsVideo?this.N=i({type:"behold-video",props:{sizes:t,mediaUrl:e,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),renderPlaceholder:!1,lazy:this.widgetSettings.lazyLoadMedia??!0}}):this.N=i({type:"behold-image",props:{sizes:t,mediaUrl:e,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0}}),this.N.addEventListener("load",()=>{this.to(this.hideBackground,600,"mediaLoad")}),this.renderPost(this.N)}static register(t="behold-album-post"){return customElements.get(t)||customElements.define(t,z),t}}var x=":host{--post-border-radius:0;--post-aspect-ratio:1;--icon-instagram:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 35 35' xml:space='preserve'%3E%3Cpath fill='%23FFF' d='M17.6 3.2c4.7 0 5.2 0 7.1.1 1.7.1 2.6.4 3.2.6.8.3 1.4.7 2 1.3.6.6 1 1.2 1.3 2 .2.6.5 1.5.6 3.3.1 1.8.1 2.4.1 7.1s0 5.2-.1 7.1c-.1 1.7-.4 2.6-.6 3.2-.6 1.5-1.8 2.7-3.3 3.3-.6.2-1.5.5-3.2.6-1.8.1-2.4.1-7.1.1s-5.2 0-7.1-.1c-1.7-.1-2.6-.4-3.2-.6-.8-.3-1.4-.7-2-1.3-.6-.6-1-1.2-1.3-2-.2-.6-.5-1.5-.6-3.2-.1-1.8-.1-2.4-.1-7.1s0-5.2.1-7.1c0-1.8.3-2.7.6-3.3.3-.8.7-1.4 1.3-2 .6-.6 1.2-1 2-1.3.6-.2 1.5-.5 3.2-.6 1.9-.1 2.4-.1 7.1-.1m0-3.2c-4.8 0-5.3 0-7.2.1-1.9.1-3.2.4-4.3.8C5 1.4 3.9 2 3 2.9c-.9.9-1.5 2-2 3.1C.6 7.1.3 8.4.2 10.2c-.1 1.9-.1 2.5-.1 7.2s0 5.3.1 7.2c.1 2 .4 3.2.8 4.4.4 1.2 1.1 2.2 2 3.1.9.9 1.9 1.6 3.1 2 1.1.4 2.4.7 4.2.8s2.5.1 7.2.1 5.3 0 7.2-.1c1.9-.1 3.1-.4 4.2-.8 2.3-.9 4.2-2.8 5.1-5.1.4-1.1.7-2.4.8-4.2.1-1.9.1-2.5.1-7.2s0-5.3-.1-7.2c-.1-1.9-.4-3.1-.8-4.2-.4-1.2-1.1-2.2-2-3.1-.9-.9-1.9-1.6-3.1-2-1.1-.4-2.4-.7-4.2-.8-1.8-.3-2.4-.3-7.1-.3z'/%3E%3Cpath fill='%23FFF' d='M17.6 8.5c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 14.8c-3.2 0-5.8-2.6-5.8-5.8s2.6-5.8 5.8-5.8 5.8 2.6 5.8 5.8-2.6 5.8-5.8 5.8z'/%3E%3Ccircle fill='%23FFF' cx='26.9' cy='8.2' r='2.1'/%3E%3C/svg%3E\");--icon-video:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 35 35' xml:space='preserve'%3E%3Cpath fill='%23FFF' d='M30.1 15.5 7.2 2.3c-1.5-.9-3.5.2-3.5 1.9v26.5c0 1.7 1.9 2.9 3.4 1.9L30 19.4c1.7-.8 1.7-3 .1-3.9z'/%3E%3C/svg%3E\");--icon-album:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 35 35' xml:space='preserve'%3E%3Cpath fill='%23FFF' d='M27.3 22.7v-17c0-2.6-2.1-4.7-4.7-4.7H5.7C3.1 1 1 3.1 1 5.7v17c0 2.6 2.1 4.7 4.7 4.7h17c2.5-.1 4.6-2.2 4.6-4.7zm4-13.4v14.6c0 4.1-3.4 7.4-7.4 7.4H9.2c-.5 0-.8.6-.5 1 .9 1 2.2 1.6 3.7 1.6h12.1c5.2 0 9.3-4.2 9.3-9.3V12.5c0-1.5-.6-2.8-1.6-3.7-.3-.4-.9 0-.9.5z'/%3E%3C/svg%3E\");align-items:center;border:none;box-shadow:none;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:center;margin:0;min-width:50px;outline:none;position:relative;width:100%}:host *{box-sizing:border-box}:host(.keyboard-nav.has-focus){outline:none}:host(.keyboard-nav.has-focus):before{background-color:rgba(0,0,0,.25);border-radius:6px;content:\"\";display:block;height:100%;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%;z-index:1}:host(.keyboard-nav.has-focus):after{background-color:#222;border-radius:6px;box-shadow:0 0 0 2px #4169e1,0 0 0 3px #fff,0 .6px .4px rgba(0,0,0,.042),0 1.3px 1px rgba(0,0,0,.061),0 2.5px 1.9px rgba(0,0,0,.075),0 4.5px 3.4px rgba(0,0,0,.089),0 8.4px 6.3px rgba(0,0,0,.108),0 20px 15px rgba(0,0,0,.15);color:#fff;content:\"Shift + arrow keys to navigate posts\";font-family:sans-serif;font-size:16px;max-width:80%;padding:15px;position:absolute;text-align:center;z-index:1}@media (max-width:1300px){:host(.keyboard-nav.has-focus):after{font-size:15px}}:host(.keyboard-nav.has-focus) .posts{opacity:.65}behold-branding{--br:100px!important;--color:#1a1a1a!important;--bg:#fff!important;--dur:0.2s!important;border-radius:var(--br)!important;bottom:10px!important;display:flex!important;position:absolute!important;right:10px!important;z-index:999!important}@media (hover:hover){behold-branding:hover{--bg:#1a1a1a!important;--color:#fff!important}}behold-branding a{align-items:center!important;background:var(--bg)!important;border:none!important;border-radius:var(--br)!important;box-shadow:0 0 0 1px #1a1a1a,1px 1px 1px rgba(0,0,0,.08),2px 1.25px 1.25px rgba(0,0,0,.06),3px 2.5px 2.5px rgba(0,0,0,.04),5px 5px 5px rgba(0,0,0,.02)!important;display:flex!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif!important;height:27px!important;justify-content:center!important;letter-spacing:.01em!important;margin:0!important;opacity:0!important;padding:0 1px 0 0!important;pointer-events:all!important;text-decoration:none!important;transform:translateY(8px)!important;transition:all .3s ease!important;visibility:visible!important;width:157px!important}behold-branding a,behold-branding a:before{color:var(--color)!important;line-height:1!important}behold-branding a:before{content:\"Made with\"!important;font-size:10px!important;margin-right:7px!important;transition:all var(--dur) ease!important;white-space:no-wrap!important}behold-branding a:after{background:transparent!important;content:\"\"!important;height:47px!important;left:-10px;position:absolute;top:-10px;width:179px!important}behold-branding svg{border:none!important;display:block!important;height:11px!important;margin:0!important;opacity:1!important;padding:0!important;visibility:visible!important;width:auto!important}behold-branding svg path{fill:var(--color)!important;transition:all var(--dur) ease!important}.posts{display:grid;margin:0;max-width:100%;padding:0;width:100%}.post{-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;align-self:stretch;border:none;border-radius:var(--post-border-radius) /calc(var(--post-border-radius)*var(--post-aspect-ratio));color:inherit;font:inherit;isolation:isolate;line-height:normal;margin:0 0 -1px;overflow:hidden;transform:translateZ(0);transition:background .3s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:calc(100% + .5px)}:host(.keyboard-nav) .post.post:focus-within{box-shadow:0 0 0 1px #fff,0 0 0 3px #4169e1,0 0 0 4px #fff;z-index:1}:host(.is-previewing-loading-colors) .post *{opacity:0}.post.post--has-row-gap,.post.post--last-row{margin:0}.post:before{background-color:transparent;border-radius:var(--post-border-radius) /calc(var(--post-border-radius)*var(--post-aspect-ratio));content:\"\";height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:all 2s cubic-bezier(.215,.61,.355,1);width:100%;z-index:2}@supports (backdrop-filter:blur(3px)){[data-hover-effect*=blur i] .post:before{height:calc(100% - 1px);left:0;opacity:0;top:0;transition:all .6s cubic-bezier(.215,.61,.355,1);width:100%}}.post.post--hover-icon:after{background-image:var(--icon);background-position:50%;background-repeat:no-repeat;background-size:auto 100%;border-radius:var(--post-border-radius) /calc(var(--post-border-radius)*var(--post-aspect-ratio));content:\"\";height:12%;height:calc(min(var(--post-width), var(--post-height))*.12);left:0;max-height:30px;min-height:20px;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%) scale(.75);transition:all .6s cubic-bezier(.215,.61,.355,1);width:100%;will-change:transform;z-index:3}@media (prefers-reduced-motion){.post.post--hover-icon:after{transition:none}}.post>a,.post>button,.post>div{background-color:transparent;border:0;box-shadow:none;color:inherit;display:block;font:inherit;height:100%;line-height:inherit;outline:none;padding:0;transition:opacity .3s ease;width:100%}.post a,.post button{cursor:pointer}behold-image-post{--icon:var(--icon-instagram);--post-background-color:transparent}behold-image-post,behold-video-post{background-color:var(--post-background-color)}behold-video-post{--icon:var(--icon-video);--post-background-color:transparent}behold-video-post .video-thumbnail{height:100%;left:0;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;position:absolute;top:0;width:100%}behold-album-post{--icon:var(--icon-album);--post-background-color:transparent;background-color:var(--post-background-color)}.post-caption{align-items:center;background-color:var(--overlay-color);display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:15px;height:100%;justify-content:center;left:0;line-height:1.5;opacity:0;padding:15%;pointer-events:none;position:absolute;top:0;transition:opacity .4s ease;width:100%;z-index:2}.post:hover .post-caption,:host(:host(.keyboard-nav)) .post:focus-within .post-caption{opacity:1}.post--xlarge .post-caption{--lines:12;--innerScale:scale(0.98);padding:20%}.post--large .post-caption{--lines:9;--innerScale:scale(0.98)}.post--medium .post-caption{--lines:6;--innerScale:scale(0.97);font-size:14px}.post--small .post-caption{--lines:4;--innerScale:scale(0.95);font-size:13px;line-height:1.25}.post--xsmall .post-caption{--lines:3;--innerScale:scale(0.95);font-size:12px;line-height:1.25}.post-caption__inner{line-clamp:var(--lines);-webkit-line-clamp:var(--lines);-webkit-box-orient:vertical;color:#fff;display:-webkit-box;opacity:0;overflow:hidden;text-align:center;transform:var(--innerScale);transition:all .3s ease;white-space:pre-line;will-change:transform,opacity;word-break:none}@media (prefers-reduced-motion){.post-caption__inner{transform:none}}.post:hover .post-caption__inner,:host(.keyboard-nav) .post:focus-within .post-caption__inner{opacity:1;transform:none;transition:all .3s ease}:host(.keyboard-nav) .post:focus-within:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) .post:focus-within:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=fade] .post:focus-within:before,[data-hover-effect=fade] .post:hover:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=fade] .post:focus-within:after,[data-hover-effect=fade] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within behold-image img,:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within behold-video video,[data-hover-effect=zoomFade] .post:hover behold-image img,[data-hover-effect=zoomFade] .post:hover behold-video video{transform:scale(1.05)}@media (prefers-reduced-motion){:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within behold-image img,:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within behold-video video,[data-hover-effect=zoomFade] .post:hover behold-image img,[data-hover-effect=zoomFade] .post:hover behold-video video{transform:none}}:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within:before,[data-hover-effect=zoomFade] .post:hover:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within:after,[data-hover-effect=zoomFade] .post:hover:after{opacity:1;transform:translateY(-50%)}@supports not (backdrop-filter:blur(3px)){:host(.keyboard-nav) [data-hover-effect=blur] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=blur] .post:focus-within behold-video,[data-hover-effect=blur] .post:hover behold-image,[data-hover-effect=blur] .post:hover behold-video{filter:brightness(97%) blur(3px);transition:all .6s cubic-bezier(.215,.61,.355,1)}}@supports (backdrop-filter:blur(3px)){:host(.keyboard-nav) [data-hover-effect=blur] .post:focus-within:before,[data-hover-effect=blur] .post:hover:before{backdrop-filter:blur(3px);background-color:rgba(0,0,0,.002);opacity:1}}:host(.keyboard-nav) [data-hover-effect=blur] .post:focus-within:after,[data-hover-effect=blur] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-video,[data-hover-effect=zoomBlur] .post:hover behold-image,[data-hover-effect=zoomBlur] .post:hover behold-video{transform:scale(1.05);transition:all .6s cubic-bezier(.215,.61,.355,1)}@media (prefers-reduced-motion){:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-video,[data-hover-effect=zoomBlur] .post:hover behold-image,[data-hover-effect=zoomBlur] .post:hover behold-video{transform:none}}@supports not (backdrop-filter:blur(3px)){:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-video,[data-hover-effect=zoomBlur] .post:hover behold-image,[data-hover-effect=zoomBlur] .post:hover behold-video{filter:brightness(97%) blur(3px)}}@supports (backdrop-filter:blur(3px)){:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within:before,[data-hover-effect=zoomBlur] .post:hover:before{backdrop-filter:blur(3px);background-color:rgba(0,0,0,.002);opacity:1}}:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within:after,[data-hover-effect=zoomBlur] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=toGreyscale] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=toGreyscale] .post:focus-within behold-video,[data-hover-effect=toGreyscale] .post:hover behold-image,[data-hover-effect=toGreyscale] .post:hover behold-video{filter:grayscale(100%);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=toGreyscale] .post:focus-within:after,[data-hover-effect=toGreyscale] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within behold-video,[data-hover-effect=zoomToGreyscale] .post:hover behold-image,[data-hover-effect=zoomToGreyscale] .post:hover behold-video{filter:grayscale(100%);transform:scale(1.05);transition:all .6s cubic-bezier(.215,.61,.355,1)}@media (prefers-reduced-motion){:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within behold-video,[data-hover-effect=zoomToGreyscale] .post:hover behold-image,[data-hover-effect=zoomToGreyscale] .post:hover behold-video{transform:none}}:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within:after,[data-hover-effect=zoomToGreyscale] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post,[data-hover-effect=fromGreyscale] .post{filter:grayscale(100%)}:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:focus,:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:hover,[data-hover-effect=fromGreyscale] .post:focus,[data-hover-effect=fromGreyscale] .post:hover{filter:grayscale(0);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:focus.post--hover-caption:before,:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:hover.post--hover-caption:before,[data-hover-effect=fromGreyscale] .post:focus.post--hover-caption:before,[data-hover-effect=fromGreyscale] .post:hover.post--hover-caption:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:focus:after,:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:hover:after,[data-hover-effect=fromGreyscale] .post:focus:after,[data-hover-effect=fromGreyscale] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post,[data-hover-effect=zoomFromGreyscale] .post{filter:grayscale(100%)}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover,[data-hover-effect=zoomFromGreyscale] .post:focus,[data-hover-effect=zoomFromGreyscale] .post:hover{filter:grayscale(0)}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus behold-image,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus behold-video,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover behold-image,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover behold-video,[data-hover-effect=zoomFromGreyscale] .post:focus behold-image,[data-hover-effect=zoomFromGreyscale] .post:focus behold-video,[data-hover-effect=zoomFromGreyscale] .post:hover behold-image,[data-hover-effect=zoomFromGreyscale] .post:hover behold-video{transform:scale(1.05);transition:all .6s cubic-bezier(.215,.61,.355,1)}@media (prefers-reduced-motion){:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus behold-image,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus behold-video,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover behold-image,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover behold-video,[data-hover-effect=zoomFromGreyscale] .post:focus behold-image,[data-hover-effect=zoomFromGreyscale] .post:focus behold-video,[data-hover-effect=zoomFromGreyscale] .post:hover behold-image,[data-hover-effect=zoomFromGreyscale] .post:hover behold-video{transform:none}}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus.post--hover-caption:before,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover.post--hover-caption:before,[data-hover-effect=zoomFromGreyscale] .post:focus.post--hover-caption:before,[data-hover-effect=zoomFromGreyscale] .post:hover.post--hover-caption:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus:after,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover:after,[data-hover-effect=zoomFromGreyscale] .post:focus:after,[data-hover-effect=zoomFromGreyscale] .post:hover:after{opacity:1;transform:translateY(-50%)}behold-image{display:block;height:0;min-height:100%;overflow:hidden;padding:0;padding-bottom:calc(100%/var(--post-aspect-ratio));position:relative;transition:all .6s cubic-bezier(.215,.61,.355,1);width:100%}behold-image img{border-radius:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;-o-object-position:center center;object-position:center center;opacity:0;pointer-events:none;position:absolute;top:0;transition:all .6s cubic-bezier(.215,.61,.355,1),opacity .6s ease;vertical-align:middle;width:100%;will-change:transform;z-index:1}@supports not (backdrop-filter:blur(3px)){[data-hover-effect=blur] behold-image img,[data-hover-effect=zoomBlur] behold-image img{height:calc(100% + 6px);left:-3px;top:-3px;width:calc(100% + 6px)}}.post--reel behold-image img{-o-object-position:center 25%;object-position:center 25%}behold-image.is-loaded img{opacity:1}behold-video{display:block;height:0;min-height:100%;overflow:hidden;padding:0;padding-bottom:calc(100%/var(--post-aspect-ratio));position:relative;transition:all .6s cubic-bezier(.215,.61,.355,1);width:100%}behold-video video{height:100%;left:0;-o-object-fit:cover;object-fit:cover;-o-object-position:center center;object-position:center center;opacity:0;pointer-events:none;position:absolute;top:0;transition:all .6s cubic-bezier(.215,.61,.355,1),opacity .6s ease;vertical-align:middle;width:100%;will-change:transform}.post--reel behold-video video{-o-object-position:center 25%;object-position:center 25%}behold-video.is-loaded video{opacity:1}";export{z as A,b as B,g as I,d as R,w as V,y as a,u as b,x as c,c as g};
1
+ import{B as t,a as e,h as o,s,c as i,t as a,b as r,f as h,i as n,e as l}from"./index-UzP-A0W0.js";function d(t){if(!t)return t;let[e,o,s]=t.split(",");e/=255,o/=255,s/=255;const i=Math.max(e,o,s),a=i-Math.min(e,o,s),r=a?i===e?(o-s)/a:i===o?2+(s-e)/a:4+(e-o)/a:0;return[60*r<0?60*r+360:60*r,100*(a?i<=.5?a/(2*i-a):a/(2-(2*i-a)):0),100*(2*i-a)/2]}function c(t,e){const o=(s=t,i=e="tone"===e?"dominant":e,s.filter(t=>t[i]).map(t=>t[i])).map(t=>d(t).join(","));var s,i;return[p(f(o,0)),p(f(o,1)),p(f(o,2))]}function p(t){const e=[...t];e.sort(function(t,e){return t-e});const o=Math.floor((e.length-1)/2);return e.length%2?e[o]:(e[o]+e[o+1])/2}function f(t,e){return t.map(t=>parseInt(t.split(",")[e]))}class b extends t{label="BaseWidget";shadow;styleEl;contents;stylesAdded;constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),this.handleKeydown=this.handleKeydown.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleFocusout=this.handleFocusout.bind(this),this.handleShadowFocusout=this.handleShadowFocusout.bind(this),this.onGlobalStateChange(()=>{e(this,{"keyboard-nav":this.globalState.keyboardNavEnabled})}),this.onConnect(()=>{this.styleEl=document.createElement("style"),e(this,{"keyboard-nav":this.globalState.keyboardNavEnabled}),this.addEventListener("focus",this.handleFocus),this.addEventListener("focusout",this.handleFocusout),this.shadow.addEventListener("focusout",this.handleShadowFocusout),this.addEventListener("keydown",this.handleKeydown)})}focusPreviousPost(){this.dispatchEvent(new CustomEvent("post-focus-previous"))}focusNextPost(){this.dispatchEvent(new CustomEvent("post-focus-next"))}handleKeydown(t){"ArrowLeft"===t.key&&t.shiftKey&&this.focusPreviousPost(),"ArrowRight"===t.key&&t.shiftKey&&this.focusNextPost(),this.shadow.activeElement&&this.classList.remove("has-focus")}handleFocus(t){this.shadow.activeElement||this.classList.add("has-focus")}handleFocusout(){this.classList.remove("has-focus")}handleShadowFocusout(t){t.relatedTarget===this&&this.classList.add("has-focus")}renderWidget(t,e){this.stylesAdded&&this.contents?this.contents.replaceWith(t):(this.contents=t,this.styleEl.beholdReplaceChildren(...e.map(t=>t.toString())),this.shadow.beholdReplaceChildren(this.contents,this.styleEl),this.stylesAdded=!0)}}function m(t){return t?`hsl(${t[0]}, ${t[1]}%, ${t[2]}%, ${Math.max(1*Math.random(),.3)})`:""}class v extends t{label="BasePost";post;widgetSettings;feedMetadata;medianPaletteHSL;hasRowGap=!1;isLastRow=!1;onClick;previewLoadingColors=null;backgroundIsHidden=!1;backgroundColor;aspectRatio;index;totalPosts;t;o;constructor(){super(),this.onPropChange(this.i,["post","widgetSettings","feedMetadata","medianPaletteHSL","hasRowGap","isLastRow","previewLoadingColors","aspectRatio","index","totalPosts"],["post","widgetSettings","feedMetadata","medianPaletteHSL","index","totalPosts"]),this.h=this.h.bind(this),this.hideBackground=this.hideBackground.bind(this),this.onConnect(()=>{this.onResize(this,this,this.l)})}i({changedProp:t,oldValue:e,newValue:s}){switch(t){case"post":o(s,e,["colorPalette"])&&this.p();break;case"widgetSettings":o(s,e,["loadingColor","loadingColorTone"])&&this.p(),this.t&&o(s,e,["linkTarget"])&&s?.onPostClick?.toLowerCase().includes("link")&&this.t.setAttribute("target",s.linkTarget),this.t&&o(s,e,["customLinkURL"])&&"customLink"===s.onPostClick&&this.t.setAttribute("href",s.customLinkURL),o(s,e,["hoverOverlayColor","hoverOverlayCustomColor","hoverOverlayOpacity"])&&this.m(),this.v();break;case"previewLoadingColors":s?(this.style.backgroundColor="",this.p()):this.backgroundIsHidden&&this.hideBackground();break;case"hasRowGap":case"isLastRow":this.v()}}m(){let t="rgba(0, 0, 0, 0.3)",e=this.widgetSettings.hoverOverlayCustomColor??"0,0,0",o=this.widgetSettings.hoverOverlayOpacity??65;if("auto"===this.widgetSettings.hoverOverlayColor){const e=d(this.post.colorPalette?.dominant||"100,100,100").map(t=>Math.round(t));t=`hsl(${e[0]} ${Math.min(e[1],50)}% ${Math.min(e[2],40)}% / ${o/100})`}if("custom"===this.widgetSettings.hoverOverlayColor){const s=e.split(",");t=`hsl(${s[0]} ${s[1]}% ${s[2]}% / ${o/100})`}s(this,{"--overlay-color":t})}v(){e(this,{post:!0,"post--hover-icon":"showIcon"===this.widgetSettings.onHover,"post--hover-caption":"showCaption"===this.widgetSettings.onHover,"post--has-row-gap":this.hasRowGap,"post--last-row":this.isLastRow}),this.m(),this.p()}renderPost(t){let e="div",o=this.post.permalink;this.v(),"linkToProfile"===this.widgetSettings.onPostClick&&this.feedMetadata.username&&(o=`https://instagram.com/${this.feedMetadata.username}`),"customLink"===this.widgetSettings.onPostClick&&this.widgetSettings.customLinkURL&&(o=this.widgetSettings?.customLinkURL),this.widgetSettings.onPostClick.toLowerCase().includes("link")&&(e="a"),this.widgetSettings.onPostClick.toLowerCase().includes("popup")&&(e="button");let s=null;if("showCaption"===this.widgetSettings.onHover){const t=i({contents:this.post.prunedCaption?.length?this.post.prunedCaption:this.post.caption,classes:"post-caption__inner"});s=i({contents:t,classes:"post-caption"})}let a="image";switch(this.post?.mediaType){case"VIDEO":a=this.post.isReel?"reel":"video";break;case"CAROUSEL_ALBUM":a="album";break;default:a="image"}this.t=i({type:e,contents:[t,s||""],attributes:{draggable:"false","aria-label":`${a}, post ${this.index+1} of ${this.totalPosts}`,tabindex:-1,..."a"===e?{href:o,target:this.widgetSettings.linkTarget}:{}},listeners:{..."button"===e?{click:this.h}:{}}}),this.beholdReplaceChildren(this.t)}hideBackground(){this.backgroundIsHidden=!0,this.previewLoadingColors||(this.style.backgroundColor="transparent")}p(){const t=function(t,e,o,s){let i="";switch(t){case"dominant":case"vibrant":case"muted":case"vibrantLight":case"mutedLight":case"vibrantDark":case"mutedDark":i=e?`rgb(${e[t]})`:m(s);break;case"tone":if(o){const t=o.split(",");if(e){const o=(a=d(e.dominant)[2]-s[2],Math.log(Math.abs(a))/Math.log(1.6)*Math.sign(a));i=`hsl(${t[0]},${t[1]}%,${parseInt(t[2])+o}%)`}else i=`hsl(${t[0]},${t[1]}%,${t[2]}%, ${Math.max(1*Math.random(),.3)})`}else i=m(s)}var a;return i}(this.previewLoadingColors?this.previewLoadingColors:this.widgetSettings.loadingColor,this.post.colorPalette,this.widgetSettings.loadingColorTone,this.medianPaletteHSL);this.backgroundColor=t,s(this,{"--post-background-color":t})}l(t){const o=t?.borderBoxSize?.[0]?.inlineSize||t?.contentRect?.width||0;s(this,{"--post-width":o+"px","--post-height":(t?.borderBoxSize?.[0]?.blockSize||t?.contentRect?.height||0)+"px"});let i="xlarge";o<600&&(i="large"),o<400&&(i="medium"),o<250&&(i="small"),o<175&&(i="xsmall"),["xsmall","small","medium","large","xlarge"].forEach(t=>{e(this,{[`post--${t}`]:t===i})})}h(){this.onClick&&this.onClick(this)}focus(){this.t.focus()}}class u extends t{label="Image";sizes;mediaUrl;aspectRatio;showLoader=!1;lazy=!0;u;k;G={isLoaded:!1,isVisible:!1,didError:!1,shouldPreload:!1,loaderIsShowing:!1,imageSrc:null,sizeObj:null};F;constructor(){super(),this.onPropChange(this._,["sizes","mediaUrl","aspectRatio","showLoader"],["sizes","mediaUrl","aspectRatio"]),this.onLocalStateChange(this.P,this.G),this.C=this.C.bind(this),this.L=this.L.bind(this),this.S=this.S.bind(this),this.F=a(this.l,50,this),this.preload=this.preload.bind(this),this.onConnect(()=>{const t=this.aspectRatio?300:this.sizes?.full.height??300,e=this.aspectRatio?300*this.aspectRatio:this.sizes?.full.width??300;this.style.aspectRatio=this.aspectRatio?`${this.aspectRatio}`:`${e}/${t}`;let o=this.sizes?.full.height?r(e,t):this.mediaUrl??r(e,t);this.u=i({type:"img",attributes:{alt:"",role:"presentation",height:t+"px",width:e+"px",tabindex:-1,src:o,draggable:"false"},listeners:{load:this.L,error:this.S}}),this.showLoader?(this.k=i({classes:"ldr"}),this.beholdReplaceChildren(this.k,this.u)):this.beholdReplaceChildren(this.u),this.lazy||this.preload(),h(),this.raf(()=>{this.onResize(this,this,this.F),this.onIntersection(this,this.C)},"connect")}),this.onDisconnect(()=>{this.updateLocalState({isVisible:!1,isLoaded:!1}),this.u&&(this.u.removeEventListener("load",this.L),this.u.removeEventListener("error",this.S))})}_({changedProp:t,oldValue:e,newValue:o}){switch(t){case"showLoader":!e&&o&&this.u&&(this.k=i({classes:"ldr"}),this.beholdReplaceChildren(this.k,this.u));break;case"sizes":if(n(e,o))return;this.updateLocalState({isLoaded:!1,sizeObj:this.u?.isConnected?this.M(this.offsetWidth,this.offsetHeight):null})}}P({changedProps:t,newState:o}){if(t.includes("loaderIsShowing")&&this.k&&e(this.k,{"ldr--visible":o.loaderIsShowing&&!o.isLoaded}),t.includes("imageSrc")&&this.u&&(o.isVisible||o.shouldPreload)&&o.imageSrc!==this.u.src&&(this.u.src=o.imageSrc),t.includes("sizeObj")&&!o.didError){const t=this.mediaUrl;this.updateLocalState({imageSrc:o.sizeObj?.mediaUrl??t})}}C(t){t.isIntersecting?(this.updateLocalState({isVisible:!0}),!this.localState.isLoaded&&this.showLoader&&this.to(()=>{this.updateLocalState({loaderIsShowing:!0})},50,"loader"),this.localState.imageSrc&&this.u.src!==this.localState.imageSrc&&(this.u.src=this.localState.imageSrc)):this.updateLocalState({isVisible:!1})}l(t){let e=t.borderBoxSize?t.borderBoxSize[0].inlineSize:t.contentRect.width||0,o=t.borderBoxSize?t.borderBoxSize[0].blockSize:t.contentRect.height||0;const s=this.M(e,o);(!this.localState.sizeObj?.width||this.localState.sizeObj?.width<s?.width||this.localState.sizeObj?.height<s?.height)&&this.updateLocalState({sizeObj:s})}L(){this.u.src!==this.localState.imageSrc&&!this.localState.shouldPreload&&this.sizes?.full.height||(this.cancelTo("loader"),this.updateLocalState({isLoaded:!0,loaderIsShowing:!1}),this.dispatchEvent(new Event("load")),this.classList.add("is-loaded"))}S(){this.localState.imageSrc===this.mediaUrl||this.localState.didError||(this.updateLocalState({didError:!0}),this.updateLocalState({imageSrc:this.mediaUrl}))}M(t,e){if(this.sizes)return this.sizes?Object.values(this.sizes).reduce(function(o,s){return Math.abs(s.width/2-t)<Math.abs(o.width/2-t)||Math.abs(s.height/2-e)<Math.abs(o.height/2-e)?s:o}):null}preload(){this.localState.isLoaded||(this.localState.imageSrc&&this.localState.sizeObj&&this.u.src!==this.localState.imageSrc?this.u.src=this.localState.imageSrc:this.updateLocalState({shouldPreload:!0}))}static register(t="behold-image"){return customElements.get(t)||customElements.define(t,u),t}}class g extends v{label="ImagePost";u;constructor(){super(),u.register(),this.onPropChange(this._,["post","widgetSettings","aspectRatio"],null,this.R)}_({changedProp:t,oldValue:e,newValue:s}){switch(t){case"widgetSettings":o(s,e,["onHover","onPostClick"])&&this.R();break;case"post":case"aspectRatio":this.R()}}R(){this.cancelTo("imageLoad");const{sizes:t,mediaUrl:e}=this.post;this.u=i({type:"behold-image",props:{sizes:t,mediaUrl:e,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0}}),this.u.addEventListener("load",t=>{this.to(this.hideBackground,600,"imageLoad")}),this.renderPost(this.u)}static register(t="behold-image-post"){return customElements.get(t)||customElements.define(t,g),t}}class y extends t{label="Video";mediaUrl;sizes;autoplay;aspectRatio;lazy=!0;renderPlaceholder;B;V;$;u;constructor(){super(),this.B=this.autoplay||!1,this.V=!1,this.j=this.j.bind(this),this.C=this.C.bind(this),this.U=this.U.bind(this),this.I=this.I.bind(this),this.H=this.H.bind(this),this.O=this.O.bind(this),this.T=this.T.bind(this),this.preload=this.preload.bind(this),this.A=this.A.bind(this),this.onPropChange(({changedProp:t,newValue:e})=>{this.localState.shouldPreload&&this.mediaUrl&&l("video",this.mediaUrl),"autoplay"===t&&(e?this.play():this.pause())},["mediaUrl","sizes","autoplay","aspectRatio","renderPlaceholder"],["mediaUrl","sizes","renderPlaceholder"]),this.onLocalStateChange(()=>{},{isMuted:!0,isLoaded:!1,shouldPreload:!1}),this.onConnect(()=>{document.addEventListener("visibilitychange",this.H),this.onLoop(this.j,15),this.onIntersection(this,this.C),this.render()}),this.onDisconnect(()=>{document.removeEventListener("visibilitychange",this.H),this.$&&(this.$.removeEventListener("play",this.O),this.$.removeEventListener("pause",this.T),this.$.removeEventListener("loadeddata",this.U))})}get isPlaying(){return this.B||!1}get Y(){return!!(this.$.currentTime>0&&!this.$.paused&&!this.$.ended&&this.$.readyState>2)}get paused(){return this.$?.paused}get muted(){return this.$?.muted}get isLoaded(){return this.localState.isLoaded}render(){this.$=i({type:"video",attributes:{loop:!0,playsinline:!0,crossorigin:"anonymous",tabIndex:-1,disablePictureInPicture:!0,disableremoteplayback:!0,height:this.sizes?.full.height||100,width:this.sizes?.full.width||100},props:{muted:this.localState.isMuted,autoplay:this.autoplay||!1},listeners:{play:this.O,pause:this.T,error:this.I}}),this.renderPlaceholder&&(this.u=i({type:"img",attributes:{height:this.sizes.full.height,width:this.sizes.full.width,src:r(this.sizes.full.width,this.sizes.full.height)}}),this.beholdReplaceChildren(this.u)),this.lazy||this.A()}async j(){if(this.$&&this.isLoaded){if(!this.V&&this.B&&!this.Y)try{this.V=!0,await this.$.play(),this.V=!1}catch(t){this.V=!1}!this.B&&this.Y&&(this.$.pause(),this.V=!1)}}A(){this.$?this.$.src!==this.mediaUrl&&(this.$.addEventListener("loadeddata",this.U,{once:!0}),this.$.src=this.mediaUrl,this.$.load()):this.autoplay||this.pause()}C(t){t.isIntersecting&&this.$?this.$.src!==this.mediaUrl&&(this.$.addEventListener("loadeddata",this.U,{once:!0}),this.$.src=this.mediaUrl,this.$.load()):this.autoplay||this.pause()}U(){this.updateLocalState({isLoaded:!0}),this.autoplay||(this.$.currentTime=.25,this.$.pause()),this.dispatchEvent(new Event("load")),this.beholdReplaceChildren(this.$),h(),this.raf(()=>{this.classList.add("is-loaded")},"_handleVideoLoad")}I(){this.dispatchEvent(new Event("error"))}O(){this.dispatchEvent(new Event("play"))}T(){this.dispatchEvent(new Event("pause"))}play(){this.B=!0}pause(){this.B=!1}mute(){this.updateLocalState({isMuted:!0}),this.$&&(this.$.muted=!0)}unmute(){this.updateLocalState({isMuted:!1}),this.$&&(this.$.muted=!1)}H(){document.hidden&&(this.pause(),this.$&&this.$.pause()),!document.hidden&&this.autoplay&&this.play()}preload(){!this.localState.isLoaded&&this.mediaUrl?l("video",this.mediaUrl):this.updateLocalState({shouldPreload:!0})}static register(t="behold-video"){return customElements.get(t)||customElements.define(t,y),t}}class w extends v{label="VideoPost";D;$;u;constructor(){super(),this.onPropChange(this._,["post","widgetSettings","aspectRatio"],null,this.R),y.register(),u.register(),this.W=this.W.bind(this),this.K=this.K.bind(this),this.onDisconnect(()=>{this.removeEventListener("mouseover",this.W),this.removeEventListener("mouseleave",this.K)})}_({changedProp:t,oldValue:e,newValue:s}){switch(t){case"widgetSettings":o(e,s,["onHover","onPostClick","previewVideosOnHover","autoplayVideos"])&&this.R();break;case"post":case"aspectRatio":this.R()}}W(){this.widgetSettings.previewVideosOnHover&&this.$&&(this.u?.remove(),this.$?.play())}K(){this.widgetSettings.autoplayVideos||this.$?.pause()}R(){this.cancelTo("mediaLoad");const{sizes:t,mediaUrl:e,thumbnailUrl:o}=this.post;this.D=document.createDocumentFragment(),(this.widgetSettings.previewVideosOnHover||this.widgetSettings.autoplayVideos)&&e||!t.full.mediaUrl&&!o&&e?(this.u=this.widgetSettings.autoplayVideos?null:i({type:"behold-image",classes:"video-thumbnail",props:{sizes:t,mediaUrl:o,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0},listeners:{mouseover:this.W,mouseleave:this.K}}),this.$=i({type:"behold-video",style:{visibility:this.widgetSettings.autoplayVideos?"":"hidden"},props:{mediaUrl:e,sizes:t,autoplay:this.widgetSettings.autoplayVideos,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),renderPlaceholder:!1,lazy:this.widgetSettings.lazyLoadMedia??!0},listeners:{mouseover:this.W,mouseleave:this.K}}),this.$.addEventListener("load",()=>{this.to(()=>{this.hideBackground(),this.$.style.visibility=""},600,"mediaLoad")}),this.$.addEventListener("error",()=>{this.raf(()=>{this.u=i({type:"behold-image",props:{sizes:t,mediaUrl:o,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0}}),this.u.addEventListener("load",()=>{this.to(this.hideBackground,600,"mediaLoad")}),this.renderPost(this.u)},"mediaError")}),this.u?this.D.beholdReplaceChildren(this.$,this.u):this.D.beholdReplaceChildren(this.$),this.renderPost(this.D)):(this.u=i({type:"behold-image",props:{sizes:t,mediaUrl:o,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0}}),this.u.addEventListener("load",()=>{this.to(this.hideBackground,600,"mediaLoad")}),this.renderPost(this.u))}static register(t="behold-video-post"){return customElements.get(t)||customElements.define(t,w),t}}class z extends v{label="AlbumPost";N;constructor(){super(),u.register(),y.register(),this.onPropChange(this._,["post","widgetSettings"],null,this.R)}_({changedProp:t,oldValue:e,newValue:s}){switch(t){case"widgetSettings":o(s,e,["onHover","onPostClick"])&&this.R();break;case"post":case"aspectRatio":this.R()}}R(){this.cancelTo("mediaLoad");let{sizes:t,mediaUrl:e,children:o}=this.post;if(!t.full.mediaUrl&&!e){const s=o.reduce((t,e)=>"VIDEO"===e.mediaType?e.sizes.full.mediaUrl||e.thumbnailUrl?e:t:e.sizes.full.mediaUrl||e.mediaUrl?e:t);t=s.sizes,e=s.thumbnailUrl??s.mediaUrl}this.post.mediaUrlIsVideo?this.N=i({type:"behold-video",props:{sizes:t,mediaUrl:e,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),renderPlaceholder:!1,lazy:this.widgetSettings.lazyLoadMedia??!0}}):this.N=i({type:"behold-image",props:{sizes:t,mediaUrl:e,aspectRatio:this.aspectRatio.reduce((t,e)=>t/e),lazy:this.widgetSettings.lazyLoadMedia??!0}}),this.N.addEventListener("load",()=>{this.to(this.hideBackground,600,"mediaLoad")}),this.renderPost(this.N)}static register(t="behold-album-post"){return customElements.get(t)||customElements.define(t,z),t}}var x=":host{--post-border-radius:0;--post-aspect-ratio:1;--icon-instagram:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 35 35' xml:space='preserve'%3E%3Cpath fill='%23FFF' d='M17.6 3.2c4.7 0 5.2 0 7.1.1 1.7.1 2.6.4 3.2.6.8.3 1.4.7 2 1.3.6.6 1 1.2 1.3 2 .2.6.5 1.5.6 3.3.1 1.8.1 2.4.1 7.1s0 5.2-.1 7.1c-.1 1.7-.4 2.6-.6 3.2-.6 1.5-1.8 2.7-3.3 3.3-.6.2-1.5.5-3.2.6-1.8.1-2.4.1-7.1.1s-5.2 0-7.1-.1c-1.7-.1-2.6-.4-3.2-.6-.8-.3-1.4-.7-2-1.3-.6-.6-1-1.2-1.3-2-.2-.6-.5-1.5-.6-3.2-.1-1.8-.1-2.4-.1-7.1s0-5.2.1-7.1c0-1.8.3-2.7.6-3.3.3-.8.7-1.4 1.3-2 .6-.6 1.2-1 2-1.3.6-.2 1.5-.5 3.2-.6 1.9-.1 2.4-.1 7.1-.1m0-3.2c-4.8 0-5.3 0-7.2.1-1.9.1-3.2.4-4.3.8C5 1.4 3.9 2 3 2.9c-.9.9-1.5 2-2 3.1C.6 7.1.3 8.4.2 10.2c-.1 1.9-.1 2.5-.1 7.2s0 5.3.1 7.2c.1 2 .4 3.2.8 4.4.4 1.2 1.1 2.2 2 3.1.9.9 1.9 1.6 3.1 2 1.1.4 2.4.7 4.2.8s2.5.1 7.2.1 5.3 0 7.2-.1c1.9-.1 3.1-.4 4.2-.8 2.3-.9 4.2-2.8 5.1-5.1.4-1.1.7-2.4.8-4.2.1-1.9.1-2.5.1-7.2s0-5.3-.1-7.2c-.1-1.9-.4-3.1-.8-4.2-.4-1.2-1.1-2.2-2-3.1-.9-.9-1.9-1.6-3.1-2-1.1-.4-2.4-.7-4.2-.8-1.8-.3-2.4-.3-7.1-.3z'/%3E%3Cpath fill='%23FFF' d='M17.6 8.5c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 14.8c-3.2 0-5.8-2.6-5.8-5.8s2.6-5.8 5.8-5.8 5.8 2.6 5.8 5.8-2.6 5.8-5.8 5.8z'/%3E%3Ccircle fill='%23FFF' cx='26.9' cy='8.2' r='2.1'/%3E%3C/svg%3E\");--icon-video:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 35 35' xml:space='preserve'%3E%3Cpath fill='%23FFF' d='M30.1 15.5 7.2 2.3c-1.5-.9-3.5.2-3.5 1.9v26.5c0 1.7 1.9 2.9 3.4 1.9L30 19.4c1.7-.8 1.7-3 .1-3.9z'/%3E%3C/svg%3E\");--icon-album:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 35 35' xml:space='preserve'%3E%3Cpath fill='%23FFF' d='M27.3 22.7v-17c0-2.6-2.1-4.7-4.7-4.7H5.7C3.1 1 1 3.1 1 5.7v17c0 2.6 2.1 4.7 4.7 4.7h17c2.5-.1 4.6-2.2 4.6-4.7zm4-13.4v14.6c0 4.1-3.4 7.4-7.4 7.4H9.2c-.5 0-.8.6-.5 1 .9 1 2.2 1.6 3.7 1.6h12.1c5.2 0 9.3-4.2 9.3-9.3V12.5c0-1.5-.6-2.8-1.6-3.7-.3-.4-.9 0-.9.5z'/%3E%3C/svg%3E\");align-items:center;border:none;box-shadow:none;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:center;margin:0;min-width:50px;outline:none;position:relative;width:100%}:host *{box-sizing:border-box}:host(.keyboard-nav.has-focus){outline:none}:host(.keyboard-nav.has-focus):before{background-color:rgba(0,0,0,.25);border-radius:6px;content:\"\";display:block;height:100%;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%;z-index:1}:host(.keyboard-nav.has-focus):after{background-color:#222;border-radius:6px;box-shadow:0 0 0 2px #4169e1,0 0 0 3px #fff,0 .6px .4px rgba(0,0,0,.042),0 1.3px 1px rgba(0,0,0,.061),0 2.5px 1.9px rgba(0,0,0,.075),0 4.5px 3.4px rgba(0,0,0,.089),0 8.4px 6.3px rgba(0,0,0,.108),0 20px 15px rgba(0,0,0,.15);color:#fff;content:\"Shift + arrow keys to navigate posts\";font-family:sans-serif;font-size:16px;max-width:80%;padding:15px;position:absolute;text-align:center;z-index:1}@media (max-width:1300px){:host(.keyboard-nav.has-focus):after{font-size:15px}}:host(.keyboard-nav.has-focus) .posts{opacity:.65}behold-branding{--br:100px!important;--color:#1a1a1a!important;--bg:#fff!important;--dur:0.2s!important;border-radius:var(--br)!important;bottom:10px!important;display:flex!important;position:absolute!important;right:10px!important;z-index:999!important}@media (hover:hover){behold-branding:hover{--bg:#1a1a1a!important;--color:#fff!important}}behold-branding a{align-items:center!important;background:var(--bg)!important;border:none!important;border-radius:var(--br)!important;box-shadow:0 0 0 1px #1a1a1a,1px 1px 1px rgba(0,0,0,.08),2px 1.25px 1.25px rgba(0,0,0,.06),3px 2.5px 2.5px rgba(0,0,0,.04),5px 5px 5px rgba(0,0,0,.02)!important;display:flex!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif!important;height:27px!important;justify-content:center!important;letter-spacing:.01em!important;margin:0!important;opacity:0!important;padding:0 1px 0 0!important;pointer-events:all!important;text-decoration:none!important;transform:translateY(8px)!important;transition:all .3s ease!important;visibility:visible!important;width:157px!important}behold-branding a,behold-branding a:before{color:var(--color)!important;line-height:1!important}behold-branding a:before{content:\"Made with\"!important;font-size:10px!important;margin-right:7px!important;transition:all var(--dur) ease!important;white-space:no-wrap!important}behold-branding a:after{background:transparent!important;content:\"\"!important;height:47px!important;left:-10px;position:absolute;top:-10px;width:179px!important}behold-branding svg{border:none!important;display:block!important;height:11px!important;margin:0!important;opacity:1!important;padding:0!important;visibility:visible!important;width:auto!important}behold-branding svg path{fill:var(--color)!important;transition:all var(--dur) ease!important}.posts{display:grid;margin:0;max-width:100%;padding:0;width:100%}.post{-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;align-self:stretch;border:none;border-radius:var(--post-border-radius) /calc(var(--post-border-radius)*var(--post-aspect-ratio));color:inherit;font:inherit;isolation:isolate;line-height:normal;margin:0 0 -1px;overflow:hidden;transform:translateZ(0);transition:background .3s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:calc(100% + .5px)}:host(.keyboard-nav) .post.post:focus-within{box-shadow:0 0 0 1px #fff,0 0 0 3px #4169e1,0 0 0 4px #fff;z-index:1}:host(.is-previewing-loading-colors) .post *{opacity:0}.post.post--has-row-gap,.post.post--last-row{margin:0}.post:before{background-color:transparent;border-radius:var(--post-border-radius) /calc(var(--post-border-radius)*var(--post-aspect-ratio));content:\"\";height:100%;left:0;pointer-events:none;position:absolute;top:0;transition:all 2s cubic-bezier(.215,.61,.355,1);width:100%;z-index:2}@supports (backdrop-filter:blur(3px)){[data-hover-effect*=blur i] .post:before{height:calc(100% - 1px);left:0;opacity:0;top:0;transition:all .6s cubic-bezier(.215,.61,.355,1);width:100%}}.post.post--hover-icon:after{background-image:var(--icon);background-position:50%;background-repeat:no-repeat;background-size:auto 100%;border-radius:var(--post-border-radius) /calc(var(--post-border-radius)*var(--post-aspect-ratio));content:\"\";height:12%;height:calc(min(var(--post-width), var(--post-height))*.12);left:0;max-height:30px;min-height:20px;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%) scale(.75);transition:all .6s cubic-bezier(.215,.61,.355,1);width:100%;will-change:transform;z-index:3}@media (prefers-reduced-motion){.post.post--hover-icon:after{transition:none}}.post>a,.post>button,.post>div{background-color:transparent;border:0;box-shadow:none;color:inherit;display:block;font:inherit;height:100%;line-height:inherit;outline:none;padding:0;transition:opacity .3s ease;width:100%}.post a,.post button{cursor:pointer}behold-image-post{--icon:var(--icon-instagram);--post-background-color:transparent}behold-image-post,behold-video-post{background-color:var(--post-background-color)}behold-video-post{--icon:var(--icon-video);--post-background-color:transparent}behold-video-post .video-thumbnail{height:100%;left:0;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;position:absolute;top:0;width:100%}behold-album-post{--icon:var(--icon-album);--post-background-color:transparent;background-color:var(--post-background-color)}.post-caption{align-items:center;background-color:var(--overlay-color);display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:15px;height:100%;justify-content:center;left:0;line-height:1.5;opacity:0;padding:15%;pointer-events:none;position:absolute;top:0;transition:opacity .4s ease;width:100%;z-index:2}.post:hover .post-caption,:host(:host(.keyboard-nav)) .post:focus-within .post-caption{opacity:1}.post--xlarge .post-caption{--lines:12;--innerScale:scale(0.98);padding:20%}.post--large .post-caption{--lines:9;--innerScale:scale(0.98)}.post--medium .post-caption{--lines:6;--innerScale:scale(0.97);font-size:14px}.post--small .post-caption{--lines:4;--innerScale:scale(0.95);font-size:13px;line-height:1.25}.post--xsmall .post-caption{--lines:3;--innerScale:scale(0.95);font-size:12px;line-height:1.25}.post-caption__inner{line-clamp:var(--lines);-webkit-line-clamp:var(--lines);-webkit-box-orient:vertical;color:#fff;display:-webkit-box;opacity:0;overflow:hidden;text-align:center;transform:var(--innerScale);transition:all .3s ease;white-space:pre-line;will-change:transform,opacity;word-break:none}@media (prefers-reduced-motion){.post-caption__inner{transform:none}}.post:hover .post-caption__inner,:host(.keyboard-nav) .post:focus-within .post-caption__inner{opacity:1;transform:none;transition:all .3s ease}:host(.keyboard-nav) .post:focus-within:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) .post:focus-within:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=fade] .post:focus-within:before,[data-hover-effect=fade] .post:hover:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=fade] .post:focus-within:after,[data-hover-effect=fade] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within behold-image img,:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within behold-video video,[data-hover-effect=zoomFade] .post:hover behold-image img,[data-hover-effect=zoomFade] .post:hover behold-video video{transform:scale(1.05)}@media (prefers-reduced-motion){:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within behold-image img,:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within behold-video video,[data-hover-effect=zoomFade] .post:hover behold-image img,[data-hover-effect=zoomFade] .post:hover behold-video video{transform:none}}:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within:before,[data-hover-effect=zoomFade] .post:hover:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=zoomFade] .post:focus-within:after,[data-hover-effect=zoomFade] .post:hover:after{opacity:1;transform:translateY(-50%)}@supports not (backdrop-filter:blur(3px)){:host(.keyboard-nav) [data-hover-effect=blur] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=blur] .post:focus-within behold-video,[data-hover-effect=blur] .post:hover behold-image,[data-hover-effect=blur] .post:hover behold-video{filter:brightness(97%) blur(3px);transition:all .6s cubic-bezier(.215,.61,.355,1)}}@supports (backdrop-filter:blur(3px)){:host(.keyboard-nav) [data-hover-effect=blur] .post:focus-within:before,[data-hover-effect=blur] .post:hover:before{backdrop-filter:blur(3px);background-color:rgba(0,0,0,.002);opacity:1}}:host(.keyboard-nav) [data-hover-effect=blur] .post:focus-within:after,[data-hover-effect=blur] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-video,[data-hover-effect=zoomBlur] .post:hover behold-image,[data-hover-effect=zoomBlur] .post:hover behold-video{transform:scale(1.05);transition:all .6s cubic-bezier(.215,.61,.355,1)}@media (prefers-reduced-motion){:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-video,[data-hover-effect=zoomBlur] .post:hover behold-image,[data-hover-effect=zoomBlur] .post:hover behold-video{transform:none}}@supports not (backdrop-filter:blur(3px)){:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within behold-video,[data-hover-effect=zoomBlur] .post:hover behold-image,[data-hover-effect=zoomBlur] .post:hover behold-video{filter:brightness(97%) blur(3px)}}@supports (backdrop-filter:blur(3px)){:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within:before,[data-hover-effect=zoomBlur] .post:hover:before{backdrop-filter:blur(3px);background-color:rgba(0,0,0,.002);opacity:1}}:host(.keyboard-nav) [data-hover-effect=zoomBlur] .post:focus-within:after,[data-hover-effect=zoomBlur] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=toGreyscale] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=toGreyscale] .post:focus-within behold-video,[data-hover-effect=toGreyscale] .post:hover behold-image,[data-hover-effect=toGreyscale] .post:hover behold-video{filter:grayscale(100%);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=toGreyscale] .post:focus-within:after,[data-hover-effect=toGreyscale] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within behold-video,[data-hover-effect=zoomToGreyscale] .post:hover behold-image,[data-hover-effect=zoomToGreyscale] .post:hover behold-video{filter:grayscale(100%);transform:scale(1.05);transition:all .6s cubic-bezier(.215,.61,.355,1)}@media (prefers-reduced-motion){:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within behold-image,:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within behold-video,[data-hover-effect=zoomToGreyscale] .post:hover behold-image,[data-hover-effect=zoomToGreyscale] .post:hover behold-video{transform:none}}:host(.keyboard-nav) [data-hover-effect=zoomToGreyscale] .post:focus-within:after,[data-hover-effect=zoomToGreyscale] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post,[data-hover-effect=fromGreyscale] .post{filter:grayscale(100%)}:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:focus,:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:hover,[data-hover-effect=fromGreyscale] .post:focus,[data-hover-effect=fromGreyscale] .post:hover{filter:grayscale(0);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:focus.post--hover-caption:before,:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:hover.post--hover-caption:before,[data-hover-effect=fromGreyscale] .post:focus.post--hover-caption:before,[data-hover-effect=fromGreyscale] .post:hover.post--hover-caption:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:focus:after,:host(.keyboard-nav) [data-hover-effect=fromGreyscale] .post:hover:after,[data-hover-effect=fromGreyscale] .post:focus:after,[data-hover-effect=fromGreyscale] .post:hover:after{opacity:1;transform:translateY(-50%)}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post,[data-hover-effect=zoomFromGreyscale] .post{filter:grayscale(100%)}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover,[data-hover-effect=zoomFromGreyscale] .post:focus,[data-hover-effect=zoomFromGreyscale] .post:hover{filter:grayscale(0)}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus behold-image,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus behold-video,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover behold-image,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover behold-video,[data-hover-effect=zoomFromGreyscale] .post:focus behold-image,[data-hover-effect=zoomFromGreyscale] .post:focus behold-video,[data-hover-effect=zoomFromGreyscale] .post:hover behold-image,[data-hover-effect=zoomFromGreyscale] .post:hover behold-video{transform:scale(1.05);transition:all .6s cubic-bezier(.215,.61,.355,1)}@media (prefers-reduced-motion){:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus behold-image,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus behold-video,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover behold-image,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover behold-video,[data-hover-effect=zoomFromGreyscale] .post:focus behold-image,[data-hover-effect=zoomFromGreyscale] .post:focus behold-video,[data-hover-effect=zoomFromGreyscale] .post:hover behold-image,[data-hover-effect=zoomFromGreyscale] .post:hover behold-video{transform:none}}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus.post--hover-caption:before,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover.post--hover-caption:before,[data-hover-effect=zoomFromGreyscale] .post:focus.post--hover-caption:before,[data-hover-effect=zoomFromGreyscale] .post:hover.post--hover-caption:before{background-color:var(--overlay-color);transition:all .6s cubic-bezier(.215,.61,.355,1)}:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:focus:after,:host(.keyboard-nav) [data-hover-effect=zoomFromGreyscale] .post:hover:after,[data-hover-effect=zoomFromGreyscale] .post:focus:after,[data-hover-effect=zoomFromGreyscale] .post:hover:after{opacity:1;transform:translateY(-50%)}behold-image{display:block;height:0;min-height:100%;overflow:hidden;padding:0;padding-bottom:calc(100%/var(--post-aspect-ratio));position:relative;transition:all .6s cubic-bezier(.215,.61,.355,1);width:100%}behold-image img{border-radius:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;-o-object-position:center center;object-position:center center;opacity:0;pointer-events:none;position:absolute;top:0;transition:all .6s cubic-bezier(.215,.61,.355,1),opacity .6s ease;vertical-align:middle;width:100%;will-change:transform;z-index:1}@supports not (backdrop-filter:blur(3px)){[data-hover-effect=blur] behold-image img,[data-hover-effect=zoomBlur] behold-image img{height:calc(100% + 6px);left:-3px;top:-3px;width:calc(100% + 6px)}}.post--reel behold-image img{-o-object-position:center 25%;object-position:center 25%}behold-image.is-loaded img{opacity:1}behold-video{display:block;height:0;min-height:100%;overflow:hidden;padding:0;padding-bottom:calc(100%/var(--post-aspect-ratio));position:relative;transition:all .6s cubic-bezier(.215,.61,.355,1);width:100%}behold-video video{height:100%;left:0;-o-object-fit:cover;object-fit:cover;-o-object-position:center center;object-position:center center;opacity:0;pointer-events:none;position:absolute;top:0;transition:all .6s cubic-bezier(.215,.61,.355,1),opacity .6s ease;vertical-align:middle;width:100%;will-change:transform}.post--reel behold-video video{-o-object-position:center 25%;object-position:center 25%}behold-video.is-loaded video{opacity:1}";export{z as A,b as B,g as I,d as R,w as V,y as a,u as b,x as c,c as g};
@@ -1 +1 @@
1
- var n='<?xml version="1.0" encoding="utf-8"?>\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 12.1 20" enable-background="new 0 0 12.1 20" xml:space="preserve">\n<path d="M12.1,17.9L4.2,10l7.9-7.9L10,0L0,10l10,10L12.1,17.9z"/>\n</svg>',x='<?xml version="1.0" encoding="utf-8"?>\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 12.1 20" enable-background="new 0 0 12.1 20" xml:space="preserve">\n<path d="M0,2.1L7.9,10L0,17.9L2.1,20l10-10L2.1,0L0,2.1z"/>\n</svg>';export{x as a,n as c};
1
+ var n='<?xml version="1.0" encoding="utf-8"?>\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 12.1 20" enable-background="new 0 0 12.1 20" xml:space="preserve">\n<path d="M12.1,17.9L4.2,10l7.9-7.9L10,0L0,10l10,10L12.1,17.9z"/>\n</svg>',e='<?xml version="1.0" encoding="utf-8"?>\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 12.1 20" enable-background="new 0 0 12.1 20" xml:space="preserve">\n<path d="M0,2.1L7.9,10L0,17.9L2.1,20l10-10L2.1,0L0,2.1z"/>\n</svg>';export{e as a,n as c};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlbumPost.d.ts","sourceRoot":"","sources":["../../src/elements/AlbumPost.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAA;AACjC,OAAO,KAAK,MAAM,SAAS,CAAA;AAK3B;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ;IAC7C,KAAK,SAAc;IAGnB,QAAQ,EAAE,KAAK,CAAA;;IAqBf,iBAAiB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE;;;;KAAA;IAcrD;;OAEG;IACH,OAAO;IAkDP,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAsB;CAM3C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseElement.d.ts","sourceRoot":"","sources":["../../src/elements/B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AE,MAAM,GAAG,IAAI;IAK1B;;;OAGG;IACH,sBAAsB;CAcvB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BasePost.d.ts","sourceRoot":"","sources":["../../src/elements/BasePost.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAMvC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAC/C,KAAK,SAAa;IAGlB,IAAI,EAAE,IAAI,CAAA;IACV,cAAc,EAAE,cAAc,CAAA;IAC9B,YAAY,EAAE,YAAY,CAAA;IAC1B,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,SAAS,EAAE,OAAO,CAAQ;IAC1B,SAAS,EAAE,OAAO,CAAQ;IAC1B,OAAO,EAAE,QAAQ,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAO;IACnC,kBAAkB,EAAE,OAAO,CAAQ;IACnC,eAAe,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAGlB,QAAQ,EAAE,WAAW,CAAA;IACrB,UAAU,EAAE,WAAW,CAAA;;IA0CvB,qBAAqB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE;;;;KAAA;IA4DzD,gBAAgB,IAAI,IAAI;IA8BxB,mBAAmB;IAgBnB,UAAU,CAAC,SAAS,CAAC,EAAE,WAAW,GAAG,gBAAgB,GAAG,IAAI;IAwF5D,cAAc,IAAI,IAAI;IAUtB,mBAAmB,IAAI,IAAI;IAmB3B,aAAa,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IA0B/C;;OAEG;IACH,kBAAkB;IAMlB,KAAK,IAAI,IAAI;CAGd"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseWidget.d.ts","sourceRoot":"","sources":["../../src/elements/BaseWidget.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAGvC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IACjD,KAAK,SAAe;IAGpB,MAAM,EAAE,UAAU,CAAA;IAClB,OAAO,EAAE,gBAAgB,CAAA;IACzB,QAAQ,EAAE,WAAW,CAAA;IACrB,WAAW,EAAE,OAAO,CAAA;;IAuCpB,iBAAiB;IAOjB,aAAa;IAOb,aAAa,CAAC,GAAG,EAAE,aAAa;IAYhC;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,KAAK;IAMtB;;OAEG;IACH,cAAc;IAId;;OAEG;IACH,oBAAoB,CAAC,GAAG,KAAA;IASxB,YAAY,CACV,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,KAAK,CAAC;QAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,GAC7C,IAAI;CAYR"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Branding.d.ts","sourceRoot":"","sources":["../../src/elements/Branding.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAIvC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAC/C,KAAK,SAAa;IAGlB,YAAY,EAAE,WAAW,CAAA;;IAwBzB,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAoB;CAMzC;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,QAAQ,CAAA;KAC5B;CACF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/elements/Image.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAUvC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW;IAC5C,KAAK,SAAU;IAGf,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA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AAK,EAAE,MAAM;IAyBjC;;OAEG;IACH,cAAc,IAAI,KAAK,CAAC,KAAK,GAAG,iBAAiB,CAAC;IAgClD;;OAEG;IACH,IAAI;IAOJ;;OAEG;IACH,KAAK;IAOL;;OAEG;IACH,OAAO;IAOP,MAAM,CAAC,QAAQ,CAAC,IAAI,SAA+B;CAMpD;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,4BAA4B,EAAE,iBAAiB,CAAA;KAChD;CACF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopoverSlideVideo.d.ts","sourceRoot":"","sources":["../../src/elements/PopoverSlideVideo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,KAAK,MAAM,SAAS,CAAA;AAI3B;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,KAAK,SAAsB;IAG3B,QAAQ,EAAE,KAAK,CAAA;IACf,QAAQ,EAAE,KAAK,CAAA;IACf,eAAe,EAAE,WAAW,CAAA;IAG5B,IAAI,EAAE,IAAI,CAAA;;IA+EV,uBAAuB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE;;;KAAA;IAWlD,wBAAwB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE;;;KAAA;IAcnD,OAAO;IAKP,OAAO;IAIP,QAAQ;IAIR,eAAe;IASf,YAAY;IASZ,IAAI;IAKJ,KAAK;IAIL,gBAAgB;IAKhB,gBAAgB;IAKhB;;OAEG;IACH,OAAO;IAOP,MAAM,CAAC,QAAQ,CAAC,IAAI,SAA+B;CAMpD;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,4BAA4B,EAAE,iBAAiB,CAAA;KAChD;CACF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../src/elements/Video.ts"],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AAS,CAAA;AAI3B;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,QAAQ;IAC7C,KAAK,SAAc;IAGnB,iBAAiB,EAAE,gBAAgB,CAAA;IACnC,QAAQ,EAAE,KAAK,CAAA;IACf,QAAQ,EAAE,KAAK,CAAA;;IA8Bf,iBAAiB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE;;;;KAAA;IAqBrD;;OAEG;IACH,gBAAgB;IAOhB;;OAEG;IACH,iBAAiB;IAMjB;;OAEG;IACH,OAAO;IAwGP,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAsB;CAM3C"}
@@ -0,0 +1 @@
1
+ function t(t){return JSON.parse(JSON.stringify(t,(t,e)=>void 0===e?null:e))}function e(){return document.body.offsetTop}async function s(t,e){const s=document.createElement(t);return new Promise((i,n)=>{switch(t){case"img":s.addEventListener("load",()=>{i(e)});break;case"video":s.addEventListener("loadeddata",()=>i(e))}s.addEventListener("error",t=>{n(t)}),s.src=e})}function i({text:t,maxLines:e=2,maxChars:s=50}){if(!t)return;const i=t.match(/.*/g).filter(t=>t.length>0).slice(0,e).join("").length,n=Math.min(i,s);return t.slice(0,n)}function n(t,e){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='${t}' height='${e}'%3E%3C/svg%3E%0A`}function o(t){return new Promise(e=>{let s=new IntersectionObserver(t=>{let i=t.reduce((t,e,s)=>e.intersectionRatio>t.intersectionRatio?{index:s,intersectionRatio:e.intersectionRatio}:t,{intersectionRatio:0,index:null});s.disconnect(),s=null,e(i.index)});t.forEach(t=>s.observe(t))})}function r(t,e){let s=!1,i=new IntersectionObserver(t=>{s||(i.disconnect(),i=null,e(t[0].boundingClientRect))});return i.observe(t),function(){s||(s=!0,i&&(i.disconnect(),i=null))}}function a(t){return t.isConnected?"#document"===t.nodeName||t instanceof ShadowRoot?t:a(t.parentNode):document}function l(t,e,s=null,i=!1){let n=i?performance.now():0,o=null;return(...i)=>{let r=performance.now();clearTimeout(o),o=setTimeout(()=>t.apply(s,i),e),r-n>e&&(clearTimeout(o),n=r,t.apply(s,i))}}function h(t,e){Object.entries(e).forEach(([e,s])=>{s?t.classList.add(e):t.classList.remove(e)})}function c(t,e){t&&Object.keys(e).forEach(s=>{t.style.setProperty(s,e[s])})}function d(t,e,s,i=0){if("string"==typeof s&&(s=[s]),i>0){let i=!1;return Object.keys(t).length!==Object.keys(e).length||(Object.keys(t).forEach(n=>{d(t[n],e[n],s)&&(i=!0)}),i)}return s.reduce((s,i)=>!u(t?.[i],e?.[i])||s,!1)}function u(t,e,s=!1,i=!1){if(i&&(Array.isArray(t)&&(t=t.sort()),Array.isArray(e)&&(e=e.sort())),s&&("number"==typeof t&&(t=t.toString()),"number"==typeof e&&(e=e.toString())),typeof t!=typeof e)return!1;if(null===t&&null===e)return!0;if(null===t&&null!==e)return!1;if(null!==t&&null===e)return!1;if(void 0===t&&void 0===e)return!0;if(void 0===t&&void 0!==e)return!1;if(void 0!==t&&void 0===e)return!1;if("object"==typeof t)return Object.keys(t).length===Object.keys(e).length&&Object.entries(t).reduce((t,[n,o])=>!!u(o,e[n],s,i)&&t,!0);if(Array.isArray(t)){let n=!0;return t.forEach((t,o)=>{u(t,e[o],s,i)||(n=!1)}),n}return t===e}function p(t,e="assertive"){const s=document.createElement("div");s.innerHTML=t,s.setAttribute("aria-live",e),s.setAttribute("aria-atomic","true"),s.style.cssText="\n position: absolute;\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0,0,0,0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n ",requestAnimationFrame(()=>{document.body.appendChild(s),setTimeout(()=>{s.remove()},500)})}function w(t,e,s){t.length===s&&t.shift(),t.push(e)}function m(...t){window?.location.search.includes("behold-debug-mode")&&console.log(...t)}let b={isMuted:!0,keyboardNavEnabled:!1,popoverOverlayHslArray:[0,0,0],popoverOverlayOpacity:.6},f=!1,g=null,v=null;const y=new Map,O=new Map,j=new Map,x=new Set;!function t(){j.forEach(t=>{const e=performance.now(),{minWait:s,lastInvocation:i,callback:n}=t,o=e-i;o>s&&(n(o),j.set(n,{...t,lastInvocation:e}))}),requestAnimationFrame(t)}();class S extends HTMLElement{label="BaseElement";storedProperties=new Map;requiredProperties=[];hasRequiredProps=!1;propChangeHandlers=new Map;delayedPropChangeHandlers=new Map;queuedPropUpdates=new Set;localState=Object.freeze({});localStateChangeHandlers=new Set;connectHandlers=new Set;disconnectHandlers=new Set;rafs=new Map;timeouts=new Map;constructor(){if(super(),this.t=this.t.bind(this),this.i=this.i.bind(this),this.o=this.o.bind(this),!g){let t=window.ResizeObserver;"ResizeObserver"in window==0&&(t=window.BeholdResizeObserver),g=new t(t=>{t.forEach(t=>{const e=y.get(t.target);e&&e(t)})})}v||(v=new IntersectionObserver(t=>{t.forEach(t=>{const e=O.get(t.target);e&&e(t)})})),f||(f=!0,document.addEventListener("keydown",this.t),document.addEventListener("mousedown",this.i),document.addEventListener("mousemove",this.o,{passive:!0}))}connectedCallback(){this.connectHandlers.forEach(t=>t())}disconnectedCallback(){this.rafs.forEach(t=>cancelAnimationFrame(t)),this.rafs.clear(),this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts.clear(),this.disconnectHandlers.forEach(t=>t())}onConnect(t){this.connectHandlers.add(t)}onDisconnect(t){this.disconnectHandlers.add(t)}onResize(t,e,s){y.set(e,s.bind(t)),g.observe(e),this.disconnectHandlers.add(()=>{y.delete(e),g.unobserve(e)})}onIntersection(t,e){O.set(t,e),v.observe(t),this.disconnectHandlers.add(()=>{O.delete(t),v.unobserve(t)})}onLoop(t,e=50){j.set(t,{minWait:e,lastInvocation:0,callback:t}),this.disconnectHandlers.add(()=>{j.delete(t)})}onPropChange(e,s,i=null,n=null){i?this.requiredProperties.push(...i):this.requiredProperties.push(...s),s.forEach(s=>{void 0!==this[s]&&this.storedProperties.set(s,this[s]),this.propChangeHandlers.get(s)||(this.propChangeHandlers.set(s,[]),this.delayedPropChangeHandlers.set(s,[])),n?this.delayedPropChangeHandlers.get(s).push(e):this.propChangeHandlers.get(s).push(e),Object.defineProperty(this,s,{set(e){void 0===e&&(e=null,m(`Attempted to set value of ${s} as "undefined" on ${this.label}. ${s} was coerced to null instead.`)),e=t(e);const i=this.storedProperties.has(s)?t(this.storedProperties.get(s)):null;this.storedProperties.set(s,e),this.hasRequiredProps=this.requiredProperties.every(t=>this.storedProperties.has(t)),this.queueHandlers({prop:s,oldValue:i,newValue:e})},get(){return this.storedProperties.get(s)}})}),n&&(n=n.bind(this),queueMicrotask(()=>{this.hasRequiredProps&&(n(),this.delayedPropChangeHandlers.forEach((t,e)=>{this.propChangeHandlers.set(e,[...this.propChangeHandlers.get(e),...t])}))})),this.queueMissingPropsCheck()}queueHandlers({prop:t,oldValue:e,newValue:s}){this.hasRequiredProps?(this.queuedPropUpdates.size&&(this.queuedPropUpdates.delete(t),this.runQueuedPropHandlers()),this.propChangeHandlers.get(t).forEach(i=>{i.call(this,{changedProp:t,oldValue:e,newValue:s})})):this.queuedPropUpdates.add(t)}runQueuedPropHandlers(){this.queuedPropUpdates.forEach(t=>{this.propChangeHandlers.get(t).forEach(e=>{e.call(this,{changedProp:t,oldValue:null,newValue:this[t]})})}),this.queuedPropUpdates.clear()}updateLocalState(e){const s=Object.freeze(t(this.localState));this.localState=Object.freeze({...this.localState,...e}),this.localStateChangeHandlers.forEach(t=>t({changedProps:Object.keys(e),oldState:s,newState:this.localState}))}onLocalStateChange(t,e){this.localState={...this.localState,...e};const s=t.bind(this);this.localStateChangeHandlers.add(s)}updateGlobalState(e){const s=t(b);b={...b,...e},x.forEach(t=>t({changedProps:Object.keys(e),oldState:s,newState:b}))}onGlobalStateChange(t){this.connectHandlers.add(()=>{const e=t.bind(this);x.add(e),this.disconnectHandlers.add(()=>x.delete(e))})}t(t){"Tab"===t.key&&this.updateGlobalState({keyboardNavEnabled:!0})}i(t){0===t.clientX&&0===t.clientY||this.updateGlobalState({keyboardNavEnabled:!1})}o(t){t.ctrlKey||t.altKey||t.shiftKey||t.metaKey||0===t.movementX||0===t.movementY||this.updateGlobalState({keyboardNavEnabled:!1})}get globalState(){return b}set globalState(t){throw new Error("Shared state cannot be set directly. Use this.updateGlobalState() instead.")}raf(t,e,s=!0){s&&cancelAnimationFrame(this.rafs.get(e));const i=requestAnimationFrame(()=>{t(),this.rafs.delete(e)});return this.rafs.set(e,i),i}cancelRaf(t){cancelAnimationFrame(this.rafs.get(t)),this.rafs.delete(t)}to(t,e,s){const i=setTimeout(()=>{t(),this.timeouts.delete(s)},e);return this.timeouts.set(s,i),i}cancelTo(t){clearTimeout(this.timeouts.get(t)),this.timeouts.delete(t)}queueMissingPropsCheck(){queueMicrotask(()=>{if(this.requiredProperties.length&&!this.hasRequiredProps){const t=this.requiredProperties.filter(t=>!this.storedProperties.has(t));console.error(`${this.label||this.tagName} is missing required props: ${t.join(", ")}`)}})}}function C(t){let{type:e="div",classes:s=[],contents:i=[],attributes:n={},props:o={},style:r={},listeners:a={}}=t;s=Array.isArray(s)?s:[s];const l=document.createElement(e);return Array.isArray(i)||(i=[i]),i=i.filter(t=>null!=t).map(t=>{if("string"==typeof t&&t.includes("</svg>")){const e=document.createElement("template");return e.innerHTML=t,e.content}return t}),l.beholdReplaceChildren(...i),s.length&&(l.className=s.join(" ")),Object.keys(n).forEach(t=>{null!==n[t]&&void 0!==n[t]?l.setAttribute(t,n[t]):l.removeAttribute(t)}),Object.assign(l,o),Object.keys(r).forEach(t=>{l&&("--"===t.substring(0,2)?l.style.setProperty(t,r[t]):l.style[t]=r[t])}),Object.keys(a).forEach(t=>{l.addEventListener(t,a[t])}),l}class M extends S{label="BeholdWidget";shadow;abortController;loadedWidget;static get observedAttributes(){return["feed-id"]}constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.abortController=null,this.onPropChange(this.l,["widgetSettings","feedMetadata","posts","previewLoadingColors","startIndex","errorMessage"],[])}attributeChangedCallback(t,e,s){"feed-id"===t&&s!==e&&this.getFeed(s)}l({changedProp:t,oldValue:e,newValue:s}){"errorMessage"!==t||e||!s?"widgetSettings"===t&&d(s,e,"type")&&s?.type?this.loadWidget(s.type):this.loadedWidget&&!u(s,e)&&(this.loadedWidget[t]=s):this.loadWidget("ErrorMessage")}async loadWidget(t){if(await import("./replaceChildren-Byt1OSKK.js"),"ResizeObserver"in window==0){const{ResizeObserver:t}=await import("./resizeObserver-CffLfe30.js");window.BeholdResizeObserver=t}const e=(await this.importWidget(t.replace(/.?/,t=>t.toUpperCase()))).register(),s=C({type:e}),i=C({type:"style",contents:":host{align-items:center;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:center;margin:0;min-width:50px;overflow:hidden;position:relative;width:100%}:host *{box-sizing:border-box}:host([hidden]){display:none}".toString()});this.shadow.beholdReplaceChildren(s,i),this.loadedWidget=this.shadow.querySelector(e),this.previewLoadingColors&&(this.loadedWidget.previewLoadingColors=this.previewLoadingColors),this.startIndex&&(this.loadedWidget.startIndex=this.startIndex),this.widgetSettings&&(this.loadedWidget.widgetSettings=this.widgetSettings),this.feedMetadata&&(this.loadedWidget.feedMetadata=this.feedMetadata),this.posts&&(this.loadedWidget.posts=this.posts),this.loadedWidget.errorMessage=this.errorMessage||null,this.dispatchEvent(new Event("load")),window.dispatchEvent(new CustomEvent("behold:widget-loaded",{detail:{id:this["feed-id"]}}))}async getFeed(t){if(t){this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const e=await fetch(`https://feeds.behold.so/${t}`,{mode:"cors",signal:this.abortController.signal});if(e.ok){const t=await e.json();if(!t.widgetSettings)throw new Error("JSON feeds cannot be used as a widget");if(t.widgetSettings.klaviyoWebFeedId)throw new Error("Klaviyo feeds cannot be used as an embedded widget");this.widgetSettings=t.widgetSettings,this.feedMetadata={username:t.username,profilePictureUrl:t.profilePictureUrl,website:t.website,followersCount:t.followersCount,hashtags:t.hashtags,showBranding:t.showBranding},this.posts=t.posts||t.media}else{const t=await e.text();this.errorMessage=t}}catch(t){"The user aborted a request."!==t.message&&(this.errorMessage=t.message)}}else this.errorMessage="No feed ID provided"}async importWidget(t){const{default:e}=await function(t){switch(t){case"./widgets/ElasticCarousel.ts":return import("./ElasticCarousel-BN3V5b-i.js");case"./widgets/ErrorMessage.ts":return import("./ErrorMessage-Bab_CfBr.js");case"./widgets/GalleryWall.ts":return import("./GalleryWall-T_W9C-jp.js");case"./widgets/Grid.ts":return import("./Grid-DC8Fqqgv.js");default:return new Promise(function(e,s){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t)))})}}(`./widgets/${t}.ts`);return e}}var E={register:(t="behold-widget")=>{customElements.get(t)||customElements.define(t,class extends M{})},element:M};export{S as B,E as W,h as a,n as b,C as c,m as d,s as e,e as f,r as g,d as h,u as i,a as j,o as k,p as l,i as m,w as p,c as s,l as t};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{W as widget}from"./index-Bx4SLolj.js";
2
- /* v0.5.124 */
1
+ export{W as widget}from"./index-UzP-A0W0.js";
2
+ /* v0.5.126 */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RGBStringToHSLArray.d.ts","sourceRoot":"","sources":["../../src/lib/RGBStringToHSLArray.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,GAAG,KAAA,OAsB9C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createElement.d.ts","sourceRoot":"","sources":["../../src/lib/createElement.ts"],"names":[],"mappings":"AAGA,iBAAS,aAAa,CAAC,UAAU,GAAG,WAAW,EAC7C,IAAI,EAAE,iBAAiB,GACtB,UAAU,CA0DZ;AAED,eAAe,aAAa,CAAA;AAE5B,KAAK,iBAAiB,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;IAChC,QAAQ,CAAC,EAAE,qBAAqB,CAAA;IAChC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,KAAK,qBAAqB,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugLog.d.ts","sourceRoot":"","sources":["../../src/lib/debugLog.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,QAI9C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detectPlatform.d.ts","sourceRoot":"","sources":["../../src/lib/detectPlatform.ts"],"names":[],"mappings":"AAwBA,iBAAS,cAAc,QAgEtB;AAED,eAAe,cAAc,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getLoadingColorString.d.ts","sourceRoot":"","sources":["../../src/lib/getLoadingColorString.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,YAAY,KAAA,EACZ,YAAY,KAAA,EACZ,gBAAgB,KAAA,EAChB,gBAAgB,KAAA,UAyCjB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMedianHSL.d.ts","sourceRoot":"","sources":["../../src/lib/getMedianHSL.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,QAAQ,KAAA,EAAE,IAAI,KAAA,SAWlD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gyre.d.ts","sourceRoot":"","sources":["../../src/lib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overScroller.d.ts","sourceRoot":"","sources":["../../src/lib/popoverScroller.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,eAAe;IAClC,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;IAC1B,WAAW,EAAE,WAAW,CAAA;IACxB,aAAa,EAAE,QAAQ,CAAA;IACvB,cAAc,EAAE,QAAQ,CAAA;IAExB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,kBAAkB,EAAE,WAAW,CAAA;IAC/B,QAAQ,EAAE,WAAW,CAAA;IACrB,gBAAgB,EAAE,QAAQ,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;gBAEJ,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,cAAqB,EAAE;;;;;KAAA;IAiBzE,IAAI,CAAC,KAAK,SAAI;IAuBd,OAAO;IAiBP,aAAa;IASb,kBAAkB,CAAC,GAAG,KAAA;IAMtB,KAAK,CAAC,EAAE,KAAK,EAAE,OAAc,EAAE;;;KAAA;CAchC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trapFocus.d.ts","sourceRoot":"","sources":["../../src/lib/trapFocus.ts"],"names":[],"mappings":"AA8HA,wBAAgB,iBAAiB,CAAC,EAChC,OAAY,EACZ,OAAY,EACZ,KAAa,GACd;;;;CAAA,QAeA;AAED,wBAAsB,SAAS,CAC7B,EAAE,EAAE,WAAW,GAAG,UAAU,EAC5B,OAAO,QAAK,EACZ,iBAAiB,SAAI,iBAqBtB;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,WAAW,QAUnD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,KAAK,CAAC,UAAU,GAAG,MAAM,EACvC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,GACzB,UAAU,CAOZ;AAED;;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AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACrB,CAAC,EAAE,GAAG,EACN,CAAC,EAAE,GAAG,EACN,YAAY,UAAQ,EACpB,UAAU,UAAQ,OAkCnB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAc,QAwBtE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,QAKlE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replaceChildren.d.ts","sourceRoot":"","sources":["../../src/polyfills/replaceChildren.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElasticCarousel.d.ts","sourceRoot":"","sources":["../../src/widgets/ElasticCarousel.ts"],"names":[],"mappings":"AAIA,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAI5C,OAAO,IAAI,MAAM,gBAAgB,CAAA;AACjC,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAA;AAUnD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,IAAI;IAC/C,KAAK,SAAoB;IAGzB,cAAc,EAAE,cAAc,CAAA;IAC9B,YAAY,EAAE,YAAY,CAAA;IAC1B,KAAK,EAAE,KAAK,CAAA;IACZ,oBAAoB,EAAE,MAAM,CAAO;IACnC,UAAU,SAAI;IAGd,WAAW,EAAE,WAAW,CAAA;IACxB,QAAQ,EAAE,WAAW,CAAA;IACrB,OAAO,EAAE,WAAW,CAAA;IACpB,QAAQ,EAAE,WAAW,CAAA;IACrB,eAAe,EAAE,gBAAgB,CAAA;IACjC,OAAO,EAAE,eAAe,CAAA;IACxB,WAAW,EAAE,iBAAiB,CAAA;IAC9B,YAAY,EAAE,iBAAiB,CAAA;IAC/B,iBAAiB,EAAE,WAAW,CAAA;IAC9B,OAAO,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3C;CACF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorMessage.d.ts","sourceRoot":"","sources":["../../src/widgets/ErrorMessage.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,4BAA4B,CAAA;AAS7C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,IAAI;IAC5C,KAAK,SAAiB;IAGtB,MAAM,EAAE,UAAU,CAAA;IAClB,MAAM,EAAE,eAAe,CAAA;IACvB,MAAM,EAAE,cAAc,CAAA;IACtB,OAAO,EAAE,gBAAgB,CAAA;IACzB,YAAY,EAAE,WAAW,CAAA;IACzB,cAAc,EAAE,WAAW,CAAA;IAC3B,kBAAkB,EAAE,WAAW,CAAA;IAG/B,YAAY,EAAE,MAAM,CAAA;;IAqBpB,iBAAiB,CAAC,EAAE,WAAW,EAAE;;KAAA;IAIjC;;OAEG;IACH,MAAM;IAkDN,aAAa,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAsB/C,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAyB,GAAG,MAAM;CAMvD;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,sBAAsB,EAAE,YAAY,CAAA;KACrC;CACF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GalleryWall.d.ts","sourceRoot":"","sources":["../../src/widgets/GalleryWall.ts"],"names":[],"mappings":"AAIA,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,QAAQ,MAAM,yBAAyB,CAAA;AAI9C,OAAO,KAAK,cAAc,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAA;AAOnD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,IAAI;IAC3C,KAAK,SAAgB;IAGrB,cAAc,EAAE,cAAc,CAAA;IAC9B,YAAY,EAAE,YAAY,CAAA;IAC1B,KAAK,EAAE,KAAK,CAAA;IACZ,oBAAoB,EAAE,MAAM,CAAO;IA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AAC,QAAQ,CAAC,IAAI,SAAgB,GAAG,MAAM;CAM9C;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,IAAI,CAAA;KACpB;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@behold/widget",
3
- "version": "0.5.124",
3
+ "version": "0.5.126",
4
4
  "author": "Griffin Johnston",
5
5
  "license": "UNLICENSED",
6
6
  "keywords": [
@@ -16,7 +16,7 @@
16
16
  "types": "./dist/index.d.ts",
17
17
  "exports": {
18
18
  ".": {
19
- "types": "./src/index.d.ts",
19
+ "types": "./dist/index.d.ts",
20
20
  "import": "./dist/index.js",
21
21
  "default": "./dist/index.js"
22
22
  }
@@ -1 +0,0 @@
1
- import{c as t,p as s,g as i,d as e,s as o,a as h,h as r}from"./index-Bx4SLolj.js";import{B as n,I as a,V as l,A as c,c as d,g as u}from"./base-C_SbMAnY.js";import{c as p,a as g}from"./caret-right-CN2RPSyP.js";const b=/^mozilla\/\d\.\d\W/,f=/(\w+)\/(\d+\.\d+(?:\.\d+)?(?:\.\d+)?)/g,m=/^(ver|cri|gec)/,v=["chrome","opera","safari","edge","firefox"],w="Unknown";let x=window.navigator.userAgentData,y=window.navigator.userAgent;const S={iphone:/iphone/,ipad:/ipad|macintosh/,android:/android/},P={windows:/win/,mac:/macintosh/,linux:/linux/},_=function(){if(y){const t=y.toLowerCase().replace(b,""),s=Object.keys(S).find(s=>S[s].test(t)&&window.navigator.maxTouchPoints>=1),i=Object.keys(P).find(s=>P[s].test(t)),e=s||i,o=t.match(f),h=/version\/(\d+(\.\d+)*)/,r=t.match(h),n=Array.isArray(r)?r[1]:null,a=o&&(o.length>2&&!m.test(o[1])?1:0),l=o&&o[o.length-1-(a||0)].split("/");return{os:e,browser:l&&l[0],version:n||l&&l[1]}}if(x){const t=x.platform.toLowerCase();let s;for(const t of x.brands){const i=t.brand.toLowerCase(),e=v.find(t=>{if(i.includes(t))return t});if(e){s={browser:e,version:t.version};break}}return{os:t,...s||{browser:w,version:w}}}return console.error("Could not find `userAgent` or `userAgentData` window.navigator properties to set `os`, `browser` and `version`"),{os:navigator.platform||w,browser:w,version:w}}(),C={mass:1,naturalFrequency:7,dampingRatio:.65},M={mass:1,naturalFrequency:4.5,dampingRatio:.65},k={mass:1,naturalFrequency:2,dampingRatio:1},E={mass:1,naturalFrequency:2,dampingRatio:1};class R{containerEl;slideEls;height;gap;borderRadius;applyBorderRadiusToContainer;snapToSlide;bindToScrollPos;resizeObserver;onSlideChange;onReachEnd;startIndex;t;i;o;h;l;u;p;m;v;S;P;_;C;M;k;R;T;$;I;A;L;B;F;j;O;V;G;q;D;atEnd;anchorSlide;constructor({onSlideChange:t,onReachEnd:s}){this.l=[],this.h=new Map,this.u=!1,this.p=0,this.m=!1,this.v=!1,this.S=0,this.P=0,this._=0,this.anchorSlide=0,this.C=0,this.k={start:0,previous:0},this.R=[],this.T=15,this.$=0,this.B=1/60,this.F=3,this.borderRadius=20,this.applyBorderRadiusToContainer=!1,this.gap=20,this.height=300,this.snapToSlide=!1,this.bindToScrollPos=!1,this.atEnd=!1,this.I=40,this.A=0,this.L=0,this.j=window.innerHeight,this.O=null,this.V=0,this.G=()=>{},this.onSlideChange=t,this.onReachEnd=s;let i=window.ResizeObserver;"ResizeObserver"in window==0&&(i=window.BeholdResizeObserver),this.resizeObserver=new i(t=>this.handleResize(t)),this.handlePointerdown=this.handlePointerdown.bind(this),this.handlePointermove=this.handlePointermove.bind(this),this.handlePointerup=this.handlePointerup.bind(this),this.handleVirtObserver=this.handleVirtObserver.bind(this)}init({containerEl:s,slideEls:i,height:e=300,gap:o=20,borderRadius:h=40,applyBorderRadiusToContainer:r=!0,snapToSlide:n=!1,bindToScrollPos:a=!1,startIndex:l=0}){this.startIndex=l,this.containerEl=s,this.slideEls=i.map(s=>t({classes:"ec-slide",contents:s,style:{backgroundColor:s.backgroundColor}})),this.o=i,this.t=s.offsetWidth,this.i=s?.scrollWidth||0,this.M=this.t-this.i,this.u=!1,this.p=0,this.D=new IntersectionObserver(this.handleVirtObserver,{root:this.containerEl,rootMargin:`0px ${this.t/4}px 0px ${this.t}px`}),this.updateSettings({height:e,gap:o,borderRadius:h,applyBorderRadiusToContainer:r,snapToSlide:n,bindToScrollPos:a}),this.addEventListeners(),this.containerEl.style.setProperty("--ec-container-width",`${this.t}px`),this.t<600&&(this.T=12),l>0&&(this.containerEl.style.opacity="0"),this.containerEl.beholdReplaceChildren(...this.slideEls),this.updateDimensions(),this.u=!0,this.loop(performance.now())}handleVirtObserver(t){t.forEach(t=>{const s=t.target,i=this.slideEls.indexOf(s);this.setVirtualization(s,i,t.isIntersecting)})}updateSettings({height:t=300,gap:s=20,borderRadius:i=40,applyBorderRadiusToContainer:e=!0,snapToSlide:o=!1,bindToScrollPos:h=!1}){cancelAnimationFrame(this.q),this.q=requestAnimationFrame(()=>{this.height=t,this.gap=s,this.borderRadius=Math.min(i/100*this.height,.45*this.t*.5),this.I=Math.max(this.borderRadius,40),this.applyBorderRadiusToContainer=e,this.snapToSlide=o,this.bindToScrollPos=h,this.containerEl.style.setProperty("--ec-height",`${this.height}px`),this.containerEl.style.setProperty("--ec-border-radius",this.applyBorderRadiusToContainer?`${this.borderRadius}px`:"0px"),this.snapToSlide&&(this.C=-this.getClosestSlideToPoint(this.C).leftEdge)})}destroy(){this.u=!1,cancelAnimationFrame(this.q),this.removeEventListeners(),this.slideEls?.length&&this.slideEls.forEach(t=>{t.remove()}),this.slideEls=null,this.containerEl=null}handleResize(t){let s=null;t&&t.forEach(t=>{t.target===this.containerEl&&(s=t.borderBoxSize?t.borderBoxSize[0].inlineSize:t.contentRect.width)}),this.updateDimensions(s)}addEventListeners(){this.removeEventListeners(),this.slideEls.length&&this.slideEls.forEach(t=>{this.resizeObserver.observe(t),this.D.observe(t)}),this.containerEl&&(this.resizeObserver.observe(this.containerEl),this.containerEl.addEventListener("pointerdown",this.handlePointerdown),document.addEventListener("pointermove",this.handlePointermove,{passive:!0}),document.addEventListener("pointerup",this.handlePointerup),document.body.addEventListener("pointerleave",this.handlePointerup))}removeEventListeners(){this.resizeObserver.disconnect(),this.containerEl&&(this.containerEl.removeEventListener("pointerdown",this.handlePointerdown),document.removeEventListener("pointermove",this.handlePointermove),document.removeEventListener("pointerup",this.handlePointerup))}handlePointerdown(t){this.m=!0,this.P=this._,this.C=this._,this.k.start=t.clientX,this.k.previous=t.clientX,this.updateDimensions()}handlePointermove(t){if(!this.m)return;const i=t.clientX-this.k.start;Math.abs(i)>10&&this.containerEl.classList.add("ec-is-dragging"),this.C=this.P+i,s(this.R,t.clientX-this.k.previous,10),this.k.previous=t.clientX}handlePointerup(){var t;this.containerEl.classList.remove("ec-is-dragging"),this.m=!1,this.C+=((t=this.R).length?t.reduce((t,s)=>t+s,0)/t.length:0)*this.T}updateDimensions(t){this.t=t||this.containerEl.offsetWidth;let s=0;this.l=this.slideEls.map((t,i)=>{let e=t.offsetWidth,o=s;return s+=e,i<this.l.length-1&&(s+=this.gap),{width:e,x:o}}),this.i=s,this.M=this.t-this.i,this.containerEl.style.setProperty("--ec-container-width",`${this.t}px`),this.t<600?this.T=12:this.T=15}isAtBoundary(){return this.C>0||this.C<this.t-this.i}getPhysicsConfig(){return this.m?C:this.v?M:this.isAtBoundary()?k:E}updatePosition(){if(!this.m)if(this.C>0)this.C-=.25*this.C;else if(this.C<this.M){const t=this.C-this.M;this.C-=.25*t}const t=this.B,s=this._-this.C,i=Math.abs(s)<.01&&Math.abs(this.S)<.01;if(!this.m&&i)return this._=this.C,void(this.S=0);const e=this.getPhysicsConfig(),{mass:o,naturalFrequency:h,dampingRatio:r}=e,n=o*(2*h*Math.PI)**2,a=(-n*s+-2*r*Math.sqrt(n*o)*this.S)/o;this.S+=a*t,this._+=this.S*t}getClosestSlideToPoint(t){return this.l.reduce((s,i,e)=>{const o=Math.abs(s.cumulativeWidth+t);return o<s.distanceFromTarget?{index:e,distanceFromTarget:o,leftEdge:s.cumulativeWidth,cumulativeWidth:s.cumulativeWidth+i.width+this.gap}:{...s,cumulativeWidth:s.cumulativeWidth+i.width+this.gap}},{index:0,distanceFromTarget:1/0,leftEdge:0,cumulativeWidth:0})}updateScrollPos(){this.G(),this.G=i(this.containerEl,t=>{this.t=t.width,this.M=this.t-this.i;const s=Math.max(Math.min((this.j-t.top)/(this.j+t.height),1),0);if(s!==this.V){this.v=!0;const t=this.V-s,i=this.j*t*.5;this.C+=i,this.C=Math.max(Math.min(0,this.C),this.t-this.i),this.V=s}this.O=t})}getSlidePositions(){const t=this._;let s=t,i=!1;const e=this.slideEls.map((e,o)=>{const h=this.o[o],r=this.l[o]?.width;o>0&&(s+=this.l[o-1]?.width+this.gap);let n=0,a=0,l=0,c=0,d=Math.min(r*this.F,this.t);const u=this.l[o];u&&u.x+u.width*this.F>this.i&&(d=r*(this.slideEls.length-o)+Math.round(this.A*this.F));let p=Math.min(Math.max(d-Math.max(this.t-s+Math.round(this.A*this.F),0),0)/(d-this.I),1);const g=(r-this.I)*p;if(l=g,n=-g/2,c-=g,s<this.t&&s+r-l+this.gap>=this.t&&t<=0){const t=r-a-l,e=this.I-(this.t-s)<=0?t:this.t-s,h=this.t-(s+e);h>0&&!this.A&&(this.A=h,this.L=o+1,i=!0),e<this.I/2&&!this.A&&(this.A=e+this.gap,this.L=o+1,i=!0)}Math.round(s-this.gap)<=0&&Math.round(r+s)>0&&(o!==this.anchorSlide&&this.onSlideChange&&this.onSlideChange(o),this.anchorSlide=o),s<=0&&(a=Math.min(Math.abs(s),r-this.I),n=s/-2);const b={el:e,contentEl:h,xPos:s,rightClipInset:l,leftClipInset:a,innerTranslate:n};return s+=c,b});return i?this.getSlidePositions():e}setVirtualization(t,s,i=!0){if(i){if(t.childElementCount>0)return;const s=this.h.get(t);s&&(t.replaceChildren(s),this.h.delete(t),t.style.width="")}else{if(!t.firstElementChild||!this.l[s])return;const i=t.firstElementChild;t.style.width=`${this.l[s].width}px`,t.style.backgroundColor=i.backgroundColor,this.h.set(t,t.removeChild(t.firstElementChild))}}positionSlides(){this.getSlidePositions().forEach(({el:t,contentEl:s,xPos:i,rightClipInset:e,leftClipInset:o,innerTranslate:h},r)=>{const n=this.l[r]?.width-e-o,a=Math.min(this.borderRadius,n/2);t.style.setProperty("--transform",`translate3d(${i}px, 0 ,0)`),this.h.has(t)||(t.style.setProperty("--clip",`inset(0 ${e}px 0 ${o}px round ${a}px)`),s.style.setProperty("--content-transform",`translate3d(${h}px, 0, 0)`))})}goToSlide(t,s=!0){t=Math.max(Math.min(t,this.slideEls.length-1),0),this.updateDimensions(),t===this.l.length-1?this.C=this.M:(this.C=this.l[t]?.x||0===this.l[t]?.x?-this.l[t]?.x:this.C,this.C=Math.max(this.C,this.M)),s||(this._=this.C)}advance(){this.goToSlide(Math.min(this.getClosestSlideToPoint(this.C).index+1,this.slideEls.length-1))}retreat(){this.goToSlide(Math.max(this.getClosestSlideToPoint(this.C).index-1,0))}render(){if(this.R.shift(),!this.slideEls)return;this.bindToScrollPos&&this.updateScrollPos();const t=this.getClosestSlideToPoint(this.M),s=this.C+t.leftEdge<=0;if(this.snapToSlide&&!this.m&&!this.isAtBoundary()&&!s){const t=this.getClosestSlideToPoint(this.C);this.C=-t.leftEdge}this.atEnd=t.cumulativeWidth+this.C-this.t-this.gap<=0,this.atEnd&&this.onReachEnd?this.onReachEnd(!0):this.onReachEnd(!1),this.updatePosition(),this.positionSlides(),this.v=!1,this.startIndex>0&&(this.p<4&&(1==this.p&&this.goToSlide(this.startIndex,!1),3==this.p&&(this.containerEl.style.opacity="")),this.p++)}loop(t){if(!this.u)return;const s="safari"===_.browser?8:12;t-this.$>s&&(this.render(),this.$=t),requestAnimationFrame(t=>this.loop(t))}}class T extends n{label="ElasticCarousel";widgetSettings;feedMetadata;posts;previewLoadingColors=null;startIndex=0;containerEl;headerEl;innerEl;footerEl;instagramLogoEl;labelEl;leftArrowEl;rightArrowEl;slidesContainerEl;postEls;popoverGalleryEl;langDirection;appliedBreakpoint;medianPaletteHSL;gyre;constructor(){super(),this.onPropChange(this.W,["widgetSettings","feedMetadata","posts","previewLoadingColors","startIndex"],["widgetSettings","feedMetadata","posts"],this.setup),a.register(),l.register(),c.register(),this.gyre=new R({onSlideChange:t=>this.H(t),onReachEnd:t=>this.J(t)}),this.U=this.U.bind(this),this.N=this.N.bind(this),this.addEventListener("post-focus-next",this.K),this.addEventListener("post-focus-previous",this.X),this.onConnect(()=>{e("elasticCarousel: onConnect"),this.N(),this.containerEl||(this.slidesContainerEl=t({classes:"ec-slides"}),this.headerEl=t({type:"header",classes:"ec-header",attributes:{dir:"ltr"}}),this.innerEl=t({classes:"ec-inner",contents:[this.slidesContainerEl]}),this.footerEl=t({type:"footer",classes:"ec-footer",attributes:{dir:"ltr"}}),this.labelEl=t({classes:"ec-label",attributes:{dir:this.langDirection??"ltr"}}),this.leftArrowEl=t({type:"button",classes:"ec-button ec-retreat",contents:[p],listeners:{click:()=>this.Y()},attributes:{tabindex:-1,disabled:!0,"aria-hidden":!0}}),this.rightArrowEl=t({type:"button",classes:"ec-button ec-advance",contents:[g],listeners:{click:()=>this.Z()},attributes:{tabindex:-1,"aria-hidden":!0}}),this.containerEl=t({type:"figure",classes:"ec-carousel",contents:[this.innerEl]})),this.renderWidget(this.containerEl,[d,'.ec-carousel{--ec-controls-margin:20px;--ec-button-border-radius:40%;--ec-icon-color:#4a4a4a;--ec-text-color:#4a4a4a;--ec-button-color:#f4f4f4;--ec-button-hover-color:#ececec;--ec-button-icon-color:#4a4a4a;--ec-button-icon-hover-color:#2e2e2e;--ec-button-gap:min(calc(var(--ec-controls-margin)/2),5px);flex-direction:column;height:var(--ec-height);margin:0;overflow:hidden;width:100%}.ec-carousel,.ec-inner{display:flex;justify-content:center}.ec-inner{align-items:center}.ec-slides{border-radius:var(--ec-border-radius);cursor:grab;height:var(--ec-height);justify-content:flex-start;overflow:hidden;position:relative;touch-action:pan-y;width:100%}.ec-slide,.ec-slides{display:flex;isolation:isolate}.ec-slide{clip-path:var(--clip);flex-shrink:0;height:100%;left:0;max-width:calc(var(--ec-container-width)*.45);position:absolute;top:0;transform:var(--transform);-moz-user-select:none;user-select:none;-webkit-user-select:none;will-change:clip-path,transform}.ec-slide behold-album-post,.ec-slide behold-image-post,.ec-slide behold-video-post{transform:var(--content-transform)}.ec-slide .post--placeholder{aspect-ratio:unset;height:100%}.ec-is-dragging{cursor:grabbing}.ec-is-dragging .ec-slide{pointer-events:none}.ec-footer,.ec-header{display:flex;justify-content:center}.ec-carousel--controls-sides .ec-footer,.ec-carousel--controls-sides .ec-header{padding:0 64px;padding-inline:64px}.ec-header{margin-bottom:var(--ec-controls-margin)}.ec-footer{margin-top:var(--ec-controls-margin)}.ec-label{align-items:center;display:flex;flex-shrink:1;gap:7px 5px;line-height:1.2;min-width:0;overflow:hidden;text-overflow:ellipsis;-moz-user-select:none;user-select:none;-webkit-user-select:none}.ec-carousel--controls-center .ec-button+.ec-label,.ec-carousel--controls-split .ec-button+.ec-label{margin:0 max(calc(var(--ec-controls-margin)*1.5),20px)}.ec-carousel--label-right .ec-label{margin-left:auto}.ec-carousel--label-left .ec-label{margin-right:auto}.ec-label svg{flex-shrink:0;height:24px;margin-right:5px;width:24px}.ec-label svg path{fill:var(--behold-icon-color,var(--ec-icon-color))}.ec-label a,.ec-label div{color:var(--behold-text-color,var(--ec-text-color));display:inline-block;font-family:inherit;font-size:19px;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.ec-button,.ec-carousel--controls-center .ec-footer,.ec-carousel--controls-center .ec-header{justify-content:center}.ec-button{align-items:center;background-color:transparent;border:none;cursor:pointer;display:flex;flex-shrink:0;height:44px;padding:0;touch-action:manipulation;transition:all .3s ease;width:44px}.ec-carousel--controls-sides .ec-button{height:var(--ec-height);width:64px}.ec-button:disabled{cursor:default;opacity:.5}.ec-button:before{background-color:var(--behold-button-color,var(--ec-button-color));border-radius:var(--ec-button-border-radius);content:"";height:44px;position:absolute;transition:all .3s ease;width:44px}.ec-button:not(:disabled):hover:before{background-color:var(\n --behold-button-hover-color,var(--ec-button-hover-color)\n )}.ec-button svg{height:14px;position:relative;width:auto;z-index:1}.ec-button svg path{fill:var(--behold-button-icon-color,var(--ec-button-icon-color));transition:all .3s ease}.ec-button:not(:disabled):hover svg path{fill:var(\n --behold-button-icon-hover-color,var(--ec-button-icon-hover-color)\n )}.ec-retreat{padding-right:var(--ec-button-gap);width:calc(44px + var(--ec-button-gap))}.ec-retreat:dir(rtl){padding-right:0;padding-inline-end:var(--ec-button-gap)}.ec-carousel--controls-split .ec-retreat{margin-right:auto}.ec-carousel--controls-split .ec-retreat:dir(rtl){margin-right:0;margin-inline-end:auto}.ec-carousel--controls-right .ec-retreat{margin-left:auto}.ec-carousel--controls-right .ec-retreat:dir(rtl){margin-left:0;margin-inline-start:auto}.ec-advance{padding-left:var(--ec-button-gap);width:calc(44px + var(--ec-button-gap))}.ec-advance:dir(rtl){padding-left:0;padding-inline-start:var(--ec-button-gap)}.ec-carousel--controls-split .ec-advance{margin-left:auto}.ec-carousel--controls-split .ec-advance:dir(rtl){margin-left:0;margin-inline-start:auto}.ec-carousel--controls-left .ec-advance{margin-right:auto;margin-inline-end:auto}.ec-carousel--controls-left .ec-advance:dir(rtl){margin-right:0;margin-inline-end:auto}.ec-carousel--controls-sides .ec-retreat{padding-right:20px}.ec-carousel--controls-sides .ec-advance{padding-left:20px}.post{height:100%;max-width:calc(var(--ec-container-width)*.45)}.post a{-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.post--placeholder{background-color:#dedede;height:0;min-height:100%;padding-bottom:calc(100%/var(--post-aspect-ratio))}']),this.setAttribute("tabindex","0"),this.setAttribute("aria-label","Gallery of Instagram posts. Shift + arrow keys to navigate"),this.onResize(this,this,this.tt)})}setup(){if(e("elasticCarousel: setup"),"transparent"!==this.widgetSettings.loadingColor){const t=this.posts.filter(t=>t.colorPalette).map(t=>t.colorPalette);this.medianPaletteHSL=u(t,this.widgetSettings.loadingColor)}const t=this.getMatchingBreakpoint(this.offsetWidth,this.widgetSettings.breakpoints);this.renderBreakpoint(t),o(this.containerEl,{"--ec-icon-color":this.widgetSettings.iconColor,"--ec-text-color":this.widgetSettings.textColor,"--ec-button-color":this.widgetSettings.buttonColor,"--ec-button-hover-color":this.widgetSettings.buttonHoverColor,"--ec-button-icon-color":this.widgetSettings.buttonIconColor,"--ec-button-icon-hover-color":this.widgetSettings.buttonIconHoverColor}),this.postEls&&this.postEls.forEach(t=>{t.widgetSettings=this.widgetSettings,t.feedMetadata=this.feedMetadata}),this.st(),"openPopupGallery"===this.widgetSettings.onPostClick&&this.enablePopoverGallery(),this.previewLoadingColors&&(this.postEls.forEach(t=>{t.previewLoadingColors=this.previewLoadingColors}),h(this,{"is-previewing-loading-colors":!!this.previewLoadingColors}))}N(){const t=getComputedStyle(document.body);this.langDirection=t.direction}st(){e("elasticCarousel: buildLabel");const s=document.createElement("template");if(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path d="M295.42,6c-53.2,2.51-89.53,11-121.29,23.48-32.87,12.81-60.73,30-88.45,57.82S40.89,143,28.17,175.92c-12.31,31.83-20.65,68.19-23,121.42S2.3,367.68,2.56,503.46,3.42,656.26,6,709.6c2.54,53.19,11,89.51,23.48,121.28,12.83,32.87,30,60.72,57.83,88.45S143,964.09,176,976.83c31.8,12.29,68.17,20.67,121.39,23s70.35,2.87,206.09,2.61,152.83-.86,206.16-3.39S799.1,988,830.88,975.58c32.87-12.86,60.74-30,88.45-57.84S964.1,862,976.81,829.06c12.32-31.8,20.69-68.17,23-121.35,2.33-53.37,2.88-70.41,2.62-206.17s-.87-152.78-3.4-206.1-11-89.53-23.47-121.32c-12.85-32.87-30-60.7-57.82-88.45S862,40.87,829.07,28.19c-31.82-12.31-68.17-20.7-121.39-23S637.33,2.3,501.54,2.56,348.75,3.4,295.42,6m5.84,903.88c-48.75-2.12-75.22-10.22-92.86-17-23.36-9-40-19.88-57.58-37.29s-28.38-34.11-37.5-57.42c-6.85-17.64-15.1-44.08-17.38-92.83-2.48-52.69-3-68.51-3.29-202s.22-149.29,2.53-202c2.08-48.71,10.23-75.21,17-92.84,9-23.39,19.84-40,37.29-57.57s34.1-28.39,57.43-37.51c17.62-6.88,44.06-15.06,92.79-17.38,52.73-2.5,68.53-3,202-3.29s149.31.21,202.06,2.53c48.71,2.12,75.22,10.19,92.83,17,23.37,9,40,19.81,57.57,37.29s28.4,34.07,37.52,57.45c6.89,17.57,15.07,44,17.37,92.76,2.51,52.73,3.08,68.54,3.32,202s-.23,149.31-2.54,202c-2.13,48.75-10.21,75.23-17,92.89-9,23.35-19.85,40-37.31,57.56s-34.09,28.38-57.43,37.5c-17.6,6.87-44.07,15.07-92.76,17.39-52.73,2.48-68.53,3-202.05,3.29s-149.27-.25-202-2.53m407.6-674.61a60,60,0,1,0,59.88-60.1,60,60,0,0,0-59.88,60.1M245.77,503c.28,141.8,115.44,256.49,257.21,256.22S759.52,643.8,759.25,502,643.79,245.48,502,245.76,245.5,361.22,245.77,503m90.06-.18a166.67,166.67,0,1,1,167,166.34,166.65,166.65,0,0,1-167-166.34" transform="translate(-2.5 -2.5)"/><title>Instagram</title></svg>',this.widgetSettings.labelLink?.length){const i=t({type:"a",contents:this.widgetSettings.label?.length?this.widgetSettings.label:this.feedMetadata.username,attributes:{href:this.widgetSettings.labelLink,target:"_blank"}});this.labelEl.beholdReplaceChildren(s.content,i)}else if(this.feedMetadata.hashtags?.length){const i=this.feedMetadata.hashtags.map((s,i,e)=>t({type:"a",contents:["#",s,i<e.length-1?", ":""],attributes:{target:"_blank",href:`https://instagram.com/explore/tags/${s}`}}));this.labelEl.beholdReplaceChildren(s.content,...i)}else{const i=t({type:"a",contents:[this.feedMetadata.username],attributes:{target:"_blank",href:`https://instagram.com/${this.feedMetadata.username}`}});this.labelEl.beholdReplaceChildren(s.content,i)}}H(t){0===t&&this.leftArrowEl?this.leftArrowEl.disabled=!0:this.leftArrowEl.disabled=!1,this.gyre.atEnd?this.rightArrowEl.disabled=!0:this.rightArrowEl.disabled=!1,this.dispatchEvent(new CustomEvent("slide-change",{bubbles:!0,composed:!0,detail:{index:t,currentPost:this.posts?.[t??0]}}))}J(t){this.rightArrowEl.disabled=!!t}W({changedProp:t,oldValue:s,newValue:i}){switch(t){case"posts":this.it({oldValue:s,newValue:i});break;case"widgetSettings":this.et(s,i);break;case"feedMetadata":this.ot();break;case"previewLoadingColors":this.postEls.forEach(t=>{t.previewLoadingColors=this.previewLoadingColors}),h(this,{"is-previewing-loading-colors":!!this.previewLoadingColors})}}it({oldValue:t,newValue:s}){this.postEls=[],this.renderBreakpoint(this.getMatchingBreakpoint(this.offsetWidth,this.widgetSettings.breakpoints),!0),this.postEls.forEach(t=>{t.widgetSettings=this.widgetSettings,t.feedMetadata=this.feedMetadata}),this.popoverGalleryEl&&(this.popoverGalleryEl.posts=this.posts)}et(t,s){let i=!1;this.postEls?.length&&!r(t.breakpoints,s.breakpoints,["postHeight"],1)||(i=!0),o(this.containerEl,{"--ec-icon-color":s.iconColor,"--ec-text-color":s.textColor,"--ec-button-color":s.buttonColor,"--ec-button-hover-color":s.buttonHoverColor,"--ec-button-icon-color":s.buttonIconColor,"--ec-button-icon-hover-color":s.buttonIconHoverColor}),r(t,s,["label","labelLink"])&&this.st(),"openPopupGallery"!==t?.onPostClick&&"openPopupGallery"===s?.onPostClick&&this.enablePopoverGallery();const e=this.getMatchingBreakpoint(this.offsetWidth,s.breakpoints);this.renderBreakpoint(e,i),this.postEls.forEach(t=>{t.widgetSettings=s}),this.popoverGalleryEl&&(this.popoverGalleryEl.widgetSettings=s)}ot(){let t=`from @${this.feedMetadata.username}`;this.feedMetadata.hashtags?.length&&(t=`from hashtag${this.feedMetadata.hashtags.length>1?"s":""} ${this.feedMetadata.hashtags.join(", ")}`),this.setAttribute("aria-label",`Gallery of Instagram posts ${t}. Shift + arrow keys to navigate`),this.postEls.forEach(t=>{t.feedMetadata=this.feedMetadata}),this.popoverGalleryEl&&(this.popoverGalleryEl.feedMetadata=this.feedMetadata)}async enablePopoverGallery(){if(this.popoverGalleryEl)return;const{default:t}=await import("./PopoverGallery-DllXW8CW.js");t.register(),this.popoverGalleryEl=document.createElement("behold-popover-gallery"),Object.assign(this.popoverGalleryEl,{widgetSettings:this.widgetSettings,feedMetadata:this.feedMetadata,posts:this.posts,closeFocusEl:this,onSlideChange:t=>{"number"==typeof t&&(this.gyre.goToSlide(t),this.popoverGalleryEl.closeFocusEl=this.postEls[t])}})}tt(t){const s=t.contentBoxSize?.[0]?.inlineSize,i=this.widgetSettings.breakpoints,e=this.getMatchingBreakpoint(s,i);this.renderBreakpoint(e)}X(){if(!this.postEls.length)return;let t=[...this.postEls].indexOf(this.shadow.activeElement?.parentElement);t>0&&(t-=1),this.postEls[t].focus(),this.gyre.goToSlide(t)}K(){if(!this.postEls.length)return;let t=[...this.postEls].indexOf(this.shadow.activeElement?.parentElement);this.gyre.anchorSlide>0&&t<this.gyre.anchorSlide&&(t=this.gyre.anchorSlide),t>-1&&t<this.postEls.length-1&&(t+=1),t<0&&(t=0),this.postEls[t].focus(),this.gyre.goToSlide(t)}U(t){this.popoverGalleryEl.open(this.postEls.indexOf(t),t)}Z(){this.gyre&&this.gyre.advance()}Y(){this.gyre&&this.gyre.retreat()}renderPosts(t){this.postEls=this.createPostEls(t),e("elasticCarousel: renderPosts"),this.raf(()=>{this.gyre.destroy(),this.gyre.init({containerEl:this.slidesContainerEl,slideEls:this.postEls,height:t.postHeight,gap:t.gap.x,borderRadius:parseInt(t.borderRadius),applyBorderRadiusToContainer:t.applyBorderRadiusToContainer||!0,snapToSlide:t.snapToSlide||!1,bindToScrollPos:t.bindToScrollPos||!1,startIndex:this.startIndex})},"renderPosts")}getMatchingBreakpoint(t,s){e("elasticCarousel: getMatchingBreakpoint");const i=Object.entries(s).map(([t,s])=>({width:t,...s})).filter(t=>"default"!==t.width).sort((t,s)=>parseInt(s.width)-parseInt(t.width)).reduce((s,i)=>t<=parseInt(i.width)?i:s,s.default);return{...s.default,...i}}renderBreakpoint(t,s=!1){if(!this.posts||!this.containerEl)return;e("elasticCarousel: renderBreakpoint"),this.N();const i=this.appliedBreakpoint,{showControls:n,controlsPosition:a,controlsJustification:l,showLabel:c,labelPosition:d,labelJustification:u,buttonBorderRadius:p,controlsMargin:g}=t;if(this.postEls?.length&&!r(i,t,["numPosts","forcePostAspectRatio","postAspectRatio","postHeight"])||(s=!0),this.widgetSettings.maxWidth&&this.widgetSettings.constrainWidth&&this.containerEl.style.maxWidth!==`${this.widgetSettings.maxWidth}px`&&(this.containerEl.style.maxWidth=`${this.widgetSettings.maxWidth}px`),this.widgetSettings.constrainWidth||(this.containerEl.style.maxWidth=""),this.leftArrowEl.remove(),this.rightArrowEl.remove(),r(i,t,["showControls","controlsPosition","controlsJustification","showLabel","labelPosition","labelJustification"])||n&&!this.leftArrowEl.isConnected||c&&!this.labelEl.isConnected){this.leftArrowEl.remove(),this.rightArrowEl.remove(),this.labelEl.remove(),this.headerEl.remove(),this.footerEl.remove(),o(this.containerEl,{"--ec-button-border-radius":`${p}%`,"--ec-controls-margin":`${g}px`}),h(this.containerEl,{"ec-carousel--controls-sides":"sides"===a,"ec-carousel--controls-left":"left"===l,"ec-carousel--controls-right":"right"===l,"ec-carousel--controls-center":"center"===l,"ec-carousel--controls-split":"split"===l,"ec-carousel--label-left":"left"===u,"ec-carousel--label-right":"right"===u,"ec-carousel--label-center":"left"===u}),c&&("top"===d&&this.headerEl.append(this.labelEl),"bottom"===d&&this.footerEl.append(this.labelEl));let t=this.innerEl;if("top"===a&&(t=this.headerEl),"bottom"===a&&(t=this.footerEl),n&&"sides"===a)"rtl"===this.langDirection?(t.append(this.leftArrowEl),t.prepend(this.rightArrowEl)):(t.prepend(this.leftArrowEl),t.append(this.rightArrowEl));else if(n)switch(l){case"left":t.prepend(this.rightArrowEl),t.prepend(this.leftArrowEl);break;case"right":t.append(this.leftArrowEl),t.append(this.rightArrowEl);break;default:t.prepend(this.leftArrowEl),t.append(this.rightArrowEl)}this.headerEl.childElementCount&&this.containerEl.prepend(this.headerEl),this.footerEl.childElementCount&&this.containerEl.append(this.footerEl)}this.containerEl.setAttribute("data-hover-effect",this.widgetSettings.hoverEffect),s?this.renderPosts(t):this.gyre.updateSettings({height:t.postHeight,gap:t.gap.x,borderRadius:parseInt(t.borderRadius),applyBorderRadiusToContainer:t.applyBorderRadiusToContainer,snapToSlide:t.snapToSlide,bindToScrollPos:t.bindToScrollPos}),this.appliedBreakpoint=t}createPostEls(s){e("elasticCarousel: createPostEls");const{numPosts:i,postHeight:o,postAspectRatio:h,forcePostAspectRatio:r}=s,n=this.posts.filter((t,i)=>i<(s?.numPosts||this.posts?.length||12)),a=n.map((s,e)=>{const a=[s.sizes.full.width,s.sizes.full.height],l=r?h||[1,1]:a,c=l.reduce((t,s)=>t/s);let d="behold-image-post";return"VIDEO"===s.mediaType&&(d="behold-video-post"),"CAROUSEL_ALBUM"===s.mediaType&&(d="behold-album-post"),t({type:d,props:{post:s,widgetSettings:this.widgetSettings,feedMetadata:this.feedMetadata,medianPaletteHSL:this.medianPaletteHSL,onClick:this.U,hasRowGap:!0,isLastRow:!1,index:e,aspectRatio:l,totalPosts:n?.length||i||this.posts?.length||0},style:{width:o*c+"px","--post-aspect-ratio":c}})});for(;a.length<s.numPosts;){const s=t({classes:"post post--placeholder",style:{width:`${o}px`,"--post-aspect-ratio":1}});a.push(s)}return a}static register(t="behold-elastic-carousel"){return customElements.get(t)||customElements.define(t,T),t}}export{T as default};
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=appendLicense.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"appendLicense.d.ts","sourceRoot":"","sources":["../appendLicense.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- function t(t){return JSON.parse(JSON.stringify(t,(t,e)=>void 0===e?null:e))}function e(){return document.body.offsetTop}async function s(t,e){const s=document.createElement(t);return new Promise((i,n)=>{switch(t){case"img":s.addEventListener("load",()=>{i(e)});break;case"video":s.addEventListener("loadeddata",()=>i(e))}s.addEventListener("error",t=>{n(t)}),s.src=e})}function i({text:t,maxLines:e=2,maxChars:s=50}){if(!t)return;const i=t.match(/.*/g).filter(t=>t.length>0).slice(0,e).join("").length,n=Math.min(i,s);return t.slice(0,n)}function n(t,e){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='${t}' height='${e}'%3E%3C/svg%3E%0A`}function o(t){return new Promise(e=>{let s=new IntersectionObserver(t=>{let i=t.reduce((t,e,s)=>e.intersectionRatio>t.intersectionRatio?{index:s,intersectionRatio:e.intersectionRatio}:t,{intersectionRatio:0,index:null});s.disconnect(),s=null,e(i.index)});t.forEach(t=>s.observe(t))})}function r(t,e){let s=!1,i=new IntersectionObserver(t=>{s||(i.disconnect(),i=null,e(t[0].boundingClientRect))});return i.observe(t),function(){s||(s=!0,i&&(i.disconnect(),i=null))}}function a(t){return t.isConnected?"#document"===t.nodeName||t instanceof ShadowRoot?t:a(t.parentNode):document}function l(t,e,s=null,i=!1){let n=i?performance.now():0,o=null;return(...i)=>{let r=performance.now();clearTimeout(o),o=setTimeout(()=>t.apply(s,i),e),r-n>e&&(clearTimeout(o),n=r,t.apply(s,i))}}function h(t,e){Object.entries(e).forEach(([e,s])=>{s?t.classList.add(e):t.classList.remove(e)})}function c(t,e){Object.keys(e).forEach(s=>{t.style.setProperty(s,e[s])})}function d(t,e,s,i=0){if("string"==typeof s&&(s=[s]),i>0){let i=!1;return Object.keys(t).length!==Object.keys(e).length||(Object.keys(t).forEach(n=>{d(t[n],e[n],s)&&(i=!0)}),i)}return s.reduce((s,i)=>!u(t?.[i],e?.[i])||s,!1)}function u(t,e,s=!1,i=!1){if(i&&(Array.isArray(t)&&(t=t.sort()),Array.isArray(e)&&(e=e.sort())),s&&("number"==typeof t&&(t=t.toString()),"number"==typeof e&&(e=e.toString())),typeof t!=typeof e)return!1;if(null===t&&null===e)return!0;if(null===t&&null!==e)return!1;if(null!==t&&null===e)return!1;if(void 0===t&&void 0===e)return!0;if(void 0===t&&void 0!==e)return!1;if(void 0!==t&&void 0===e)return!1;if("object"==typeof t)return Object.keys(t).length===Object.keys(e).length&&Object.entries(t).reduce((t,[n,o])=>!!u(o,e[n],s,i)&&t,!0);if(Array.isArray(t)){let n=!0;return t.forEach((t,o)=>{u(t,e[o],s,i)||(n=!1)}),n}return t===e}function p(t,e="assertive"){const s=document.createElement("div");s.innerHTML=t,s.setAttribute("aria-live",e),s.setAttribute("aria-atomic","true"),s.style.cssText="\n position: absolute;\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0,0,0,0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n ",requestAnimationFrame(()=>{document.body.appendChild(s),setTimeout(()=>{s.remove()},500)})}function w(t,e,s){t.length===s&&t.shift(),t.push(e)}function m(...t){window?.location.search.includes("behold-debug-mode")&&console.log(...t)}let b={isMuted:!0,keyboardNavEnabled:!1,popoverOverlayHslArray:[0,0,0],popoverOverlayOpacity:.6},f=!1,g=null,v=null;const y=new Map,O=new Map,j=new Map,x=new Set;!function t(){j.forEach(t=>{const e=performance.now(),{minWait:s,lastInvocation:i,callback:n}=t,o=e-i;o>s&&(n(o),j.set(n,{...t,lastInvocation:e}))}),requestAnimationFrame(t)}();class S extends HTMLElement{label="BaseElement";storedProperties=new Map;requiredProperties=[];hasRequiredProps=!1;propChangeHandlers=new Map;delayedPropChangeHandlers=new Map;queuedPropUpdates=new Set;localState=Object.freeze({});localStateChangeHandlers=new Set;connectHandlers=new Set;disconnectHandlers=new Set;rafs=new Map;timeouts=new Map;constructor(){if(super(),this.t=this.t.bind(this),this.i=this.i.bind(this),this.o=this.o.bind(this),!g){let t=window.ResizeObserver;"ResizeObserver"in window==0&&(t=window.BeholdResizeObserver),g=new t(t=>{t.forEach(t=>{const e=y.get(t.target);e&&e(t)})})}v||(v=new IntersectionObserver(t=>{t.forEach(t=>{const e=O.get(t.target);e&&e(t)})})),f||(f=!0,document.addEventListener("keydown",this.t),document.addEventListener("mousedown",this.i),document.addEventListener("mousemove",this.o,{passive:!0}))}connectedCallback(){this.connectHandlers.forEach(t=>t())}disconnectedCallback(){this.rafs.forEach(t=>cancelAnimationFrame(t)),this.rafs.clear(),this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts.clear(),this.disconnectHandlers.forEach(t=>t())}onConnect(t){this.connectHandlers.add(t)}onDisconnect(t){this.disconnectHandlers.add(t)}onResize(t,e,s){y.set(e,s.bind(t)),g.observe(e),this.disconnectHandlers.add(()=>{y.delete(e),g.unobserve(e)})}onIntersection(t,e){O.set(t,e),v.observe(t),this.disconnectHandlers.add(()=>{O.delete(t),v.unobserve(t)})}onLoop(t,e=50){j.set(t,{minWait:e,lastInvocation:0,callback:t}),this.disconnectHandlers.add(()=>{j.delete(t)})}onPropChange(e,s,i=null,n=null){i?this.requiredProperties.push(...i):this.requiredProperties.push(...s),s.forEach(s=>{void 0!==this[s]&&this.storedProperties.set(s,this[s]),this.propChangeHandlers.get(s)||(this.propChangeHandlers.set(s,[]),this.delayedPropChangeHandlers.set(s,[])),n?this.delayedPropChangeHandlers.get(s).push(e):this.propChangeHandlers.get(s).push(e),Object.defineProperty(this,s,{set(e){void 0===e&&(e=null,m(`Attempted to set value of ${s} as "undefined" on ${this.label}. ${s} was coerced to null instead.`)),e=t(e);const i=this.storedProperties.has(s)?t(this.storedProperties.get(s)):null;this.storedProperties.set(s,e),this.hasRequiredProps=this.requiredProperties.every(t=>this.storedProperties.has(t)),this.queueHandlers({prop:s,oldValue:i,newValue:e})},get(){return this.storedProperties.get(s)}})}),n&&(n=n.bind(this),queueMicrotask(()=>{this.hasRequiredProps&&(n(),this.delayedPropChangeHandlers.forEach((t,e)=>{this.propChangeHandlers.set(e,[...this.propChangeHandlers.get(e),...t])}))})),this.queueMissingPropsCheck()}queueHandlers({prop:t,oldValue:e,newValue:s}){this.hasRequiredProps?(this.queuedPropUpdates.size&&(this.queuedPropUpdates.delete(t),this.runQueuedPropHandlers()),this.propChangeHandlers.get(t).forEach(i=>{i.call(this,{changedProp:t,oldValue:e,newValue:s})})):this.queuedPropUpdates.add(t)}runQueuedPropHandlers(){this.queuedPropUpdates.forEach(t=>{this.propChangeHandlers.get(t).forEach(e=>{e.call(this,{changedProp:t,oldValue:null,newValue:this[t]})})}),this.queuedPropUpdates.clear()}updateLocalState(e){const s=Object.freeze(t(this.localState));this.localState=Object.freeze({...this.localState,...e}),this.localStateChangeHandlers.forEach(t=>t({changedProps:Object.keys(e),oldState:s,newState:this.localState}))}onLocalStateChange(t,e){this.localState={...this.localState,...e};const s=t.bind(this);this.localStateChangeHandlers.add(s)}updateGlobalState(e){const s=t(b);b={...b,...e},x.forEach(t=>t({changedProps:Object.keys(e),oldState:s,newState:b}))}onGlobalStateChange(t){this.connectHandlers.add(()=>{const e=t.bind(this);x.add(e),this.disconnectHandlers.add(()=>x.delete(e))})}t(t){"Tab"===t.key&&this.updateGlobalState({keyboardNavEnabled:!0})}i(t){0===t.clientX&&0===t.clientY||this.updateGlobalState({keyboardNavEnabled:!1})}o(t){t.ctrlKey||t.altKey||t.shiftKey||t.metaKey||0===t.movementX||0===t.movementY||this.updateGlobalState({keyboardNavEnabled:!1})}get globalState(){return b}set globalState(t){throw new Error("Shared state cannot be set directly. Use this.updateGlobalState() instead.")}raf(t,e,s=!0){s&&cancelAnimationFrame(this.rafs.get(e));const i=requestAnimationFrame(()=>{t(),this.rafs.delete(e)});return this.rafs.set(e,i),i}cancelRaf(t){cancelAnimationFrame(this.rafs.get(t)),this.rafs.delete(t)}to(t,e,s){const i=setTimeout(()=>{t(),this.timeouts.delete(s)},e);return this.timeouts.set(s,i),i}cancelTo(t){clearTimeout(this.timeouts.get(t)),this.timeouts.delete(t)}queueMissingPropsCheck(){queueMicrotask(()=>{if(this.requiredProperties.length&&!this.hasRequiredProps){const t=this.requiredProperties.filter(t=>!this.storedProperties.has(t));console.error(`${this.label||this.tagName} is missing required props: ${t.join(", ")}`)}})}}function C(t){let{type:e="div",classes:s=[],contents:i=[],attributes:n={},props:o={},style:r={},listeners:a={}}=t;s=Array.isArray(s)?s:[s];const l=document.createElement(e);return Array.isArray(i)||(i=[i]),i=i.filter(t=>null!=t).map(t=>{if("string"==typeof t&&t.includes("</svg>")){const e=document.createElement("template");return e.innerHTML=t,e.content}return t}),l.beholdReplaceChildren(...i),s.length&&(l.className=s.join(" ")),Object.keys(n).forEach(t=>{null!==n[t]&&void 0!==n[t]?l.setAttribute(t,n[t]):l.removeAttribute(t)}),Object.assign(l,o),Object.keys(r).forEach(t=>{"--"===t.substring(0,2)?l.style.setProperty(t,r[t]):l.style[t]=r[t]}),Object.keys(a).forEach(t=>{l.addEventListener(t,a[t])}),l}class M extends S{label="BeholdWidget";shadow;abortController;loadedWidget;static get observedAttributes(){return["feed-id"]}constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.abortController=null,this.onPropChange(this.l,["widgetSettings","feedMetadata","posts","previewLoadingColors","startIndex","errorMessage"],[])}attributeChangedCallback(t,e,s){"feed-id"===t&&s!==e&&this.getFeed(s)}l({changedProp:t,oldValue:e,newValue:s}){"errorMessage"!==t||e||!s?"widgetSettings"===t&&d(s,e,"type")&&s?.type?this.loadWidget(s.type):this.loadedWidget&&!u(s,e)&&(this.loadedWidget[t]=s):this.loadWidget("ErrorMessage")}async loadWidget(t){if(await import("./replaceChildren-Byt1OSKK.js"),"ResizeObserver"in window==0){const{ResizeObserver:t}=await import("./resizeObserver-CffLfe30.js");window.BeholdResizeObserver=t}const e=(await this.importWidget(t.replace(/.?/,t=>t.toUpperCase()))).register(),s=C({type:e}),i=C({type:"style",contents:":host{align-items:center;box-sizing:border-box;display:flex;flex-wrap:wrap;justify-content:center;margin:0;min-width:50px;overflow:hidden;position:relative;width:100%}:host *{box-sizing:border-box}:host([hidden]){display:none}".toString()});this.shadow.beholdReplaceChildren(s,i),this.loadedWidget=this.shadow.querySelector(e),this.previewLoadingColors&&(this.loadedWidget.previewLoadingColors=this.previewLoadingColors),this.startIndex&&(this.loadedWidget.startIndex=this.startIndex),this.widgetSettings&&(this.loadedWidget.widgetSettings=this.widgetSettings),this.feedMetadata&&(this.loadedWidget.feedMetadata=this.feedMetadata),this.posts&&(this.loadedWidget.posts=this.posts),this.loadedWidget.errorMessage=this.errorMessage||null,this.dispatchEvent(new Event("load")),window.dispatchEvent(new CustomEvent("behold:widget-loaded",{detail:{id:this["feed-id"]}}))}async getFeed(t){if(t){this.abortController&&this.abortController.abort(),this.abortController=new AbortController;try{const e=await fetch(`https://feeds.behold.so/${t}`,{mode:"cors",signal:this.abortController.signal});if(e.ok){const t=await e.json();if(!t.widgetSettings)throw new Error("JSON feeds cannot be used as a widget");if(t.widgetSettings.klaviyoWebFeedId)throw new Error("Klaviyo feeds cannot be used as an embedded widget");this.widgetSettings=t.widgetSettings,this.feedMetadata={username:t.username,profilePictureUrl:t.profilePictureUrl,website:t.website,followersCount:t.followersCount,hashtags:t.hashtags,showBranding:t.showBranding},this.posts=t.posts||t.media}else{const t=await e.text();this.errorMessage=t}}catch(t){"The user aborted a request."!==t.message&&(this.errorMessage=t.message)}}else this.errorMessage="No feed ID provided"}async importWidget(t){const{default:e}=await function(t){switch(t){case"./widgets/ElasticCarousel.ts":return import("./ElasticCarousel-C_vNaPZ1.js");case"./widgets/ErrorMessage.ts":return import("./ErrorMessage-Bjo6dhZv.js");case"./widgets/GalleryWall.ts":return import("./GalleryWall-prSkljjY.js");case"./widgets/Grid.ts":return import("./Grid-BIccDeLo.js");default:return new Promise(function(e,s){("function"==typeof queueMicrotask?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t)))})}}(`./widgets/${t}.ts`);return e}}var E={register:(t="behold-widget")=>{customElements.get(t)||customElements.define(t,class extends M{})},element:M};export{S as B,E as W,h as a,n as b,C as c,m as d,s as e,e as f,r as g,d as h,u as i,a as j,o as k,p as l,i as m,w as p,c as s,l as t};
@@ -1 +0,0 @@
1
- {"version":3,"file":"Widget.d.ts","sourceRoot":"","sources":["../../src/Widget.ts"],"names":[],"mappings":"AAEA,OAAO,WAAW,MAAM,wBAAwB,CAAA;AAShD,cAAM,YAAa,SAAQ,WAAW;IACpC,KAAK,SAAiB;IAEtB,MAAM,EAAE,UAAU,CAAA;IAClB,eAAe,EAAE,eAAe,CAAA;IAChC,YAAY,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,oBAAoB,EAAE,MAAM,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,cAAc,CAAA;IAC9B,YAAY,EAAE,YAAY,CAAA;IAC1B,KAAK,EAAE,KAAK,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IAE5B,MAAM,KAAK,kBAAkB,aAE5B;;IAqBD;;OAEG;IACH,wBAAwB,CACtB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM;IAOlB;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE;;;;KAAA;IAuB/C,UAAU,CAAC,IAAI,EAAE,MAAM;IAoDvB,OAAO,CAAC,MAAM,EAAE,MAAM;IAkDtB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAIxD;AAED;;GAEG;;;;;AACH,wBAOC;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAA;KAC9B;IACD,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,eAAe,EAAE;gBACf,SAAS,EAAE,MAAM,CAAA;aAClB,CAAA;SACF;KACF;CACF;AAED,OAAO,EAAE,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AlbumPost.d.ts","sourceRoot":"","sources":["../../../src/elements/AlbumPost.ts"],"names":[],"mappings":"AAAA,OAAO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EAAE,QAAQ,EAAE,QAAQ,EAAE;;;;KAAA;IA4DzD,gBAAgB,IAAI,IAAI;IA8BxB,mBAAmB;IAgBnB,UAAU,CAAC,SAAS,CAAC,EAAE,WAAW,GAAG,gBAAgB,GAAG,IAAI;IAwF5D,cAAc,IAAI,IAAI;IAUtB,mBAAmB,IAAI,IAAI;IAmB3B,aAAa,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IA0B/C;;OAEG;IACH,kBAAkB;IAMlB,KAAK,IAAI,IAAI;CAGd"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"BaseWidget.d.ts","sourceRoot":"","sources":["../../../src/elements/BaseWidget.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAGvC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IACjD,KAAK,SAAe;IAGpB,MAAM,EAAE,UAAU,CAAA;IAClB,OAAO,EAAE,gBAAgB,CAAA;IACzB,QAAQ,EAAE,WAAW,CAAA;IACrB,WAAW,EAAE,OAAO,CAAA;;IAuCpB,iBAAiB;IAOjB,aAAa;IAOb,aAAa,CAAC,GAAG,EAAE,aAAa;IAYhC;;OAEG;IACH,WAAW,CAAC,GAAG,EAAE,KAAK;IAMtB;;OAEG;IACH,cAAc;IAId;;OAEG;IACH,oBAAoB,CAAC,GAAG,KAAA;IASxB,YAAY,CACV,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,KAAK,CAAC;QAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC,GAC7C,IAAI;CAYR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Branding.d.ts","sourceRoot":"","sources":["../../../src/elements/Branding.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAIvC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAC/C,KAAK,SAAa;IAGlB,YAAY,EAAE,WAAW,CAAA;;IAwBzB,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAoB;CAMzC;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,QAAQ,CAAA;KAC5B;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/elements/Image.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAA;AAUvC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,WAAW;IAC5C,KAAK,SAAU;IAGf,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,OAAO,CAAQ;IAC3B,IAAI,EAAE,OAAO,CAAO;IAGpB,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,MAAM,EAAE,WAAW,CAAA;IACnB,kBAAkB;;;;;;;;MAQjB;IACD,sBAAsB,EAAE,QAAQ,CAAA;;IA0FhC,iBAAiB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE;;;;KAAA;IAuBrD;;OAEG;IACH,uBAAuB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE;;;KAAA;IAiClD,mBAAmB,CAAC,KAAK,EAAE,yBAAyB;IA4BpD,aAAa,CAAC,KAAK,EAAE,mBAAmB;IAqBxC,gBAAgB;IAkBhB;;OAEG;IACH,iBAAiB;IAUjB;;OAEG;IACH,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IA2BzD;;OAEG;IACH,OAAO;IAiBP,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAiB;CAMtC;AAKD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,KAAK,CAAA;KACtB;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImagePost.d.ts","sourceRoot":"","sources":["../../../src/elements/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