@flourish/sdk 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/site/embedded.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){"use strict";var e,t,i=!1;function n(e){if(i&&window.top!==window.self){var t=window;"srcdoc"===t.location.pathname&&(t=t.parent);var n,o=(n={},window._Flourish_template_id&&(n.template_id=window._Flourish_template_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_template_id&&(n.template_id=window.Flourish.app.loaded_template_id),window._Flourish_visualisation_id&&(n.visualisation_id=window._Flourish_visualisation_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_visualisation&&(n.visualisation_id=window.Flourish.app.loaded_visualisation.id),window.Flourish&&window.Flourish.app&&window.Flourish.app.story&&(n.story_id=window.Flourish.app.story.id,n.slide_count=window.Flourish.app.story.slides.length),window.Flourish&&window.Flourish.app&&window.Flourish.app.current_slide&&(n.slide_index=window.Flourish.app.current_slide.index+1),n),r={sender:"Flourish",method:"customerAnalytics"};for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a]);for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);t.parent.postMessage(JSON.stringify(r),"*")}}function o(e){if("function"!=typeof e)throw new Error("Analytics callback is not a function");window.Flourish._analytics_listeners.push(e)}function r(){i=!0;[{event_name:"click",action_name:"click",use_capture:!0},{event_name:"keydown",action_name:"key_down",use_capture:!0},{event_name:"mouseenter",action_name:"mouse_enter",use_capture:!1},{event_name:"mouseleave",action_name:"mouse_leave",use_capture:!1}].forEach((function(e){document.body.addEventListener(e.event_name,(function(){n({action:e.action_name})}),e.use_capture)}))}function a(){if(null==e){var t=function(){var e=window.location;"about:srcdoc"==e.href&&(e=window.parent.location);var t={};return function(e,i,n){for(;n=i.exec(e);)t[decodeURIComponent(n[1])]=decodeURIComponent(n[2])}(e.search.substring(1).replace(/\+/g,"%20"),/([^&=]+)=?([^&]*)/g),t}();e="referrer"in t?/^https:\/\/medium.com\//.test(t.referrer):!("auto"in t)}return e}function s(e){var t=e||window.innerWidth;return t>999?650:t>599?575:400}function l(e){if(e&&window.top!==window.self){var t=window;"srcdoc"==t.location.pathname&&(t=t.parent);var i={sender:"Flourish",method:"scrolly"};if(e)for(var n in e)i[n]=e[n];t.parent.postMessage(JSON.stringify(i),"*")}}function d(e,i){if(window.top!==window.self){var n=window;if("srcdoc"==n.location.pathname&&(n=n.parent),t)return e=parseInt(e,10),void n.parent.postMessage({sentinel:"amp",type:"embed-size",height:e},"*");var o={sender:"Flourish",context:"iframe.resize",method:"resize",height:e,src:n.location.toString()};if(i)for(var r in i)o[r]=i[r];n.parent.postMessage(JSON.stringify(o),"*")}}function u(){return(-1!==navigator.userAgent.indexOf("Safari")||-1!==navigator.userAgent.indexOf("iPhone"))&&-1==navigator.userAgent.indexOf("Chrome")}function c(e){return"string"==typeof e||e instanceof String}function h(e){return"warn"!==e.method?(console.warn("BUG: validateWarnMessage called for method"+e.method),!1):!(null!=e.message&&!c(e.message))&&!(null!=e.explanation&&!c(e.explanation))}function f(e){return"resize"!==e.method?(console.warn("BUG: validateResizeMessage called for method"+e.method),!1):!!c(e.src)&&(!!c(e.context)&&!!("number"==typeof(t=e.height)?!isNaN(t)&&t>=0:c(t)&&/\d/.test(t)&&/^[0-9]*(\.[0-9]*)?(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%)?$/i.test(t)));var t}function p(e){throw new Error("Validation for setSetting is not implemented yet; see issue #4328")}function m(e){return"scrolly"!==e.method?(console.warn("BUG: validateScrolly called for method"+e.method),!1):!!Array.isArray(e.slides)}function w(e){return"customerAnalytics"===e.method||(console.warn("BUG: validateCustomerAnalyticsMessage called for method"+e.method),!1)}function g(e){return"request-upload"!==e.method?(console.warn("BUG: validateResizeMessage called for method"+e.method),!1):!!c(e.name)&&!(null!=e.accept&&!c(e.accept))}function y(e,t,i){var n=function(e){for(var t={warn:h,resize:f,setSetting:p,customerAnalytics:w,"request-upload":g,scrolly:m},i={},n=0;n<e.length;n++){var o=e[n];if(!t[o])throw new Error("No validator found for method "+o);i[o]=t[o]}return i}(t);window.addEventListener("message",(function(t){var o=function(){if(t.origin==document.location.origin)return!0;if(i){const e=t.origin.toLowerCase();if(i=i.toLowerCase(),e.endsWith("//"+i))return!0;if(e.endsWith("."+i))return!0}return!!t.origin.match(/\/\/localhost:\d+$|\/\/(?:public|app)\.flourish.devlocal$|\/\/flourish-api\.com$|\.flourish\.(?:local(:\d+)?|net|rocks|studio)$|\.uri\.sh$|\/\/flourish-user-templates\.com$/)}();if(null!=t.source&&o){var r;try{r=JSON.parse(t.data)}catch(e){return void console.warn("Unexpected non-JSON message: "+JSON.stringify(t.data))}if("Flourish"===r.sender)if(r.method)if(Object.prototype.hasOwnProperty.call(n,r.method))if(n[r.method](r)){for(var a=document.querySelectorAll("iframe"),s=0;s<a.length;s++)if(a[s].contentWindow==t.source||a[s].contentWindow==t.source.parent)return void e(r,a[s]);console.warn("could not find frame",r)}else console.warn("Validation failed for the message",r);else console.warn("No validator implemented for message",r);else console.warn("The 'method' property was missing from message",r)}})),u()&&(window.addEventListener("resize",v),v())}function v(){for(var e=document.querySelectorAll(".flourish-embed"),t=0;t<e.length;t++){var i=e[t];if(!i.getAttribute("data-width")){var n=i.querySelector("iframe");if(n){var o=window.getComputedStyle(i),r=i.offsetWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight);n.style.width=r+"px"}}}}function _(e,t){var i=e.parentNode;if(i.classList.contains("fl-scrolly-wrapper"))console.warn("createScrolly is being called more than once per story. This should not happen.");else{i.classList.add("fl-scrolly-wrapper"),i.style.position="relative",i.style.paddingBottom="1px",i.style.transform="translate3d(0, 0, 0)",e.style.position="sticky";var n=i.getAttribute("data-height")||null;n||(n="80vh",e.style.height=n),e.style.top="calc(50vh - "+n+"/2)";var o=i.querySelector(".flourish-credit");o&&(o.style.position="sticky",o.style.top="calc(50vh + "+n+"/2)"),t.forEach((function(e,t){var n="string"==typeof e&&""!=e.trim(),o=document.createElement("div");o.setAttribute("data-slide",t),o.classList.add("fl-scrolly-caption"),o.style.position="relative",o.style.transform="translate3d(0,0,0)",o.style.textAlign="center",o.style.maxWidth="500px",o.style.height="auto",o.style.marginTop="0",o.style.marginBottom=n?"100vh":"50vh",o.style.marginLeft="auto",o.style.marginRight="auto";var r=document.createElement("div");r.innerHTML=e,r.style.visibility=n?"":"hidden",r.style.display="inline-block",r.style.paddingTop="1.25em",r.style.paddingRight="1.25em",r.style.paddingBottom="1.25em",r.style.paddingLeft="1.25em",r.style.background="rgba(255,255,255,0.9)",r.style.boxShadow="0px 0px 10px rgba(0,0,0,0.2)",r.style.borderRadius="10px",r.style.textAlign="center",r.style.maxWidth="100%",r.style.margin="0 20px",r.style.overflowX="hidden",o.appendChild(r),i.appendChild(o)})),function(e){for(var t=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var i=e.querySelector("iframe");i&&(i.src=i.src.replace(/#slide-.*/,"")+"#slide-"+t.target.getAttribute("data-slide"))}}))}),{rootMargin:"0px 0px -0% 0px"}),i=e.querySelectorAll(".fl-scrolly-caption"),n=0;n<i.length;n++)t.observe(i[n]);e.querySelectorAll(".fl-scrolly-caption img").forEach((function(e){e.style.maxWidth="100%"}))}(i)}}function F(e,t,i,n,o){var r=document.createElement("iframe");if(r.setAttribute("scrolling","no"),r.setAttribute("frameborder","0"),r.setAttribute("title","Interactive or visual content"),r.setAttribute("sandbox","allow-same-origin allow-forms allow-scripts allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"),t.appendChild(r),r.offsetParent||"fixed"===getComputedStyle(r).position)x(e,t,r,i,n,o);else{var a={embed_url:e,container:t,iframe:r,width:i,height:n,play_on_load:o};if(window._flourish_poll_items?window._flourish_poll_items.push(a):window._flourish_poll_items=[a],window._flourish_poll_items.length>1)return r;var s=setInterval((function(){window._flourish_poll_items=window._flourish_poll_items.filter((function(e){return!e.iframe.offsetParent||(x(e.embed_url,e.container,e.iframe,e.width,e.height,e.play_on_load),!1)})),window._flourish_poll_items.length||clearInterval(s)}),500)}return r}function x(e,t,i,n,o,r){var a;return n&&"number"==typeof n?(a=n,n+="px"):n&&n.match(/^[ \t\r\n\f]*([+-]?\d+|\d*\.\d+(?:[eE][+-]?\d+)?)(?:\\?[Pp]|\\0{0,4}[57]0(?:\r\n|[ \t\r\n\f])?)(?:\\?[Xx]|\\0{0,4}[57]8(?:\r\n|[ \t\r\n\f])?)[ \t\r\n\f]*$/)&&(a=parseFloat(n)),o&&"number"==typeof o&&(o+="px"),n?i.style.width=n:u()?i.style.width=t.offsetWidth+"px":i.style.width="100%",!!o||(e.match(/\?/)?e+="&auto=1":e+="?auto=1",o=s(a||i.offsetWidth)+"px"),o&&("%"===o.charAt(o.length-1)&&(o=parseFloat(o)/100*t.parentNode.offsetHeight+"px"),i.style.height=o),i.setAttribute("src",e+(r?"#play-on-load":"")),i}function b(e){return!Array.isArray(e)&&"object"==typeof e&&null!=e}function A(e,t){for(var i in t)b(e[i])&&b(t[i])?A(e[i],t[i]):e[i]=t[i];return e}!function(){var e,i=window.top===window.self,c=i?null:(t="#amp=1"==window.location.hash,{createEmbedIframe:F,isFixedHeight:a,getHeightForBreakpoint:s,startEventListeners:y,notifyParentWindow:d,initScrolly:l,createScrolly:_,isSafari:u,initCustomerAnalytics:r,addAnalyticsListener:o,sendCustomerAnalyticsMessage:n}),h=!0;function f(){var t;Flourish.fixed_height||(null!=e?t=e:h&&(t=c.getHeightForBreakpoint()),t!==window.innerHeight&&c.notifyParentWindow(t))}function p(){-1!==window.location.search.indexOf("enable_customer_analytics=1")&&Flourish.enableCustomerAnalytics(),f(),window.addEventListener("resize",f)}Flourish.warn=function(e){if("string"==typeof e&&(e={message:e}),i||"editor"!==Flourish.environment)console.warn(e.message);else{var t={sender:"Flourish",method:"warn",message:e.message,explanation:e.explanation};window.parent.postMessage(JSON.stringify(t),"*")}},Flourish.uploadImage=function(e){if(i||"story_editor"!==Flourish.environment)throw"Invalid upload request";var t={sender:"Flourish",method:"request-upload",name:e.name,accept:e.accept};window.parent.postMessage(JSON.stringify(t),"*")},Flourish.setSetting=function(e,t){if("editor"===Flourish.environment||"sdk"===Flourish.environment){var i={sender:"Flourish",method:"setSetting",name:e,value:t};window.parent.postMessage(JSON.stringify(i),"*")}else if("story_editor"===Flourish.environment){var n={};n[e]=t,A(window.template.state,function(e){var t={};for(var i in e){for(var n=t,o=i.indexOf("."),r=0;o>=0;o=i.indexOf(".",r=o+1)){var a=i.substring(r,o);a in n||(n[a]={}),n=n[a]}n[i.substring(r)]=e[i]}return t}(n))}},Flourish.setHeight=function(t){Flourish.fixed_height||(e=t,h=null==t,f())},Flourish.checkHeight=function(){if(!i){var e=Flourish.__container_height;null!=e?(Flourish.fixed_height=!0,c.notifyParentWindow(e)):c.isFixedHeight()?Flourish.fixed_height=!0:(Flourish.fixed_height=!1,f())}},Flourish.fixed_height=i||c.isFixedHeight(),Flourish.enableCustomerAnalytics=function(){c&&c.initCustomerAnalytics()},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p()}()}();
1
+ !function(){"use strict";var e,t,i=!1;function n(e){if(i&&window.top!==window.self){var t=window;"srcdoc"===t.location.pathname&&(t=t.parent);var n,o=(n={},window._Flourish_template_id&&(n.template_id=window._Flourish_template_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_template_id&&(n.template_id=window.Flourish.app.loaded_template_id),window._Flourish_visualisation_id&&(n.visualisation_id=window._Flourish_visualisation_id),window.Flourish&&window.Flourish.app&&window.Flourish.app.loaded_visualisation&&(n.visualisation_id=window.Flourish.app.loaded_visualisation.id),window.Flourish&&window.Flourish.app&&window.Flourish.app.story&&(n.story_id=window.Flourish.app.story.id,n.slide_count=window.Flourish.app.story.slides.length),window.Flourish&&window.Flourish.app&&window.Flourish.app.current_slide&&(n.slide_index=window.Flourish.app.current_slide.index+1),n),r={sender:"Flourish",method:"customerAnalytics"};for(var a in o)o.hasOwnProperty(a)&&(r[a]=o[a]);for(var a in e)e.hasOwnProperty(a)&&(r[a]=e[a]);t.parent.postMessage(JSON.stringify(r),"*")}}function o(e){if("function"!=typeof e)throw new Error("Analytics callback is not a function");window.Flourish._analytics_listeners.push(e)}function r(){i=!0;[{event_name:"click",action_name:"click",use_capture:!0},{event_name:"keydown",action_name:"key_down",use_capture:!0},{event_name:"mouseenter",action_name:"mouse_enter",use_capture:!1},{event_name:"mouseleave",action_name:"mouse_leave",use_capture:!1}].forEach((function(e){document.body.addEventListener(e.event_name,(function(){n({action:e.action_name})}),e.use_capture)}))}function a(){if(null==e){var t=function(){var e=window.location;"about:srcdoc"==e.href&&(e=window.parent.location);var t={};return function(e,i,n){for(;n=i.exec(e);)t[decodeURIComponent(n[1])]=decodeURIComponent(n[2])}(e.search.substring(1).replace(/\+/g,"%20"),/([^&=]+)=?([^&]*)/g),t}();e="referrer"in t?/^https:\/\/medium.com\//.test(t.referrer):!("auto"in t)}return e}function s(e){var t=e||window.innerWidth;return t>999?650:t>599?575:400}function l(e){if(e&&window.top!==window.self){var t=window;"srcdoc"==t.location.pathname&&(t=t.parent);var i={sender:"Flourish",method:"scrolly"};if(e)for(var n in e)i[n]=e[n];t.parent.postMessage(JSON.stringify(i),"*")}}function d(e,i){if(window.top!==window.self){var n=window;if("srcdoc"==n.location.pathname&&(n=n.parent),t)return e=parseInt(e,10),void n.parent.postMessage({sentinel:"amp",type:"embed-size",height:e},"*");var o={sender:"Flourish",context:"iframe.resize",method:"resize",height:e,src:n.location.toString()};if(i)for(var r in i)o[r]=i[r];n.parent.postMessage(JSON.stringify(o),"*")}}function u(){return(-1!==navigator.userAgent.indexOf("Safari")||-1!==navigator.userAgent.indexOf("iPhone"))&&-1==navigator.userAgent.indexOf("Chrome")}function c(e){return"string"==typeof e||e instanceof String}function h(e){return"warn"!==e.method?(console.warn("BUG: validateWarnMessage called for method"+e.method),!1):!(null!=e.message&&!c(e.message))&&!(null!=e.explanation&&!c(e.explanation))}function f(e){return"resize"!==e.method?(console.warn("BUG: validateResizeMessage called for method"+e.method),!1):!!c(e.src)&&(!!c(e.context)&&!!("number"==typeof(t=e.height)?!isNaN(t)&&t>=0:c(t)&&/\d/.test(t)&&/^[0-9]*(\.[0-9]*)?(cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%)?$/i.test(t)));var t}function p(e){throw new Error("Validation for setSetting is not implemented yet; see issue #4328")}function m(e){return"scrolly"!==e.method?(console.warn("BUG: validateScrolly called for method"+e.method),!1):!!Array.isArray(e.slides)}function w(e){return"customerAnalytics"===e.method||(console.warn("BUG: validateCustomerAnalyticsMessage called for method"+e.method),!1)}function g(e){return"request-upload"!==e.method?(console.warn("BUG: validateResizeMessage called for method"+e.method),!1):!!c(e.name)&&!(null!=e.accept&&!c(e.accept))}function y(e,t,i){var n=function(e){for(var t={warn:h,resize:f,setSetting:p,customerAnalytics:w,"request-upload":g,scrolly:m},i={},n=0;n<e.length;n++){var o=e[n];if(!t[o])throw new Error("No validator found for method "+o);i[o]=t[o]}return i}(t);window.addEventListener("message",(function(t){var o=function(){if(t.origin==document.location.origin)return!0;if(i){const e=t.origin.toLowerCase();if(i=i.toLowerCase(),e.endsWith("//"+i))return!0;if(e.endsWith("."+i))return!0}return!!t.origin.match(/\/\/localhost:\d+$|\/\/(?:public|app)\.flourish.devlocal$|\/\/flourish-api\.com$|\.flourish\.(?:local(:\d+)?|net|rocks|studio)$|\.uri\.sh$|\/\/flourish-user-templates\.com$/)}();if(null!=t.source&&o){var r;try{r="object"==typeof t.data?t.data:JSON.parse(t.data)}catch(e){return void console.warn("Unexpected non-JSON message: "+JSON.stringify(t.data))}if("Flourish"===r.sender)if(r.method)if(Object.prototype.hasOwnProperty.call(n,r.method))if(n[r.method](r)){for(var a=document.querySelectorAll("iframe"),s=0;s<a.length;s++)if(a[s].contentWindow==t.source||a[s].contentWindow==t.source.parent)return void e(r,a[s]);console.warn("could not find frame",r)}else console.warn("Validation failed for the message",r);else console.warn("No validator implemented for message",r);else console.warn("The 'method' property was missing from message",r)}})),u()&&(window.addEventListener("resize",v),v())}function v(){for(var e=document.querySelectorAll(".flourish-embed"),t=0;t<e.length;t++){var i=e[t];if(!i.getAttribute("data-width")){var n=i.querySelector("iframe");if(n){var o=window.getComputedStyle(i),r=i.offsetWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight);n.style.width=r+"px"}}}}function _(e,t){var i=e.parentNode;if(i.classList.contains("fl-scrolly-wrapper"))console.warn("createScrolly is being called more than once per story. This should not happen.");else{i.classList.add("fl-scrolly-wrapper"),i.style.position="relative",i.style.paddingBottom="1px",i.style.transform="translate3d(0, 0, 0)",e.style.position="sticky";var n=i.getAttribute("data-height")||null;n||(n="80vh",e.style.height=n),e.style.top="calc(50vh - "+n+"/2)";var o=i.querySelector(".flourish-credit");o&&(o.style.position="sticky",o.style.top="calc(50vh + "+n+"/2)"),t.forEach((function(e,t){var n="string"==typeof e&&""!=e.trim(),o=document.createElement("div");o.setAttribute("data-slide",t),o.classList.add("fl-scrolly-caption"),o.style.position="relative",o.style.transform="translate3d(0,0,0)",o.style.textAlign="center",o.style.maxWidth="500px",o.style.height="auto",o.style.marginTop="0",o.style.marginBottom=n?"100vh":"50vh",o.style.marginLeft="auto",o.style.marginRight="auto";var r=document.createElement("div");r.innerHTML=e,r.style.visibility=n?"":"hidden",r.style.display="inline-block",r.style.paddingTop="1.25em",r.style.paddingRight="1.25em",r.style.paddingBottom="1.25em",r.style.paddingLeft="1.25em",r.style.background="rgba(255,255,255,0.9)",r.style.boxShadow="0px 0px 10px rgba(0,0,0,0.2)",r.style.borderRadius="10px",r.style.textAlign="center",r.style.maxWidth="100%",r.style.margin="0 20px",r.style.overflowX="hidden",o.appendChild(r),i.appendChild(o)})),function(e){for(var t=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var i=e.querySelector("iframe");i&&(i.src=i.src.replace(/#slide-.*/,"")+"#slide-"+t.target.getAttribute("data-slide"))}}))}),{rootMargin:"0px 0px -0% 0px"}),i=e.querySelectorAll(".fl-scrolly-caption"),n=0;n<i.length;n++)t.observe(i[n]);e.querySelectorAll(".fl-scrolly-caption img").forEach((function(e){e.style.maxWidth="100%"}))}(i)}}function F(e,t,i,n,o){var r=document.createElement("iframe");if(r.setAttribute("scrolling","no"),r.setAttribute("frameborder","0"),r.setAttribute("title","Interactive or visual content"),r.setAttribute("sandbox","allow-same-origin allow-forms allow-scripts allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"),t.appendChild(r),r.offsetParent||"fixed"===getComputedStyle(r).position)x(e,t,r,i,n,o);else{var a={embed_url:e,container:t,iframe:r,width:i,height:n,play_on_load:o};if(window._flourish_poll_items?window._flourish_poll_items.push(a):window._flourish_poll_items=[a],window._flourish_poll_items.length>1)return r;var s=setInterval((function(){window._flourish_poll_items=window._flourish_poll_items.filter((function(e){return!e.iframe.offsetParent||(x(e.embed_url,e.container,e.iframe,e.width,e.height,e.play_on_load),!1)})),window._flourish_poll_items.length||clearInterval(s)}),500)}return r}function x(e,t,i,n,o,r){var a;return n&&"number"==typeof n?(a=n,n+="px"):n&&n.match(/^[ \t\r\n\f]*([+-]?\d+|\d*\.\d+(?:[eE][+-]?\d+)?)(?:\\?[Pp]|\\0{0,4}[57]0(?:\r\n|[ \t\r\n\f])?)(?:\\?[Xx]|\\0{0,4}[57]8(?:\r\n|[ \t\r\n\f])?)[ \t\r\n\f]*$/)&&(a=parseFloat(n)),o&&"number"==typeof o&&(o+="px"),n?i.style.width=n:u()?i.style.width=t.offsetWidth+"px":i.style.width="100%",!!o||(e.match(/\?/)?e+="&auto=1":e+="?auto=1",o=s(a||i.offsetWidth)+"px"),o&&("%"===o.charAt(o.length-1)&&(o=parseFloat(o)/100*t.parentNode.offsetHeight+"px"),i.style.height=o),i.setAttribute("src",e+(r?"#play-on-load":"")),i}function b(e){return!Array.isArray(e)&&"object"==typeof e&&null!=e}function A(e,t){for(var i in t)b(e[i])&&b(t[i])?A(e[i],t[i]):e[i]=t[i];return e}!function(){var e,i=window.top===window.self,c=i?null:(t="#amp=1"==window.location.hash,{createEmbedIframe:F,isFixedHeight:a,getHeightForBreakpoint:s,startEventListeners:y,notifyParentWindow:d,initScrolly:l,createScrolly:_,isSafari:u,initCustomerAnalytics:r,addAnalyticsListener:o,sendCustomerAnalyticsMessage:n}),h=!0;function f(){var t;Flourish.fixed_height||(null!=e?t=e:h&&(t=c.getHeightForBreakpoint()),t!==window.innerHeight&&c.notifyParentWindow(t))}function p(){-1!==window.location.search.indexOf("enable_customer_analytics=1")&&Flourish.enableCustomerAnalytics(),f(),window.addEventListener("resize",f)}Flourish.warn=function(e){if("string"==typeof e&&(e={message:e}),i||"editor"!==Flourish.environment)console.warn(e.message);else{var t={sender:"Flourish",method:"warn",message:e.message,explanation:e.explanation};window.parent.postMessage(JSON.stringify(t),"*")}},Flourish.uploadImage=function(e){if(i||"story_editor"!==Flourish.environment)throw"Invalid upload request";var t={sender:"Flourish",method:"request-upload",name:e.name,accept:e.accept};window.parent.postMessage(JSON.stringify(t),"*")},Flourish.setSetting=function(e,t){if("editor"===Flourish.environment||"sdk"===Flourish.environment){var i={sender:"Flourish",method:"setSetting",name:e,value:t};window.parent.postMessage(JSON.stringify(i),"*")}else if("story_editor"===Flourish.environment){var n={};n[e]=t,A(window.template.state,function(e){var t={};for(var i in e){for(var n=t,o=i.indexOf("."),r=0;o>=0;o=i.indexOf(".",r=o+1)){var a=i.substring(r,o);a in n||(n[a]={}),n=n[a]}n[i.substring(r)]=e[i]}return t}(n))}},Flourish.setHeight=function(t){Flourish.fixed_height||(e=t,h=null==t,f())},Flourish.checkHeight=function(){if(!i){var e=Flourish.__container_height;null!=e?(Flourish.fixed_height=!0,c.notifyParentWindow(e)):c.isFixedHeight()?Flourish.fixed_height=!0:(Flourish.fixed_height=!1,f())}},Flourish.fixed_height=i||c.isFixedHeight(),Flourish.enableCustomerAnalytics=function(){c&&c.initCustomerAnalytics()},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p()}()}();
2
2
  //# sourceMappingURL=embedded.js.map
@@ -0,0 +1,5 @@
1
+ <svg width="20" height="20" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g fill="black">
3
+ <path d="M15.8333 2.49999V17.5H10.8333V14.5833H9.16667V17.5H4.16667V2.49999H15.8333ZM12.5 5.83333H14.1667V4.16666H12.5V5.83333ZM9.16667 5.83333H10.8333V4.16666H9.16667V5.83333ZM5.83333 5.83333H7.5V4.16666H5.83333V5.83333ZM12.5 9.16666H14.1667V7.5H12.5V9.16666ZM9.16667 9.16666H10.8333V7.5H9.16667V9.16666ZM5.83333 9.16666H7.5V7.5H5.83333V9.16666ZM12.5 12.5H14.1667V10.8333H12.5V12.5ZM9.16667 12.5H10.8333V10.8333H9.16667V12.5ZM5.83333 12.5H7.5V10.8333H5.83333V12.5ZM12.5 15.8333H14.1667V14.1667H12.5V15.8333ZM5.83333 15.8333H7.5V14.1667H5.83333V15.8333ZM17.5 0.833328H2.5V19.1667H17.5V0.833328Z" />
4
+ </g>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9 9C7.60212 9 6.42755 8.04392 6.09451 6.75H3.25C2.83579 6.75 2.5 6.41421 2.5 6C2.5 5.58579 2.83579 5.25 3.25 5.25H6.09451C6.42755 3.95608 7.60212 3 9 3C10.3979 3 11.5725 3.95608 11.9055 5.25H20.75C21.1642 5.25 21.5 5.58579 21.5 6C21.5 6.41421 21.1642 6.75 20.75 6.75H11.9055C11.5725 8.04392 10.3979 9 9 9ZM2.5 12C2.5 11.5858 2.83579 11.25 3.25 11.25H12.0945C12.4275 9.95608 13.6021 9 15 9C16.3979 9 17.5725 9.95608 17.9055 11.25H20.75C21.1642 11.25 21.5 11.5858 21.5 12C21.5 12.4142 21.1642 12.75 20.75 12.75H17.9055C17.5725 14.0439 16.3979 15 15 15C13.6021 15 12.4275 14.0439 12.0945 12.75H3.25C2.83579 12.75 2.5 12.4142 2.5 12ZM3.25 17.25C2.83579 17.25 2.5 17.5858 2.5 18C2.5 18.4142 2.83579 18.75 3.25 18.75H6.09451C6.42755 20.0439 7.60212 21 9 21C10.3979 21 11.5725 20.0439 11.9055 18.75H20.75C21.1642 18.75 21.5 18.4142 21.5 18C21.5 17.5858 21.1642 17.25 20.75 17.25H11.9055C11.5725 15.9561 10.3979 15 9 15C7.60212 15 6.42755 15.9561 6.09451 17.25H3.25ZM10.5 6C10.5 6.82843 9.82843 7.5 9 7.5C8.17157 7.5 7.5 6.82843 7.5 6C7.5 5.17157 8.17157 4.5 9 4.5C9.82843 4.5 10.5 5.17157 10.5 6ZM15 13.5C15.8284 13.5 16.5 12.8284 16.5 12C16.5 11.1716 15.8284 10.5 15 10.5C14.1716 10.5 13.5 11.1716 13.5 12C13.5 12.8284 14.1716 13.5 15 13.5ZM10.5 18C10.5 18.8284 9.82843 19.5 9 19.5C8.17157 19.5 7.5 18.8284 7.5 18C7.5 17.1716 8.17157 16.5 9 16.5C9.82843 16.5 10.5 17.1716 10.5 18Z" fill="#191E26"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="4 4 16 16">
2
+ <path d="M12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12ZM12 14C9.33 14 4 15.34 4 18V19C4 19.55 4.45 20 5 20H19C19.55 20 20 19.55 20 19V18C20 15.34 14.67 14 12 14Z" fill="#B0B0B0"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.75003 2.25C6.92253 2.25 4.64253 4.4625 4.50003 7.245L3.06003 9.1425C2.88003 9.375 3.06003 9.75 3.37503 9.75H4.50003V12C4.50003 12.8325 5.16753 13.5 6.00003 13.5H6.75003V15.75H12V12.2325C13.7775 11.3925 15 9.6 15 7.5C15 4.605 12.66 2.25 9.75003 2.25ZM12.795 7.1775L11.325 7.5675L12.405 8.655C12.531 8.7815 12.6017 8.95274 12.6017 9.13125C12.6017 9.30976 12.531 9.481 12.405 9.6075C12.2785 9.73345 12.1073 9.80416 11.9288 9.80416C11.7503 9.80416 11.579 9.73345 11.4525 9.6075L10.3575 8.5275L9.97503 9.9975C9.88503 10.365 9.51003 10.575 9.15753 10.4775C9.07143 10.4556 8.99056 10.4167 8.91965 10.3631C8.84874 10.3096 8.7892 10.2425 8.74452 10.1657C8.69983 10.0889 8.6709 10.0039 8.6594 9.91582C8.64789 9.82771 8.65406 9.7382 8.67753 9.6525L9.07503 8.175L7.59753 8.5725C7.51183 8.5965 7.42218 8.60307 7.3339 8.5918C7.24561 8.58054 7.16048 8.55167 7.08356 8.50691C7.00663 8.46215 6.93946 8.40241 6.88604 8.33123C6.83262 8.26005 6.79402 8.17887 6.77253 8.0925C6.67503 7.74 6.88503 7.365 7.25253 7.275L8.72253 6.8925L7.64253 5.7975C7.5297 5.66863 7.47008 5.50168 7.47575 5.33049C7.48142 5.1593 7.55197 4.99667 7.67308 4.87555C7.7942 4.75443 7.95683 4.68389 8.12802 4.67822C8.29922 4.67255 8.46616 4.73217 8.59503 4.845L9.68253 5.925L10.0725 4.455C10.0936 4.37071 10.131 4.2914 10.1828 4.22162C10.2345 4.15184 10.2996 4.09296 10.3741 4.04836C10.4487 4.00377 10.5313 3.97433 10.6173 3.96174C10.7032 3.94915 10.7908 3.95366 10.875 3.975C11.25 4.0725 11.46 4.44 11.37 4.8075L10.9725 6.2775L12.4425 5.88C12.5297 5.85752 12.6205 5.8525 12.7096 5.86524C12.7987 5.87798 12.8844 5.90823 12.9618 5.95424C13.0392 6.00025 13.1067 6.06111 13.1605 6.13332C13.2142 6.20554 13.2532 6.28767 13.275 6.375C13.2964 6.45921 13.3009 6.54681 13.2883 6.63277C13.2757 6.71873 13.2463 6.80136 13.2017 6.87592C13.1571 6.95048 13.0982 7.0155 13.0284 7.06725C12.9586 7.119 12.8793 7.15647 12.795 7.1775Z" fill="black"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12 8.66668L6.81667 4.61667C6.51667 4.38334 6.18067 4.29156 5.80867 4.34134C5.43622 4.39156 5.13889 4.57223 4.91667 4.88334L3.08333 7.41668L0.833333 5.63334C0.7 5.52223 0.561111 5.44445 0.416667 5.40001C0.272222 5.35556 0.133333 5.33334 0 5.33334V2.83334C0.0555556 2.83334 0.119556 2.84156 0.192 2.85801C0.264 2.8749 0.333333 2.91112 0.4 2.96667L2.66667 4.66667L5.58333 0.566675C5.69444 0.411119 5.84444 0.319564 6.03333 0.292008C6.22222 0.264008 6.39444 0.311119 6.55 0.433342L9.33333 2.66667H11.3333C11.5222 2.66667 11.6804 2.73045 11.808 2.85801C11.936 2.98601 12 3.14445 12 3.33334V8.66668ZM0.666667 11.3333C0.477778 11.3333 0.319556 11.2693 0.192 11.1413C0.0640001 11.0138 0 10.8556 0 10.6667V6.85001C0.0777778 6.85001 0.15 6.86112 0.216667 6.88334C0.283333 6.90556 0.35 6.94445 0.416667 7.00001L3.33333 9.33334L5.6 6.21667C5.71111 6.06112 5.85822 5.96934 6.04133 5.94134C6.22489 5.91379 6.39444 5.96112 6.55 6.08334L12 10.35V10.6667C12 10.8556 11.936 11.0138 11.808 11.1413C11.6804 11.2693 11.5222 11.3333 11.3333 11.3333H0.666667Z" fill="#333333"/>
3
+ </svg>