Changeset 3106870
- Timestamp:
- 06/24/2024 09:01:44 PM (22 months ago)
- Location:
- teachable/trunk
- Files:
-
- 29 edited
-
build/blocks/blocks/buy-button/block.json (modified) (1 diff)
-
build/blocks/blocks/buy-button/index.asset.php (modified) (1 diff)
-
build/blocks/blocks/buy-button/index.js (modified) (1 diff)
-
build/blocks/blocks/product-checkout-button/block.json (modified) (1 diff)
-
build/blocks/blocks/product-checkout-button/index.asset.php (modified) (1 diff)
-
build/blocks/blocks/product-checkout-button/index.js (modified) (1 diff)
-
build/blocks/blocks/product-description/block.json (modified) (1 diff)
-
build/blocks/blocks/product-description/index.asset.php (modified) (1 diff)
-
build/blocks/blocks/product-description/index.js (modified) (1 diff)
-
build/blocks/blocks/product-enrollment-count/block.json (modified) (1 diff)
-
build/blocks/blocks/product-enrollment-count/index.asset.php (modified) (1 diff)
-
build/blocks/blocks/product-enrollment-count/index.js (modified) (1 diff)
-
build/blocks/blocks/product-image/block.json (modified) (1 diff)
-
build/blocks/blocks/product-image/index.asset.php (modified) (1 diff)
-
build/blocks/blocks/product-image/index.js (modified) (1 diff)
-
build/blocks/blocks/product-name/block.json (modified) (1 diff)
-
build/blocks/blocks/product-name/index.asset.php (modified) (1 diff)
-
build/blocks/blocks/product-name/index.js (modified) (1 diff)
-
build/blocks/blocks/product-plan-options/block.json (modified) (1 diff)
-
build/blocks/blocks/product-plan-options/index.asset.php (modified) (1 diff)
-
build/blocks/blocks/product-plan-options/index.js (modified) (1 diff)
-
build/blocks/blocks/product-updated-at/block.json (modified) (1 diff)
-
build/blocks/blocks/product-updated-at/index.asset.php (modified) (1 diff)
-
build/blocks/blocks/product-updated-at/index.js (modified) (1 diff)
-
build/css/buy-button-styles.css (modified) (1 diff)
-
build/css/buy-button-styles.css.map (modified) (1 diff)
-
includes/wp-block-supports.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
teachable.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
teachable/trunk/build/blocks/blocks/buy-button/block.json
r3100764 r3106870 33 33 "color": { 34 34 "text": true, 35 "background": true 35 "background": true, 36 "border": true 36 37 }, 37 38 "typography": { -
teachable/trunk/build/blocks/blocks/buy-button/index.asset.php
r3100764 r3106870 1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' d70c57797ba2efa19cf8');1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '84cfd793a5dafa01527c'); -
teachable/trunk/build/blocks/blocks/buy-button/index.js
r3100764 r3106870 1 (()=>{"use strict";const e=window.React,t=window.wp.i18n,o=window.wp.blocks,c=window.wp.blockEditor,a=window.wp.element,r=window.wp.components,n=window.wp.data,l=()=>(0,e.createElement)(r.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(r.Rect,{width:"29",height:"29",fill:"white"}),(0,e.createElement)(r.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,e.createElement)(r.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,e.createElement)(r.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),i=({title:t="Teachable Buy Button",description:o="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,e.createElement)("div",{className:"teachable-error-notice"},(0,e.createElement)(l,null),(0,e.createElement)("h5",{className:"teachable-error-title"},t),(0,e.createElement)("p",{className:"teachable-error-description"},o)), s=()=>(0,e.createElement)(r.SVG,{width:"27",height:"27",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(r.Path,{d:"M13.5 0.166504C6.13996 0.166504 0.166626 6.13984 0.166626 13.4998C0.166626 20.8598 6.13996 26.8332 13.5 26.8332C20.86 26.8332 26.8333 20.8598 26.8333 13.4998C26.8333 6.13984 20.86 0.166504 13.5 0.166504ZM14.8333 20.1665H12.1666V17.4998H14.8333V20.1665ZM14.8333 14.8332H12.1666V6.83317H14.8333V14.8332Z",fill:"#AE2D2D"})),u=()=>(0,e.createElement)("div",{className:"teachable-error-notice"},(0,e.createElement)(s,null),(0,e.createElement)("p",{className:"teachable-error-description"},"This block is no longer available. Please contact the site administrator for assistance.")),p=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/buy-button","title":"Teachable Buy Button","category":"embed","icon":"edit","description":"Allow customers to purchase your Teachable products from your website more easily.","keywords":["teachable buy button"],"version":"1.0.0","textdomain":"teachable","providesContext":{"teachableBuyButton/productId":"productId"},"example":{"attributes":{"productId":0}},"attributes":{"productId":{"type":"string","default":null},"hasError":{"type":"boolean","default":false}},"supports":{"color":{"text":true,"background":true},"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"align":true},"editorScript":"file:./index.js"}'),{name:d}=p,h={...p,title:(0,t.__)("Teachable Buy Button","teachable"),description:(0,t.__)("Allow customers to purchase your Teachable products from your website more easily.","teachable"),icon:(0,e.createElement)(l,null),edit:function(l){const{attributes:s,clientId:u,setAttributes:p}=l,{productId:d}=s,{buyButtonData:h,description_classes:b}=teachable_buy_button||{},m=!1===h?[]:h,g=Array.isArray(m)?m.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],f=e=>{const t=m.some((t=>t.id.toString()===e));return!t&&m.length>0?m[0].id.toString():e};(0,a.useEffect)((()=>{p({productId:f(d)})}),[d]);const y=d?m.find((e=>e.id.toString()===f(d))):m.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),[k,w]=(0,a.useState)(y),[E,B]=(0,a.useState)(null),[x,I]=(0,a.useState)(!0);(0,a.useEffect)((()=>{p(x&&d?{productId:d}:{productId:E}),I(!1)}),[x,E,B]);const S=(0,n.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return function e(o){const c=t(o);if(!c)return{};let a={};const r={"teachable/product-image":"productId","teachable/product-name":"productId","teachable/product-description":"productId","teachable/product-enrollment-count":"productId","teachable/product-updated-at":"productId","teachable/product-plan-options":"productId","teachable/product-checkout-button":"productId"};r[c.name]&&(a[c.name]=c.attributes[r[c.name]]);for(const t of c.innerBlocks){const o=e(t.clientId);a={...a,...o}}return a}(u)}),[u]),{getBlock:v,getBlocksByClientId:V}=(0,n.useSelect)((e=>e("core/block-editor"))),{updateBlockAttributes:H}=(0,n.useDispatch)("core/block-editor"),C=(e,t)=>{const o=v(e);o&&o.innerBlocks.forEach((e=>{if(["teachable/product-image","teachable/product-name","teachable/product-description","teachable/product-enrollment-count","teachable/product-updated-at","teachable/product-plan-options","teachable/product-checkout-button"].includes(e.name)&&e.attributes.productId!==t){const o={productId:t};H(e.clientId,o)}e.innerBlocks.length>0&&C(e.clientId,t)}))};(0,a.useEffect)((()=>{const e=Object.values(S).find((e=>e!==d))||null;e&&e!==d?E!==e&&(B(e),C(u,e)):E!==d&&(B(d),C(u,d))}),[S,d,u]);const _=(0,c.useBlockProps)({className:"teachable-buy-button"}),P=(0,n.useSelect)((e=>e("core/block-editor").getBlock(u).innerBlocks),[u]),{replaceInnerBlocks:N}=(0,n.useDispatch)("core/block-editor");(0,a.useEffect)((()=>{const e=function(e,t){const o={"teachable/product-plan-options":!1,"teachable/product-checkout-button":!1};return function e(c){c.forEach((c=>{t.includes(c.name)&&(o[c.name]=!0),c.innerBlocks.length&&e(c.innerBlocks)}))}(e),o}(P,["teachable/product-plan-options","teachable/product-checkout-button"]),t=[];k&&!x&&(e["teachable/product-plan-options"]||t.push((0,o.createBlock)("teachable/product-plan-options")),e["teachable/product-checkout-button"]||t.push((0,o.createBlock)("teachable/product-checkout-button"))),t.length>0&&N(u,[...P,...t],!1)}),[x,P,u,N]);const T=(0,c.useInnerBlocksProps)({},{template:[["teachable/product-image",{style:{border:{radius:"9px 9px 0 0"}}}],["core/group",{style:{padding:"16px",spacing:{padding:{top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},[["teachable/product-name",{style:{typography:{fontSize:"35px"}}}],["teachable/product-description",{style:{typography:{fontSize:"17px"}}}],["core/columns",{className:"teachable-details",verticalAlignment:"center"},[["core/column",{},[["teachable/product-enrollment-count",{style:{typography:{fontSize:"15px"}}}]]],["core/column",{},[["teachable/product-updated-at",{style:{typography:{fontSize:"15px"}}}]]]]],["core/group",{className:"teachable-pricing"},[["teachable/product-plan-options"],["teachable/product-checkout-button",{style:{border:{radius:"4px"},color:{background:"#222222",text:"#ffffff"},spacing:{padding:"12px 16px 12px 16px",margin:"20px 0 0 0"},typography:{fontSize:"20px"}}}]]]]]],templateLock:!1});return(0,a.useEffect)((()=>{p({hasError:!k||k&&0===k.pricing_plans.length})}),[k,p]),(0,e.createElement)(a.Fragment,null,(0,e.createElement)(c.InspectorControls,{group:"settings"},(0,e.createElement)(r.PanelBody,{title:(0,t.__)("General","teachable"),initialOpen:!0},(0,e.createElement)("div",null,(0,e.createElement)(r.ComboboxControl,{label:(0,t.__)("Product","teachable"),value:E,options:g,onChange:e=>{E&&e&&e!==E&&(w(m.find((t=>t.id.toString()===e))),B(e),C(u,e))},help:(0,t.__)("Select a course or bundle.","teachable")})))),(0,e.createElement)("div",{..._},k&&k!==[]?(0,e.createElement)("div",{...T}):(0,e.createElement)(i,null)))},save:function(t){const{attributes:o}=t,{hasError:a}=o,r=c.useBlockProps.save({className:"teachable-buy-button"}),n=c.useInnerBlocksProps.save({},!1);return(0,e.createElement)("div",{...r},a?(0,e.createElement)(u,null):n.children)}};(0,o.registerBlockType)(d,h),(0,o.registerBlockCollection)("teachable",{title:"Teachable"})})();1 (()=>{"use strict";const e=window.React,t=window.wp.i18n,o=window.wp.blocks,c=window.wp.blockEditor,a=window.wp.element,r=window.wp.components,n=window.wp.data,l=()=>(0,e.createElement)(r.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(r.Rect,{width:"29",height:"29",fill:"white"}),(0,e.createElement)(r.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,e.createElement)(r.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,e.createElement)(r.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),i=({title:t="Teachable Buy Button",description:o="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,e.createElement)("div",{className:"teachable-error-notice"},(0,e.createElement)(l,null),(0,e.createElement)("h5",{className:"teachable-error-title"},t),(0,e.createElement)("p",{className:"teachable-error-description"},o)),u=()=>(0,e.createElement)(r.SVG,{width:"27",height:"27",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(r.Path,{d:"M13.5 0.166504C6.13996 0.166504 0.166626 6.13984 0.166626 13.4998C0.166626 20.8598 6.13996 26.8332 13.5 26.8332C20.86 26.8332 26.8333 20.8598 26.8333 13.4998C26.8333 6.13984 20.86 0.166504 13.5 0.166504ZM14.8333 20.1665H12.1666V17.4998H14.8333V20.1665ZM14.8333 14.8332H12.1666V6.83317H14.8333V14.8332Z",fill:"#AE2D2D"})),s=()=>(0,e.createElement)("div",{className:"teachable-error-notice"},(0,e.createElement)(u,null),(0,e.createElement)("p",{className:"teachable-error-description"},"This block is no longer available. Please contact the site administrator for assistance.")),p=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/buy-button","title":"Teachable Buy Button","category":"embed","icon":"edit","description":"Allow customers to purchase your Teachable products from your website more easily.","keywords":["teachable buy button"],"version":"1.0.0","textdomain":"teachable","providesContext":{"teachableBuyButton/productId":"productId"},"example":{"attributes":{"productId":0}},"attributes":{"productId":{"type":"string","default":null},"hasError":{"type":"boolean","default":false}},"supports":{"color":{"text":true,"background":true,"border":true},"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"align":true},"editorScript":"file:./index.js"}'),{name:d}=p,h={...p,title:(0,t.__)("Teachable Buy Button","teachable"),description:(0,t.__)("Allow customers to purchase your Teachable products from your website more easily.","teachable"),icon:(0,e.createElement)(l,null),edit:function(l){const{attributes:u,clientId:s,setAttributes:p}=l,{productId:d}=u,{buyButtonData:h,description_classes:b}=teachable_buy_button||{},m=!1===h?[]:h,g=Array.isArray(m)?m.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],f=e=>{const t=m.some((t=>t.id.toString()===e));return!t&&m.length>0?m[0].id.toString():e};(0,a.useEffect)((()=>{p({productId:f(d)})}),[d]);const y=d?m.find((e=>e.id.toString()===f(d))):m.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),[k,w]=(0,a.useState)(y),[E,B]=(0,a.useState)(null),[x,I]=(0,a.useState)(!0);(0,a.useEffect)((()=>{p(x&&d?{productId:d}:{productId:E}),I(!1)}),[x,E,B]);const S=(0,n.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return function e(o){const c=t(o);if(!c)return{};let a={};const r={"teachable/product-image":"productId","teachable/product-name":"productId","teachable/product-description":"productId","teachable/product-enrollment-count":"productId","teachable/product-updated-at":"productId","teachable/product-plan-options":"productId","teachable/product-checkout-button":"productId"};r[c.name]&&(a[c.name]=c.attributes[r[c.name]]);for(const t of c.innerBlocks){const o=e(t.clientId);a={...a,...o}}return a}(s)}),[s]),{getBlock:v,getBlocksByClientId:V}=(0,n.useSelect)((e=>e("core/block-editor"))),{updateBlockAttributes:H}=(0,n.useDispatch)("core/block-editor"),C=(e,t)=>{const o=v(e);o&&o.innerBlocks.forEach((e=>{if(["teachable/product-image","teachable/product-name","teachable/product-description","teachable/product-enrollment-count","teachable/product-updated-at","teachable/product-plan-options","teachable/product-checkout-button"].includes(e.name)&&e.attributes.productId!==t){const o={productId:t};H(e.clientId,o)}e.innerBlocks.length>0&&C(e.clientId,t)}))};(0,a.useEffect)((()=>{const e=Object.values(S).find((e=>e!==d))||null;e&&e!==d?E!==e&&(B(e),C(s,e)):E!==d&&(B(d),C(s,d))}),[S,d,s]);const _=(0,c.useBlockProps)({className:"teachable-buy-button"}),P=(0,n.useSelect)((e=>e("core/block-editor").getBlock(s).innerBlocks),[s]),{replaceInnerBlocks:N}=(0,n.useDispatch)("core/block-editor");(0,a.useEffect)((()=>{const e=function(e,t){const o={"teachable/product-plan-options":!1,"teachable/product-checkout-button":!1};return function e(c){c.forEach((c=>{t.includes(c.name)&&(o[c.name]=!0),c.innerBlocks.length&&e(c.innerBlocks)}))}(e),o}(P,["teachable/product-plan-options","teachable/product-checkout-button"]),t=[];k&&!x&&(e["teachable/product-plan-options"]||t.push((0,o.createBlock)("teachable/product-plan-options")),e["teachable/product-checkout-button"]||t.push((0,o.createBlock)("teachable/product-checkout-button"))),t.length>0&&N(s,[...P,...t],!1)}),[x,P,s,N]);const T=(0,c.useInnerBlocksProps)({},{template:[["teachable/product-image",{style:{border:{radius:"9px 9px 0 0"}}}],["core/group",{style:{padding:"16px",spacing:{padding:{top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},[["teachable/product-name",{style:{typography:{fontSize:"35px"}}}],["teachable/product-description",{style:{typography:{fontSize:"17px"}}}],["core/columns",{className:"teachable-details",verticalAlignment:"center"},[["core/column",{},[["teachable/product-enrollment-count",{style:{typography:{fontSize:"15px"}}}]]],["core/column",{},[["teachable/product-updated-at",{style:{typography:{fontSize:"15px"}}}]]]]],["core/group",{className:"teachable-pricing"},[["teachable/product-plan-options"],["teachable/product-checkout-button",{style:{border:{radius:"4px"},color:{background:"#222222",text:"#ffffff"},spacing:{padding:"12px 16px 12px 16px",margin:"20px 0 0 0"},typography:{fontSize:"20px"}}}]]]]]],templateLock:!1});return(0,a.useEffect)((()=>{p({hasError:!k||k&&0===k.pricing_plans.length})}),[k,p]),(0,e.createElement)(a.Fragment,null,(0,e.createElement)(c.InspectorControls,{group:"settings"},(0,e.createElement)(r.PanelBody,{title:(0,t.__)("General","teachable"),initialOpen:!0},(0,e.createElement)("div",null,(0,e.createElement)(r.ComboboxControl,{label:(0,t.__)("Product","teachable"),value:E,options:g,onChange:e=>{E&&e&&e!==E&&(w(m.find((t=>t.id.toString()===e))),B(e),C(s,e))},help:(0,t.__)("Select a course or bundle.","teachable")})))),(0,e.createElement)("div",{..._},k&&k!==[]?(0,e.createElement)("div",{...T}):(0,e.createElement)(i,null)))},save:function(t){const{attributes:o}=t,{hasError:a}=o,r=c.useBlockProps.save({className:"teachable-buy-button"}),n=c.useInnerBlocksProps.save({},!1);return(0,e.createElement)("div",{...r},a?(0,e.createElement)(s,null):n.children)}};(0,o.registerBlockType)(d,h),(0,o.registerBlockCollection)("teachable",{title:"Teachable"})})(); -
teachable/trunk/build/blocks/blocks/product-checkout-button/block.json
r3100764 r3106870 35 35 "color": { 36 36 "text": true, 37 "background": true 37 "background": true, 38 "border": true 38 39 }, 39 40 "typography": { -
teachable/trunk/build/blocks/blocks/product-checkout-button/index.asset.php
r3100764 r3106870 1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' edd351fdcc460ab81876');1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '1455273f2e06042a9532'); -
teachable/trunk/build/blocks/blocks/product-checkout-button/index.js
r3100764 r3106870 1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,n=window.React,r=window.wp.blockEditor,o=window.wp.data,a=window.wp.element,l=window.wp.components,c=()=>(0,n.createElement)(l.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(l.Rect,{width:"29",height:"29",fill:"white"}),(0,n.createElement)(l.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,n.createElement)(l.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,n.createElement)(l.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),i=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,n.createElement)("div",{className:"teachable-error-notice"},(0,n.createElement)(c,null),(0,n.createElement)("h5",{className:"teachable-error-title"},e),(0,n.createElement)("p",{className:"teachable-error-description"},t)),u=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-checkout-button","title":"Product Checkout Button","category":"embed","description":"A teachable product checkout button block.","keywords":["teachable product checkout button"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null},"buttonText":{"type":"string","default":"Buy now"},"urlQuery":{"type":"string","default":""}},"supports":{"color":{"text":true,"background":true },"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:s}=u,d={...u,title:(0,e.__)("Teachable Checkout Button","teachable"),description:(0,e.__)("A teachable product checkout button block.","teachable"),icon:"money-alt",edit:function(t){const{attributes:c,clientId:u,setAttributes:s}=t,{productId:d,buttonText:h,urlQuery:b}=c,{buyButtonData:p,description_classes:m}=teachable_buy_button||{},g=!1===p?[]:p,y=Array.isArray(g)?g.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],f=e=>{const t=g.some((t=>t.id.toString()===e));return!t&&g.length>0?g[0].id.toString():e};(0,a.useEffect)((()=>{s({productId:f(d)})}),[d]);const w=d?g.find((e=>e.id.toString()===f(d))):g.find((e=>e.id.toString()===(y.length>0?y[0].value:null))),[_,k]=(0,a.useState)(w),[E,x]=(0,a.useState)(null),[B,S]=(0,a.useState)(!0);(0,a.useEffect)((()=>{s(B&&d?{productId:d}:{productId:E}),S(!1)}),[B,E,x]);const v=(0,o.useSelect)((e=>{let t=u;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const r=e("core/block-editor").getBlockAttributes(n);if(r&&r.productId)return r.productId;t=n}if(Array.isArray(g)){const e=g.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[u]);(0,a.useEffect)((()=>{k((e=>g.find((e=>e.id.toString()===v)))),x(f(v))}),[v]);const C=(0,r.useBlockProps)({className:`teachable-checkout-button ${m}`});return _?(0,n.createElement)(a.Fragment,null,(0,n.createElement)(r.InspectorControls,{group:"settings"},(0,n.createElement)(l.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,n.createElement)("div",null,(0,n.createElement)(l.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:E,options:y,onChange:e=>{E&&e&&e!==E&&(k(g.find((t=>t.id.toString()===e))),x(e))},help:(0,e.__)("Select a course or bundle.","teachable")}),_&&(0,n.createElement)(a.Fragment,null,(0,n.createElement)(l.TextControl,{label:(0,e.__)("Button Text","teachable"),value:h||"",onChange:t=>s({buttonText:t||(0,e.__)("Buy now","teachable")}),help:(0,e.__)("The text to display within the button.","teachable")}),(0,n.createElement)(l.TextControl,{label:(0,e.__)("URL Parameters","teachable"),value:b||"",placeholder:(0,e.__)("&utm_id=1234","teachable"),onChange:e=>{const t=/^[a-zA-Z0-9&=_.\-~]+$/,n=e.split("").filter((e=>t.test(e))).join("");s({urlQuery:n})},help:(0,e.__)("An extension of the checkout button URL.","teachable")}))))),(0,n.createElement)("div",{...C,"data-query":b,target:"_blank",rel:"noopener noreferrer"},h)):(0,n.createElement)("div",{...C},(0,n.createElement)(i,{title:(0,e.__)("Product Checkout Button","teachable"),description:(0,e.__)("Oops! No product checkout button found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(s,d),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})();1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,n=window.React,r=window.wp.blockEditor,o=window.wp.data,a=window.wp.element,l=window.wp.components,c=()=>(0,n.createElement)(l.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(l.Rect,{width:"29",height:"29",fill:"white"}),(0,n.createElement)(l.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,n.createElement)(l.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,n.createElement)(l.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),i=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,n.createElement)("div",{className:"teachable-error-notice"},(0,n.createElement)(c,null),(0,n.createElement)("h5",{className:"teachable-error-title"},e),(0,n.createElement)("p",{className:"teachable-error-description"},t)),u=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-checkout-button","title":"Product Checkout Button","category":"embed","description":"A teachable product checkout button block.","keywords":["teachable product checkout button"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null},"buttonText":{"type":"string","default":"Buy now"},"urlQuery":{"type":"string","default":""}},"supports":{"color":{"text":true,"background":true,"border":true},"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:s}=u,d={...u,title:(0,e.__)("Teachable Checkout Button","teachable"),description:(0,e.__)("A teachable product checkout button block.","teachable"),icon:"money-alt",edit:function(t){const{attributes:c,clientId:u,setAttributes:s}=t,{productId:d,buttonText:h,urlQuery:b}=c,{buyButtonData:p,description_classes:m}=teachable_buy_button||{},g=!1===p?[]:p,y=Array.isArray(g)?g.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],f=e=>{const t=g.some((t=>t.id.toString()===e));return!t&&g.length>0?g[0].id.toString():e};(0,a.useEffect)((()=>{s({productId:f(d)})}),[d]);const w=d?g.find((e=>e.id.toString()===f(d))):g.find((e=>e.id.toString()===(y.length>0?y[0].value:null))),[_,k]=(0,a.useState)(w),[E,x]=(0,a.useState)(null),[B,S]=(0,a.useState)(!0);(0,a.useEffect)((()=>{s(B&&d?{productId:d}:{productId:E}),S(!1)}),[B,E,x]);const v=(0,o.useSelect)((e=>{let t=u;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const r=e("core/block-editor").getBlockAttributes(n);if(r&&r.productId)return r.productId;t=n}if(Array.isArray(g)){const e=g.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[u]);(0,a.useEffect)((()=>{k((e=>g.find((e=>e.id.toString()===v)))),x(f(v))}),[v]);const C=(0,r.useBlockProps)({className:`teachable-checkout-button ${m}`});return _?(0,n.createElement)(a.Fragment,null,(0,n.createElement)(r.InspectorControls,{group:"settings"},(0,n.createElement)(l.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,n.createElement)("div",null,(0,n.createElement)(l.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:E,options:y,onChange:e=>{E&&e&&e!==E&&(k(g.find((t=>t.id.toString()===e))),x(e))},help:(0,e.__)("Select a course or bundle.","teachable")}),_&&(0,n.createElement)(a.Fragment,null,(0,n.createElement)(l.TextControl,{label:(0,e.__)("Button Text","teachable"),value:h||"",onChange:t=>s({buttonText:t||(0,e.__)("Buy now","teachable")}),help:(0,e.__)("The text to display within the button.","teachable")}),(0,n.createElement)(l.TextControl,{label:(0,e.__)("URL Parameters","teachable"),value:b||"",placeholder:(0,e.__)("&utm_id=1234","teachable"),onChange:e=>{const t=/^[a-zA-Z0-9&=_.\-~]+$/,n=e.split("").filter((e=>t.test(e))).join("");s({urlQuery:n})},help:(0,e.__)("An extension of the checkout button URL.","teachable")}))))),(0,n.createElement)("div",{...C,"data-query":b,target:"_blank",rel:"noopener noreferrer"},h)):(0,n.createElement)("div",{...C},(0,n.createElement)(i,{title:(0,e.__)("Product Checkout Button","teachable"),description:(0,e.__)("Oops! No product checkout button found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(s,d),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})(); -
teachable/trunk/build/blocks/blocks/product-description/block.json
r3100764 r3106870 27 27 "color": { 28 28 "text": true, 29 "background": true 29 "background": true, 30 "border": true 30 31 }, 31 32 "typography": { -
teachable/trunk/build/blocks/blocks/product-description/index.asset.php
r3100764 r3106870 1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' 6b7a723af29044df8b48');1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'c5d4f71f0e3b4529406d'); -
teachable/trunk/build/blocks/blocks/product-description/index.js
r3100764 r3106870 1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=N(Array.prototype.forEach),p=N(Array.prototype.pop),d=N(Array.prototype.push),m=N(String.prototype.toLowerCase),f=N(String.prototype.toString),h=N(String.prototype.match),g=N(String.prototype.replace),_=N(String.prototype.indexOf),y=N(String.prototype.trim),T=N(Object.prototype.hasOwnProperty),b=N(RegExp.prototype.test),E=(A=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(A,t)});var A;function N(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function S(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function w(e){for(let t=0;t<e.length;t++)T(e,t)||(e[t]=null);return e}function v(t){const n=l(null);for(const[o,r]of e(t))T(t,o)&&(Array.isArray(r)?n[o]=w(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=v(r):n[o]=r);return n}function C(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=o(e)}return function(){return null}}const R=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),O=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),I=i(["#text"]),M=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),B=a(/<%[\w\W]*|[\w\W]*%>/gm),z=a(/\${[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]/),G=a(/^aria-[\-\w]+$/),j=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=a(/^(?:\w+script|data):/i),V=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=a(/^html$/i),q=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var $=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:B,TMPLIT_EXPR:z,DATA_ATTR:W,ARIA_ATTR:G,IS_ALLOWED_URI:j,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:V,DOCTYPE_NAME:X,CUSTOM_ELEMENT:q});const K=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const o=e=>t(e);if(o.version="3.1.1",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:A,Node:N,Element:w,NodeFilter:F,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:z,DOMParser:W,trustedTypes:G}=n,Y=w.prototype,V=C(Y,"cloneNode"),q=C(Y,"nextSibling"),Z=C(Y,"childNodes"),J=C(Y,"parentNode");if("function"==typeof A){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:re}=r,{importNode:ie}=a;let ae={};o.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:se,DATA_ATTR:ue,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:fe}=$;let{IS_ALLOWED_URI:he}=$,ge=null;const _e=S({},[...R,...k,...x,...L,...I]);let ye=null;const Te=S({},[...M,...P,...H,...U]);let be=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,Ae=null,Ne=!0,Se=!0,we=!1,ve=!0,Ce=!1,Re=!0,ke=!1,xe=!1,De=!1,Le=!1,Oe=!1,Ie=!1,Me=!0,Pe=!1,He=!0,Ue=!1,Fe={},Be=null;const ze=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let We=null;const Ge=S({},["audio","video","img","source","image","track"]);let je=null;const Ye=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let $e=qe,Ke=!1,Ze=null;const Je=S({},[Ve,Xe,qe],f);let Qe=null;const et=["application/xhtml+xml","text/html"];let tt=null,nt=null;const ot=r.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=v(e),Qe=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Qe?f:m,ge=T(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,tt):_e,ye=T(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,tt):Te,Ze=T(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,f):Je,je=T(e,"ADD_URI_SAFE_ATTR")?S(v(Ye),e.ADD_URI_SAFE_ATTR,tt):Ye,We=T(e,"ADD_DATA_URI_TAGS")?S(v(Ge),e.ADD_DATA_URI_TAGS,tt):Ge,Be=T(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,tt):ze,Ee=T(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,tt):{},Ae=T(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,tt):{},Fe=!!T(e,"USE_PROFILES")&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,Re=!1!==e.SAFE_FOR_XML,ke=e.WHOLE_DOCUMENT||!1,Le=e.RETURN_DOM||!1,Oe=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Pe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||j,$e=e.NAMESPACE||qe,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(Se=!1),Oe&&(Le=!0),Fe&&(ge=S({},I),ye=[],!0===Fe.html&&(S(ge,R),S(ye,M)),!0===Fe.svg&&(S(ge,k),S(ye,P),S(ye,U)),!0===Fe.svgFilters&&(S(ge,x),S(ye,P),S(ye,U)),!0===Fe.mathMl&&(S(ge,L),S(ye,H),S(ye,U))),e.ADD_TAGS&&(ge===_e&&(ge=v(ge)),S(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(ye===Te&&(ye=v(ye)),S(ye,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&S(je,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Be===ze&&(Be=v(Be)),S(Be,e.FORBID_CONTENTS,tt)),He&&(ge["#text"]=!0),ke&&S(ge,["html","head","body"]),ge.table&&(S(ge,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));i&&i(e),nt=e}},at=S({},["mi","mo","mn","ms","mtext"]),lt=S({},["foreignobject","desc","title","annotation-xml"]),ct=S({},["title","style","font","a","script"]),st=S({},[...k,...x,...D]),ut=S({},[...L,...O]),pt=function(e){d(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},dt=function(e,t){try{d(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ye[e])if(Le||Oe)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){let t=null,n=null;if(De)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Qe&&$e===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Q?Q.createHTML(e):e;if($e===qe)try{t=(new W).parseFromString(o,Qe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ke?ee:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),$e===qe?re.call(t,ke?"html":"body")[0]:ke?t.documentElement:i},ft=function(e){return ne.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT|F.SHOW_PROCESSING_INSTRUCTION|F.SHOW_CDATA_SECTION,null)},ht=function(e){return"function"==typeof N&&e instanceof N},gt=function(e,t,n){ae[e]&&u(ae[e],(e=>{e.call(o,t,n,nt)}))},_t=function(e){let t=null;if(gt("beforeSanitizeElements",e,null),(n=e)instanceof z&&(void 0!==n.__depth&&"number"!=typeof n.__depth||void 0!==n.__removalCount&&"number"!=typeof n.__removalCount||"string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return pt(e),!0;var n;const r=tt(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:r,allowedTags:ge}),e.hasChildNodes()&&!ht(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return pt(e),!0;if(7===e.nodeType)return pt(e),!0;if(Re&&8===e.nodeType&&b(/<[/\w]/g,e.data))return pt(e),!0;if(!ge[r]||Ee[r]){if(!Ee[r]&&Tt(r)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,r))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(r))return!1}if(He&&!Be[r]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=V(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,q(e))}}return pt(e),!0}return e instanceof w&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=m(e.tagName),o=m(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===Xe?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===o||at[o]):Boolean(st[n]):e.namespaceURI===Ve?t.namespaceURI===qe?"math"===n:t.namespaceURI===Xe?"math"===n&<[o]:Boolean(ut[n]):e.namespaceURI===qe?!(t.namespaceURI===Xe&&!lt[o])&&!(t.namespaceURI===Ve&&!at[o])&&!ut[n]&&(ct[n]||!st[n]):!("application/xhtml+xml"!==Qe||!Ze[e.namespaceURI]))}(e)?(pt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,u([le,ce,se],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(o.removed,{element:e.cloneNode()}),e.textContent=t)),gt("afterSanitizeElements",e,null),!1):(pt(e),!0)},yt=function(e,t,n){if(Me&&("id"===t||"name"===t)&&(n in r||n in ot))return!1;if(Se&&!Ae[t]&&b(ue,t));else if(Ne&&b(pe,t));else if(!ye[t]||Ae[t]){if(!(Tt(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(je[t]);else if(b(he,g(n,me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_(n,"data:")||!We[e])if(we&&!b(de,g(n,me,"")));else if(n)return!1;return!0},Tt=function(e){return"annotation-xml"!==e&&h(e,fe)},bt=function(e){gt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=tt(a);let d="value"===a?c:y(c);if(n.attrName=s,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,gt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(dt(a,e),!n.keepAttr)continue;if(!ve&&b(/\/>/i,d)){dt(a,e);continue}Ce&&u([le,ce,se],(e=>{d=g(d,e," ")}));const m=tt(e.nodeName);if(yt(m,s,d)){if(!Pe||"id"!==s&&"name"!==s||(dt(a,e),d="user-content-"+d),Q&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(m,s)){case"TrustedHTML":d=Q.createHTML(d);break;case"TrustedScriptURL":d=Q.createScriptURL(d)}try{l?e.setAttributeNS(l,a,d):e.setAttribute(a,d),p(o.removed)}catch(e){}}}gt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const o=ft(t);for(gt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)gt("uponSanitizeShadowNode",n,null),_t(n)||(1===n.nodeType&&(n.parentNode&&n.parentNode.__depth?n.__depth=(n.__removalCount||0)+n.parentNode.__depth+1:n.__depth=1),n.__depth>=255&&pt(n),n.content instanceof s&&(n.content.__depth=n.__depth,e(n.content)),bt(n));gt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!o.isSupported)return e;if(xe||it(t),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||Ee[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof N)n=mt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Le&&!Ce&&!ke&&-1===e.indexOf("<"))return Q&&Ie?Q.createHTML(e):e;if(n=mt(e),!n)return Le?null:Ie?ee:""}n&&De&&pt(n.firstChild);const c=ft(Ue?e:n);for(;i=c.nextNode();)_t(i)||(1===i.nodeType&&(i.parentNode&&i.parentNode.__depth?i.__depth=(i.__removalCount||0)+i.parentNode.__depth+1:i.__depth=1),i.__depth>=255&&pt(i),i.content instanceof s&&(i.content.__depth=i.__depth,Et(i.content)),bt(i));if(Ue)return e;if(Le){if(Oe)for(l=oe.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ye.shadowroot||ye.shadowrootmode)&&(l=ie.call(a,l,!0)),l}let p=ke?n.outerHTML:n.innerHTML;return ke&&ge["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(X,n.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+p),Ce&&u([le,ce,se],(e=>{p=g(p,e," ")})),Q&&Ie?Q.createHTML(p):p},o.setConfig=function(){it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),xe=!0},o.clearConfig=function(){nt=null,xe=!1},o.isValidAttribute=function(e,t,n){nt||it({});const o=tt(e),r=tt(t);return yt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],d(ae[e],t))},o.removeHook=function(e){if(ae[e])return p(ae[e])},o.removeHooks=function(e){ae[e]&&(ae[e]=[])},o.removeAllHooks=function(){ae={}},o}()}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,o=window.React,r=window.wp.blockEditor,i=window.wp.data,a=window.wp.element,l=window.wp.components,c=()=>(0,o.createElement)(l.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(l.Rect,{width:"29",height:"29",fill:"white"}),(0,o.createElement)(l.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,o.createElement)(l.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,o.createElement)(l.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),s=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,o.createElement)("div",{className:"teachable-error-notice"},(0,o.createElement)(c,null),(0,o.createElement)("h5",{className:"teachable-error-title"},e),(0,o.createElement)("p",{className:"teachable-error-description"},t));var u=n(838),p=n.n(u);const d=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-description","title":"Product Description","category":"embed","description":"A teachable product description block.","keywords":["teachable product description"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"color":{"text":true,"background":true },"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:m}=d,f={...d,title:(0,e.__)("Teachable Description","teachable"),description:(0,e.__)("A teachable product description block.","teachable"),icon:"text",edit:function(t){const{attributes:n,clientId:c,setAttributes:u}=t,{productId:d}=n,{buyButtonData:m,description_classes:f}=teachable_buy_button||{},h=!1===m?[]:m,g=Array.isArray(h)?h.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],_=e=>{const t=h.some((t=>t.id.toString()===e));return!t&&h.length>0?h[0].id.toString():e};(0,a.useEffect)((()=>{u({productId:_(d)})}),[d]);const y=d?h.find((e=>e.id.toString()===_(d))):h.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),[T,b]=(0,a.useState)(y),[E,A]=(0,a.useState)(null),[N,S]=(0,a.useState)(!0);(0,a.useEffect)((()=>{u(N&&d?{productId:d}:{productId:E}),S(!1)}),[N,E,A]);const w=(0,i.useSelect)((e=>{let t=c;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const o=e("core/block-editor").getBlockAttributes(n);if(o&&o.productId)return o.productId;t=n}if(Array.isArray(h)){const e=h.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[c]);(0,a.useEffect)((()=>{b((e=>h.find((e=>e.id.toString()===w)))),A(_(w))}),[w]);const v=T&&T.description?p().sanitize(T.description,{ALLOWED_TAGS:["b","strong","i","em"]}):"",C=(0,r.useBlockProps)({className:`teachable-desription ${f}`});return T&&T.description&&""!==T.description?(0,o.createElement)(a.Fragment,null,(0,o.createElement)(r.InspectorControls,{group:"settings"},(0,o.createElement)(l.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,o.createElement)("div",null,(0,o.createElement)(l.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:E,options:g,onChange:e=>{E&&e&&e!==E&&(b(h.find((t=>t.id.toString()===e))),A(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,o.createElement)("p",{...C,dangerouslySetInnerHTML:{__html:v}})):(0,o.createElement)("div",{...C},(0,o.createElement)(s,{title:(0,e.__)("Product Description","teachable"),description:(0,e.__)("Oops! No product description found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(m,f),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})()})();1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=N(Array.prototype.forEach),p=N(Array.prototype.pop),d=N(Array.prototype.push),m=N(String.prototype.toLowerCase),f=N(String.prototype.toString),h=N(String.prototype.match),g=N(String.prototype.replace),_=N(String.prototype.indexOf),y=N(String.prototype.trim),T=N(Object.prototype.hasOwnProperty),b=N(RegExp.prototype.test),E=(A=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(A,t)});var A;function N(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function S(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function w(e){for(let t=0;t<e.length;t++)T(e,t)||(e[t]=null);return e}function v(t){const n=l(null);for(const[o,r]of e(t))T(t,o)&&(Array.isArray(r)?n[o]=w(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=v(r):n[o]=r);return n}function C(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=o(e)}return function(){return null}}const R=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),D=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),O=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),I=i(["#text"]),M=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),B=a(/<%[\w\W]*|[\w\W]*%>/gm),z=a(/\${[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]/),G=a(/^aria-[\-\w]+$/),j=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=a(/^(?:\w+script|data):/i),V=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=a(/^html$/i),q=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var $=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:B,TMPLIT_EXPR:z,DATA_ATTR:W,ARIA_ATTR:G,IS_ALLOWED_URI:j,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:V,DOCTYPE_NAME:X,CUSTOM_ELEMENT:q});const K=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const o=e=>t(e);if(o.version="3.1.1",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:A,Node:N,Element:w,NodeFilter:F,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:z,DOMParser:W,trustedTypes:G}=n,Y=w.prototype,V=C(Y,"cloneNode"),q=C(Y,"nextSibling"),Z=C(Y,"childNodes"),J=C(Y,"parentNode");if("function"==typeof A){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:re}=r,{importNode:ie}=a;let ae={};o.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:se,DATA_ATTR:ue,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:fe}=$;let{IS_ALLOWED_URI:he}=$,ge=null;const _e=S({},[...R,...k,...x,...L,...I]);let ye=null;const Te=S({},[...M,...P,...H,...U]);let be=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,Ae=null,Ne=!0,Se=!0,we=!1,ve=!0,Ce=!1,Re=!0,ke=!1,xe=!1,De=!1,Le=!1,Oe=!1,Ie=!1,Me=!0,Pe=!1,He=!0,Ue=!1,Fe={},Be=null;const ze=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let We=null;const Ge=S({},["audio","video","img","source","image","track"]);let je=null;const Ye=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let $e=qe,Ke=!1,Ze=null;const Je=S({},[Ve,Xe,qe],f);let Qe=null;const et=["application/xhtml+xml","text/html"];let tt=null,nt=null;const ot=r.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=v(e),Qe=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Qe?f:m,ge=T(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,tt):_e,ye=T(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,tt):Te,Ze=T(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,f):Je,je=T(e,"ADD_URI_SAFE_ATTR")?S(v(Ye),e.ADD_URI_SAFE_ATTR,tt):Ye,We=T(e,"ADD_DATA_URI_TAGS")?S(v(Ge),e.ADD_DATA_URI_TAGS,tt):Ge,Be=T(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,tt):ze,Ee=T(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,tt):{},Ae=T(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,tt):{},Fe=!!T(e,"USE_PROFILES")&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,Re=!1!==e.SAFE_FOR_XML,ke=e.WHOLE_DOCUMENT||!1,Le=e.RETURN_DOM||!1,Oe=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Pe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||j,$e=e.NAMESPACE||qe,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(Se=!1),Oe&&(Le=!0),Fe&&(ge=S({},I),ye=[],!0===Fe.html&&(S(ge,R),S(ye,M)),!0===Fe.svg&&(S(ge,k),S(ye,P),S(ye,U)),!0===Fe.svgFilters&&(S(ge,x),S(ye,P),S(ye,U)),!0===Fe.mathMl&&(S(ge,L),S(ye,H),S(ye,U))),e.ADD_TAGS&&(ge===_e&&(ge=v(ge)),S(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(ye===Te&&(ye=v(ye)),S(ye,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&S(je,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Be===ze&&(Be=v(Be)),S(Be,e.FORBID_CONTENTS,tt)),He&&(ge["#text"]=!0),ke&&S(ge,["html","head","body"]),ge.table&&(S(ge,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));i&&i(e),nt=e}},at=S({},["mi","mo","mn","ms","mtext"]),lt=S({},["foreignobject","desc","title","annotation-xml"]),ct=S({},["title","style","font","a","script"]),st=S({},[...k,...x,...D]),ut=S({},[...L,...O]),pt=function(e){d(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},dt=function(e,t){try{d(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ye[e])if(Le||Oe)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){let t=null,n=null;if(De)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Qe&&$e===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Q?Q.createHTML(e):e;if($e===qe)try{t=(new W).parseFromString(o,Qe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ke?ee:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),$e===qe?re.call(t,ke?"html":"body")[0]:ke?t.documentElement:i},ft=function(e){return ne.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT|F.SHOW_PROCESSING_INSTRUCTION|F.SHOW_CDATA_SECTION,null)},ht=function(e){return"function"==typeof N&&e instanceof N},gt=function(e,t,n){ae[e]&&u(ae[e],(e=>{e.call(o,t,n,nt)}))},_t=function(e){let t=null;if(gt("beforeSanitizeElements",e,null),(n=e)instanceof z&&(void 0!==n.__depth&&"number"!=typeof n.__depth||void 0!==n.__removalCount&&"number"!=typeof n.__removalCount||"string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return pt(e),!0;var n;const r=tt(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:r,allowedTags:ge}),e.hasChildNodes()&&!ht(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return pt(e),!0;if(7===e.nodeType)return pt(e),!0;if(Re&&8===e.nodeType&&b(/<[/\w]/g,e.data))return pt(e),!0;if(!ge[r]||Ee[r]){if(!Ee[r]&&Tt(r)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,r))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(r))return!1}if(He&&!Be[r]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=V(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,q(e))}}return pt(e),!0}return e instanceof w&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=m(e.tagName),o=m(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===Xe?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===o||at[o]):Boolean(st[n]):e.namespaceURI===Ve?t.namespaceURI===qe?"math"===n:t.namespaceURI===Xe?"math"===n&<[o]:Boolean(ut[n]):e.namespaceURI===qe?!(t.namespaceURI===Xe&&!lt[o])&&!(t.namespaceURI===Ve&&!at[o])&&!ut[n]&&(ct[n]||!st[n]):!("application/xhtml+xml"!==Qe||!Ze[e.namespaceURI]))}(e)?(pt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,u([le,ce,se],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(o.removed,{element:e.cloneNode()}),e.textContent=t)),gt("afterSanitizeElements",e,null),!1):(pt(e),!0)},yt=function(e,t,n){if(Me&&("id"===t||"name"===t)&&(n in r||n in ot))return!1;if(Se&&!Ae[t]&&b(ue,t));else if(Ne&&b(pe,t));else if(!ye[t]||Ae[t]){if(!(Tt(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(je[t]);else if(b(he,g(n,me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_(n,"data:")||!We[e])if(we&&!b(de,g(n,me,"")));else if(n)return!1;return!0},Tt=function(e){return"annotation-xml"!==e&&h(e,fe)},bt=function(e){gt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=tt(a);let d="value"===a?c:y(c);if(n.attrName=s,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,gt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(dt(a,e),!n.keepAttr)continue;if(!ve&&b(/\/>/i,d)){dt(a,e);continue}Ce&&u([le,ce,se],(e=>{d=g(d,e," ")}));const m=tt(e.nodeName);if(yt(m,s,d)){if(!Pe||"id"!==s&&"name"!==s||(dt(a,e),d="user-content-"+d),Q&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(m,s)){case"TrustedHTML":d=Q.createHTML(d);break;case"TrustedScriptURL":d=Q.createScriptURL(d)}try{l?e.setAttributeNS(l,a,d):e.setAttribute(a,d),p(o.removed)}catch(e){}}}gt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const o=ft(t);for(gt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)gt("uponSanitizeShadowNode",n,null),_t(n)||(1===n.nodeType&&(n.parentNode&&n.parentNode.__depth?n.__depth=(n.__removalCount||0)+n.parentNode.__depth+1:n.__depth=1),n.__depth>=255&&pt(n),n.content instanceof s&&(n.content.__depth=n.__depth,e(n.content)),bt(n));gt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!o.isSupported)return e;if(xe||it(t),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||Ee[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof N)n=mt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Le&&!Ce&&!ke&&-1===e.indexOf("<"))return Q&&Ie?Q.createHTML(e):e;if(n=mt(e),!n)return Le?null:Ie?ee:""}n&&De&&pt(n.firstChild);const c=ft(Ue?e:n);for(;i=c.nextNode();)_t(i)||(1===i.nodeType&&(i.parentNode&&i.parentNode.__depth?i.__depth=(i.__removalCount||0)+i.parentNode.__depth+1:i.__depth=1),i.__depth>=255&&pt(i),i.content instanceof s&&(i.content.__depth=i.__depth,Et(i.content)),bt(i));if(Ue)return e;if(Le){if(Oe)for(l=oe.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ye.shadowroot||ye.shadowrootmode)&&(l=ie.call(a,l,!0)),l}let p=ke?n.outerHTML:n.innerHTML;return ke&&ge["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(X,n.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+p),Ce&&u([le,ce,se],(e=>{p=g(p,e," ")})),Q&&Ie?Q.createHTML(p):p},o.setConfig=function(){it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),xe=!0},o.clearConfig=function(){nt=null,xe=!1},o.isValidAttribute=function(e,t,n){nt||it({});const o=tt(e),r=tt(t);return yt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],d(ae[e],t))},o.removeHook=function(e){if(ae[e])return p(ae[e])},o.removeHooks=function(e){ae[e]&&(ae[e]=[])},o.removeAllHooks=function(){ae={}},o}()}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,o=window.React,r=window.wp.blockEditor,i=window.wp.data,a=window.wp.element,l=window.wp.components,c=()=>(0,o.createElement)(l.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(l.Rect,{width:"29",height:"29",fill:"white"}),(0,o.createElement)(l.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,o.createElement)(l.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,o.createElement)(l.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),s=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,o.createElement)("div",{className:"teachable-error-notice"},(0,o.createElement)(c,null),(0,o.createElement)("h5",{className:"teachable-error-title"},e),(0,o.createElement)("p",{className:"teachable-error-description"},t));var u=n(838),p=n.n(u);const d=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-description","title":"Product Description","category":"embed","description":"A teachable product description block.","keywords":["teachable product description"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"color":{"text":true,"background":true,"border":true},"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:m}=d,f={...d,title:(0,e.__)("Teachable Description","teachable"),description:(0,e.__)("A teachable product description block.","teachable"),icon:"text",edit:function(t){const{attributes:n,clientId:c,setAttributes:u}=t,{productId:d}=n,{buyButtonData:m,description_classes:f}=teachable_buy_button||{},h=!1===m?[]:m,g=Array.isArray(h)?h.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],_=e=>{const t=h.some((t=>t.id.toString()===e));return!t&&h.length>0?h[0].id.toString():e};(0,a.useEffect)((()=>{u({productId:_(d)})}),[d]);const y=d?h.find((e=>e.id.toString()===_(d))):h.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),[T,b]=(0,a.useState)(y),[E,A]=(0,a.useState)(null),[N,S]=(0,a.useState)(!0);(0,a.useEffect)((()=>{u(N&&d?{productId:d}:{productId:E}),S(!1)}),[N,E,A]);const w=(0,i.useSelect)((e=>{let t=c;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const o=e("core/block-editor").getBlockAttributes(n);if(o&&o.productId)return o.productId;t=n}if(Array.isArray(h)){const e=h.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[c]);(0,a.useEffect)((()=>{b((e=>h.find((e=>e.id.toString()===w)))),A(_(w))}),[w]);const v=T&&T.description?p().sanitize(T.description,{ALLOWED_TAGS:["b","strong","i","em"]}):"",C=(0,r.useBlockProps)({className:`teachable-desription ${f}`});return T&&T.description&&""!==T.description?(0,o.createElement)(a.Fragment,null,(0,o.createElement)(r.InspectorControls,{group:"settings"},(0,o.createElement)(l.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,o.createElement)("div",null,(0,o.createElement)(l.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:E,options:g,onChange:e=>{E&&e&&e!==E&&(b(h.find((t=>t.id.toString()===e))),A(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,o.createElement)("p",{...C,dangerouslySetInnerHTML:{__html:v}})):(0,o.createElement)("div",{...C},(0,o.createElement)(s,{title:(0,e.__)("Product Description","teachable"),description:(0,e.__)("Oops! No product description found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(m,f),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})()})(); -
teachable/trunk/build/blocks/blocks/product-enrollment-count/block.json
r3100764 r3106870 27 27 "color": { 28 28 "text": true, 29 "background": true 29 "background": true, 30 "border": true 30 31 }, 31 32 "typography": { -
teachable/trunk/build/blocks/blocks/product-enrollment-count/index.asset.php
r3100764 r3106870 1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' 843b02291bb33bd3ad5c');1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '4fb4d1822e30cf3918d7'); -
teachable/trunk/build/blocks/blocks/product-enrollment-count/index.js
r3100764 r3106870 1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,n=window.React,l=window.wp.blockEditor,r=window.wp.data,o=window.wp.element,a=window.wp.components,c=()=>(0,n.createElement)(a.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Rect,{width:"29",height:"29",fill:"white"}),(0,n.createElement)(a.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,n.createElement)(a.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,n.createElement)(a.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),i=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,n.createElement)("div",{className:"teachable-error-notice"},(0,n.createElement)(c,null),(0,n.createElement)("h5",{className:"teachable-error-title"},e),(0,n.createElement)("p",{className:"teachable-error-description"},t)),s=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-enrollment-count","title":"Product Enrollment Count","category":"embed","description":"A teachable product enrollment count block.","keywords":["teachable product enrollment count"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"color":{"text":true,"background":true },"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:u}=s,d={...s,title:(0,e.__)("Teachable Enrollment Count","teachable"),description:(0,e.__)("A teachable product enrollment count block.","teachable"),icon:"admin-users",edit:function(t){const{attributes:c,clientId:s,setAttributes:u}=t,{productId:d}=c,{buyButtonData:m,description_classes:p}=teachable_buy_button||{},h=!1===m?[]:m,b=Array.isArray(h)?h.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],g=e=>{const t=h.some((t=>t.id.toString()===e));return!t&&h.length>0?h[0].id.toString():e};(0,o.useEffect)((()=>{u({productId:g(d)})}),[d]);const C=d?h.find((e=>e.id.toString()===g(d))):h.find((e=>e.id.toString()===(b.length>0?b[0].value:null))),[w,f]=(0,o.useState)(C),[y,E]=(0,o.useState)(null),[_,k]=(0,o.useState)(!0);(0,o.useEffect)((()=>{u(_&&d?{productId:d}:{productId:y}),k(!1)}),[_,y,E]);const v=(0,r.useSelect)((e=>{let t=s;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const l=e("core/block-editor").getBlockAttributes(n);if(l&&l.productId)return l.productId;t=n}if(Array.isArray(h)){const e=h.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[s]);(0,o.useEffect)((()=>{f((e=>h.find((e=>e.id.toString()===v)))),E(g(v))}),[v]);const S=(0,e.__)("students enrolled","teachable"),V=(0,l.useBlockProps)({className:`teachable-enrollment-count ${p}`});return w&&null!==w.enrollment_count?(w&&void 0===w.enrollment_count&&(w.enrollment_count=0),(0,n.createElement)(o.Fragment,null,(0,n.createElement)(l.InspectorControls,{group:"settings"},(0,n.createElement)(a.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,n.createElement)("div",null,(0,n.createElement)(a.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:y,options:b,onChange:e=>{y&&e&&e!==y&&(f(h.find((t=>t.id.toString()===e))),E(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,n.createElement)("p",{...V},(0,n.createElement)("span",{className:"teachable-enrollment-count-icon",dangerouslySetInnerHTML:{__html:'<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg" style="display:block"><path d="M0.833008 13.667V11.271C0.833008 10.785 0.958008 10.3473 1.20801 9.95801C1.45801 9.56934 1.78467 9.27768 2.18801 9.08301C3.02134 8.66634 3.89601 8.35401 4.81201 8.14601C5.72934 7.93734 6.64601 7.83301 7.56201 7.83301C8.47934 7.83301 9.39601 7.94068 10.312 8.15601C11.2293 8.37134 12.1047 8.68034 12.938 9.08301C13.3407 9.27768 13.667 9.56934 13.917 9.95801C14.167 10.3473 14.292 10.785 14.292 11.271V13.667H0.833008ZM7.56201 6.97901C6.61801 6.97901 5.82667 6.65968 5.18801 6.02101C4.54867 5.38168 4.22901 4.59001 4.22901 3.64601C4.22901 2.70134 4.54867 1.90968 5.18801 1.27101C5.82667 0.631678 6.61801 0.312012 7.56201 0.312012C8.50667 0.312012 9.29867 0.631678 9.93801 1.27101C10.5767 1.90968 10.896 2.70134 10.896 3.64601C10.896 4.59001 10.5767 5.38168 9.93801 6.02101C9.29867 6.65968 8.50667 6.97901 7.56201 6.97901ZM15.896 3.64601C15.896 4.59001 15.5767 5.38168 14.938 6.02101C14.2987 6.65968 13.5067 6.97901 12.562 6.97901C12.4093 6.97901 12.1977 6.95834 11.927 6.91701C11.6563 6.87501 11.4447 6.83334 11.292 6.79201C11.6527 6.34734 11.9337 5.85768 12.135 5.32301C12.337 4.78834 12.438 4.22934 12.438 3.64601C12.438 3.07668 12.337 2.52468 12.135 1.99001C11.9337 1.45534 11.6527 0.965678 11.292 0.521012C11.5 0.451678 11.7153 0.399678 11.938 0.365012C12.16 0.329678 12.368 0.312012 12.562 0.312012C13.5067 0.312012 14.2987 0.631678 14.938 1.27101C15.5767 1.90968 15.896 2.70134 15.896 3.64601ZM15.917 13.667V11.083C15.917 10.5277 15.7607 9.96168 15.448 9.38501C15.1353 8.80901 14.6667 8.31968 14.042 7.91701C14.778 8.00034 15.4513 8.14268 16.062 8.34401C16.6733 8.54534 17.2567 8.79168 17.812 9.08301C18.326 9.36101 18.6803 9.67368 18.875 10.021C19.0697 10.3683 19.167 10.785 19.167 11.271V13.667H15.917Z" fill="currentColor" /></svg>'}}),(0,n.createElement)("span",{className:"teachable-enrollment-count-number"},w.enrollment_count),(0,n.createElement)("span",{className:"teachable-enrollment-count-details"},S)))):(0,n.createElement)("div",{...V},(0,n.createElement)(i,{title:(0,e.__)("Product Enrollment Count","teachable"),description:(0,e.__)("Oops! No product enrollment count found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(u,d),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})();1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,n=window.React,l=window.wp.blockEditor,r=window.wp.data,o=window.wp.element,a=window.wp.components,c=()=>(0,n.createElement)(a.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(a.Rect,{width:"29",height:"29",fill:"white"}),(0,n.createElement)(a.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,n.createElement)(a.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,n.createElement)(a.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),i=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,n.createElement)("div",{className:"teachable-error-notice"},(0,n.createElement)(c,null),(0,n.createElement)("h5",{className:"teachable-error-title"},e),(0,n.createElement)("p",{className:"teachable-error-description"},t)),s=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-enrollment-count","title":"Product Enrollment Count","category":"embed","description":"A teachable product enrollment count block.","keywords":["teachable product enrollment count"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"color":{"text":true,"background":true,"border":true},"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:u}=s,d={...s,title:(0,e.__)("Teachable Enrollment Count","teachable"),description:(0,e.__)("A teachable product enrollment count block.","teachable"),icon:"admin-users",edit:function(t){const{attributes:c,clientId:s,setAttributes:u}=t,{productId:d}=c,{buyButtonData:m,description_classes:p}=teachable_buy_button||{},h=!1===m?[]:m,b=Array.isArray(h)?h.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],g=e=>{const t=h.some((t=>t.id.toString()===e));return!t&&h.length>0?h[0].id.toString():e};(0,o.useEffect)((()=>{u({productId:g(d)})}),[d]);const C=d?h.find((e=>e.id.toString()===g(d))):h.find((e=>e.id.toString()===(b.length>0?b[0].value:null))),[w,f]=(0,o.useState)(C),[y,E]=(0,o.useState)(null),[_,k]=(0,o.useState)(!0);(0,o.useEffect)((()=>{u(_&&d?{productId:d}:{productId:y}),k(!1)}),[_,y,E]);const v=(0,r.useSelect)((e=>{let t=s;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const l=e("core/block-editor").getBlockAttributes(n);if(l&&l.productId)return l.productId;t=n}if(Array.isArray(h)){const e=h.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[s]);(0,o.useEffect)((()=>{f((e=>h.find((e=>e.id.toString()===v)))),E(g(v))}),[v]);const S=(0,e.__)("students enrolled","teachable"),V=(0,l.useBlockProps)({className:`teachable-enrollment-count ${p}`});return w&&null!==w.enrollment_count?(w&&void 0===w.enrollment_count&&(w.enrollment_count=0),(0,n.createElement)(o.Fragment,null,(0,n.createElement)(l.InspectorControls,{group:"settings"},(0,n.createElement)(a.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,n.createElement)("div",null,(0,n.createElement)(a.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:y,options:b,onChange:e=>{y&&e&&e!==y&&(f(h.find((t=>t.id.toString()===e))),E(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,n.createElement)("p",{...V},(0,n.createElement)("span",{className:"teachable-enrollment-count-icon",dangerouslySetInnerHTML:{__html:'<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg" style="display:block"><path d="M0.833008 13.667V11.271C0.833008 10.785 0.958008 10.3473 1.20801 9.95801C1.45801 9.56934 1.78467 9.27768 2.18801 9.08301C3.02134 8.66634 3.89601 8.35401 4.81201 8.14601C5.72934 7.93734 6.64601 7.83301 7.56201 7.83301C8.47934 7.83301 9.39601 7.94068 10.312 8.15601C11.2293 8.37134 12.1047 8.68034 12.938 9.08301C13.3407 9.27768 13.667 9.56934 13.917 9.95801C14.167 10.3473 14.292 10.785 14.292 11.271V13.667H0.833008ZM7.56201 6.97901C6.61801 6.97901 5.82667 6.65968 5.18801 6.02101C4.54867 5.38168 4.22901 4.59001 4.22901 3.64601C4.22901 2.70134 4.54867 1.90968 5.18801 1.27101C5.82667 0.631678 6.61801 0.312012 7.56201 0.312012C8.50667 0.312012 9.29867 0.631678 9.93801 1.27101C10.5767 1.90968 10.896 2.70134 10.896 3.64601C10.896 4.59001 10.5767 5.38168 9.93801 6.02101C9.29867 6.65968 8.50667 6.97901 7.56201 6.97901ZM15.896 3.64601C15.896 4.59001 15.5767 5.38168 14.938 6.02101C14.2987 6.65968 13.5067 6.97901 12.562 6.97901C12.4093 6.97901 12.1977 6.95834 11.927 6.91701C11.6563 6.87501 11.4447 6.83334 11.292 6.79201C11.6527 6.34734 11.9337 5.85768 12.135 5.32301C12.337 4.78834 12.438 4.22934 12.438 3.64601C12.438 3.07668 12.337 2.52468 12.135 1.99001C11.9337 1.45534 11.6527 0.965678 11.292 0.521012C11.5 0.451678 11.7153 0.399678 11.938 0.365012C12.16 0.329678 12.368 0.312012 12.562 0.312012C13.5067 0.312012 14.2987 0.631678 14.938 1.27101C15.5767 1.90968 15.896 2.70134 15.896 3.64601ZM15.917 13.667V11.083C15.917 10.5277 15.7607 9.96168 15.448 9.38501C15.1353 8.80901 14.6667 8.31968 14.042 7.91701C14.778 8.00034 15.4513 8.14268 16.062 8.34401C16.6733 8.54534 17.2567 8.79168 17.812 9.08301C18.326 9.36101 18.6803 9.67368 18.875 10.021C19.0697 10.3683 19.167 10.785 19.167 11.271V13.667H15.917Z" fill="currentColor" /></svg>'}}),(0,n.createElement)("span",{className:"teachable-enrollment-count-number"},w.enrollment_count),(0,n.createElement)("span",{className:"teachable-enrollment-count-details"},S)))):(0,n.createElement)("div",{...V},(0,n.createElement)(i,{title:(0,e.__)("Product Enrollment Count","teachable"),description:(0,e.__)("Oops! No product enrollment count found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(u,d),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})(); -
teachable/trunk/build/blocks/blocks/product-image/block.json
r3100764 r3106870 25 25 }, 26 26 "supports": { 27 "color": { 28 "border": true 29 }, 27 30 "spacing": { 28 31 "margin": true, -
teachable/trunk/build/blocks/blocks/product-image/index.asset.php
r3100764 r3106870 1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' 67dd8d502b5bc0092863');1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '25e6a6d8db84ae422610'); -
teachable/trunk/build/blocks/blocks/product-image/index.js
r3100764 r3106870 1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks, a=window.React,r=window.wp.blockEditor,l=window.wp.data,n=window.wp.element,i=window.wp.components,c=()=>(0,a.createElement)(i.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(i.Rect,{width:"29",height:"29",fill:"white"}),(0,a.createElement)(i.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,a.createElement)(i.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,a.createElement)(i.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),o=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,a.createElement)("div",{className:"teachable-error-notice"},(0,a.createElement)(c,null),(0,a.createElement)("h5",{className:"teachable-error-title"},e),(0,a.createElement)("p",{className:"teachable-error-description"},t)),s=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-image","title":"Product Image","category":"embed","description":"A teachable product image block.","keywords":["teachable product image"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:u}=s,d={...s,title:(0,e.__)("Teachable Image","teachable"),description:(0,e.__)("A teachable product image block.","teachable"),icon:"format-image",edit:function(t){const{attributes:c,clientId:s,setAttributes:u}=t,{productId:d}=c,{buyButtonData:m,description_classes:p}=teachable_buy_button||{},g=!1===m?[]:m,b=Array.isArray(g)?g.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],h=e=>{const t=g.some((t=>t.id.toString()===e));return!t&&g.length>0?g[0].id.toString():e};(0,n.useEffect)((()=>{u({productId:h(d)})}),[d]);const w=d?g.find((e=>e.id.toString()===h(d))):g.find((e=>e.id.toString()===(b.length>0?b[0].value:null))),[_,f]=(0,n.useState)(w),[y,E]=(0,n.useState)(null),[k,S]=(0,n.useState)(!0);(0,n.useEffect)((()=>{u(k&&d?{productId:d}:{productId:y}),S(!1)}),[k,y,E]);const v=(0,l.useSelect)((e=>{let t=s;for(;t;){const a=e("core/block-editor").getBlockRootClientId(t);if(!a)break;const r=e("core/block-editor").getBlockAttributes(a);if(r&&r.productId)return r.productId;t=a}if(Array.isArray(g)){const e=g.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[s]);(0,n.useEffect)((()=>{f((e=>g.find((e=>e.id.toString()===v)))),E(h(v))}),[v]);const I=(0,r.useBlockProps)({className:`teachable-image ${p}`});return _&&_.image_url&&""!==_.image_url?(0,a.createElement)(n.Fragment,null,(0,a.createElement)(r.InspectorControls,{group:"settings"},(0,a.createElement)(i.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,a.createElement)("div",null,(0,a.createElement)(i.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:y,options:b,onChange:e=>{y&&e&&e!==y&&(f(g.find((t=>t.id.toString()===e))),E(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,a.createElement)("div",{...I},(0,a.createElement)("img",{key:_.image_url,src:_.image_url,alt:(0,e.__)("Product image","teachable"),title:(0,e.__)("Product image","teachable")}))):(0,a.createElement)("div",{...I},(0,a.createElement)(o,{title:(0,e.__)("Product Image","teachable"),description:(0,e.__)("Oops! No product image found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(u,d),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})();1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,r=window.React,a=window.wp.blockEditor,l=window.wp.data,n=window.wp.element,i=window.wp.components,o=()=>(0,r.createElement)(i.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(i.Rect,{width:"29",height:"29",fill:"white"}),(0,r.createElement)(i.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,r.createElement)(i.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,r.createElement)(i.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),c=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,r.createElement)("div",{className:"teachable-error-notice"},(0,r.createElement)(o,null),(0,r.createElement)("h5",{className:"teachable-error-title"},e),(0,r.createElement)("p",{className:"teachable-error-description"},t)),s=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-image","title":"Product Image","category":"embed","description":"A teachable product image block.","keywords":["teachable product image"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"color":{"border":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:u}=s,d={...s,title:(0,e.__)("Teachable Image","teachable"),description:(0,e.__)("A teachable product image block.","teachable"),icon:"format-image",edit:function(t){const{attributes:o,clientId:s,setAttributes:u}=t,{productId:d}=o,{buyButtonData:m,description_classes:p}=teachable_buy_button||{},b=!1===m?[]:m,g=Array.isArray(b)?b.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],h=e=>{const t=b.some((t=>t.id.toString()===e));return!t&&b.length>0?b[0].id.toString():e};(0,n.useEffect)((()=>{u({productId:h(d)})}),[d]);const w=d?b.find((e=>e.id.toString()===h(d))):b.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),[_,f]=(0,n.useState)(w),[y,E]=(0,n.useState)(null),[k,S]=(0,n.useState)(!0);(0,n.useEffect)((()=>{u(k&&d?{productId:d}:{productId:y}),S(!1)}),[k,y,E]);const v=(0,l.useSelect)((e=>{let t=s;for(;t;){const r=e("core/block-editor").getBlockRootClientId(t);if(!r)break;const a=e("core/block-editor").getBlockAttributes(r);if(a&&a.productId)return a.productId;t=r}if(Array.isArray(b)){const e=b.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[s]);(0,n.useEffect)((()=>{f((e=>b.find((e=>e.id.toString()===v)))),E(h(v))}),[v]);const I=(0,a.useBlockProps)({className:`teachable-image ${p}`});return _&&_.image_url&&""!==_.image_url?(0,r.createElement)(n.Fragment,null,(0,r.createElement)(a.InspectorControls,{group:"settings"},(0,r.createElement)(i.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,r.createElement)("div",null,(0,r.createElement)(i.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:y,options:g,onChange:e=>{y&&e&&e!==y&&(f(b.find((t=>t.id.toString()===e))),E(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,r.createElement)("div",{...I},(0,r.createElement)("img",{key:_.image_url,src:_.image_url,alt:(0,e.__)("Product image","teachable"),title:(0,e.__)("Product image","teachable")}))):(0,r.createElement)("div",{...I},(0,r.createElement)(c,{title:(0,e.__)("Product Image","teachable"),description:(0,e.__)("Oops! No product image found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(u,d),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})(); -
teachable/trunk/build/blocks/blocks/product-name/block.json
r3100764 r3106870 27 27 "color": { 28 28 "text": true, 29 "background": true 29 "background": true, 30 "border": true 30 31 }, 31 32 "typography": { -
teachable/trunk/build/blocks/blocks/product-name/index.asset.php
r3100764 r3106870 1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' beb6681e49e5950ddae4');1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'f208532cfbd644386949'); -
teachable/trunk/build/blocks/blocks/product-name/index.js
r3100764 r3106870 1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:a,seal:i,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),i||(i=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=N(Array.prototype.forEach),m=N(Array.prototype.pop),p=N(Array.prototype.push),d=N(String.prototype.toLowerCase),f=N(String.prototype.toString),h=N(String.prototype.match),g=N(String.prototype.replace),_=N(String.prototype.indexOf),y=N(String.prototype.trim),T=N(Object.prototype.hasOwnProperty),b=N(RegExp.prototype.test),E=(A=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(A,t)});var A;function N(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function S(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function w(e){for(let t=0;t<e.length;t++)T(e,t)||(e[t]=null);return e}function v(t){const n=l(null);for(const[o,r]of e(t))T(t,o)&&(Array.isArray(r)?n[o]=w(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=v(r):n[o]=r);return n}function C(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=o(e)}return function(){return null}}const R=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),O=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),I=a(["#text"]),M=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),B=i(/<%[\w\W]*|[\w\W]*%>/gm),z=i(/\${[\w\W]*}/gm),W=i(/^data-[\-\w.\u00B7-\uFFFF]/),G=i(/^aria-[\-\w]+$/),j=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=i(/^(?:\w+script|data):/i),V=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=i(/^html$/i),q=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var $=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:B,TMPLIT_EXPR:z,DATA_ATTR:W,ARIA_ATTR:G,IS_ALLOWED_URI:j,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:V,DOCTYPE_NAME:X,CUSTOM_ELEMENT:q});const K=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const o=e=>t(e);if(o.version="3.1.1",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const i=r,c=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:A,Node:N,Element:w,NodeFilter:F,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:z,DOMParser:W,trustedTypes:G}=n,Y=w.prototype,V=C(Y,"cloneNode"),q=C(Y,"nextSibling"),Z=C(Y,"childNodes"),J=C(Y,"parentNode");if("function"==typeof A){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:re}=r,{importNode:ae}=i;let ie={};o.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:se,DATA_ATTR:ue,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:de,CUSTOM_ELEMENT:fe}=$;let{IS_ALLOWED_URI:he}=$,ge=null;const _e=S({},[...R,...k,...x,...O,...I]);let ye=null;const Te=S({},[...M,...P,...H,...U]);let be=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,Ae=null,Ne=!0,Se=!0,we=!1,ve=!0,Ce=!1,Re=!0,ke=!1,xe=!1,Le=!1,Oe=!1,De=!1,Ie=!1,Me=!0,Pe=!1,He=!0,Ue=!1,Fe={},Be=null;const ze=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let We=null;const Ge=S({},["audio","video","img","source","image","track"]);let je=null;const Ye=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let $e=qe,Ke=!1,Ze=null;const Je=S({},[Ve,Xe,qe],f);let Qe=null;const et=["application/xhtml+xml","text/html"];let tt=null,nt=null;const ot=r.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},at=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=v(e),Qe=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Qe?f:d,ge=T(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,tt):_e,ye=T(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,tt):Te,Ze=T(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,f):Je,je=T(e,"ADD_URI_SAFE_ATTR")?S(v(Ye),e.ADD_URI_SAFE_ATTR,tt):Ye,We=T(e,"ADD_DATA_URI_TAGS")?S(v(Ge),e.ADD_DATA_URI_TAGS,tt):Ge,Be=T(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,tt):ze,Ee=T(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,tt):{},Ae=T(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,tt):{},Fe=!!T(e,"USE_PROFILES")&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,Re=!1!==e.SAFE_FOR_XML,ke=e.WHOLE_DOCUMENT||!1,Oe=e.RETURN_DOM||!1,De=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Pe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||j,$e=e.NAMESPACE||qe,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(Se=!1),De&&(Oe=!0),Fe&&(ge=S({},I),ye=[],!0===Fe.html&&(S(ge,R),S(ye,M)),!0===Fe.svg&&(S(ge,k),S(ye,P),S(ye,U)),!0===Fe.svgFilters&&(S(ge,x),S(ye,P),S(ye,U)),!0===Fe.mathMl&&(S(ge,O),S(ye,H),S(ye,U))),e.ADD_TAGS&&(ge===_e&&(ge=v(ge)),S(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(ye===Te&&(ye=v(ye)),S(ye,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&S(je,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Be===ze&&(Be=v(Be)),S(Be,e.FORBID_CONTENTS,tt)),He&&(ge["#text"]=!0),ke&&S(ge,["html","head","body"]),ge.table&&(S(ge,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));a&&a(e),nt=e}},it=S({},["mi","mo","mn","ms","mtext"]),lt=S({},["foreignobject","desc","title","annotation-xml"]),ct=S({},["title","style","font","a","script"]),st=S({},[...k,...x,...L]),ut=S({},[...O,...D]),mt=function(e){p(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ye[e])if(Oe||De)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Qe&&$e===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Q?Q.createHTML(e):e;if($e===qe)try{t=(new W).parseFromString(o,Qe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ke?ee:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),$e===qe?re.call(t,ke?"html":"body")[0]:ke?t.documentElement:a},ft=function(e){return ne.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT|F.SHOW_PROCESSING_INSTRUCTION|F.SHOW_CDATA_SECTION,null)},ht=function(e){return"function"==typeof N&&e instanceof N},gt=function(e,t,n){ie[e]&&u(ie[e],(e=>{e.call(o,t,n,nt)}))},_t=function(e){let t=null;if(gt("beforeSanitizeElements",e,null),(n=e)instanceof z&&(void 0!==n.__depth&&"number"!=typeof n.__depth||void 0!==n.__removalCount&&"number"!=typeof n.__removalCount||"string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return mt(e),!0;var n;const r=tt(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:r,allowedTags:ge}),e.hasChildNodes()&&!ht(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return mt(e),!0;if(7===e.nodeType)return mt(e),!0;if(Re&&8===e.nodeType&&b(/<[/\w]/g,e.data))return mt(e),!0;if(!ge[r]||Ee[r]){if(!Ee[r]&&Tt(r)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,r))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(r))return!1}if(He&&!Be[r]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=V(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,q(e))}}return mt(e),!0}return e instanceof w&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=d(e.tagName),o=d(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===Xe?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(st[n]):e.namespaceURI===Ve?t.namespaceURI===qe?"math"===n:t.namespaceURI===Xe?"math"===n&<[o]:Boolean(ut[n]):e.namespaceURI===qe?!(t.namespaceURI===Xe&&!lt[o])&&!(t.namespaceURI===Ve&&!it[o])&&!ut[n]&&(ct[n]||!st[n]):!("application/xhtml+xml"!==Qe||!Ze[e.namespaceURI]))}(e)?(mt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,u([le,ce,se],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),gt("afterSanitizeElements",e,null),!1):(mt(e),!0)},yt=function(e,t,n){if(Me&&("id"===t||"name"===t)&&(n in r||n in ot))return!1;if(Se&&!Ae[t]&&b(ue,t));else if(Ne&&b(me,t));else if(!ye[t]||Ae[t]){if(!(Tt(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(je[t]);else if(b(he,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_(n,"data:")||!We[e])if(we&&!b(pe,g(n,de,"")));else if(n)return!1;return!0},Tt=function(e){return"annotation-xml"!==e&&h(e,fe)},bt=function(e){gt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let r=t.length;for(;r--;){const a=t[r],{name:i,namespaceURI:l,value:c}=a,s=tt(i);let p="value"===i?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,gt("uponSanitizeAttribute",e,n),p=n.attrValue,n.forceKeepAttr)continue;if(pt(i,e),!n.keepAttr)continue;if(!ve&&b(/\/>/i,p)){pt(i,e);continue}Ce&&u([le,ce,se],(e=>{p=g(p,e," ")}));const d=tt(e.nodeName);if(yt(d,s,p)){if(!Pe||"id"!==s&&"name"!==s||(pt(i,e),p="user-content-"+p),Q&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(d,s)){case"TrustedHTML":p=Q.createHTML(p);break;case"TrustedScriptURL":p=Q.createScriptURL(p)}try{l?e.setAttributeNS(l,i,p):e.setAttribute(i,p),m(o.removed)}catch(e){}}}gt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const o=ft(t);for(gt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)gt("uponSanitizeShadowNode",n,null),_t(n)||(1===n.nodeType&&(n.parentNode&&n.parentNode.__depth?n.__depth=(n.__removalCount||0)+n.parentNode.__depth+1:n.__depth=1),n.__depth>=255&&mt(n),n.content instanceof s&&(n.content.__depth=n.__depth,e(n.content)),bt(n));gt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,a=null,l=null;if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!o.isSupported)return e;if(xe||at(t),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||Ee[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof N)n=dt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Oe&&!Ce&&!ke&&-1===e.indexOf("<"))return Q&&Ie?Q.createHTML(e):e;if(n=dt(e),!n)return Oe?null:Ie?ee:""}n&&Le&&mt(n.firstChild);const c=ft(Ue?e:n);for(;a=c.nextNode();)_t(a)||(1===a.nodeType&&(a.parentNode&&a.parentNode.__depth?a.__depth=(a.__removalCount||0)+a.parentNode.__depth+1:a.__depth=1),a.__depth>=255&&mt(a),a.content instanceof s&&(a.content.__depth=a.__depth,Et(a.content)),bt(a));if(Ue)return e;if(Oe){if(De)for(l=oe.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ye.shadowroot||ye.shadowrootmode)&&(l=ae.call(i,l,!0)),l}let m=ke?n.outerHTML:n.innerHTML;return ke&&ge["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(X,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ce&&u([le,ce,se],(e=>{m=g(m,e," ")})),Q&&Ie?Q.createHTML(m):m},o.setConfig=function(){at(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),xe=!0},o.clearConfig=function(){nt=null,xe=!1},o.isValidAttribute=function(e,t,n){nt||at({});const o=tt(e),r=tt(t);return yt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],p(ie[e],t))},o.removeHook=function(e){if(ie[e])return m(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}()}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,o=window.React,r=window.wp.blockEditor,a=window.wp.data,i=window.wp.element,l=window.wp.components,c=()=>(0,o.createElement)(l.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(l.Rect,{width:"29",height:"29",fill:"white"}),(0,o.createElement)(l.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,o.createElement)(l.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,o.createElement)(l.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),s=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,o.createElement)("div",{className:"teachable-error-notice"},(0,o.createElement)(c,null),(0,o.createElement)("h5",{className:"teachable-error-title"},e),(0,o.createElement)("p",{className:"teachable-error-description"},t));var u=n(838),m=n.n(u);const p=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-name","title":"Product Name","category":"embed","description":"A teachable product name block.","keywords":["teachable product name"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"color":{"text":true,"background":true },"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:d}=p,f={...p,title:(0,e.__)("Teachable Name","teachable"),description:(0,e.__)("A teachable product name block.","teachable"),icon:"align-center",edit:function(t){const{attributes:n,clientId:c,setAttributes:u}=t,{productId:p}=n,{buyButtonData:d,description_classes:f}=teachable_buy_button||{},h=!1===d?[]:d,g=Array.isArray(h)?h.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],_=e=>{const t=h.some((t=>t.id.toString()===e));return!t&&h.length>0?h[0].id.toString():e};(0,i.useEffect)((()=>{u({productId:_(p)})}),[p]);const y=p?h.find((e=>e.id.toString()===_(p))):h.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),[T,b]=(0,i.useState)(y),[E,A]=(0,i.useState)(null),[N,S]=(0,i.useState)(!0);(0,i.useEffect)((()=>{u(N&&p?{productId:p}:{productId:E}),S(!1)}),[N,E,A]);const w=(0,a.useSelect)((e=>{let t=c;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const o=e("core/block-editor").getBlockAttributes(n);if(o&&o.productId)return o.productId;t=n}if(Array.isArray(h)){const e=h.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[c]);(0,i.useEffect)((()=>{b((e=>h.find((e=>e.id.toString()===w)))),A(_(w))}),[w]);const v=T&&T.name?m().sanitize(T.name,{ALLOWED_TAGS:["b","strong","i","em"]}):"",C=(0,r.useBlockProps)({className:`teachable-name ${f}`});return T&&T.name&&""!==T.name?(0,o.createElement)(i.Fragment,null,(0,o.createElement)(r.InspectorControls,{group:"settings"},(0,o.createElement)(l.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,o.createElement)("div",null,(0,o.createElement)(l.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:E,options:g,onChange:e=>{E&&e&&e!==E&&(b(h.find((t=>t.id.toString()===e))),A(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,o.createElement)("h3",{...C,dangerouslySetInnerHTML:{__html:v}})):(0,o.createElement)("div",{...C},(0,o.createElement)(s,{title:(0,e.__)("Product Name","teachable"),description:(0,e.__)("Oops! No product name found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(d,f),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})()})();1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:a,seal:i,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),i||(i=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=N(Array.prototype.forEach),m=N(Array.prototype.pop),p=N(Array.prototype.push),d=N(String.prototype.toLowerCase),f=N(String.prototype.toString),h=N(String.prototype.match),g=N(String.prototype.replace),_=N(String.prototype.indexOf),y=N(String.prototype.trim),T=N(Object.prototype.hasOwnProperty),b=N(RegExp.prototype.test),E=(A=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(A,t)});var A;function N(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function S(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function w(e){for(let t=0;t<e.length;t++)T(e,t)||(e[t]=null);return e}function v(t){const n=l(null);for(const[o,r]of e(t))T(t,o)&&(Array.isArray(r)?n[o]=w(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=v(r):n[o]=r);return n}function C(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=o(e)}return function(){return null}}const R=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),k=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),L=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),O=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),I=a(["#text"]),M=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),B=i(/<%[\w\W]*|[\w\W]*%>/gm),z=i(/\${[\w\W]*}/gm),W=i(/^data-[\-\w.\u00B7-\uFFFF]/),G=i(/^aria-[\-\w]+$/),j=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=i(/^(?:\w+script|data):/i),V=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=i(/^html$/i),q=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var $=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:B,TMPLIT_EXPR:z,DATA_ATTR:W,ARIA_ATTR:G,IS_ALLOWED_URI:j,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:V,DOCTYPE_NAME:X,CUSTOM_ELEMENT:q});const K=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const o=e=>t(e);if(o.version="3.1.1",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;let{document:r}=n;const i=r,c=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:A,Node:N,Element:w,NodeFilter:F,NamedNodeMap:B=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:z,DOMParser:W,trustedTypes:G}=n,Y=w.prototype,V=C(Y,"cloneNode"),q=C(Y,"nextSibling"),Z=C(Y,"childNodes"),J=C(Y,"parentNode");if("function"==typeof A){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:re}=r,{importNode:ae}=i;let ie={};o.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:le,ERB_EXPR:ce,TMPLIT_EXPR:se,DATA_ATTR:ue,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:de,CUSTOM_ELEMENT:fe}=$;let{IS_ALLOWED_URI:he}=$,ge=null;const _e=S({},[...R,...k,...x,...O,...I]);let ye=null;const Te=S({},[...M,...P,...H,...U]);let be=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ee=null,Ae=null,Ne=!0,Se=!0,we=!1,ve=!0,Ce=!1,Re=!0,ke=!1,xe=!1,Le=!1,Oe=!1,De=!1,Ie=!1,Me=!0,Pe=!1,He=!0,Ue=!1,Fe={},Be=null;const ze=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let We=null;const Ge=S({},["audio","video","img","source","image","track"]);let je=null;const Ye=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let $e=qe,Ke=!1,Ze=null;const Je=S({},[Ve,Xe,qe],f);let Qe=null;const et=["application/xhtml+xml","text/html"];let tt=null,nt=null;const ot=r.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},at=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=v(e),Qe=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Qe?f:d,ge=T(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,tt):_e,ye=T(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,tt):Te,Ze=T(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,f):Je,je=T(e,"ADD_URI_SAFE_ATTR")?S(v(Ye),e.ADD_URI_SAFE_ATTR,tt):Ye,We=T(e,"ADD_DATA_URI_TAGS")?S(v(Ge),e.ADD_DATA_URI_TAGS,tt):Ge,Be=T(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,tt):ze,Ee=T(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,tt):{},Ae=T(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,tt):{},Fe=!!T(e,"USE_PROFILES")&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,we=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,Re=!1!==e.SAFE_FOR_XML,ke=e.WHOLE_DOCUMENT||!1,Oe=e.RETURN_DOM||!1,De=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Pe=e.SANITIZE_NAMED_PROPS||!1,He=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||j,$e=e.NAMESPACE||qe,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(Se=!1),De&&(Oe=!0),Fe&&(ge=S({},I),ye=[],!0===Fe.html&&(S(ge,R),S(ye,M)),!0===Fe.svg&&(S(ge,k),S(ye,P),S(ye,U)),!0===Fe.svgFilters&&(S(ge,x),S(ye,P),S(ye,U)),!0===Fe.mathMl&&(S(ge,O),S(ye,H),S(ye,U))),e.ADD_TAGS&&(ge===_e&&(ge=v(ge)),S(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(ye===Te&&(ye=v(ye)),S(ye,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&S(je,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Be===ze&&(Be=v(Be)),S(Be,e.FORBID_CONTENTS,tt)),He&&(ge["#text"]=!0),ke&&S(ge,["html","head","body"]),ge.table&&(S(ge,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));a&&a(e),nt=e}},it=S({},["mi","mo","mn","ms","mtext"]),lt=S({},["foreignobject","desc","title","annotation-xml"]),ct=S({},["title","style","font","a","script"]),st=S({},[...k,...x,...L]),ut=S({},[...O,...D]),mt=function(e){p(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ye[e])if(Oe||De)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(Le)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Qe&&$e===qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Q?Q.createHTML(e):e;if($e===qe)try{t=(new W).parseFromString(o,Qe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ke?ee:o}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),$e===qe?re.call(t,ke?"html":"body")[0]:ke?t.documentElement:a},ft=function(e){return ne.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT|F.SHOW_PROCESSING_INSTRUCTION|F.SHOW_CDATA_SECTION,null)},ht=function(e){return"function"==typeof N&&e instanceof N},gt=function(e,t,n){ie[e]&&u(ie[e],(e=>{e.call(o,t,n,nt)}))},_t=function(e){let t=null;if(gt("beforeSanitizeElements",e,null),(n=e)instanceof z&&(void 0!==n.__depth&&"number"!=typeof n.__depth||void 0!==n.__removalCount&&"number"!=typeof n.__removalCount||"string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof B)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return mt(e),!0;var n;const r=tt(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:r,allowedTags:ge}),e.hasChildNodes()&&!ht(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return mt(e),!0;if(7===e.nodeType)return mt(e),!0;if(Re&&8===e.nodeType&&b(/<[/\w]/g,e.data))return mt(e),!0;if(!ge[r]||Ee[r]){if(!Ee[r]&&Tt(r)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,r))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(r))return!1}if(He&&!Be[r]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=V(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,q(e))}}return mt(e),!0}return e instanceof w&&!function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=d(e.tagName),o=d(t.tagName);return!!Ze[e.namespaceURI]&&(e.namespaceURI===Xe?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(st[n]):e.namespaceURI===Ve?t.namespaceURI===qe?"math"===n:t.namespaceURI===Xe?"math"===n&<[o]:Boolean(ut[n]):e.namespaceURI===qe?!(t.namespaceURI===Xe&&!lt[o])&&!(t.namespaceURI===Ve&&!it[o])&&!ut[n]&&(ct[n]||!st[n]):!("application/xhtml+xml"!==Qe||!Ze[e.namespaceURI]))}(e)?(mt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&3===e.nodeType&&(t=e.textContent,u([le,ce,se],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),gt("afterSanitizeElements",e,null),!1):(mt(e),!0)},yt=function(e,t,n){if(Me&&("id"===t||"name"===t)&&(n in r||n in ot))return!1;if(Se&&!Ae[t]&&b(ue,t));else if(Ne&&b(me,t));else if(!ye[t]||Ae[t]){if(!(Tt(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(je[t]);else if(b(he,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==_(n,"data:")||!We[e])if(we&&!b(pe,g(n,de,"")));else if(n)return!1;return!0},Tt=function(e){return"annotation-xml"!==e&&h(e,fe)},bt=function(e){gt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let r=t.length;for(;r--;){const a=t[r],{name:i,namespaceURI:l,value:c}=a,s=tt(i);let p="value"===i?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,gt("uponSanitizeAttribute",e,n),p=n.attrValue,n.forceKeepAttr)continue;if(pt(i,e),!n.keepAttr)continue;if(!ve&&b(/\/>/i,p)){pt(i,e);continue}Ce&&u([le,ce,se],(e=>{p=g(p,e," ")}));const d=tt(e.nodeName);if(yt(d,s,p)){if(!Pe||"id"!==s&&"name"!==s||(pt(i,e),p="user-content-"+p),Q&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(d,s)){case"TrustedHTML":p=Q.createHTML(p);break;case"TrustedScriptURL":p=Q.createScriptURL(p)}try{l?e.setAttributeNS(l,i,p):e.setAttribute(i,p),m(o.removed)}catch(e){}}}gt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const o=ft(t);for(gt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)gt("uponSanitizeShadowNode",n,null),_t(n)||(1===n.nodeType&&(n.parentNode&&n.parentNode.__depth?n.__depth=(n.__removalCount||0)+n.parentNode.__depth+1:n.__depth=1),n.__depth>=255&&mt(n),n.content instanceof s&&(n.content.__depth=n.__depth,e(n.content)),bt(n));gt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,a=null,l=null;if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!o.isSupported)return e;if(xe||at(t),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||Ee[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof N)n=dt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Oe&&!Ce&&!ke&&-1===e.indexOf("<"))return Q&&Ie?Q.createHTML(e):e;if(n=dt(e),!n)return Oe?null:Ie?ee:""}n&&Le&&mt(n.firstChild);const c=ft(Ue?e:n);for(;a=c.nextNode();)_t(a)||(1===a.nodeType&&(a.parentNode&&a.parentNode.__depth?a.__depth=(a.__removalCount||0)+a.parentNode.__depth+1:a.__depth=1),a.__depth>=255&&mt(a),a.content instanceof s&&(a.content.__depth=a.__depth,Et(a.content)),bt(a));if(Ue)return e;if(Oe){if(De)for(l=oe.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(ye.shadowroot||ye.shadowrootmode)&&(l=ae.call(i,l,!0)),l}let m=ke?n.outerHTML:n.innerHTML;return ke&&ge["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(X,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ce&&u([le,ce,se],(e=>{m=g(m,e," ")})),Q&&Ie?Q.createHTML(m):m},o.setConfig=function(){at(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),xe=!0},o.clearConfig=function(){nt=null,xe=!1},o.isValidAttribute=function(e,t,n){nt||at({});const o=tt(e),r=tt(t);return yt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],p(ie[e],t))},o.removeHook=function(e){if(ie[e])return m(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}()}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,o=window.React,r=window.wp.blockEditor,a=window.wp.data,i=window.wp.element,l=window.wp.components,c=()=>(0,o.createElement)(l.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(l.Rect,{width:"29",height:"29",fill:"white"}),(0,o.createElement)(l.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,o.createElement)(l.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,o.createElement)(l.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),s=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,o.createElement)("div",{className:"teachable-error-notice"},(0,o.createElement)(c,null),(0,o.createElement)("h5",{className:"teachable-error-title"},e),(0,o.createElement)("p",{className:"teachable-error-description"},t));var u=n(838),m=n.n(u);const p=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-name","title":"Product Name","category":"embed","description":"A teachable product name block.","keywords":["teachable product name"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"color":{"text":true,"background":true,"border":true},"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:d}=p,f={...p,title:(0,e.__)("Teachable Name","teachable"),description:(0,e.__)("A teachable product name block.","teachable"),icon:"align-center",edit:function(t){const{attributes:n,clientId:c,setAttributes:u}=t,{productId:p}=n,{buyButtonData:d,description_classes:f}=teachable_buy_button||{},h=!1===d?[]:d,g=Array.isArray(h)?h.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],_=e=>{const t=h.some((t=>t.id.toString()===e));return!t&&h.length>0?h[0].id.toString():e};(0,i.useEffect)((()=>{u({productId:_(p)})}),[p]);const y=p?h.find((e=>e.id.toString()===_(p))):h.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),[T,b]=(0,i.useState)(y),[E,A]=(0,i.useState)(null),[N,S]=(0,i.useState)(!0);(0,i.useEffect)((()=>{u(N&&p?{productId:p}:{productId:E}),S(!1)}),[N,E,A]);const w=(0,a.useSelect)((e=>{let t=c;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const o=e("core/block-editor").getBlockAttributes(n);if(o&&o.productId)return o.productId;t=n}if(Array.isArray(h)){const e=h.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[c]);(0,i.useEffect)((()=>{b((e=>h.find((e=>e.id.toString()===w)))),A(_(w))}),[w]);const v=T&&T.name?m().sanitize(T.name,{ALLOWED_TAGS:["b","strong","i","em"]}):"",C=(0,r.useBlockProps)({className:`teachable-name ${f}`});return T&&T.name&&""!==T.name?(0,o.createElement)(i.Fragment,null,(0,o.createElement)(r.InspectorControls,{group:"settings"},(0,o.createElement)(l.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,o.createElement)("div",null,(0,o.createElement)(l.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:E,options:g,onChange:e=>{E&&e&&e!==E&&(b(h.find((t=>t.id.toString()===e))),A(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,o.createElement)("h3",{...C,dangerouslySetInnerHTML:{__html:v}})):(0,o.createElement)("div",{...C},(0,o.createElement)(s,{title:(0,e.__)("Product Name","teachable"),description:(0,e.__)("Oops! No product name found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(d,f),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})()})(); -
teachable/trunk/build/blocks/blocks/product-plan-options/block.json
r3100764 r3106870 32 32 "color": { 33 33 "text": true, 34 "background": true 34 "background": true, 35 "border": true 35 36 }, 36 37 "typography": { -
teachable/trunk/build/blocks/blocks/product-plan-options/index.asset.php
r3100764 r3106870 1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' f1830341ec4bd5b385ec');1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b484c1cd5d5f02b10189'); -
teachable/trunk/build/blocks/blocks/product-plan-options/index.js
r3100764 r3106870 1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,n=window.React,a=window.wp.blockEditor,l=window.wp.data,r=window.wp.element,i=window.wp.components,o=()=>(0,n.createElement)(i.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(i.Rect,{width:"29",height:"29",fill:"white"}),(0,n.createElement)(i.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,n.createElement)(i.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,n.createElement)(i.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),c=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,n.createElement)("div",{className:"teachable-error-notice"},(0,n.createElement)(o,null),(0,n.createElement)("h5",{className:"teachable-error-title"},e),(0,n.createElement)("p",{className:"teachable-error-description"},t)),s=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-plan-options","title":"Product Plan Options","category":"embed","description":"A teachable product plan options block.","keywords":["teachable product plan options"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId","teachableBuyButton/planIds"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null},"planIds":{"type":"array","default":[]}},"supports":{"color":{"text":true,"background":true },"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:p}=s,u={...s,title:(0,e.__)("Teachable Plan Options","teachable"),description:(0,e.__)("A teachable product plan options block.","teachable"),icon:"money-alt",edit:function(t){const{attributes:o,clientId:s,setAttributes:p}=t,{productId:u,planIds:d=[]}=o,{buyButtonData:m,description_classes:h}=teachable_buy_button||{},b=!1===m?[]:m,g=Array.isArray(b)?b.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],f=e=>{const t=b.some((t=>t.id.toString()===e));return!t&&b.length>0?b[0].id.toString():e};(0,r.useEffect)((()=>{p({productId:f(u)})}),[u]);const _=u?b.find((e=>e.id.toString()===f(u))):b.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),w=_&&_.pricing_plans?_.pricing_plans.map((({name:e})=>e.trim())):[],y=_&&_.pricing_plans&&_.pricing_plans.length>0?_.pricing_plans[0].id:null,E=(()=>{if(d&&d.length>0){const e=d.map((e=>e));return _.pricing_plans.filter((t=>e.includes(t.id)))}return[_.pricing_plans[0]]})(),[k,S]=(0,r.useState)(_),[v,P]=(0,r.useState)(null),[I,B]=(0,r.useState)(E),[x,H]=(0,r.useState)([y]),[N,V]=(0,r.useState)(!0),C=(0,r.useRef)();(0,r.useEffect)((()=>{if(!N&&C.current&&v!==C.current){const e=b.find((e=>e.id.toString()===v));B([e.pricing_plans[0]]),H([e.pricing_plans[0].id])}p(N&&u?{productId:u}:{productId:v}),N&&d.length?p({planIds:d.map((e=>Number(e)))}):p({planIds:x}),C.current=v,V(!1)}),[N,v,P,x,H]);const A=(0,l.useSelect)((e=>{let t=s;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const a=e("core/block-editor").getBlockAttributes(n);if(a&&a.productId)return a.productId;t=n}if(Array.isArray(b)){const e=b.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[s]);(0,r.useEffect)((()=>{S((e=>b.find((e=>e.id.toString()===A)))),P(f(A))}),[A]);const T=(0,a.useBlockProps)({className:`teachable-plan-options ${h}`});if(!k)return(0,n.createElement)("div",{...T},(0,n.createElement)(c,{title:(0,e.__)("Product Plan Options","teachable"),description:(0,e.__)("Oops! No product pricing plan options found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}));const O=Math.random().toString(36).substr(2,9);return(0,n.createElement)(r.Fragment,null,(0,n.createElement)(a.InspectorControls,{group:"settings"},(0,n.createElement)(i.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,n.createElement)("div",null,(0,n.createElement)(i.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:v,options:g,onChange:e=>{v&&e&&e!==v&&(S(b.find((t=>t.id.toString()===e))),P(f(e)))},help:(0,e.__)("Select a course or bundle.","teachable")}),k?(0,n.createElement)(i.FormTokenField,{label:(0,e.__)("Pricing Plans","teachable"),value:I.map((({name:e})=>e.trim())),suggestions:w,onChange:e=>{if(d&&e){const t=_.pricing_plans.filter((t=>e.includes(t.name.trim())));if(0===t.length){const e=_.pricing_plans[0];t.push(e)}B(t),H(t.map((({id:e})=>Number(e))))}},__experimentalExpandOnFocus:!0,placeholder:(0,e.__)("Select pricing plans","teacable")}):null))),(0,n.createElement)("div",{...T},(0,n.createElement)("fieldset",{className:"teachable-plan-options-wrap"},(0,n.createElement)("legend",null,(0,e.__)("Select a Pricing Plan","teachable")),I&&I.length>0&&I.map(((e,t)=>(0,n.createElement)("div",{className:"teachable-plan-option",key:O+t},(0,n.createElement)("input",{type:"radio",id:`plan-option-${e.id}-${O}`,name:`teachable-product-plan-option-${O}`,value:e.id,defaultChecked:0===t,"data-checkout_url":e.checkout_url}),(0,n.createElement)("label",{htmlFor:`plan-option-${e.id}-${O}`,className:"teachable-plan-option-label"},(0,n.createElement)("span",{className:"teachable-plan-option-name"},e.name.trim()),(0,n.createElement)("span",{className:"teachable-plan-option-price"},e.formatted_price))))))))},save:function(){return null}};(0,t.registerBlockType)(p,u),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})();1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,n=window.React,a=window.wp.blockEditor,l=window.wp.data,r=window.wp.element,i=window.wp.components,o=()=>(0,n.createElement)(i.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)(i.Rect,{width:"29",height:"29",fill:"white"}),(0,n.createElement)(i.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,n.createElement)(i.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,n.createElement)(i.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),c=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,n.createElement)("div",{className:"teachable-error-notice"},(0,n.createElement)(o,null),(0,n.createElement)("h5",{className:"teachable-error-title"},e),(0,n.createElement)("p",{className:"teachable-error-description"},t)),s=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-plan-options","title":"Product Plan Options","category":"embed","description":"A teachable product plan options block.","keywords":["teachable product plan options"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId","teachableBuyButton/planIds"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null},"planIds":{"type":"array","default":[]}},"supports":{"color":{"text":true,"background":true,"border":true},"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:p}=s,u={...s,title:(0,e.__)("Teachable Plan Options","teachable"),description:(0,e.__)("A teachable product plan options block.","teachable"),icon:"money-alt",edit:function(t){const{attributes:o,clientId:s,setAttributes:p}=t,{productId:u,planIds:d=[]}=o,{buyButtonData:m,description_classes:h}=teachable_buy_button||{},b=!1===m?[]:m,g=Array.isArray(b)?b.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],f=e=>{const t=b.some((t=>t.id.toString()===e));return!t&&b.length>0?b[0].id.toString():e};(0,r.useEffect)((()=>{p({productId:f(u)})}),[u]);const _=u?b.find((e=>e.id.toString()===f(u))):b.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),w=_&&_.pricing_plans?_.pricing_plans.map((({name:e})=>e.trim())):[],y=_&&_.pricing_plans&&_.pricing_plans.length>0?_.pricing_plans[0].id:null,E=(()=>{if(d&&d.length>0){const e=d.map((e=>e));return _.pricing_plans.filter((t=>e.includes(t.id)))}return[_.pricing_plans[0]]})(),[k,S]=(0,r.useState)(_),[v,P]=(0,r.useState)(null),[I,B]=(0,r.useState)(E),[x,H]=(0,r.useState)([y]),[N,V]=(0,r.useState)(!0),C=(0,r.useRef)();(0,r.useEffect)((()=>{if(!N&&C.current&&v!==C.current){const e=b.find((e=>e.id.toString()===v));B([e.pricing_plans[0]]),H([e.pricing_plans[0].id])}p(N&&u?{productId:u}:{productId:v}),N&&d.length?p({planIds:d.map((e=>Number(e)))}):p({planIds:x}),C.current=v,V(!1)}),[N,v,P,x,H]);const A=(0,l.useSelect)((e=>{let t=s;for(;t;){const n=e("core/block-editor").getBlockRootClientId(t);if(!n)break;const a=e("core/block-editor").getBlockAttributes(n);if(a&&a.productId)return a.productId;t=n}if(Array.isArray(b)){const e=b.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[s]);(0,r.useEffect)((()=>{S((e=>b.find((e=>e.id.toString()===A)))),P(f(A))}),[A]);const T=(0,a.useBlockProps)({className:`teachable-plan-options ${h}`});if(!k)return(0,n.createElement)("div",{...T},(0,n.createElement)(c,{title:(0,e.__)("Product Plan Options","teachable"),description:(0,e.__)("Oops! No product pricing plan options found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}));const O=Math.random().toString(36).substr(2,9);return(0,n.createElement)(r.Fragment,null,(0,n.createElement)(a.InspectorControls,{group:"settings"},(0,n.createElement)(i.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,n.createElement)("div",null,(0,n.createElement)(i.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:v,options:g,onChange:e=>{v&&e&&e!==v&&(S(b.find((t=>t.id.toString()===e))),P(f(e)))},help:(0,e.__)("Select a course or bundle.","teachable")}),k?(0,n.createElement)(i.FormTokenField,{label:(0,e.__)("Pricing Plans","teachable"),value:I.map((({name:e})=>e.trim())),suggestions:w,onChange:e=>{if(d&&e){const t=_.pricing_plans.filter((t=>e.includes(t.name.trim())));if(0===t.length){const e=_.pricing_plans[0];t.push(e)}B(t),H(t.map((({id:e})=>Number(e))))}},__experimentalExpandOnFocus:!0,placeholder:(0,e.__)("Select pricing plans","teacable")}):null))),(0,n.createElement)("div",{...T},(0,n.createElement)("fieldset",{className:"teachable-plan-options-wrap"},(0,n.createElement)("legend",null,(0,e.__)("Select a Pricing Plan","teachable")),I&&I.length>0&&I.map(((e,t)=>(0,n.createElement)("div",{className:"teachable-plan-option",key:O+t},(0,n.createElement)("input",{type:"radio",id:`plan-option-${e.id}-${O}`,name:`teachable-product-plan-option-${O}`,value:e.id,defaultChecked:0===t,"data-checkout_url":e.checkout_url}),(0,n.createElement)("label",{htmlFor:`plan-option-${e.id}-${O}`,className:"teachable-plan-option-label"},(0,n.createElement)("span",{className:"teachable-plan-option-name"},e.name.trim()),(0,n.createElement)("span",{className:"teachable-plan-option-price"},e.formatted_price))))))))},save:function(){return null}};(0,t.registerBlockType)(p,u),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})(); -
teachable/trunk/build/blocks/blocks/product-updated-at/block.json
r3100764 r3106870 27 27 "color": { 28 28 "text": true, 29 "background": true 29 "background": true, 30 "border": true 30 31 }, 31 32 "typography": { -
teachable/trunk/build/blocks/blocks/product-updated-at/index.asset.php
r3100764 r3106870 1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => ' 5c7ccf11034946399a76');1 <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '4dfb71c8e2dc24a3358e'); -
teachable/trunk/build/blocks/blocks/product-updated-at/index.js
r3100764 r3106870 1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,a=window.React,r=window.wp.blockEditor,n=window.wp.data,l=window.wp.element,o=window.wp.components,c=()=>(0,a.createElement)(o.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(o.Rect,{width:"29",height:"29",fill:"white"}),(0,a.createElement)(o.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,a.createElement)(o.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,a.createElement)(o.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),i=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,a.createElement)("div",{className:"teachable-error-notice"},(0,a.createElement)(c,null),(0,a.createElement)("h5",{className:"teachable-error-title"},e),(0,a.createElement)("p",{className:"teachable-error-description"},t)),d=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-updated-at","title":"Product Updated At","category":"embed","description":"A teachable product updated at block.","keywords":["teachable product updated at"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"color":{"text":true,"background":true },"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:s}=d,u={...d,title:(0,e.__)("Teachable Updated At","teachable"),description:(0,e.__)("A teachable product updated at block.","teachable"),icon:"clock",edit:function(t){const{attributes:c,clientId:d,setAttributes:s}=t,{productId:u}=c,{buyButtonData:p,description_classes:h}=teachable_buy_button||{},b=!1===p?[]:p,g=Array.isArray(b)?b.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],m=e=>{const t=b.some((t=>t.id.toString()===e));return!t&&b.length>0?b[0].id.toString():e};(0,l.useEffect)((()=>{s({productId:m(u)})}),[u]);const w=u?b.find((e=>e.id.toString()===m(u))):b.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),[f,y]=(0,l.useState)(w),[_,E]=(0,l.useState)(null),[k,S]=(0,l.useState)(!0);(0,l.useEffect)((()=>{s(k&&u?{productId:u}:{productId:_}),S(!1)}),[k,_,E]);const v=(0,n.useSelect)((e=>{let t=d;for(;t;){const a=e("core/block-editor").getBlockRootClientId(t);if(!a)break;const r=e("core/block-editor").getBlockAttributes(a);if(r&&r.productId)return r.productId;t=a}if(Array.isArray(b)){const e=b.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[d]);(0,l.useEffect)((()=>{y((e=>b.find((e=>e.id.toString()===v)))),E(m(v))}),[v]);const C=(0,e.__)("Last updated","teachable"),H=(0,r.useBlockProps)({className:`teachable-updated-at ${h}`});return f&&f.updated_at&&""!==f.updated_at?(0,a.createElement)(l.Fragment,null,(0,a.createElement)(r.InspectorControls,{group:"settings"},(0,a.createElement)(o.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,a.createElement)("div",null,(0,a.createElement)(o.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:_,options:g,onChange:e=>{_&&e&&e!==_&&(y(b.find((t=>t.id.toString()===e))),E(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,a.createElement)("p",{...H},(0,a.createElement)("span",{className:"teachable-updated-at-icon",dangerouslySetInnerHTML:{__html:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" style="display:block"><path d="M8 5V10L12.25 12.52L13.02 11.24L9.5 9.15V5H8ZM18 7V0L15.36 2.64C13.74 1.01 11.49 0 9 0C4.03 0 0 4.03 0 9C0 13.97 4.03 18 9 18C13.97 18 18 13.97 18 9H16C16 12.86 12.86 16 9 16C5.14 16 2 12.86 2 9C2 5.14 5.14 2 9 2C10.93 2 12.68 2.79 13.95 4.05L11 7H18Z" fill="currentColor" /></svg>'}}),(0,a.createElement)("span",{className:"teachable-updated-at-details"},C),(0,a.createElement)("span",{className:"teachable-updated-at-date"},(e=>{const t=new Date(e),a=t.getDate(),r=t.getMonth(),n=t.getFullYear();return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][r]} ${(e=>{const t=e%10,a=e%100;return 1===t&&11!==a?e+"st":2===t&&12!==a?e+"nd":3===t&&13!==a?e+"rd":e+"th"})(a)}, ${n}`})(f.updated_at)))):(0,a.createElement)("div",{...H},(0,a.createElement)(i,{title:(0,e.__)("Product Updated At","teachable"),description:(0,e.__)("Oops! No product updated at date found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(s,u),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})();1 (()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,a=window.React,r=window.wp.blockEditor,n=window.wp.data,l=window.wp.element,o=window.wp.components,c=()=>(0,a.createElement)(o.SVG,{width:"29",height:"29",viewBox:"0 0 29 29",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(o.Rect,{width:"29",height:"29",fill:"white"}),(0,a.createElement)(o.Circle,{cx:"14.5",cy:"14.5",r:"14",stroke:"black",fill:"white"}),(0,a.createElement)(o.Path,{d:"M19.9726 11.1289V13.2651H17.8516V11.1289H19.9726ZM19.9726 18.8847V20.9994H17.8516V18.8847H19.9726Z",fill:"black"}),(0,a.createElement)(o.Path,{d:"M12.9683 7V11.1315H15.9261V12.7762H12.9683V17.7105C12.9683 18.7678 13.5439 19.3552 14.5166 19.3552H15.9261V21H14.3578C12.333 21 11.0427 19.786 11.0427 17.7692V12.7762H8.99805V11.1315H11.0427V7H12.9683Z",fill:"black"})),i=({title:e="Teachable Buy Button",description:t="This block is encountering an unexpected error. Please try resolving it by resetting your API Key in the plugin settings."})=>(0,a.createElement)("div",{className:"teachable-error-notice"},(0,a.createElement)(c,null),(0,a.createElement)("h5",{className:"teachable-error-title"},e),(0,a.createElement)("p",{className:"teachable-error-description"},t)),d=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"teachable/product-updated-at","title":"Product Updated At","category":"embed","description":"A teachable product updated at block.","keywords":["teachable product updated at"],"version":"1.0.0","textdomain":"teachable","usesContext":["teachableBuyButton/productId"],"ancestor":["teachable/buy-button"],"example":{},"attributes":{"productId":{"type":"string","default":null}},"supports":{"color":{"text":true,"background":true,"border":true},"typography":{"fontSize":true,"lineHeight":true,"fontStyle":true,"fontWeight":true,"textTransform":true,"fontFamily":true},"dimensions":{"aspectRatio":true,"minHeight":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"radius":true,"color":true,"style":true,"width":true},"align":true},"editorScript":"file:./index.js","render":"file:./render.php"}'),{name:s}=d,u={...d,title:(0,e.__)("Teachable Updated At","teachable"),description:(0,e.__)("A teachable product updated at block.","teachable"),icon:"clock",edit:function(t){const{attributes:c,clientId:d,setAttributes:s}=t,{productId:u}=c,{buyButtonData:p,description_classes:h}=teachable_buy_button||{},b=!1===p?[]:p,g=Array.isArray(b)?b.map((({id:e,name:t})=>({value:e.toString(),label:t.trim()}))):[],m=e=>{const t=b.some((t=>t.id.toString()===e));return!t&&b.length>0?b[0].id.toString():e};(0,l.useEffect)((()=>{s({productId:m(u)})}),[u]);const w=u?b.find((e=>e.id.toString()===m(u))):b.find((e=>e.id.toString()===(g.length>0?g[0].value:null))),[f,y]=(0,l.useState)(w),[_,E]=(0,l.useState)(null),[k,S]=(0,l.useState)(!0);(0,l.useEffect)((()=>{s(k&&u?{productId:u}:{productId:_}),S(!1)}),[k,_,E]);const v=(0,n.useSelect)((e=>{let t=d;for(;t;){const a=e("core/block-editor").getBlockRootClientId(t);if(!a)break;const r=e("core/block-editor").getBlockAttributes(a);if(r&&r.productId)return r.productId;t=a}if(Array.isArray(b)){const e=b.map((({id:e,name:t})=>({value:e.toString(),label:t})));return e.length>0?e[0].value:null}return null}),[d]);(0,l.useEffect)((()=>{y((e=>b.find((e=>e.id.toString()===v)))),E(m(v))}),[v]);const C=(0,e.__)("Last updated","teachable"),H=(0,r.useBlockProps)({className:`teachable-updated-at ${h}`});return f&&f.updated_at&&""!==f.updated_at?(0,a.createElement)(l.Fragment,null,(0,a.createElement)(r.InspectorControls,{group:"settings"},(0,a.createElement)(o.PanelBody,{title:(0,e.__)("General","teachable"),initialOpen:!0},(0,a.createElement)("div",null,(0,a.createElement)(o.ComboboxControl,{label:(0,e.__)("Product","teachable"),value:_,options:g,onChange:e=>{_&&e&&e!==_&&(y(b.find((t=>t.id.toString()===e))),E(e))},help:(0,e.__)("Select a course or bundle.","teachable")})))),(0,a.createElement)("p",{...H},(0,a.createElement)("span",{className:"teachable-updated-at-icon",dangerouslySetInnerHTML:{__html:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg" style="display:block"><path d="M8 5V10L12.25 12.52L13.02 11.24L9.5 9.15V5H8ZM18 7V0L15.36 2.64C13.74 1.01 11.49 0 9 0C4.03 0 0 4.03 0 9C0 13.97 4.03 18 9 18C13.97 18 18 13.97 18 9H16C16 12.86 12.86 16 9 16C5.14 16 2 12.86 2 9C2 5.14 5.14 2 9 2C10.93 2 12.68 2.79 13.95 4.05L11 7H18Z" fill="currentColor" /></svg>'}}),(0,a.createElement)("span",{className:"teachable-updated-at-details"},C),(0,a.createElement)("span",{className:"teachable-updated-at-date"},(e=>{const t=new Date(e),a=t.getDate(),r=t.getMonth(),n=t.getFullYear();return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][r]} ${(e=>{const t=e%10,a=e%100;return 1===t&&11!==a?e+"st":2===t&&12!==a?e+"nd":3===t&&13!==a?e+"rd":e+"th"})(a)}, ${n}`})(f.updated_at)))):(0,a.createElement)("div",{...H},(0,a.createElement)(i,{title:(0,e.__)("Product Updated At","teachable"),description:(0,e.__)("Oops! No product updated at date found. Please add one in your Teachable account, then return to WordPress and sync the data on the plugin settings page. After syncing, revisit this step.","teachable")}))},save:function(){return null}};(0,t.registerBlockType)(s,u),(0,t.registerBlockCollection)("teachable",{title:"Teachable"})})(); -
teachable/trunk/build/css/buy-button-styles.css
r3100764 r3106870 1 .teachable-buy-button{display:block;box-sizing:border-box;width:100%}.teachable-buy-button *,.teachable-buy-button ::before,.teachable-buy-button ::after{box-sizing:border-box}.disabled-combobox{pointer-events:none}.disabled-combobox .components-combobox-control__suggestions-container,.disabled-combobox input{pointer-events:none;background:#ddd;border-color:#ddd}.teachable-error-notice{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;gap:1rem;border:.0125rem solid #ae2d2d;padding:2.5rem 1rem;font-weight:500;border-radius:inherit}.teachable-error-notice svg{display:block}.teachable-error-notice .teachable-error-title{font-weight:bold;margin:0;padding:0}.teachable-error-notice .teachable-error-description{font-weight:normal;margin:0;padding:0}.teachable-image{display:block;width:100%;overflow:hidden}.teachable-image img{display:block;width:100%;border-top-left-radius:9px;border-top-right-radius:9px;border-radius:inherit}.demo-span{display:contents}.teachable-content{display:block;width:100%;padding:16px}.teachable-name{display:flex;align-items:center;width:100%;padding:0;margin:0;margin-top:0;margin-bottom:0;font-size:35px}.teachable-description{display:flex;align-items:center;width:100%;font-size:17px}.teachable-details{display:flex;align-items:center;width:100%}.teachable-enrollment-count{display:flex;align-items:center;width:100%;gap:.3rem;font-size:15px}.teachable-enrollment-count .teachable-enrollment-count-icon{display:block;margin-right:.2rem}.teachable-enrollment-count .teachable-enrollment-count-icon svg{display:block}.teachable-updated-at{display:flex;align-items:center;width:100%;gap:.3rem;font-size:15px}.teachable-updated-at .teachable-updated-at-icon{display:block;margin-right:.2rem}.teachable-updated-at .teachable-updated-at-icon svg{display:block}.teachable-plan-options{display:flex;flex-wrap:wrap;align-items:center;margin-top:1.2rem;width:100%}.teachable-plan-options legend{display:none}.teachable-plan-options .teachable-plan-options-wrap{display:flex;align-items:center;flex-wrap:wrap;width:100%;border:0;padding:0;gap:.5rem;margin:0}.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option{position:relative;display:flex;align-items:center;gap:.75rem;width:100%;padding:.5rem;margin:0;border:.0125rem solid #d7d7d7;border-radius:.25rem}.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option:only-of-type input[type=radio]{visibility:hidden;margin:0 0 0 -1.25rem}.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option .teachable-plan-option-label{display:flex;align-items:center;width:100%;cursor:pointer;margin:0;padding:0}.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option input[type=radio]{display:block;order:-1;margin-top:0;margin-right:0;cursor:pointer }.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option input[type=radio]:checked+label:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;border:.0125rem solid #222;border-radius:.25rem;color:#222}.teachable-plan-options .teachable-plan-option-name{display:flex;align-items:center;width:auto;font-weight:normal}.teachable-plan-options .teachable-plan-option-price{display:flex;align-items:center;width:auto;font-weight:normal;font-size:125%;margin-left:auto}.teachable-checkout-button,a.teachable-checkout-button{display:flex;align-items:center;justify-content:center;width:100%;padding:.75rem 1rem;margin:1.2rem 0 0;font-size:1.25rem;background-color:#222;color:#fff;border-radius:.25rem;text-decoration:none}/*# sourceMappingURL=buy-button-styles.css.map */1 .teachable-buy-button{display:block;box-sizing:border-box;width:100%}.teachable-buy-button *,.teachable-buy-button ::before,.teachable-buy-button ::after{box-sizing:border-box}.disabled-combobox{pointer-events:none}.disabled-combobox .components-combobox-control__suggestions-container,.disabled-combobox input{pointer-events:none;background:#ddd;border-color:#ddd}.teachable-error-notice{display:flex;width:100%;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;gap:1rem;border:.0125rem solid #ae2d2d;padding:2.5rem 1rem;font-weight:500;border-radius:inherit}.teachable-error-notice svg{display:block}.teachable-error-notice .teachable-error-title{font-weight:bold;margin:0;padding:0}.teachable-error-notice .teachable-error-description{font-weight:normal;margin:0;padding:0}.teachable-image{display:block;width:100%;overflow:hidden}.teachable-image img{display:block;width:100%;border-top-left-radius:9px;border-top-right-radius:9px;border-radius:inherit}.demo-span{display:contents}.teachable-content{display:block;width:100%;padding:16px}.teachable-name{display:flex;align-items:center;width:100%;padding:0;margin:0;margin-top:0;margin-bottom:0;font-size:35px}.teachable-description{display:flex;align-items:center;width:100%;font-size:17px}.teachable-details{display:flex;align-items:center;width:100%}.teachable-enrollment-count{display:flex;align-items:center;width:100%;gap:.3rem;font-size:15px}.teachable-enrollment-count .teachable-enrollment-count-icon{display:block;margin-right:.2rem}.teachable-enrollment-count .teachable-enrollment-count-icon svg{display:block}.teachable-updated-at{display:flex;align-items:center;width:100%;gap:.3rem;font-size:15px}.teachable-updated-at .teachable-updated-at-icon{display:block;margin-right:.2rem}.teachable-updated-at .teachable-updated-at-icon svg{display:block}.teachable-plan-options{display:flex;flex-wrap:wrap;align-items:center;margin-top:1.2rem;width:100%}.teachable-plan-options legend{display:none}.teachable-plan-options .teachable-plan-options-wrap{display:flex;align-items:center;flex-wrap:wrap;width:100%;border:0;padding:0;gap:.5rem;margin:0}.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option{position:relative;display:flex;align-items:center;gap:.75rem;width:100%;padding:.5rem;margin:0;border:.0125rem solid #d7d7d7;border-radius:.25rem}.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option:only-of-type input[type=radio]{visibility:hidden;margin:0 0 0 -1.25rem}.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option .teachable-plan-option-label{display:flex;align-items:center;width:100%;cursor:pointer;margin:0;padding:0}.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option input[type=radio]{display:block;order:-1;margin-top:0;margin-right:0;cursor:pointer;width:auto !important}.teachable-plan-options .teachable-plan-options-wrap .teachable-plan-option input[type=radio]:checked+label:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;border:.0125rem solid #222;border-radius:.25rem;color:#222}.teachable-plan-options .teachable-plan-option-name{display:flex;align-items:center;width:auto;font-weight:normal}.teachable-plan-options .teachable-plan-option-price{display:flex;align-items:center;width:auto;font-weight:normal;font-size:125%;margin-left:auto}.teachable-checkout-button,a.teachable-checkout-button{display:flex;align-items:center;justify-content:center;width:100%;padding:.75rem 1rem;margin:1.2rem 0 0;font-size:1.25rem;background-color:#222;color:#fff;border-radius:.25rem;text-decoration:none}/*# sourceMappingURL=buy-button-styles.css.map */ -
teachable/trunk/build/css/buy-button-styles.css.map
r3100764 r3106870 1 {"version":3,"sourceRoot":"","sources":["../../src/scss/buy-button-styles.scss"],"names":[],"mappings":"AAAA,sBACC,cACA,sBACA,WAEA,qFAGC,sBAIF,mBACC,oBAEA,gGAEC,oBACA,gBACA,kBAIF,wBACC,aACA,WACA,eACA,mBACA,uBACA,kBACA,SACA,8BACA,oBACA,gBACA,sBAEA,4BACC,cAGD,+CACC,iBACA,SACA,UAGD,qDACC,mBACA,SACA,UAIF,iBACC,cACA,WACA,gBAEA,qBACC,cACA,WACA,2BACA,4BACA,sBAIF,WACC,iBAGD,mBACC,cACA,WACA,aAGD,gBACC,aACA,mBACA,WACA,UACA,SACA,aACA,gBACA,eAGD,uBACC,aACA,mBACA,WACA,eAGD,mBACC,aACA,mBACA,WAGD,4BACC,aACA,mBACA,WACA,UACA,eAEA,6DACC,cACA,mBAEA,iEACC,cAKH,sBACC,aACA,mBACA,WACA,UACA,eAEA,iDACC,cACA,mBAEA,qDACC,cAKH,wBACC,aACA,eACA,mBACA,kBACA,WAEA,+BACC,aAGD,qDACC,aACA,mBACA,eACA,WACA,SACA,UACA,UACA,SAEA,4EACC,kBACA,aACA,mBACA,WACA,WACA,cACA,SACA,8BACA,qBAGC,2GACC,kBACA,sBAIF,yGACC,aACA,mBACA,WACA,eACA,SACA,UAGD,8FACC,cACA,SACA,aACA,eACA,eA IE,mHACC,WACA,kBACA,MACA,OACA,WACA,YACA,2BACA,qBACA,WAQN,oDACC,aACA,mBACA,WACA,mBAGD,qDACC,aACA,mBACA,WACA,mBACA,eACA,iBAIF,uDAEC,aACA,mBACA,uBACA,WACA,oBACA,kBACA,kBACA,sBACA,WACA,qBACA","file":"buy-button-styles.css"}1 {"version":3,"sourceRoot":"","sources":["../../src/scss/buy-button-styles.scss"],"names":[],"mappings":"AAAA,sBACC,cACA,sBACA,WAEA,qFAGC,sBAIF,mBACC,oBAEA,gGAEC,oBACA,gBACA,kBAIF,wBACC,aACA,WACA,eACA,mBACA,uBACA,kBACA,SACA,8BACA,oBACA,gBACA,sBAEA,4BACC,cAGD,+CACC,iBACA,SACA,UAGD,qDACC,mBACA,SACA,UAIF,iBACC,cACA,WACA,gBAEA,qBACC,cACA,WACA,2BACA,4BACA,sBAIF,WACC,iBAGD,mBACC,cACA,WACA,aAGD,gBACC,aACA,mBACA,WACA,UACA,SACA,aACA,gBACA,eAGD,uBACC,aACA,mBACA,WACA,eAGD,mBACC,aACA,mBACA,WAGD,4BACC,aACA,mBACA,WACA,UACA,eAEA,6DACC,cACA,mBAEA,iEACC,cAKH,sBACC,aACA,mBACA,WACA,UACA,eAEA,iDACC,cACA,mBAEA,qDACC,cAKH,wBACC,aACA,eACA,mBACA,kBACA,WAEA,+BACC,aAGD,qDACC,aACA,mBACA,eACA,WACA,SACA,UACA,UACA,SAEA,4EACC,kBACA,aACA,mBACA,WACA,WACA,cACA,SACA,8BACA,qBAGC,2GACC,kBACA,sBAIF,yGACC,aACA,mBACA,WACA,eACA,SACA,UAGD,8FACC,cACA,SACA,aACA,eACA,eACA,sBAIE,mHACC,WACA,kBACA,MACA,OACA,WACA,YACA,2BACA,qBACA,WAQN,oDACC,aACA,mBACA,WACA,mBAGD,qDACC,aACA,mBACA,WACA,mBACA,eACA,iBAIF,uDAEC,aACA,mBACA,uBACA,WACA,oBACA,kBACA,kBACA,sBACA,WACA,qBACA","file":"buy-button-styles.css"} -
teachable/trunk/includes/wp-block-supports.php
r3100764 r3106870 52 52 } 53 53 54 if ( isset( $styles['border']['radius'] ) ) { 55 $border_radius = esc_attr( $styles['border']['radius'] ); 56 $inline_style .= "border-radius: {$border_radius};"; 54 if ( isset( $styles['color']['text'] ) ) { 55 $color_text = esc_attr( $styles['color']['text'] ); 56 $inline_style .= "color: {$color_text};"; 57 } 58 59 if ( isset( $styles['color']['background'] ) ) { 60 $color_background = esc_attr( $styles['color']['background'] ); 61 $inline_style .= "background-color: {$color_background};"; 57 62 } 58 63 … … 72 77 $inline_style .= "border-color: {$border_color};"; 73 78 } 79 80 81 if ( isset( $styles['border']['radius'] ) ) { 82 $border_radius = esc_attr( $styles['border']['radius'] ); 83 $inline_style .= "border-radius: {$border_radius};"; 84 } 85 74 86 } 75 87 … … 118 130 } 119 131 132 if ( isset( $attributes['borderColor'] ) ) { 133 $class_names[] = 'has-' . $attributes['borderColor'] . '-border-color'; 134 $class_names[] = 'has-border-color'; 135 } 136 120 137 return implode( ' ', $class_names ); 121 138 } -
teachable/trunk/readme.txt
r3100764 r3106870 6 6 Requires at least: 6.0 7 7 Tested up to: 6.5.2 8 Stable tag: 1.0. 08 Stable tag: 1.0.1 9 9 Requires PHP: 7.4 10 10 License: GPLv3 … … 87 87 == Changelog == 88 88 89 = 1.0.1 = 90 Bug fixes to correct radio button and page preview styling inconsistencies. 91 89 92 = 1.0.0 = 90 93 Initial release. -
teachable/trunk/teachable.php
r3100764 r3106870 8 8 * Plugin URI: https://wordpress.org/plugins/teachable/ 9 9 * Description: Effortlessly connect your Teachable products to WordPress with the official Teachable Buy Button Plugin. 10 * Version: 1.0. 010 * Version: 1.0.1 11 11 * Author: Teachable 12 12 * Author URI: https://teachable.com
Note: See TracChangeset
for help on using the changeset viewer.