PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.8
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.8
2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 All 108 releases
← All changes | build/lottie-player/view.js +2 -1 2.0.41 → 2.1.8 View file →
@@ -1 +1,2 @@
1 -(()=>{"use strict";var t={5795:t=>{t.exports=window.ReactDOM},9940:(t,e,n)=>{var o=n(5795);e.H=o.createRoot,o.hydrateRoot}},e={};const n=window.React;var o=function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}(9940);const r=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}},i="linear-gradient(135deg, #0040E3, #18D4FD)",l=(t,e,n=!1)=>{return null==(o=e)||""===o||Array.isArray(o)&&0===o.length||"object"==typeof o&&0===Object.keys(o).length||"string"==typeof o&&""===o.trim()||"number"==typeof o&&0===o?"":`${t}: ${e}${n?" !important":""};`;var o},a=t=>{const{color:e="",bgType:n="solid",bg:o="",gradient:r=i}=t||{};return`\n\t\t${l("color",e)}\n\t\t${r||o?l("background","gradient"===n?r:o):""}\n\t`},c=t=>{const{side:e=2,vertical:n="0px",horizontal:o="0px",top:r="0px",right:i="0px",bottom:l="0px",left:a="0px"}=t||{};return 2===e?`${n} ${o}`:`${r} ${i} ${l} ${a}`},s=(t,e,n=!0)=>{const{fontFamily:o="Default",fontCategory:r="sans-serif",fontVariant:i=400,fontWeight:a,isUploadFont:c=!0,fontSize:s={desktop:null,tablet:null,mobile:null},fontStyle:p,textTransform:u,textDecoration:d,lineHeight:$,letterSpace:y}=e||{},m=!n||!o||"Default"===o,g=s?.desktop||s,f=s?.tablet||g,b=s?.mobile||f,h=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},v=`\n\t\t${m?"":`font-family: '${o}', ${r};`}\n\t\t${l("font-weight",a)}\n\t\t${l("font-size",h(g))}\n\t\t${l("font-style",p)}\n\t\t${l("text-transform",u)}\n\t\t${l("text-decoration",d)}\n\t\t${l("line-height",$)}\n\t\t${l("letter-spacing",y)}\n\t`,x=i&&400!==i?"400i"===i?":ital@1":i?.includes("00i")?`: ital, wght@1, ${i?.replace("00i","00")} `:`: wght@${i} `:"",k=m?"":`https://fonts.googleapis.com/css2?family=${o?.split(" ").join("+")}${x.replace(/ /g,"")}&display=swap`;return{googleFontLink:!c||m?"":`@import url(${k});`,styles:`${t}{\n\t\t\t${v}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${l("font-size",h(f))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${t}{\n\t\t\t\t${l("font-size",h(b))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},p="bBlocksLottiePlayer",u=({attributes:t,id:e})=>{const{playerAlign:o,link:r,width:i,controlsHeight:l,controlsBG:u,controlsIconColor:d,controlsIconHoverColor:$,controlsIconActiveColor:y,controlsTrackColor:m,controlsThumbColor:g,capAlign:f="center",capTypo:b={},capColors:h={color:"#333"},capPadding:v={},capMargin:x={}}=t,k=`#${e} .${p}`;return(0,n.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${s("",b)?.googleFontLink}\n\t\t${s(`${k} .caption`,b)?.styles}\n\n\t\t${k}{\n\t\t\ttext-align: ${o};\n\t\t}\n\t\t${k} dotlottie-player{\n\t\t\twidth: ${i};\n\t\t\tcursor: ${r?"pointer":"auto"};\n\t\t\t--lottie-player-toolbar-height: ${l};\n\t\t\t--lottie-player-toolbar-background-color: ${u};\n\t\t\t--lottie-player-toolbar-icon-color: ${d};\n\t\t\t--lottie-player-toolbar-icon-hover-color: ${$};\n\t\t\t--lottie-player-toolbar-icon-active-color: ${y};\n\t\t\t--lottie-player-seeker-track-color: ${m};\n\t\t\t--lottie-player-seeker-thumb-color: ${g};\n\t\t}\n\t\t${k} .caption{\n\t\t\twidth: ${i};\n\t\t\ttext-align: ${f};\n\t\t\t${a(h)};\n\t\t\tpadding: ${c(v)};\n\t\t\tmargin: ${c(x)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},d=(t,e,n,o)=>{e&&t?.setAttribute(n,o),!e&&t?.removeAttribute(n,o)},$=(0,n.forwardRef)((({attributes:t},e)=>{const{file:o,isControls:r,isAutoplay:i,isLoop:l,isHover:a,mode:c,direction:s=1,count:p,speed:u,intermission:$,background:y}=t;return(0,n.useEffect)((()=>{if(e?.current){const t=!!l&&(!(0<p)||p);d(e?.current,r,"controls",""),d(e?.current,i,"autoplay",""),d(e?.current,l,"loop",t),d(e?.current,a,"hover","")}}),[e]),(0,n.createElement)("dotlottie-player",{ref:e,src:o,autoplay:!0,loop:!0,mode:c,speed:u,direction:s,intermission:1e3*$,background:y,debug:!0})}));document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-lottie-player").forEach((t=>{const e=JSON.parse(t.dataset.attributes);(0,o.H)(t).render((0,n.createElement)(n.Fragment,null,(0,n.createElement)(u,{attributes:e,id:t.id}),(0,n.createElement)(y,{attributes:e,id:t.id}))),t?.removeAttribute("data-attributes")}))}));const y=({attributes:t,id:e})=>{const{isControls:o,isAutoplay:i,isLoop:l,isHover:a,count:c,link:s,isLinkInNewTab:u=!1,interactivity:y="noInteractivity",interactivityMode:m="",interactivityContainer:g=".wp-block-b-blocks-lottie-player",interactivityActions:f=[],isCap:b=!1,caption:h=""}=t,v=(0,n.useRef)(null);return(0,n.useEffect)((()=>{const t=document.querySelector(`#${e} .${p} lottie-player`),n=!!l&&(!(0<c)||c);d(t,o,"controls",""),d(t,i,"autoplay",""),d(t,l,"loop",n),d(t,a,"hover","")}),[]),(0,n.useEffect)((()=>{const t=v?.current;t&&y&&"noInteractivity"!==y&&t.addEventListener("ready",(()=>{LottieInteractivity.create({player:t.getLottie(),container:"scrollRelativeToContainer"===y?g:`#${e}`,mode:m,actions:f})}))}),[v?.current]),(0,n.createElement)("div",{className:p},s?(0,n.createElement)("a",{href:r(s),target:u?"_blank":"_self",rel:"noreferrer"},(0,n.createElement)($,{ref:v,attributes:t})):(0,n.createElement)($,{ref:v,attributes:t}),b&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("br",null),(0,n.createElement)("span",{className:"caption"},h)))}})();
1 +(()=>{"use strict";const t=window.React,e=window.ReactDOM,r=t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}};new class{constructor(t={}){this.defaultOptions={allowedTags:["svg","g","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","defs","clipPath","mask","linearGradient","radialGradient","stop","style","title","desc"],allowedAttributes:["id","class","style","transform","xmlns","xmlns:xlink","version","baseProfile","xml:space","d","x","y","width","height","cx","cy","r","rx","ry","points","x1","y1","x2","y2","viewBox","preserveAspectRatio","overflow","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","opacity","color","paint-order","vector-effect","shape-rendering","display","visibility","clip-path","clip-rule","clipPathUnits","mask","maskUnits","maskContentUnits","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","fx","fy","fr","dx","dy","text-anchor","dominant-baseline","alignment-baseline","font-family","font-size","font-style","font-weight","letter-spacing","word-spacing","textLength","lengthAdjust","role","focusable","aria-hidden","aria-label","aria-labelledby","aria-describedby"],allowedProtocols:["http","https","data"],removeScripts:!0,removeEvents:!0,removeExternalResources:!0,sanitizeStyle:!0},this.options={...this.defaultOptions,...t},this.allowedTagSet=new Set(this.options.allowedTags.map((t=>t.toLowerCase()))),this.allowedAttributeSet=new Set(this.options.allowedAttributes.map((t=>t.toLowerCase())))}sanitize(t){if("string"!=typeof t||""===t.trim())return"";const e=(new DOMParser).parseFromString(t,"image/svg+xml"),r=e.documentElement;return!r||"svg"!==r.localName.toLowerCase()||e.getElementsByTagName("parsererror").length?"":(this.removeScripts(e),this.sanitizeElements(e),(new XMLSerializer).serializeToString(e.documentElement))}async sanitizeFile(t){const e=await fetch(t),r=await e.text();return this.sanitize(`${r}`)}removeScripts(t){this.options.removeScripts&&Array.from(t.querySelectorAll("*")).forEach((t=>{t.localName.toLowerCase().includes("script")&&t.remove()}))}sanitizeElements(t){Array.from(t.querySelectorAll("*")).forEach((t=>{const e=t.localName.toLowerCase();this.allowedTagSet.has(e)?("style"===e&&this.options.sanitizeStyle&&(t.textContent=this.sanitizeCss(t.textContent)),this.sanitizeAttributes(t)):t.remove()}))}sanitizeAttributes(t){Array.from(t.attributes).forEach((e=>{const r=e.name,o=r.toLowerCase(),i=e.value;if(this.options.removeEvents&&o.startsWith("on"))return void t.removeAttribute(r);if(this.options.removeExternalResources&&("href"===o||o.endsWith(":href"))&&!this.isAllowedUrl(i))return void t.removeAttribute(r);const n=o.replace("xlink:","");this.allowedAttributeSet.has(o)||this.allowedAttributeSet.has(n)?this.options.removeExternalResources&&this.hasExternalUrl(i)?t.removeAttribute(r):"style"===o&&this.options.sanitizeStyle&&t.setAttribute(r,this.sanitizeCss(i)):t.removeAttribute(r)}))}hasExternalUrl(t){return!("string"!=typeof t||!/url\s*\(/i.test(t))&&Array.from(t.matchAll(/url\s*\(\s*['"]?([^'")]*)/gi)).some((([,t])=>!t.trim().startsWith("#")))}isAllowedUrl(t){const e=String(t||"").trim();if(e.startsWith("#"))return!0;if(/^data:/i.test(e))return this.options.allowedProtocols.includes("data")&&/^data:image\/(png|jpe?g|gif|webp);base64,/i.test(e);try{return this.options.allowedProtocols.includes(new URL(e).protocol.replace(":",""))}catch{return!1}}sanitizeCss(t){return String(t||"").replace(/expression\s*\(/gi,"").replace(/javascript:/gi,"").replace(/behavior\s*:/gi,"").replace(/binding\s*:/gi,"").replace(/@import[^;]*;?/gi,"").replace(/url\s*\(\s*(['"]?)(?!#)[^)]*\)/gi,"none")}};const o="linear-gradient(135deg, #0040E3, #18D4FD)",i=(t,e)=>{return null==(r=e)||""===r||Array.isArray(r)&&0===r.length||"object"==typeof r&&0===Object.keys(r).length||"string"==typeof r&&""===r.trim()||"number"==typeof r&&0===r?"":`${t}: ${e};`;var r},n=t=>{const{color:e="",bgType:r="solid",bg:n="",gradient:s=o}=t||{};return`\n\t\t${i("color",e)}\n\t\t${s||n?i("background","gradient"===r?s:n):""}\n\t`},s=t=>{const{side:e=2,vertical:r="0px",horizontal:o="0px",top:i="0px",right:n="0px",bottom:s="0px",left:a="0px"}=t||{};return 2===e?`${r} ${o}`:`${i} ${n} ${s} ${a}`},a=(t,e,r=!0)=>{const{fontFamily:o="Default",fontCategory:n="sans-serif",fontVariant:s=400,fontWeight:a,isUploadFont:l=!0,fontSize:c={desktop:null,tablet:null,mobile:null},fontStyle:p,textTransform:d,textDecoration:u,lineHeight:h,letterSpace:m}=e||{},y=!r||!o||"Default"===o,g=c?.desktop||c,f=c?.tablet||g,b=c?.mobile||f,$=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},v=`\n\t\t${y?"":`font-family: '${o}', ${n};`}\n\t\t${i("font-weight",a)}\n\t\t${i("font-size",$(g))}\n\t\t${i("font-style",p)}\n\t\t${i("text-transform",d)}\n\t\t${i("text-decoration",u)}\n\t\t${i("line-height",h)}\n\t\t${i("letter-spacing",m)}\n\t`,w=s&&400!==s?"400i"===s?":ital@1":s?.includes("00i")?`: ital, wght@1, ${s?.replace("00i","00")} `:`: wght@${s} `:"",x=y?"":`https://fonts.googleapis.com/css2?family=${o?.split(" ").join("+")}${w.replace(/ /g,"")}&display=swap`;return{googleFontLink:!l||y?"":`@import url(${x});`,styles:`${t}{\n\t\t\t${v}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${i("font-size",$(f))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${t}{\n\t\t\t\t${i("font-size",$(b))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},l="bBlocksLottiePlayer",c=window.ReactJSXRuntime,p=({attributes:t,id:e})=>{const{playerAlign:r,link:o,width:i,controlsHeight:p,controlsBG:d,controlsIconColor:u,controlsIconHoverColor:h,controlsIconActiveColor:m,controlsTrackColor:y,controlsThumbColor:g,capAlign:f="center",capTypo:b={},capColors:$={color:"#333"},capPadding:v={},capMargin:w={}}=t,x=`#${e} .${l}`;return(0,c.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${a("",b)?.googleFontLink}\n\t\t${a(`${x} .caption`,b)?.styles}\n\n\t\t${x}{\n\t\t\ttext-align: ${r};\n\t\t}\n\t\t${x} dotlottie-player{\n\t\t\twidth: ${i};\n\t\t\tcursor: ${o?"pointer":"auto"};\n\t\t\t--lottie-player-toolbar-height: ${p};\n\t\t\t--lottie-player-toolbar-background-color: ${d};\n\t\t\t--lottie-player-toolbar-icon-color: ${u};\n\t\t\t--lottie-player-toolbar-icon-hover-color: ${h};\n\t\t\t--lottie-player-toolbar-icon-active-color: ${m};\n\t\t\t--lottie-player-seeker-track-color: ${y};\n\t\t\t--lottie-player-seeker-thumb-color: ${g};\n\t\t}\n\t\t${x} .caption{\n\t\t\twidth: ${i};\n\t\t\ttext-align: ${f};\n\t\t\t${n($)};\n\t\t\tpadding: ${s(v)};\n\t\t\tmargin: ${s(w)};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},d=(t,e,r,o)=>{e&&t?.setAttribute(r,o),!e&&t?.removeAttribute(r,o)},u=(0,t.forwardRef)((({attributes:e},r)=>{const{file:o,isControls:i,isAutoplay:n,isLoop:s,isHover:a,mode:l,direction:p=1,count:u,speed:h,intermission:m,background:y}=e;return(0,t.useEffect)((()=>{if(r?.current){const t=!!s&&(!(0<u)||u);d(r?.current,i,"controls",""),d(r?.current,n,"autoplay",""),d(r?.current,s,"loop",t),d(r?.current,a,"hover","")}}),[r]),(0,c.jsx)("dotlottie-player",{ref:r,src:o,autoplay:!0,loop:!0,mode:l,speed:h,direction:p,intermission:1e3*m,background:y,debug:!0})}));document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-lottie-player").forEach((t=>{const r=JSON.parse(t.dataset.attributes);(0,e.createRoot)(t).render((0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(p,{attributes:r,id:t.id}),(0,c.jsx)(h,{attributes:r,id:t.id})]})),t?.removeAttribute("data-attributes")}))}));const h=({attributes:e,id:o})=>{
2 +const{isControls:i,isAutoplay:n,isLoop:s,isHover:a,count:p,link:h,isLinkInNewTab:m=!1,interactivity:y="noInteractivity",interactivityMode:g="",interactivityContainer:f=".wp-block-b-blocks-lottie-player",interactivityActions:b=[],isCap:$=!1,caption:v=""}=e,w=(0,t.useRef)(null);return(0,t.useEffect)((()=>{const t=document.querySelector(`#${o} .${l} lottie-player`),e=!!s&&(!(0<p)||p);d(t,i,"controls",""),d(t,n,"autoplay",""),d(t,s,"loop",e),d(t,a,"hover","")}),[]),(0,t.useEffect)((()=>{const t=w?.current;t&&y&&"noInteractivity"!==y&&t.addEventListener("ready",(()=>{LottieInteractivity.create({player:t.getLottie(),container:"scrollRelativeToContainer"===y?f:`#${o}`,mode:g,actions:b})}))}),[w?.current]),(0,c.jsxs)("div",{className:l,children:[h?(0,c.jsx)("a",{href:r(h),target:m?"_blank":"_self",rel:"noreferrer",children:(0,c.jsx)(u,{ref:w,attributes:e})}):(0,c.jsx)(u,{ref:w,attributes:e}),$&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("br",{}),(0,c.jsx)("span",{className:"caption",children:v})]})]})}})();