(self.webpackChunkacmsWebpackJsonp=self.webpackChunkacmsWebpackJsonp||[]).push([[79],{73144:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(96540),a=n(74848);const s=(0,r.forwardRef)((e,t)=>{let{size:n,verticalAlign:r,borderWidth:s,speed:i}=e;return(0,a.jsx)("div",{className:"acms-admin-spinner",style:{"--acms-admin-spinner-size":"number"==typeof n?`${n}px`:n,"--acms-admin-spinner-vertical-align":r,"--acms-admin-spinner-border-width":s,"--acms-admin-spinner-animation-speed":i},role:"status",ref:t})});s.displayName="Spinner",t.default=s},90352:function(e,t,n){var r=n(24994);t.default=function(e){const t=e.querySelectorAll(".js-acms-preview");if(0===t.length)return;const r=(0,a.lazy)(()=>Promise.all([n.e(8187),n.e(2135)]).then(n.bind(n,90191)));t.forEach(e=>{(0,i.render)((0,o.jsx)(a.Suspense,{fallback:(0,o.jsx)("div",{className:"acms-admin-position-absolute acms-admin-top-50 acms-admin-left-50 acms-admin-translate-middle",children:(0,o.jsx)(s.default,{size:20})}),children:(0,o.jsx)(r,{src:e.dataset.url||location.href,hasShareBtn:"0"!==e.dataset.share,defaultDevice:e.dataset.defaultDevice,hasHistoryDevice:"on"===e.dataset.hasHistoryDevice,historyDeviceKey:e.dataset.historyDeviceKey,enableNaked:"1"===e.dataset.enableNaked})}),e)})};var a=n(96540),s=r(n(73144)),i=n(36725),o=n(74848)},36725:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.datasetToProps=function(e,t){const n={},r=t?(0,s.toCamelCase)(t):"";for(const[t,a]of Object.entries(e)){if(r&&!t.startsWith(r))continue;const e=r?t.slice(r.length):t,i=e.charAt(0).toLowerCase()+e.slice(1),c=(0,s.toCamelCase)(i);"true"===a?n[c]=!0:"false"===a?n[c]=!1:"null"===a?n[c]=null:"undefined"===a?n[c]=void 0:"NaN"===a?n[c]=NaN:"Infinity"===a?n[c]=1/0:"-Infinity"===a?n[c]=-1/0:"function"==typeof window[a]?n[c]=window[a]:isNaN(a)||""===a?.trim()?o(a)?n[c]=JSON.parse(a):n[c]=a:n[c]=Number(a)}return n},t.handleRef=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(e=>null==e)?null:e=>{t.forEach(t=>{t&&function(e,t){if(null!=e)if("function"!=typeof e)try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}else e(t)}(t,e)})}},t.nl2br=function(e){return"string"==typeof e?e.split(/\r\n|\n|\r/g).flatMap((e,t,n)=>t<n.length-1?[e,(0,i.jsx)("br",{},t)]:[e]):e},t.render=function(e,t,n){if(t._reactRoot)return t._reactRoot;const s=(0,a.createRoot)(t,n);return t._reactRoot=s,s.render((0,i.jsx)(r.StrictMode,{children:e})),s};var r=n(96540),a=n(5338),s=n(9559),i=n(74848);function o(e){try{const t=JSON.parse(e);return"object"==typeof t&&null!==t}catch{return!1}}},9559:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.capitalize=function(e){return`${e.charAt(0).toUpperCase()}${e.substring(1)}`},t.nl2br=function(e){return"string"!=typeof e?e:e.split(n).map(e=>e.match(n)?"<br />":e).join("")},t.replaceLast=function(e,t,n){const r=e.lastIndexOf(t);return-1===r?e:e.substring(0,r)+n+e.substring(r+t.length)},t.stringLength=r,t.stripHtmlTags=function(e){try{const t=(new DOMParser).parseFromString(e,"text/html");return t.body.textContent?.trim()||""}catch(e){return console.error("Error parsing HTML string:",e),""}},t.toCamelCase=function(e){return e.replace(/[-_](\w)/g,(e,t)=>t.toUpperCase())},t.truncate=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return r(e)<=t?e:`${e.slice(0,t-r(n))}${n}`},t.truncateUrl=function(e,t){if(r(e)<=t)return e;const n=Math.floor((t-3)/2);return`${e.slice(0,n)}...${e.slice(-n)}`};const n=/(\r\n|\r|\n)/g;function r(e){return[...new Intl.Segmenter(navigator.languages,{granularity:"grapheme"}).segment(e)].length}}}]);