| @@ -1 +1,2 @@ | ||
| 1 | -(()=>{"use strict";document.addEventListener("DOMContentLoaded",(()=>{!function(){const t=document.querySelectorAll(".ablocks-block--flip-box");t.length&&t.forEach((t=>{(t=>{const e=t.children[0];if(!e)return;const o=!!document.querySelector(".ablocks-is-fse-theme"),l=e.querySelectorAll(".ablocks-block--flip-box-child");if(!l||l.length<2)return t.style.pointerEvents="none",void(t.style.cursor="default");const i=l[0].children[0],n=l[1].children[0],s=t.querySelectorAll(".ablocks-block--flip-box-child");let c=0;s.forEach((t=>{const e=t.offsetWidth;e>c&&(c=e)}));const h=i.offsetHeight,r=n.offsetHeight,a=Math.max(h,r),d=i.offsetWidth,f=n.offsetWidth,p=Math.max(d,f),g=Math.max(p,c);if(o){const t=i.offsetHeight-i.clientHeight,e=i.offsetWidth-i.clientWidth,o=(t,e="vertical")=>{const o=window.getComputedStyle(t);return"vertical"===e?parseInt(o.paddingTop)+parseInt(o.paddingBottom):parseInt(o.paddingLeft)+parseInt(o.paddingRight)},l=o(i,"vertical"),s=o(n,"vertical"),c=Math.max(l,s),h=o(i,"horizontal"),r=o(n,"horizontal"),d=Math.max(h,r),f=(o,l,i)=>{o.style.height=`${a-t-c+l}px`,o.style.width=`${g-e-d+i}px`};f(i,c-l,d-h),f(n,c-s,d-r)}else i.style.height=`${a}px`,n.style.height=`${a}px`,i.style.width=`${g}px`,n.style.width=`${g}px`})(t)}))}()}))})(); | |
| 1 | +(()=>{"use strict";document.addEventListener("DOMContentLoaded",()=>{!function(t,e,o="ablocksInitialized"){t&&("function"==typeof t.forEach?t:[t]).forEach(t=>{t&&t.dataset&&!t.dataset[o]&&(t.dataset[o]="1",e(t))})}(document.querySelectorAll(".ablocks-block--flip-box"),t=>{(t=>{const e=t.children[0];if(!e)return;const o=!!document.querySelector(".ablocks-is-fse-theme"),i=e.querySelectorAll(".ablocks-block--flip-box-child");if(!i||i.length<2)return t.style.pointerEvents="none",void(t.style.cursor="default");const l=i[0].children[0],n=i[1].children[0],a=t.querySelectorAll(".ablocks-block--flip-box-child");let s=0;a.forEach(t=>{const e=t.offsetWidth;e>s&&(s=e)});const c=l.offsetHeight,d=n.offsetHeight,h=Math.max(c,d),r=l.offsetWidth,f=n.offsetWidth,p=Math.max(r,f),u=Math.max(p,s);if(o){const t=l.offsetHeight-l.clientHeight,e=l.offsetWidth-l.clientWidth,o=(t,e="vertical")=>{const o=window.getComputedStyle(t) | |
| 2 | +;return"vertical"===e?parseInt(o.paddingTop)+parseInt(o.paddingBottom):parseInt(o.paddingLeft)+parseInt(o.paddingRight)},i=o(l,"vertical"),a=o(n,"vertical"),s=Math.max(i,a),c=o(l,"horizontal"),d=o(n,"horizontal"),r=Math.max(c,d),f=(o,i,l)=>{o.style.height=`${h-t-s+i}px`,o.style.width=`${u-e-r+l}px`};f(l,s-i,r-c),f(n,s-a,r-d)}else l.style.height=`${h}px`,n.style.height=`${h}px`,l.style.width=`${u}px`,n.style.width=`${u}px`})(t)},"ablocksFlipBoxInit")})})(); | |