You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
27 KiB
JavaScript

(globalThis.webpackChunkweb_stories_wp=globalThis.webpackChunkweb_stories_wp||[]).push([[649],{7739:(e,t,n)=>{"use strict";n.d(t,{DATA_VERSION:()=>Gt,migrate:()=>Vt});n(41792);const r=function(e){return{pages:e}},a=1080/412,o=1920/732;function i(e){let{elements:t,...n}=e;return{elements:t.map(s),...n}}function s(e){let{x:t,y:n,width:r,height:i,...s}=e;const c={x:u(t*a),y:u(n*o),width:u(r*a),height:u(i*o),...s};return"fontSize"in c&&"number"==typeof c.fontSize&&(c.fontSize=u(c.fontSize*o)),c}function u(e){return Number(e.toFixed(0))}const c=function(e){let{pages:t,...n}=e;return{pages:t.map(i),...n}};function l(e){let{elements:t,...n}=e;return{elements:t.map(d),...n}}function d(e){if("isFullbleed"in e){const{isFullbleed:t,...n}=e;return{isFill:t,...n}}return e}const p=function(e){let{pages:t,...n}=e;return{pages:t.map(l),...n}};function m(e){let{elements:t,...n}=e;return{elements:t.map(g),...n}}function g(e){const{type:t,...n}=e;return"square"===t?{type:"shape",...n}:e}const f=function(e){let{pages:t,...n}=e;return{pages:t.map(m),...n}};function h(e){let{elements:t,...n}=e;return{elements:t.map(y),...n}}function y(e){if("mimeType"in e){if("videoId"in e){const{src:t,origRatio:n,poster:r,posterId:a,videoId:o,mimeType:i,width:s,height:u,...c}=e;return{resource:{type:"video",src:t,width:s,height:u,poster:r,posterId:a,videoId:o,mimeType:i},width:s,height:u,...c}}if("image"===e.type){const{src:t,origRatio:n,width:r,height:a,mimeType:o,...i}=e;return{resource:{type:"image",src:t,width:r,height:a,mimeType:o},width:r,height:a,...i}}}return e}const b=function(e){let{pages:t,...n}=e;return{pages:t.map(h),...n}};function k(e){let{elements:t,...n}=e;return{elements:t.map(v),...n}}function v(e){return"opacity"in e&&e.opacity?e:{opacity:100,...e}}const x=function(e){let{pages:t,...n}=e;return{pages:t.map(k),...n}};var w=n(84967);function D(e){let{elements:t,backgroundColor:n,...r}=e;return{elements:t.map(z),backgroundColor:A(n),...r}}function z(e){const t={};return"color"in e&&(t.color=A(e.color)),"backgroundColor"in e&&(t.backgroundColor=A(e.backgroundColor)),{...e,...t}}function A(e){if(!e||"transparent"===e)return null;const t=(0,w.parseToRgb)(e),{red:n,green:r,blue:a}=t;if("alpha"in t&&1!==t.alpha){const{alpha:e}=t;return{color:{r:n,g:r,b:a,a:e}}}return{color:{r:n,g:r,b:a}}}const _=function(e){let{pages:t,...n}=e;return{pages:t.map(D),...n}};function S(e){let{elements:t,...n}=e;return{elements:t.map(C),...n}}function C(e){return"content"in e||"flip"in e?e:{...e,flip:{horizontal:!1,vertical:!1}}}const E=function(e){let{pages:t,...n}=e;return{pages:t.map(S),...n}};function O(e){let{elements:t,...n}=e;return{elements:t.map(T),...n}}function T(e){if(!("content"in e))return e;const{padding:t}=e;if(t&&Object.prototype.hasOwnProperty.call(e.padding,"vertical")&&Object.prototype.hasOwnProperty.call(e.padding,"horizontal"))return e;const n=t||0;return{...e,padding:{horizontal:n,vertical:n}}}const B=function(e){let{pages:t,...n}=e;return{pages:t.map(O),...n}};n(91719);var N=n(19112);const I=1080,R=I/3;function $(e){let{backgroundColor:t,...n}=e;if(!("backgroundElementId"in n)){const{elements:e}=n,r={type:"shape",x:I/4*Math.random(),y:I/4*Math.random(),width:R,height:R,rotationAngle:0,mask:{type:"rectangle"},flip:{vertical:!1,horizontal:!1},isBackground:!0,backgroundColor:t||{color:{r:255,g:255,b:255,a:1}},id:(0,N.default)(),opacity:100};return e.unshift(r),{...n,elements:e,backgroundElementId:r.id}}return n}const F=function(e){let{pages:t,...n}=e;return{pages:t.map($),...n}},M=Math.min(440/1080,.34375);function P(e){let{elements:t,...n}=e;return{elements:t.map(L),...n}}function L(e){let{x:t,y:n,width:r,height:a,...o}=e;const i={x:j(t*M),y:j(n*M),width:j(r*M),height:j(a*M),...o};if("fontSize"in i){const{fontSize:e}=i;"number"==typeof e&&(i.fontSize=j(e*M))}if("padding"in i&&i.padding){const{padding:e}=i,{horizontal:t,vertical:n}=e;i.padding={horizontal:j(t*M),vertical:j(n*M)}}return i}function j(e){return Number(e.toFixed(0))}const W=function(e){let{pages:t,...n}=e;return{pages:t.map(P),...n}};const q=function(e){return"autoAdvance"in e&&"def