"use strict";(self.webpackChunk_genially_view_client=self.webpackChunk_genially_view_client||[]).push([[8736],{94253(e,t,n){n.d(t,{q:()=>a});var i=n(45992),o=n(37577);const r=o.Ay.div`
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
`,l=o.Ay.button`
  padding: 8px 16px;
  border: none;
  font-size: 16px;
  color: ${e=>{let{$textColor:t}=e;return t}};
  background-color: ${e=>{let{$backgroundColor:t}=e;return t}};
  border-radius: ${e=>{let{$borderRadius:t}=e;return t}};
  font-family: ${e=>{let{$fontFamily:t}=e;return null!==t&&void 0!==t?t:"inherit"}};
  font-weight: ${e=>{let{$bold:t}=e;return t?"bold":"normal"}};
  font-style: ${e=>{let{$italic:t}=e;return t?"italic":"normal"}};
  cursor: pointer;
`,d={pill:"9999px",rounded:"8px",square:"0"},a=e=>{let{text:t,textColor:n,backgroundColor:o,shape:a,fontFamily:c,bold:u,italic:s}=e;return(0,i.jsx)(r,{children:(0,i.jsx)(l,{type:"button",$textColor:n,$backgroundColor:o,$borderRadius:d[a],$fontFamily:c,$bold:u,$italic:s,children:t})})}},58736(e,t,n){n.d(t,{geniallyButtonEditorScript:()=>l});var i=n(45992),o=n(57277),r=n(94253);const l=e=>{let{script:t,editor:n}=e;(0,o.x)({getTargetNodeItem:()=>t.item,renderApp:()=>{const{text:e,textColor:n,defaultColor:o,shape:l,fontFamily:d,bold:a,italic:c}=t.getConfig();return(0,i.jsx)(r.q,{text:e,textColor:n,backgroundColor:o,shape:l,fontFamily:""===d.name?void 0:d.name,bold:a,italic:c})},nodePrefix:"button"})({script:t,editor:n})}},57277(e,t,n){n.d(t,{x:()=>o});var i=n(70377);function o(e){let{getTargetNodeItem:t,renderApp:n,renderThumbnailApp:o,nodePrefix:r}=e;return e=>{let{script:l,editor:d}=e,a=null,c=[];function u(e){a&&(i.unmountComponentAtNode(a),a=null),e&&"innerHtml"in e&&(e.innerHtml='<div class="card-iframe"><div style="width: 100%; height: 100%; background: #FF0000; color: #FFFFFF;">Deleted</div><script><\/script></div>')}function s(){a&&i.render(n(),a)}function m(){const e=t(l.getConfig());if(!e)return;const n=`${r}-${e.id}`;"innerHtml"in e&&(e.innerHtml=`<div class="card-iframe"><div id="${n}" class="genially-widget-app" style="width: 100%; height: 100%;"></div></div>`),requestAnimationFrame((()=>{a="idOfFreeNode"in e?document.getElementById(e.idOfFreeNode)||null:document.getElementById(n)||null,s()}))}function f(){o&&c.length&&c.forEach((e=>{const t="true"===e.dataset.critical,{renderingSlideId:n}=e.dataset;i.render(o({important:t,renderingSlideId:n}),e)}))}function g(){const e=t(l.getConfig());e&&"idOfThumbnailFreeNode"in e&&requestAnimationFrame((()=>{const t=document.getElementsByClassName(e.idOfThumbnailFreeNode);c=Array.from(t).filter((e=>e instanceof HTMLElement)),f()}))}l.on("configChange",(e=>{let{config:n,prevConfig:i}=e;const o=t(n),r=i?t(i):void 0;r&&r!==o&&u(r),o&&(o!==r?(m(),g()):(s(),f()))})),l.on("scriptIdChange",(e=>{let{scriptId:t,prevScriptId:n}=e;n!==t&&(u(),m(),g())})),l.on("dispose",(()=>{u(t(l.getConfig()))})),d.on("itemMount",(e=>{let{item:t}=e;t===l.item&&m()})),d.on("slideChange",(()=>{s()})),d.on("itemUnmount",(e=>{let{item:t}=e;t===l.item&&u()})),d.on("itemThumbnailMount",(e=>{let{item:t}=e;t===l.item&&g()}))}}}}]);
//# sourceMappingURL=https://s3-static-genially.genially.com/view/static/js/8736.85d7c5b8.chunk.js.map