text: "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./generateLicense-c091cf37.js"),t=require("@material-ui/utils");function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(i){if("default"!==i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}})),t.default=e,Object.freeze(t)}var r,n=i(require("react"));t.ponyfillGlobal.__MUI_LICENSE_INFO__=t.ponyfillGlobal.__MUI_LICENSE_INFO__||{key:void 0,releaseInfo:void 0};class s{static getKey(){return t.ponyfillGlobal.__MUI_LICENSE_INFO__.key}static getReleaseInfo(){return t.ponyfillGlobal.__MUI_LICENSE_INFO__.releaseInfo}static setLicenseKey(e){t.ponyfillGlobal.__MUI_LICENSE_INFO__.key=e}static setReleaseInfo(e){t.ponyfillGlobal.__MUI_LICENSE_INFO__.releaseInfo=e}}function o(e){console.error(["************************************************************","*************************************************************","",...e,"","*************************************************************","*************************************************************"].join("\n"))}function a(){o(["Material-UI X: Invalid license.","","Your license for Material-UI X is not valid, please visit","https://material-ui.com/r/x-license to get a valid license."])}function l(){o(["Material-UI X: License key not found.","","This is a trial-only version of Material-UI X.","While all the features are unlocked, it is not licensed for","development use on projects intended for production.","","To purchase a license, please visit","https://material-ui.com/r/x-license to get a valid license."])}function c(){o(["Material-UI X: License key expired.","","Please visit https://material-ui.com/r/x-license to renew","your subscription and get the latest version of Material-UI X."])}exports.LicenseStatus=void 0,(r=exports.LicenseStatus||(exports.LicenseStatus={})).NotFound="NotFound",r.Invalid="Invalid",r.Expired="Expired",r.Valid="Valid";const u=["https://muix-preview.netlify.app/","https://muix-storybook.netlify.app/","material-ui.com/"],p=/^.*EXPIRY=([0-9]+),.*$/;function f(t,i){if(u.some((e=>null!=window&&window.location.href.indexOf(e)>-1)))return exports.LicenseStatus.Valid;if(!t)throw new Error("Material-UI: The release information is missing. Not able to validate license.");if(!i)return exports.LicenseStatus.NotFound;const r=i.substr(0,32),n=i.substr(32);if(r!==e.md5(n))return exports.LicenseStatus.Invalid;const s=e.base64Decode(n);let o=0;try{if(o=parseInt(s.match(p)[1],10),!o||Number.isNaN(o))return console.error("Error checking license. Expiry timestamp not found or invalid!"),exports.LicenseStatus.Invalid}catch(e){return console.error("Error extracting license expiry timestamp.",e),exports.LicenseStatus.Invalid}const a=parseInt(e.base64Decode(t),10);if(Number.isNaN(a))throw new Error("Material-UI: The release information is invalid. Not able to validate license.");return o<a?exports.LicenseStatus.Expired:exports.LicenseStatus.Valid}exports.generateLicence=e.generateLicence,exports.LicenseInfo=s,exports.generateReleaseInfo=function(){const t=new Date;return t.setHours(0,0,0,0),e.base64Encode(t.getTime().toString())},exports.showExpiredLicenseError=c,exports.showInvalidLicenseError=a,exports.showNotFoundLicenseError=l,exports.useLicenseVerifier=function(){const[e,t]=n.useState(exports.LicenseStatus.Invalid);return n.useEffect((()=>{const e=f(s.getReleaseInfo(),s.getKey());t(e),e===exports.LicenseStatus.Invalid?a():e===exports.LicenseStatus.NotFound?l():e===exports.LicenseStatus.Expired&&c()}),[]),e},exports.verifyLicense=f;
  