(self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[]).push([[5210],{8184:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9196),o=n(444);const i=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}))},5202:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9196),o=n(444);const i=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}))},5430:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9196),o=n(444);const i=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}))},5045:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9196),o=n(444);const i=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fillRule:"evenodd",d:"M6.863 13.644L5 13.25h-.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H5L18 6.5h2V16h-2l-3.854-.815.026.008a3.75 3.75 0 01-7.31-1.549zm1.477.313a2.251 2.251 0 004.356.921l-4.356-.921zm-2.84-3.28L18.157 8h.343v6.5h-.343L5.5 11.823v-1.146z",clipRule:"evenodd"}))},4877:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9196),o=n(9685),i=n(4184),s=n.n(i),a=(n(5482),n(4705));const l=({className:e,showSpinner:t=!1,children:n,variant:i="contained",...l})=>{const c=s()("wc-block-components-button","wp-element-button",e,i,{"wc-block-components-button--loading":t});return(0,r.createElement)(o.Z,{className:c,...l},t&&(0,r.createElement)(a.Z,null),(0,r.createElement)("span",{className:"wc-block-components-button__text"},n))}},4427:(e,t,n)=>{"use strict";n.d(t,{Z:()=>w});var r=n(9196),o=n(4184),i=n.n(o),s=n(5736),a=n(2629),l=n(711),c=n(9307),u=n(5027),p=n(7856),d=n.n(p);const m=["a","b","em","i","strong","p","br"],f=["target","href","rel","name","download"],g=(e,t)=>{const n=(null==t?void 0:t.tags)||m,r=(null==t?void 0:t.attr)||f;return d().sanitize(e,{ALLOWED_TAGS:n,ALLOWED_ATTR:r})};var h=n(9097),b=n(4293),v=n(4617);const y=e=>{const t=(0,v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:(0,a.decodeEntities)(e.name),value:e.rate_id,description:(0,r.createElement)(r.Fragment,null,Number.isFinite(t)&&(0,r.createElement)(l.FormattedMonetaryAmount,{currency:(0,b.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,(0,a.decodeEntities)(e.delivery_time))}},E=({className:e="",noResultsMessage:t,onSelectRate:n,rates:o,renderOption:i=y,selectedRate:s,disabled:a=!1})=>{const u=(null==s?void 0:s.rate_id)||"",p=(0,h.D)(u),[d,m]=(0,c.useState)((()=>{var e;return u||(null===(e=o[0])||void 0===e?void 0:e.rate_id)}));if((0,c.useEffect)((()=>{u&&u!==p&&u!==d&&m(u)}),[u,d,p]),(0,c.useEffect)((()=>{d&&n(d)}),[n,d]),0===o.length)return t;if(o.length>1)return(0,r.createElement)(l.RadioControl,{className:e,onChange:e=>{m(e),n(e)},disabled:a,selected:d,options:o.map(i)});const{label:f,secondaryLabel:g,description:b,secondaryDescription:v}=i(o[0]);return(0,r.createElement)(l.RadioControlOptionLayout,{label:f,secondaryLabel:g,description:b,secondaryDescription:v})};n(6125);const w=({packageId:e,className:t="",noResultsMessage:n,renderOption:o,packageData:p,collapsible:d,showItems:m})=>{const{selectShippingRate:f,isSelectingRate:h}=(0,u.V)(),b=document.querySelectorAll(".wc-block-components-shipping-rates-control__package").length>1,v=null!=m?m:b,y=null!=d?d:b,w=(0,r.createElement)(r.Fragment,null,(y||v)&&(0,r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title",dangerouslySetInnerHTML:{__html:g(p.name)}}),v&&(0,r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(p.items).map((e=>{const t=(0,a.decodeEntities)(e.name),n=e.quantity;return(0,r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},(0,r.createElement)(l.Label,{label:n>1?`${t} × ${n}`:`${t}`,screenReaderLabel:(0,s.sprintf)(/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ (0,s._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woocommerce"),t,n)}))})))),_=(0,c.useCallback)((t=>{f(t,e)}),[e,f]),S={className:t,noResultsMessage:n,rates:p.shipping_rates,onSelectRate:_,selectedRate:p.shipping_rates.find((e=>e.selected)),renderOption:o,disabled:h};return y?(0,r.createElement)(l.Panel,{className:i()("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":h}),initialOpen:!1,title:w},(0,r.createElement)(E,{...S})):(0,r.createElement)("div",{className:i()("wc-block-components-shipping-rates-control__package",t,{"wc-block-components-shipping-rates-control__package--disabled":h})},w,(0,r.createElement)(E,{...S}))}},4017:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(9196),o=n(5736),i=n(9307),s=n(1193),a=n(3554),l=n(602),c=n(4055),u=n(8832),p=n(5027),d=n(6131),m=n(7884),f=n(4427),g=n(5158);const h=({packages:e,showItems:t,collapsible:n,noResultsMessage:o,renderOption:i})=>e.length?(0,r.createElement)(r.Fragment,null,e.map((({package_id:e,...s})=>(0,r.createElement)(f.Z,{key:e,packageId:e,packageData:s,collapsible:n,showItems:t,noResultsMessage:o,renderOption:i})))):null,b=({shippingRates:e,isLoadingRates:t,className:n,collapsible:b,showItems:v,noResultsMessage:y,renderOption:E,context:w})=>{(0,i.useEffect)((()=>{var n,r;t||(n=(0,l.wH)(e),r=(0,l.Q_)(e),1===n?(0,g.speak)((0,o.sprintf)(/* translators: %d number of shipping options found. */ (0,o._n)("%d shipping option was found.","%d shipping options were found.",r,"woocommerce"),r)):(0,g.speak)((0,o.sprintf)(/* translators: %d number of shipping packages packages. */ (0,o._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",n,"woocommerce"),n)+" "+(0,o.sprintf)(/* translators: %d number of shipping options available. */ (0,o._n)("%d shipping option was found","%d shipping options were found",r,"woocommerce"),r)))}),[t,e]);const{extensions:_,receiveCart:S,...k}=(0,c.b)(),N={className:n,collapsible:b,showItems:v,noResultsMessage:y,renderOption:E,extensions:_,cart:k,components:{ShippingRatesControlPackage:f.Z},context:w},{isEditor:T}=(0,u._)(),{hasSelectedLocalPickup:A,selectedRates:R}=(0,p.V)(),x=(0,m.Kn)(R)?Object.values(R):[],L=x.every((e=>e===x[0]));return(0,r.createElement)(s.Z,{isLoading:t,screenReaderLabel:(0,o.__)("Loading shipping rates…","woocommerce"),showSpinner:!0},A&&"woocommerce/cart"===w&&e.length>1&&!L&&!T&&(0,r.createElement)(d.Z,{className:"wc-block-components-notice",isDismissible:!1,status:"warning"},(0,o.__)("Multiple shipments must have the same pickup location","woocommerce")),(0,r.createElement)(a.ExperimentalOrderShippingPackages.Slot,{...N}),(0,r.createElement)(a.ExperimentalOrderShippingPackages,null,(0,r.createElement)(h,{packages:e,noResultsMessage:y,renderOption:E})))}},1193:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(9196),o=n(5736),i=n(4184),s=n.n(i),a=n(711);n(6575);const l=({children:e,className:t,screenReaderLabel:n,showSpinner:i=!1,isLoading:l=!0})=>(0,r.createElement)("div",{className:s()(t,{"wc-block-components-loading-mask":l})},l&&i&&(0,r.createElement)(a.Spinner,null),(0,r.createElement)("div",{className:s()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},e),l&&(0,r.createElement)("span",{className:"screen-reader-text"},n||(0,o.__)("Loading…","woocommerce")))},6131:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(9196),o=n(4184),i=n.n(o),s=n(5736),a=n(1984),l=n(5202),c=(n(1365),n(395)),u=n(4877),p=n(2023);const d=({className:e,status:t="default",children:n,spokenMessage:o=n,onRemove:d=(()=>{}),isDismissible:m=!0,politeness:f=(0,c.x)(t),summary:g})=>((0,p.o)(o,f),(0,r.createElement)("div",{className:i()(e,"wc-block-components-notice-banner","is-"+t,{"is-dismissible":m})},(0,r.createElement)(a.Z,{icon:(0,c.X)(t)}),(0,r.createElement)("div",{className:"wc-block-components-notice-banner__content"},g&&(0,r.createElement)("p",{className:"wc-block-components-notice-banner__summary"},g),n),!!m&&(0,r.createElement)(u.Z,{className:"wc-block-components-notice-banner__dismiss",icon:l.Z,label:(0,s.__)("Dismiss this notice","woocommerce"),onClick:e=>{"function"==typeof(null==e?void 0:e.preventDefault)&&e.preventDefault&&e.preventDefault(),d()},showTooltip:!1})))},395:(e,t,n)=>{"use strict";n.d(t,{X:()=>a,x:()=>s});var r=n(8184),o=n(5430),i=n(5045);const s=e=>{switch(e){case"success":case"warning":case"info":case"default":return"polite";default:return"assertive"}},a=e=>{switch(e){case"success":return r.Z;case"warning":case"info":case"error":return o.Z;default:return i.Z}}},7277:(e,t,n)=>{"use strict";n.d(t,{B:()=>c});var r=n(4617),o=n(9307),i=n(9818),s=n(4801),a=n(7844),l=n(5027);const c=()=>{const{needsShipping:e}=(0,l.V)(),{useShippingAsBilling:t,prefersCollection:n}=(0,i.useSelect)((e=>({useShippingAsBilling:e(s.CHECKOUT_STORE_KEY).getUseShippingAsBilling(),prefersCollection:e(s.CHECKOUT_STORE_KEY).prefersCollection()}))),{__internalSetUseShippingAsBilling:c}=(0,i.useDispatch)(s.CHECKOUT_STORE_KEY),{billingAddress:u,setBillingAddress:p,shippingAddress:d,setShippingAddress:m}=(0,a.L)(),f=(0,o.useCallback)((e=>{p({email:e})}),[p]),g=(0,r.getSetting)("forcedBillingAddress",!1);return{shippingAddress:d,billingAddress:u,setShippingAddress:m,setBillingAddress:p,setEmail:f,defaultAddressFields:r.defaultAddressFields,useShippingAsBilling:t,setUseShippingAsBilling:c,needsShipping:e,showShippingFields:!g&&e&&!n,showShippingMethods:e&&!n,showBillingFields:!e||!t||!!n,forcedBillingAddress:g,useBillingAsShipping:g||!!n}}},7844:(e,t,n)=>{"use strict";n.d(t,{L:()=>i});var r=n(9818),o=n(4801);const i=()=>{const{customerData:e,isInitialized:t}=(0,r.useSelect)((e=>{const t=e(o.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}})),{setShippingAddress:n,setBillingAddress:i}=(0,r.useDispatch)(o.CART_STORE_KEY);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:i,setShippingAddress:n}}},2023:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(9307),o=n(5158);const i=(e,t)=>{const n="string"==typeof e?e:(0,r.renderToString)(e);(0,r.useEffect)((()=>{n&&(0,o.speak)(n,t)}),[n,t])}},9490:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5736);const o=({defaultTitle:e=(0,r.__)("Step","woocommerce"),defaultDescription:t=(0,r.__)("Step description text.","woocommerce"),defaultShowStepNumber:n=!0})=>({title:{type:"string",default:e},description:{type:"string",default:t},showStepNumber:{type:"boolean",default:n}})},6956:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>T});var r=n(9196),o=n(4184),i=n.n(o),s=n(721),a=n(711),l=n(7277),c=n(9818),u=n(4801),p=n(5736),d=n(5027),m=n(7844),f=n(4017),g=n(602),h=n(3881),b=n(4293),v=n(8832),y=n(6423),E=n(2629),w=n(4617),_=n(6131);const S=e=>{const t=(0,w.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:(0,E.decodeEntities)(e.name),value:e.rate_id,description:(0,E.decodeEntities)(e.description),secondaryLabel:(0,r.createElement)(a.FormattedMonetaryAmount,{currency:(0,b.getCurrencyFromPriceResponse)(e),value:t}),secondaryDescription:(0,E.decodeEntities)(e.delivery_time)}},k=({noShippingPlaceholder:e=null})=>{const{isEditor:t}=(0,v._)(),{shippingRates:n,needsShipping:o,isLoadingRates:i,hasCalculatedShipping:s,isCollectable:l}=(0,d.V)(),{shippingAddress:c}=(0,m.L)(),u=l?n.map((e=>({...e,shipping_rates:e.shipping_rates.filter((e=>!(0,g.Ep)(e.method_id)))}))):n;if(!o)return null;const b=(0,g.wH)(n);if(!s&&!b)return(0,r.createElement)("p",null,(0,p.__)("Shipping options will be displayed here after entering your full shipping address.","woocommerce"));const E=(0,h.K5)(c);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.StoreNoticesContainer,{context:y.n7.SHIPPING_METHODS}),t&&!b?e:(0,r.createElement)(f.Z,{noResultsMessage:(0,r.createElement)(r.Fragment,null,E?(0,r.createElement)(_.Z,{isDismissible:!1,className:"wc-block-components-shipping-rates-control__no-results-notice",status:"warning"},(0,p.__)("There are no shipping options available. Please check your shipping address.","woocommerce")):(0,p.__)("Add a shipping address to view shipping options.","woocommerce")),renderOption:S,collapsible:!1,shippingRates:u,isLoadingRates:i,context:"woocommerce/checkout"}))},N={...(0,n(9490).Z)({defaultTitle:(0,p.__)("Shipping options","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},T=(0,s.withFilteredAttributes)(N)((({title:e,description:t,showStepNumber:n,children:o,className:s})=>{const p=(0,c.useSelect)((e=>e(u.CHECKOUT_STORE_KEY).isProcessing())),{showShippingMethods:d}=(0,l.B)();return d?(0,r.createElement)(a.FormStep,{id:"shipping-option",disabled:p,className:i()("wc-block-checkout__shipping-option",s),title:e,description:t,showStepNumber:n},(0,r.createElement)(k,null),o):null}))},4705:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(9196);n(129);const o=()=>(0,r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},7856:function(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(e,r,o){return n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return r&&t(i,r.prototype),i},n.apply(null,arguments)}function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;o/gm),G=p(/\${[\w\W]*}/gm),V=p(/^data-[\-\w.\u00B7-\uFFFF]/),K=p(/^aria-[\-\w]+$/),q=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=p(/^(?:\w+script|data):/i),$=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=p(/^html$/i),J=function(){return"undefined"==typeof window?null:window};return function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J(),o=function(e){return t(e)};if(o.version="2.4.7",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;var i=n.document,s=n.document,a=n.DocumentFragment,l=n.HTMLTemplateElement,c=n.Node,p=n.Element,d=n.NodeFilter,m=n.NamedNodeMap,f=void 0===m?n.NamedNodeMap||n.MozNamedAttrMap:m,g=n.HTMLFormElement,h=n.DOMParser,R=n.trustedTypes,Q=p.prototype,ee=C(Q,"cloneNode"),te=C(Q,"nextSibling"),ne=C(Q,"childNodes"),re=C(Q,"parentNode");if("function"==typeof l){var oe=s.createElement("template");oe.content&&oe.content.ownerDocument&&(s=oe.content.ownerDocument)}var ie=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(R,i),se=ie?ie.createHTML(""):"",ae=s,le=ae.implementation,ce=ae.createNodeIterator,ue=ae.createDocumentFragment,pe=ae.getElementsByTagName,de=i.importNode,me={};try{me=L(s).documentMode?s.documentMode:{}}catch(e){}var fe={};o.isSupported="function"==typeof re&&le&&void 0!==le.createHTMLDocument&&9!==me;var ge,he,be=W,ve=j,ye=G,Ee=V,we=K,_e=Y,Se=$,ke=q,Ne=null,Te=x({},[].concat(r(O),r(D),r(M),r(I),r(H))),Ae=null,Re=x({},[].concat(r(B),r(P),r(U),r(z))),xe=Object.seal(Object.create(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}})),Le=null,Ce=null,Oe=!0,De=!0,Me=!1,Fe=!0,Ie=!1,Ze=!1,He=!1,Be=!1,Pe=!1,Ue=!1,ze=!1,We=!0,je=!1,Ge=!0,Ve=!1,Ke={},qe=null,Ye=x({},["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"]),$e=null,Xe=x({},["audio","video","img","source","image","track"]),Je=null,Qe=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml",rt=nt,ot=!1,it=null,st=x({},[et,tt,nt],w),at=["application/xhtml+xml","text/html"],lt=null,ct=s.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},pt=function(t){lt&<===t||(t&&"object"===e(t)||(t={}),t=L(t),ge=ge=-1===at.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,he="application/xhtml+xml"===ge?w:E,Ne="ALLOWED_TAGS"in t?x({},t.ALLOWED_TAGS,he):Te,Ae="ALLOWED_ATTR"in t?x({},t.ALLOWED_ATTR,he):Re,it="ALLOWED_NAMESPACES"in t?x({},t.ALLOWED_NAMESPACES,w):st,Je="ADD_URI_SAFE_ATTR"in t?x(L(Qe),t.ADD_URI_SAFE_ATTR,he):Qe,$e="ADD_DATA_URI_TAGS"in t?x(L(Xe),t.ADD_DATA_URI_TAGS,he):Xe,qe="FORBID_CONTENTS"in t?x({},t.FORBID_CONTENTS,he):Ye,Le="FORBID_TAGS"in t?x({},t.FORBID_TAGS,he):{},Ce="FORBID_ATTR"in t?x({},t.FORBID_ATTR,he):{},Ke="USE_PROFILES"in t&&t.USE_PROFILES,Oe=!1!==t.ALLOW_ARIA_ATTR,De=!1!==t.ALLOW_DATA_ATTR,Me=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ie=t.SAFE_FOR_TEMPLATES||!1,Ze=t.WHOLE_DOCUMENT||!1,Pe=t.RETURN_DOM||!1,Ue=t.RETURN_DOM_FRAGMENT||!1,ze=t.RETURN_TRUSTED_TYPE||!1,Be=t.FORCE_BODY||!1,We=!1!==t.SANITIZE_DOM,je=t.SANITIZE_NAMED_PROPS||!1,Ge=!1!==t.KEEP_CONTENT,Ve=t.IN_PLACE||!1,ke=t.ALLOWED_URI_REGEXP||ke,rt=t.NAMESPACE||nt,xe=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ut(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ut(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xe.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(De=!1),Ue&&(Pe=!0),Ke&&(Ne=x({},r(H)),Ae=[],!0===Ke.html&&(x(Ne,O),x(Ae,B)),!0===Ke.svg&&(x(Ne,D),x(Ae,P),x(Ae,z)),!0===Ke.svgFilters&&(x(Ne,M),x(Ae,P),x(Ae,z)),!0===Ke.mathMl&&(x(Ne,I),x(Ae,U),x(Ae,z))),t.ADD_TAGS&&(Ne===Te&&(Ne=L(Ne)),x(Ne,t.ADD_TAGS,he)),t.ADD_ATTR&&(Ae===Re&&(Ae=L(Ae)),x(Ae,t.ADD_ATTR,he)),t.ADD_URI_SAFE_ATTR&&x(Je,t.ADD_URI_SAFE_ATTR,he),t.FORBID_CONTENTS&&(qe===Ye&&(qe=L(qe)),x(qe,t.FORBID_CONTENTS,he)),Ge&&(Ne["#text"]=!0),Ze&&x(Ne,["html","head","body"]),Ne.table&&(x(Ne,["tbody"]),delete Le.tbody),u&&u(t),lt=t)},dt=x({},["mi","mo","mn","ms","mtext"]),mt=x({},["foreignobject","desc","title","annotation-xml"]),ft=x({},["title","style","font","a","script"]),gt=x({},D);x(gt,M),x(gt,F);var ht=x({},I);x(ht,Z);var bt=function(e){y(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=se}catch(t){e.remove()}}},vt=function(e,t){try{y(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){y(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ae[e])if(Pe||Ue)try{bt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},yt=function(e){var t,n;if(Be)e=""+e;else{var r=_(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===ge&&rt===nt&&(e=''+e+"");var o=ie?ie.createHTML(e):e;if(rt===nt)try{t=(new h).parseFromString(o,ge)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(rt,"template",null);try{t.documentElement.innerHTML=ot?se:o}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(s.createTextNode(n),i.childNodes[0]||null),rt===nt?pe.call(t,Ze?"html":"body")[0]:Ze?t.documentElement:i},Et=function(e){return ce.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},wt=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},_t=function(e,t,n){fe[e]&&b(fe[e],(function(e){e.call(o,t,n,lt)}))},St=function(e){var t,n;if(_t("beforeSanitizeElements",e,null),(n=e)instanceof g&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof f)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return bt(e),!0;if(T(/[\u0080-\uFFFF]/,e.nodeName))return bt(e),!0;var r=he(e.nodeName);if(_t("uponSanitizeElement",e,{tagName:r,allowedTags:Ne}),e.hasChildNodes()&&!wt(e.firstElementChild)&&(!wt(e.content)||!wt(e.content.firstElementChild))&&T(/<[/\w]/g,e.innerHTML)&&T(/<[/\w]/g,e.textContent))return bt(e),!0;if("select"===r&&T(/