index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/4869.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[4869],{4805:function(e,t,n){n.d(t,{a:function(){return h},b:function(){return u},g:function(){return d}});var r=n(4467),i=n(296);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.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)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var _n=0,r=function(){};return{s:r,n:function(){return _n>=e.length?{done:!0}:{done:!1,value:e[_n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){for(var t,n="",r=Object.entries(e);t=r.shift();){var o=t,a=(0,i.A)(o,2),c=a[0],u=a[1];if(Array.isArray(u)||u&&u.constructor===Object){var l,d=s(Object.entries(u).reverse());try{for(d.s();!(l=d.n()).done;){var h=(0,i.A)(l.value,2),p=h[0],f=h[1];r.unshift(["".concat(c,"[").concat(p,"]"),f])}}catch(e){d.e(e)}finally{d.f()}}else void 0!==u&&(null===u&&(u=""),n+="&"+[c,u].map(encodeURIComponent).join("="))}return n.substr(1)}function l(e){try{return decodeURIComponent(e)}catch(t){return e}}function d(e){return(function(e){var t;try{t=new URL(e,"http://example.com").search.substring(1)}catch(e){}if(t)return t}(e)||"").replace(/\+/g,"%20").split("&").reduce((function(e,t){var n=t.split("=").filter(Boolean).map(l),r=(0,i.A)(n,2),o=r[0],s=r[1],c=void 0===s?"":s;return o&&function(e,t,n){for(var r=t.length,i=r-1,o=0;o<r;o++){var s=t[o];!s&&Array.isArray(e)&&(s=e.length.toString()),s=["__proto__","constructor","prototype"].includes(s)?s.toUpperCase():s;var c=!isNaN(Number(t[o+1]));e[s]=o===i?n:e[s]||(c?[]:{}),Array.isArray(e[s])&&!c&&(e[s]=a({},e[s])),e=e[s]}}(e,o.replace(/\]/g,"").split("["),c),e}),Object.create(null))}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!t||!Object.keys(t).length)return e;var n=e,r=e.indexOf("?");return-1!==r&&(t=Object.assign(d(e),t),n=n.substr(0,r)),n+"?"+u(t)}},488:function(e,t,n){n.d(t,{i:function(){return o},m:function(){return i},z:function(){return r}});var r=["bif","byr","clp","djf","gnf","isk","jpy","kmf","krw","pyg","rwf","ugx","vnd","vuv","xaf","xag","xau","xba","xbb","xbc","xbd","xdr","xof","xpd","xpf","xpt","xts"],i=function(e,t){return o(t)?e:e/100},o=function(e){var t;return r.includes(null===(t=null==e?void 0:e.toLowerCase)||void 0===t?void 0:t.call(e))}},3:function(e,t,n){n.d(t,{a:function(){return N},h:function(){return H}});var r=n(467),i=n(45),o=n(296),a=n(4467),s=n(9280),c=n.n(s),u=n(4805),l=n(3506),d=["rest_route"],h=["path","url"],p=["url","path","data","parse"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,a.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){return void 0!==(0,l.g)(e,t)}function m(e){var t=e.split("?"),n=t[1],r=t[0];return n?r+"?"+n.split("&").map((function(e){return e.split("=")})).map((function(e){return e.map(decodeURIComponent)})).sort((function(e,t){return e[0].localeCompare(t[0])})).map((function(e){return e.map(encodeURIComponent)})).map((function(e){return e.join("=")})).join("&"):r}var y=function(e,t){var n,r,i=e.path;return"string"==typeof e.namespace&&"string"==typeof e.endpoint&&(n=e.namespace.replace(/^\/|\/$/g,""),i=(r=e.endpoint.replace(/^\//,""))?n+"/"+r:n),delete e.namespace,delete e.endpoint,t(v(v({},e),{},{path:i}))};function _(e,t){return Promise.resolve(t?e.body:new window.Response(JSON.stringify(e.body),{status:200,statusText:"OK",headers:e.headers}))}var g=function(e){return e.json?e.json():Promise.reject(e)},w=function(e){return function(e){if(!e)return{};var t=e.match(/<([^>]+)>; rel="next"/);return t?{next:t[1]}:{}}(e.headers.get("link")).next},x=function(e){var t=!!e.path&&-1!==e.path.indexOf("per_page=-1"),n=!!e.url&&-1!==e.url.indexOf("per_page=-1");return t||n},k=function(){var e=(0,r.A)(c().mark((function e(t,n){var r,o,a,s,l,d;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.parse){e.next=2;break}return e.abrupt("return",n(t));case 2:if(x(t)){e.next=4;break}return e.abrupt("return",n(t));case 4:return e.next=6,N(v(v({},(p={per_page:100},void 0,void 0,f=(c=t).path,b=c.url,v(v({},(0,i.A)(c,h)),{},{url:b&&(0,u.a)(b,p),path:f&&(0,u.a)(f,p)}))),{},{parse:!1}));case 6:return r=e.sent,e.next=9,g(r);case 9:if(o=e.sent,Array.isArray(o)){e.next=12;break}return e.abrupt("return",o);case 12:if(a=w(r)){e.next=15;break}return e.abrupt("return",o);case 15:s=[].concat(o);case 16:if(!a){e.next=27;break}return e.next=19,N(v(v({},t),{},{path:void 0,url:a,parse:!1}));case 19:return l=e.sent,e.next=22,g(l);case 22:d=e.sent,s=s.concat(d),a=w(l),e.next=16;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}var c,p,f,b}),e)})));return function(_x,t){return e.apply(this,arguments)}}(),O=new Set(["PATCH","PUT","DELETE"]),j=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(function(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:204===e.status?null:e.json?e.json():Promise.reject(e)}(e,t)).catch((function(e){return A(e,t)}))};function A(e){if(arguments.length>1&&void 0!==arguments[1]&&!arguments[1])throw e;return function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.")};if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))}(e).then((function(e){var t={code:"unknown_error",message:wp.i18n.__("An unknown error occurred.")};throw e||t}))}var P,C,S,z,D,R,I,T={Accept:"application/json, */*;q=0.1"},E={credentials:"include"},F=[function(e,t){return"string"!=typeof e.url||b(e.url,"_locale")||(e.url=(0,u.a)(e.url,{_locale:"user"})),"string"!=typeof e.path||b(e.path,"_locale")||(e.path=(0,u.a)(e.path,{_locale:"user"})),t(e)},y,function(e,t){var n=e.method,r=void 0===n?"GET":n;return O.has(r.toUpperCase())&&(e=v(v({},e),{},{headers:v(v({},e.headers),{},{"X-HTTP-Method-Override":r,"Content-Type":"application/json"}),method:"POST"})),t(e)},k],L=function(e){if(e.status>=200&&e.status<300)return e;throw e},M=function(e){var t=e.url,n=e.path,r=e.data,o=e.parse,a=void 0===o||o,s=(0,i.A)(e,p),c=e.body,u=e.headers;return u=v(v({},T),u),r&&(c=JSON.stringify(r),u["Content-Type"]="application/json"),window.fetch(t||n||window.location.href,v(v(v({},E),s),{},{body:c,headers:u})).then((function(e){return Promise.resolve(e).then(L).catch((function(e){return A(e,a)})).then((function(e){return j(e,a)}))}),(function(e){if(e&&"AbortError"===e.name)throw e;throw{code:"fetch_error",message:wp.i18n.__("You are probably offline.")}}))};function N(e){return F.reduceRight((function(e,t){return function(n){return t(n,e)}}),M)(e).catch((function(t){return"rest_cookie_invalid_nonce"!==t.code?Promise.reject(t):window.fetch(N.nonceEndpoint).then(L).then((function(e){return e.text()})).then((function(t){return N.nonceMiddleware.nonce=t,N(e)}))}))}N.use=function(e){F.unshift(e)},N.setFetchHandler=function(e){M=e},N.createNonceMiddleware=function(e){var t=function e(t,n){var r=t.headers,i=void 0===r?{}:r;for(var o in i)if("x-wp-nonce"===o.toLowerCase()&&i[o]===e.nonce)return n(t);return n(v(v({},t),{},{headers:v(v({},i),{},{"X-WP-Nonce":e.nonce})}))};return t.nonce=e,t},N.createPreloadingMiddleware=function(e){var t=Object.fromEntries(Object.entries(e).map((function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1];return[m(n),r]})));return function(e,n){var r=e.parse,o=void 0===r||r,a=e.path;if(!a&&e.url){var s=(0,u.g)(e.url),c=s.rest_route,l=(0,i.A)(s,d);"string"==typeof c&&(a=(0,u.a)(c,l))}if("string"!=typeof a)return n(e);var h=e.method||"GET",p=m(a);if("GET"===h&&t[p]){var f=t[p];return delete t[p],_(f,!!o)}if("OPTIONS"===h&&t[h]&&t[h][p]){var v=t[h][p];return delete t[h][p],_(v,!!o)}return n(e)}},N.createRootURLMiddleware=function(e){return function(t,n){return y(t,(function(t){var r,i=t.url,o=t.path;return"string"==typeof o&&(r=e,-1!==e.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),"string"==typeof r&&-1!==r.indexOf("?")&&(o=o.replace("?","&")),i=r+o),n(v(v({},t),{},{url:i}))}))}},N.fetchAllMiddleware=k,N.mediaUploadMiddleware=function(e,t){if(!function(e){var t=!!e.method&&"POST"===e.method;return(!!e.path&&-1!==e.path.indexOf("/wp/v2/media")||!!e.url&&-1!==e.url.indexOf("/wp/v2/media"))&&t}(e))return t(e);var n=0,r=function e(r){return n++,t({path:"/wp/v2/media/".concat(r,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch((function(){return n<5?e(r):(t({path:"/wp/v2/media/".concat(r,"?force=true"),method:"DELETE"}),Promise.reject())}))};return t(v(v({},e),{},{parse:!1})).catch((function(t){var n=t.headers.get("x-wp-upload-attachment-id");return t.status>=500&&t.status<600&&n?r(n).catch((function(){return!1!==e.parse?Promise.reject({code:"post_process",message:wp.i18n.__("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(t)})):A(t,e.parse)})).then((function(t){return j(t,e.parse)}))},N.createThemePreviewMiddleware=function(e){return function(t,n){if("string"==typeof t.url){var r=(0,l.g)(t.url,"wp_theme_preview");void 0===r?t.url=(0,u.a)(t.url,{wp_theme_preview:e}):""===r&&(t.url=(0,l.r)(t.url,"wp_theme_preview"))}if("string"==typeof t.path){var i=(0,l.g)(t.path,"wp_theme_preview");void 0===i?t.path=(0,u.a)(t.path,{wp_theme_preview:e}):""===i&&(t.path=(0,l.r)(t.path,"wp_theme_preview"))}return n(t)}},N.fetchAllMiddleware=null,N.use(N.createRootURLMiddleware((null===(C=null===(P=null===window||void 0===window?void 0:window.parent)||void 0===P?void 0:P.scData)||void 0===C?void 0:C.root_url)||(null===(S=null===window||void 0===window?void 0:window.scData)||void 0===S?void 0:S.root_url))),(null===(z=null===window||void 0===window?void 0:window.scData)||void 0===z?void 0:z.nonce)&&(N.nonceMiddleware=N.createNonceMiddleware(null===(D=null===window||void 0===window?void 0:window.scData)||void 0===D?void 0:D.nonce),N.use(N.nonceMiddleware)),(null===(R=null===window||void 0===window?void 0:window.scData)||void 0===R?void 0:R.nonce_endpoint)&&(N.nonceEndpoint=null===(I=null===window||void 0===window?void 0:window.scData)||void 0===I?void 0:I.nonce_endpoint),N.use((function(e,t){return e.path=(0,u.a)(e.path,{t:Date.now()}),t(e)})),N.use((function(e,t){var n=t(e);return n.catch((function(e){return"invalid_json"===e.code&&(e.message=wp.i18n.__("The response is not a valid JSON response.","surecart"),e.additional_errors=[{code:"invalid_json",message:wp.i18n.sprintf(/* translators: %s: URL to debug settings page */ wp.i18n.__("Please ensure that your site is not in debug mode as this may interfere with API responses. %s","surecart"),'<a href="'.concat("https://surecart.com/docs/is-not-a-valid-json-response/",'" target="_blank" rel="noopener noreferrer">').concat(wp.i18n.__("More Information","surecart"),"</a>"))}]),"checkout.finalize_error"===e.code&&(e.additional_errors=[{code:"checkout.finalize_error",message:e.message}],e.message=wp.i18n.__("We were not able to process this order","surecart")),Promise.reject(e)})),n}));var U=function(e){var t={code:"invalid_json",message:wp.i18n.__("The response is not a valid JSON response.","surecart")};if((null==e?void 0:e.code)&&(null==e?void 0:e.message))throw e;if(!e||!e.json)throw t;return e.json().catch((function(){throw t}))},H=function(){var e=(0,r.A)(c().mark((function e(t){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U(t);case 2:if("rest_cookie_invalid_nonce"===(n=e.sent).code){e.next=5;break}throw n;case 5:return e.abrupt("return",window.fetch(N.nonceEndpoint).then((function(e){if(e.status>=200&&e.status<300)return e;throw e})).then((function(e){return e.text()})).then((function(e){N.nonceMiddleware.nonce=e})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},6418:function(e,t,n){n.d(t,{F:function(){return b},p:function(){return m},r:function(){return y}});var r=n(9394),i=n(467),o=n(45),a=n(4467),s=n(3029),c=n(2901),u=n(9280),l=n.n(u),d=["email","name","first_name","last_name","phone","password","shipping_city","shipping_country","shipping_line_1","shipping_line_2","shipping_postal_code","shipping_state","billing_city","billing_country","billing_line_1","billing_line_2","billing_postal_code","billing_state","tax_identifier.number_type","tax_identifier.number"];function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.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)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var _n=0,r=function(){};return{s:r,n:function(){return _n>=e.length?{done:!0}:{done:!1,value:e[_n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,a.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=function(){return(0,c.A)((function e(t,n){var r=this;(0,s.A)(this,e),this.form=null,this.input=t,this.options=v({form:function(e){var t,n;return(null===(n=null===(t=r.closestElement("sc-form",e))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector("form"))||r.closestElement("form",e)},name:function(e){return e.name},value:function(e){return e.value},disabled:function(e){return e.disabled}},n),this.form=this.options.form(this.input),this.handleFormData=this.handleFormData.bind(this)}),[{key:"closestElement",value:function(e,t){return t?t&&t!=document&&t!=window&&t.closest(e)||this.closestElement(e,t.getRootNode().host):null}},{key:"addFormData",value:function(){this.form&&this.form.addEventListener("formdata",this.handleFormData)}},{key:"removeFormData",value:function(){this.form&&this.form.removeEventListener("formdata",this.handleFormData)}},{key:"handleFormData",value:function(e){var t=this.options.name(this.input),n=this.options.value(this.input);"string"==typeof t&&void 0!==n&&(Array.isArray(n)?n.forEach((function(n){n&&e.formData.append(t,n.toString())})):n&&e.formData.append(t,n.toString()))}}])}(),m=function(e){var t,n=e.email,r=e.name,i=e.first_name,a=e.last_name,s=e.phone,c=e.password,u=e.shipping_city,l=e.shipping_country,h=e.shipping_line_1,p=e.shipping_line_2,f=e.shipping_postal_code,b=e.shipping_state,m=e.billing_city,y=e.billing_country,_=e.billing_line_1,g=e.billing_line_2,w=e.billing_postal_code,x=e.billing_state,k=e["tax_identifier.number_type"],O=e["tax_identifier.number"],j=(0,o.A)(e,d),A=v(v(v(v(v(v({},u?{city:u}:{}),l?{country:l}:{}),h?{line_1:h}:{}),p?{line_2:p}:{}),f?{postal_code:f}:{}),b?{state:b}:{}),P=v(v(v(v(v(v({},m?{city:m}:{}),y?{country:y}:{}),_?{line_1:_}:{}),g?{line_2:g}:{}),w?{postal_code:w}:{}),x?{state:x}:{});return v(v(v(v(v(v(v(v(v(v({},r?{name:r}:{}),n?{email:n}:{}),i?{first_name:i}:{}),a?{last_name:a}:{}),s?{phone:s}:{}),c?{password:c}:{}),Object.keys(A||{}).length?{shipping_address:A}:{}),Object.keys(P||{}).length?{billing_address:P}:{}),k&&O?{tax_identifier:{number:O,number_type:k}}:{}),(null===(t=Object.keys(j))||void 0===t?void 0:t.length)?{metadata:j}:{})},y=function(){var e=(0,i.A)(l().mark((function e(t){var n,i,o,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=(0,r.A)(t.shadowRoot.querySelectorAll("*")).filter((function(e){return"function"==typeof e.reportValidity})),i=h(n),e.prev=2,i.s();case 4:if((o=i.n()).done){e.next=13;break}return a=o.value,e.next=8,a.reportValidity();case 8:if(e.sent){e.next=11;break}return e.abrupt("return",!1);case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),i.e(e.t0);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt("return",!0);case 22:case"end":return e.stop()}}),e,null,[[2,15,18,21]])})));return function(_x){return e.apply(this,arguments)}}()},1517:function(e,t,n){n.d(t,{a:function(){return i},b:function(){return d},c:function(){return p},d:function(){return a},g:function(){return o},i:function(){return c},p:function(){return h},t:function(){return s}});var r=n(488),i=function(e){return(null==e?void 0:e.amount_off)&&(null==e?void 0:e.currency)?o({amount:e.amount_off,currency:e.currency}):(null==e?void 0:e.percent_off)?wp.i18n.sprintf(wp.i18n.__("%1d%% off","surecart"),0|e.percent_off):""},o=function(e){var t=e.amount,n=e.currency,i=function(e,t){return r.z.includes(t)?e:e/100}(t,n);return"".concat(new Intl.NumberFormat(void 0,{style:"currency",currency:n}).format(parseFloat(i.toFixed(2))))},a=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"usd";return null===(e=new Intl.NumberFormat(void 0,{style:"currency",currency:t}).formatToParts().find((function(e){return"currency"===e.type})))||void 0===e?void 0:e.value},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("every","surecart"),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:wp.i18n.__("once","surecart"),i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];switch(t){case"day":return"".concat(n," ").concat(wp.i18n.sprintf(i?wp.i18n._n("%d day","%d days",e,"surecart"):wp.i18n._n("day","%d days",e,"surecart"),e));case"week":return"".concat(n," ").concat(wp.i18n.sprintf(i?wp.i18n._n("%d week","%d weeks",e,"surecart"):wp.i18n._n("week","%d weeks",e,"surecart"),e));case"month":return"".concat(n," ").concat(wp.i18n.sprintf(i?wp.i18n._n("%d month","%d months",e,"surecart"):wp.i18n._n("month","%d months",e,"surecart"),e));case"year":return"".concat(n," ").concat(wp.i18n.sprintf(i?wp.i18n._n("%d year","%d years",e,"surecart"):wp.i18n._n("year","%d years",e,"surecart"),e));default:return r}},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";var n=t.showOnce,r=t.labels,i=t.abbreviate,o=(r||{}).interval,a=void 0===o?wp.i18n.__("every","surecart"):o;return"".concat(u(e,a,n?wp.i18n.__("once","surecart"):"",i)," ").concat(l(e,i))},u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.recurring_interval_count&&e.recurring_interval&&1!==(null==e?void 0:e.recurring_period_count)?r?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];switch(t){case"day":return" / ".concat(wp.i18n.sprintf(r?wp.i18n._n("%d day","%d days",e,"surecart"):wp.i18n._n("day","%d days",e,"surecart"),e));case"week":return" / ".concat(wp.i18n.sprintf(r?wp.i18n._n("%d wk","%d wks",e,"surecart"):wp.i18n._n("wk","%d wks",e,"surecart"),e));case"month":return" / ".concat(wp.i18n.sprintf(r?wp.i18n._n("%d mo","%d months",e,"surecart"):wp.i18n._n("mo","%d mos",e,"surecart"),e));case"year":return" / ".concat(wp.i18n.sprintf(r?wp.i18n._n("%d yr","%d yrs",e,"surecart"):wp.i18n._n("yr","%d yrs",e,"surecart"),e));default:return n}}(e.recurring_interval_count,e.recurring_interval,n):s(e.recurring_interval_count,e.recurring_interval," ".concat(t),n):""},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(null==e?void 0:e.recurring_period_count)&&1!==(null==e?void 0:e.recurring_period_count)?t?"x ".concat(e.recurring_period_count):" (".concat(wp.i18n.sprintf(wp.i18n._n("%d payment","%d payments",e.recurring_period_count,"surecart"),e.recurring_period_count),")"):""},d=function(e){return wp.i18n.sprintf(wp.i18n._n("%d payment remaining","%d payments remaining",e,"surecart"),e)},h=function(e){var t;return e?"".concat(null===(t=null==e?void 0:e.product)||void 0===t?void 0:t.name," ").concat((null==e?void 0:e.name)?"— ".concat(e.name):""):""},p=function(e){switch(e){case"invalid":return wp.i18n.__("Not valid","surecart");case"expired":return wp.i18n.__("Expired","surecart");case"gone":return wp.i18n.__("Not available","surecart");case"less_than_min_subtotal_amount":return wp.i18n.__("Minimum not met","surecart");case"greater_than_max_subtotal_amount":return wp.i18n.__("Order too large","surecart");case"not_applicable":return wp.i18n.__("Product(s) not eligible","surecart");case"not_applicable_to_customer":return wp.i18n.__("Not eligible","surecart");case"":return"";default:return wp.i18n.__("Not redeemable","surecart")}}},3506:function(e,t,n){n.d(t,{g:function(){return i},r:function(){return o}});var r=n(4805);function i(e,t){return(0,r.g)(e)[t]}function o(e){var t=e.indexOf("?");if(-1===t)return e;for(var n=(0,r.g)(e),i=e.substr(0,t),o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];a.forEach((function(e){return delete n[e]}));var c=(0,r.b)(n);return c?i+"?"+c:i}},4869:function(e,t,n){n.r(t),n.d(t,{sc_cancel_discount:function(){return m},sc_cancel_survey:function(){return y},sc_subscription_cancel:function(){return _},sc_textarea:function(){return w}});var r=n(4467),i=n(467),o=n(3029),a=n(2901),s=n(9280),c=n.n(s),u=n(1346),l=n(3),d=n(1517),h=n(4805),p=n(6418);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=function(e,t){return(null==t?void 0:t.preservation_coupon)?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"amount";return e.replaceAll("{{"+n+"}}",t).replaceAll("{{ "+n+" }}",t)}(e,(0,d.a)(null==t?void 0:t.preservation_coupon)):e},m=function(){return(0,a.A)((function e(t){(0,o.A)(this,e),(0,u.r)(this,t),this.scCancel=(0,u.c)(this,"scCancel",7),this.scPreserved=(0,u.c)(this,"scPreserved",7),this.subscription=void 0,this.reason=void 0,this.comment=void 0,this.protocol=void 0,this.loading=void 0,this.error=void 0}),[{key:"addDiscount",value:(e=(0,i.A)(c().mark((function e(){var t,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,(0,l.a)({method:"PATCH",path:(0,h.a)("surecart/v1/subscriptions/".concat(null===(t=this.subscription)||void 0===t?void 0:t.id,"/preserve"),{cancellation_act:v(v({},this.comment?{comment:this.comment}:{}),{},{cancellation_reason_id:null===(n=this.reason)||void 0===n?void 0:n.id})})});case 4:this.subscription=e.sent,this.scPreserved.emit(),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),console.error(e.t0),this.error=e.t0;case 12:return e.prev=12,this.loading=!1,e.finish(12);case 15:case"end":return e.stop()}}),e,this,[[0,8,12,15]])}))),function(){return e.apply(this,arguments)})},{key:"hasDiscount",value:function(){var e,t;return!!(null===(t=null===(e=this.subscription)||void 0===e?void 0:e.discount)||void 0===t?void 0:t.id)}},{key:"render",value:function(){var e,t,n=this,r=function(e,t){var n=(null==e?void 0:e.preservation_locales)||{},r=n.preserve_title,i=n.preserve_description,o=n.preserve_button,a=n.cancel_link;return t?{title:b(wp.i18n.__("Your {{ amount }} discount is still active.","surecart"),e),description:b(wp.i18n.__("You have a {{ amount }} discount active. Cancelling now will forfeit this discount forever. Are you sure you wish to cancel?","surecart"),e),button:wp.i18n.__("Keep My Discount","surecart"),cancel_link:wp.i18n.__("Cancel Anyway","surecart")}:{title:b(r,e),description:b(i,e),button:o,cancel_link:a}}(this.protocol,null===(t=null===(e=this.subscription)||void 0===e?void 0:e.discount)||void 0===t?void 0:t.id),i=r.title,o=r.description,a=r.button,s=r.cancel_link;return(0,u.h)("div",{key:"1e3234f5a046311223b48a1a351c291dc9ee77c8",class:"cancel-discount"},(0,u.h)("sc-dashboard-module",{key:"13449ca7bcaf3d624555ca8d54f0940bda47ada3",heading:i,style:{"--sc-dashboard-module-spacing":"2em"}},(0,u.h)("span",{key:"a4c0441dc4903c9c14fcb9661b366b2db88706a7",slot:"description"},o),(0,u.h)("sc-flex",{key:"caa60edc75a785cc6f24ab28b5c40cceadca4706",justifyContent:"flex-start"},(0,u.h)("sc-button",{key:"1ac401b834877bcdb619f25e6226307ee92e8675",type:"primary",onClick:function(){return n.addDiscount()}},a),(0,u.h)("sc-button",{key:"7c0c71eefe09175d2c0011eee0033fdeea5cb324",class:"cancel-discount__abort-link",type:"text",onClick:function(){return n.scCancel.emit()}},s)),!!this.loading&&(0,u.h)("sc-block-ui",{key:"a563ff82d602516fb014e04d24fba9e07b054457",spinner:!0})))}}]);var e}();m.style=".cancel-discount__abort-link{color:var(--sc-color-gray-500)}";var y=function(){return(0,a.A)((function e(t){(0,o.A)(this,e),(0,u.r)(this,t),this.scAbandon=(0,u.c)(this,"scAbandon",7),this.scSubmitReason=(0,u.c)(this,"scSubmitReason",7),this.protocol=void 0,this.reasons=void 0,this.loading=void 0,this.selectedReason=void 0,this.comment=void 0,this.error=void 0}),[{key:"componentWillLoad",value:function(){this.reasons||this.fetchReasons()}},{key:"handleSelectedReasonChange",value:function(){var e,t=this;(null===(e=this.selectedReason)||void 0===e?void 0:e.comment_enabled)&&setTimeout((function(){t.textArea.triggerFocus()}),50)}},{key:"fetchReasons",value:(t=(0,i.A)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.next=4,(0,l.a)({path:"surecart/v1/cancellation_reasons"});case 4:this.reasons=e.sent,e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),this.error=e.t0;case 11:return e.prev=11,this.loading=!1,e.finish(11);case 14:case"end":return e.stop()}}),e,this,[[0,7,11,14]])}))),function(){return t.apply(this,arguments)})},{key:"handleSubmit",value:(e=(0,i.A)(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),t.stopImmediatePropagation();try{this.scSubmitReason.emit({reason:this.selectedReason,comment:this.comment})}catch(e){console.error(e),this.error=e}case 3:case"end":return e.stop()}}),e,this)}))),function(_x){return e.apply(this,arguments)})},{key:"renderReasons",value:function(){var e=this;return this.loading?(0,u.h)("sc-choice",null,(0,u.h)("sc-skeleton",null)):(this.reasons||[]).map((function(t){return(0,u.h)("sc-choice",{value:null==t?void 0:t.id,name:"reason",onScChange:function(n){n.target.checked&&(e.selectedReason=t)}},null==t?void 0:t.label)}))}},{key:"render",value:function(){var e,t,n,r=this,i=(null===(e=this.protocol)||void 0===e?void 0:e.preservation_locales)||{},o=i.reasons_title,a=i.reasons_description,s=i.skip_link;return this.loading?(0,u.h)("sc-skeleton",null):(0,u.h)("div",{class:"cancel-survey"},(0,u.h)("sc-dashboard-module",{heading:o,style:{"--sc-dashboard-module-spacing":"2em"}},(0,u.h)("span",{slot:"description"},a),(0,u.h)("sc-form",{onScSubmit:function(e){return r.handleSubmit(e)},style:{"--sc-form-row-spacing":"2em"}},(0,u.h)("sc-choices",{showLabel:!1,label:wp.i18n.__("Choose a reason","surecart"),style:{"--columns":"2"},required:!0},this.renderReasons()),(null===(t=this.selectedReason)||void 0===t?void 0:t.comment_enabled)&&(0,u.h)("sc-textarea",{label:(null===(n=this.selectedReason)||void 0===n?void 0:n.comment_prompt)||wp.i18n.__("Additional Comments","surecart"),required:!0,ref:function(e){return r.textArea=e},onScInput:function(e){return r.comment=e.target.value}}),(0,u.h)("sc-flex",{justifyContent:"flex-start"},(0,u.h)("sc-button",{type:"primary",submit:!0},wp.i18n.__("Continue","surecart"),(0,u.h)("sc-icon",{name:"arrow-right",slot:"suffix"})),!!s&&(0,u.h)("sc-button",{class:"cancel-survey__abort-link",type:"text",onClick:function(){return r.scAbandon.emit()}},s)))))}}],[{key:"watchers",get:function(){return{selectedReason:["handleSelectedReasonChange"]}}}]);var e,t}();y.style=".cancel-survey{color:var(--sc-color-gray-900)}.cancel-survey__abort-link{color:var(--sc-color-gray-500)}";var _=function(){return(0,a.A)((function e(t){(0,o.A)(this,e),(0,u.r)(this,t),this.scAbandon=(0,u.c)(this,"scAbandon",7),this.scCancelled=(0,u.c)(this,"scCancelled",7),this.heading=void 0,this.backUrl=void 0,this.successUrl=void 0,this.subscription=void 0,this.protocol=void 0,this.reason=void 0,this.comment=void 0,this.loading=void 0,this.busy=void 0,this.error=void 0}),[{key:"cancelSubscription",value:(e=(0,i.A)(c().mark((function e(){var t,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.error="",this.busy=!0,e.next=5,(0,l.a)({path:(0,h.a)("/surecart/v1/subscriptions/".concat(null===(t=this.subscription)||void 0===t?void 0:t.id,"/cancel"),{cancellation_act:v(v({},this.comment?{comment:this.comment}:{}),{},{cancellation_reason_id:null===(n=this.reason)||void 0===n?void 0:n.id})}),method:"PATCH"});case 5:this.scCancelled.emit(),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),this.error=(null===e.t0||void 0===e.t0?void 0:e.t0.message)||wp.i18n.__("Something went wrong","surecart"),this.busy=!1;case 12:case"end":return e.stop()}}),e,this,[[0,8]])}))),function(){return e.apply(this,arguments)})},{key:"renderContent",value:function(){var e,t;return this.loading?this.renderLoading():(0,u.h)(u.F,null,"pending"===(null===(e=null==this?void 0:this.protocol)||void 0===e?void 0:e.cancel_behavior)?(0,u.h)("div",{slot:"description"},wp.i18n.__("Your plan will be canceled, but is still available until the end of your billing period on","surecart")," ",(0,u.h)("strong",null,null===(t=null==this?void 0:this.subscription)||void 0===t?void 0:t.current_period_end_at_date),". ",wp.i18n.__("If you change your mind, you can renew your subscription.","surecart")):(0,u.h)("div",{slot:"description"},wp.i18n.__("Your plan will be canceled immediately and cannot be modified later.","surecart")))}},{key:"renderLoading",value:function(){return(0,u.h)("div",{style:{padding:"0.5em"}},(0,u.h)("sc-skeleton",{style:{width:"30%",marginBottom:"0.75em"}}),(0,u.h)("sc-skeleton",{style:{width:"20%",marginBottom:"0.75em"}}),(0,u.h)("sc-skeleton",{style:{width:"40%"}}))}},{key:"render",value:function(){var e=this;return(0,u.h)("sc-dashboard-module",{key:"915e0da3858552d79170106f78eb698b5202ccd6",heading:this.heading||wp.i18n.__("Cancel your plan","surecart"),class:"subscription-cancel",error:this.error,style:{"--sc-dashboard-module-spacing":"1em"}},this.renderContent(),(0,u.h)("sc-flex",{key:"036032a82590c922b3167b7b87d3f140d2356dbb",justifyContent:"flex-start"},(0,u.h)("sc-button",{key:"ad2e297e2cca0db7fc215998cbab017cf19ed0bf",type:"primary",loading:this.loading||this.busy,disabled:this.loading||this.busy,onClick:function(){return e.cancelSubscription()}},wp.i18n.__("Cancel Plan","surecart")),(0,u.h)("sc-button",{key:"1ad0cbfe78e8c6664d6507f7cb39e30fc270c6b9",style:{color:"var(--sc-color-gray-500"},type:"text",onClick:function(){return e.scAbandon.emit()},loading:this.loading||this.busy,disabled:this.loading||this.busy},wp.i18n.__("Keep My Plan","surecart"))),this.busy&&(0,u.h)("sc-block-ui",{key:"2aaa6e5bcde01d056c2edd146d7ddae84426bbd8"}))}}]);var e}();_.style=":host{display:block;position:relative}.subscription-cancel{display:grid;gap:0.5em}.subscription-cancel__terms{color:var(--sc-color-gray-600);font-size:var(--sc-font-size-small)}";var g=0,w=function(){return(0,a.A)((function e(t){(0,o.A)(this,e),(0,u.r)(this,t),this.scChange=(0,u.c)(this,"scChange",7),this.scInput=(0,u.c)(this,"scInput",7),this.scBlur=(0,u.c)(this,"scBlur",7),this.scFocus=(0,u.c)(this,"scFocus",7),this.inputId="textarea-".concat(++g),this.helpId="textarea-help-text-".concat(g),this.labelId="textarea-label-".concat(g),this.hasFocus=!1,this.showCharLimit=!1,this.size="medium",this.name=void 0,this.value="",this.filled=!1,this.label="",this.showLabel=!0,this.help="",this.placeholder=void 0,this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.minlength=void 0,this.maxlength=void 0,this.required=!1,this.invalid=!1,this.autocapitalize=void 0,this.autocorrect=void 0,this.autocomplete=void 0,this.autofocus=void 0,this.enterkeyhint=void 0,this.spellcheck=void 0,this.inputmode=void 0}),[{key:"handleRowsChange",value:function(){this.setTextareaHeight()}},{key:"handleValueChange",value:function(){var e;this.invalid=!this.input.checkValidity();var t=(null===(e=this.value)||void 0===e?void 0:e.length)||0,n=this.maxlength||Number.MAX_SAFE_INTEGER;this.showCharLimit=n-t<=20}},{key:"handleDisabledChange",value:function(){this.input.disabled=this.disabled,this.invalid=!this.input.checkValidity()}},{key:"triggerFocus",value:(t=(0,i.A)(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.input.focus(t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"focus",value:function(e){this.input.focus(e)}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"scrollPosition",value:function(e){return e?("number"==typeof e.top&&(this.input.scrollTop=e.top),void("number"==typeof e.left&&(this.input.scrollLeft=e.left))):{top:this.input.scrollTop,left:this.input.scrollTop}}},{key:"setSelectionRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"none";this.input.setSelectionRange(e,t,n)}},{key:"setRangeText",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"preserve";this.input.setRangeText(e,t,n,r),this.value!==this.input.value&&(this.value=this.input.value,this.scInput.emit()),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaHeight(),this.scInput.emit(),this.scChange.emit())}},{key:"reportValidity",value:(e=(0,i.A)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.input.reportValidity());case 1:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"setCustomValidity",value:function(e){this.input.setCustomValidity(e),this.invalid=!this.input.checkValidity()}},{key:"handleBlur",value:function(){this.hasFocus=!1,this.scBlur.emit()}},{key:"handleChange",value:function(){this.value=this.input.value,this.setTextareaHeight(),this.scChange.emit()}},{key:"handleFocus",value:function(){this.hasFocus=!0,this.scFocus.emit()}},{key:"handleInput",value:function(){this.value=this.input.value,this.setTextareaHeight(),this.scInput.emit()}},{key:"componentWillLoad",value:function(){var e=this;(null===window||void 0===window?void 0:window.ResizeObserver)&&(this.resizeObserver=new window.ResizeObserver((function(){return e.setTextareaHeight()})))}},{key:"componentDidLoad",value:function(){this.formController=new p.F(this.el).addFormData(),(null===window||void 0===window?void 0:window.ResizeObserver)&&this.resizeObserver.observe(this.input)}},{key:"disconnectedCallback",value:function(){var e;null===(e=this.formController)||void 0===e||e.removeFormData(),this.resizeObserver.unobserve(this.input)}},{key:"setTextareaHeight",value:function(){"auto"===this.resize?(this.input.style.height="auto",this.input.style.height="".concat(this.input.scrollHeight,"px")):this.input.style.height=void 0}},{key:"render",value:function(){var e,t=this;return(0,u.h)("div",{key:"4248ae2284a2cb8e00caa2c72f136b56afa75bb3",part:"form-control",class:{"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size}},(0,u.h)("sc-form-control",{key:"450ff72a85f80d390925a283d454f9cbb2d0c7a9",exportparts:"label, help-text, form-control",size:this.size,required:this.required,label:this.label,showLabel:this.showLabel,help:this.help,inputId:this.inputId,helpId:this.helpId,labelId:this.labelId,name:this.name},(0,u.h)("div",{key:"a2e325cc1836293c9b9e7e1568c0238d0d96bfd9",part:"form-control-input",class:"form-control-input"},(0,u.h)("div",{key:"0bd99c323f098c3858c0be722b354948ae4af40f",part:"base",class:{textarea:!0,"textarea--small":"small"===this.size,"textarea--medium":"medium"===this.size,"textarea--large":"large"===this.size,"textarea--standard":!this.filled,"textarea--filled":this.filled,"textarea--disabled":this.disabled,"textarea--focused":this.hasFocus,"textarea--empty":!this.value,"textarea--invalid":this.invalid,"textarea--resize-none":"none"===this.resize,"textarea--resize-vertical":"vertical"===this.resize,"textarea--resize-auto":"auto"===this.resize}},(0,u.h)("textarea",{key:"8998674cdd362594733d093288370f05c188c11d",part:"textarea",ref:function(e){return t.input=e},id:"input",class:"textarea__control",name:this.name,value:this.value,disabled:this.disabled,readonly:this.readonly,required:this.required,placeholder:this.placeholder,rows:this.rows,minlength:this.minlength,maxlength:this.maxlength,autocapitalize:this.autocapitalize,autocorrect:this.autocorrect,autofocus:this.autofocus,spellcheck:this.spellcheck,enterkeyhint:this.enterkeyhint,inputmode:this.inputmode,"aria-describedby":"help-text",onChange:function(){return t.handleChange()},onInput:function(){return t.handleInput()},onFocus:function(){return t.handleFocus()},onBlur:function(){return t.handleBlur()},onKeyDown:function(e){return e.stopPropagation()}})),this.showCharLimit&&(0,u.h)("div",{key:"3bf51bc2294f5196775dd1d8a840b57ad752b4e4",slot:"help",class:"textarea__char-limit-warning"},wp.i18n.sprintf(wp.i18n.__("%d characters remaining","surecart"),this.maxlength&&(null===(e=this.input)||void 0===e?void 0:e.value)?this.maxlength-this.input.value.length:this.maxlength)))))}},{key:"el",get:function(){return(0,u.a)(this)}}],[{key:"watchers",get:function(){return{rows:["handleRowsChange"],value:["handleValueChange"],disabled:["handleDisabledChange"]}}}]);var e,t}();w.style=":host{display:block}.textarea{display:flex;align-items:center;position:relative;width:100%;font-family:var(--sc-input-font-family);font-weight:var(--sc-input-font-weight);line-height:var(--sc-line-height-normal);letter-spacing:var(--sc-input-letter-spacing);vertical-align:middle;transition:var(--sc-input-transition, var(--sc-transition-medium)) color, var(--sc-input-transition, var(--sc-transition-medium)) border, var(--sc-input-transition, var(--sc-transition-medium)) box-shadow,\n var(--sc-input-transition, var(--sc-transition-medium)) background-color;cursor:text}.textarea--standard{background-color:var(--sc-input-background-color);border:solid var(--sc-input-border-width) var(--sc-input-border-color)}.textarea--standard:hover:not(.textarea--disabled){background-color:var(--sc-input-background-color-hover);border-color:var(--sc-input-border-color-hover)}.textarea--standard:hover:not(.textarea--disabled) .textarea__control{color:var(--sc-input-color-hover)}.textarea--standard.textarea--focused:not(.textarea--disabled){background-color:var(--sc-input-background-color-focus);border-color:var(--sc-input-border-color-focus);color:var(--sc-input-color-focus);box-shadow:0 0 0 var(--sc-focus-ring-width) var(--sc-input-focus-ring-color)}.textarea--standard.textarea--focused:not(.textarea--disabled) .textarea__control{color:var(--sc-input-color-focus)}.textarea--standard.textarea--disabled{background-color:var(--sc-input-background-color-disabled);border-color:var(--sc-input-border-color-disabled);opacity:0.5;cursor:not-allowed}.textarea--standard.textarea--disabled .textarea__control{color:var(--sc-input-color-disabled)}.textarea--standard.textarea--disabled .textarea__control::placeholder{color:var(--sc-input-placeholder-color-disabled)}.textarea--filled{border:none;background-color:var(--sc-input-filled-background-color);color:var(--sc-input-color)}.textarea--filled:hover:not(.textarea--disabled){background-color:var(--sc-input-filled-background-color-hover)}.textarea--filled.textarea--focused:not(.textarea--disabled){background-color:var(--sc-input-filled-background-color-focus);outline:var(--sc-focus-ring);outline-offset:var(--sc-focus-ring-offset)}.textarea--filled.textarea--disabled{background-color:var(--sc-input-filled-background-color-disabled);opacity:0.5;cursor:not-allowed}.textarea__control{flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.4;color:var(--sc-input-color);border:none;background:none;box-shadow:none;cursor:inherit;-webkit-appearance:none}.textarea__control::-webkit-search-decoration,.textarea__control::-webkit-search-cancel-button,.textarea__control::-webkit-search-results-button,.textarea__control::-webkit-search-results-decoration{-webkit-appearance:none}.textarea__control::placeholder{color:var(--sc-input-placeholder-color);user-select:none}.textarea__control:focus{outline:none}.textarea--small{border-radius:var(--sc-input-border-radius-small);font-size:var(--sc-input-font-size-small)}.textarea--small .textarea__control{padding:0.5em var(--sc-input-spacing-small)}.textarea--medium{border-radius:var(--sc-input-border-radius-medium);font-size:var(--sc-input-font-size-medium)}.textarea--medium .textarea__control{padding:0.5em var(--sc-input-spacing-medium)}.textarea--large{border-radius:var(--sc-input-border-radius-large);font-size:var(--sc-input-font-size-large)}.textarea--large .textarea__control{padding:0.5em var(--sc-input-spacing-large)}.textarea--resize-none .textarea__control{resize:none}.textarea--resize-vertical .textarea__control{resize:vertical}.textarea--resize-auto .textarea__control{height:auto;resize:none}.textarea__char-limit-warning{margin-top:var(--sc-input-spacing-small);color:var(--sc-input-help-text-color);font-size:var(--sc-input-help-text-font-size-medium)}"},45:function(e,t,n){n.d(t,{A:function(){return i}});var r=n(8587);function i(e,t){if(null==e)return{};var n,i,o=(0,r.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},8587:function(e,t,n){function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}n.d(t,{A:function(){return r}})}}]);