tocco-admin 1.0.249 → 1.0.251
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +11 -0
- package/dist/{chunk-531.3ddb3f9b0ddcdbe7f00e.js → chunk-531.6efb9993d64cbb783438.js} +1 -1
- package/dist/{chunk-834.6b13905a28688beb32cb.js → chunk-834.1a872258a8daf79cd765.js} +1 -1
- package/dist/chunk-896.1024ddd00ee532ef3387.js +6 -0
- package/dist/{chunk-actions.732f8e81ecbbc7a731ec.js → chunk-actions.97aa7a6d7e85b06f45bc.js} +1 -1
- package/dist/chunk-docs-actions.74103210db187d2e89af.js +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-896.5fa4268f01f679e80643.js +0 -6
- package/dist/chunk-docs-actions.bea4d1e0cdc4ed4fd062.js +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[896],{78788:(e,t,n)=>{"use strict";n.d(t,{Z:()=>mt});var r,o=n(45697),i=n.n(o),a=n(50600),s=n(18882),c=n(19241),l=n(30604),u=n(73665),d=n(74806),f=n(50558),p="root/LOAD_DIALOG_INFO",h="delete/SET_DELETE_DIALOG_INFO",m="delete/DO_DELETE",y="delete/SET_DELETING_IN_PROGRESS",g="delete/ON_CANCEL",v="delete/SET_ENTITIES_TO_DELETE",b=function(e){return{type:h,payload:{dialogInfo:e}}},E=function(){return{type:m}},w=function(e){return{type:v,payload:{entitiesToDelete:e}}},O=n(1024),x=n.n(O),C=n(35728),_=n(44012),N=n(93235),I=n(34206),k=n(319),S=n.n(k),R=n(63038),P=n.n(R),j=n(28655),M=n.n(j),T=n(38205),L=n(76791),A=n(85893);const D=function(e){var t=e.relatedEntity,n=e.children,o=e.maxCountLink;if(t.keys.length<o&&0===t.keysOtherBu.length)return n;var i=(0,A.jsxs)(A.Fragment,{children:[t.keys.length>o&&(r||(r=(0,A.jsx)(I.ZP.P,{children:(0,A.jsx)(_.Z,{id:"client.delete.tooManyRecords"})}))),t.keysOtherBu.length>0&&(0,A.jsx)(I.ZP.P,{children:(0,A.jsx)(_.Z,{id:"client.delete.recordInOtherBU",values:{count:t.keysOtherBu.length}})})]});return(0,A.jsx)(L.Z,{content:i,placement:"top",children:n})};var B,Z,F=T.ZP.span.withConfig({displayName:"NonBreakingText"})(B||(B=M()(["\n white-space: nowrap;\n"])));const U=function(e){var t=e.rootEntities,n=e.relatedEntities,r=e.maxCountLink,o=e.navigationStrategy;return(0,A.jsxs)(I.ZP.Span,{children:[(0,A.jsx)(I.ZP.B,{children:Object.entries(t).map((function(e){var t=P()(e,2),n=t[0],r=t[1];return(0,A.jsxs)("span",{children:[r.entityLabel," (",r.keys.length>0&&o.ListLink?(0,A.jsx)(o.ListLink,{entityName:n,entityKeys:r.keys,children:r.keys.length}):(0,A.jsx)(I.ZP.Span,{children:r.keys.length}),")"]},"root-entity-".concat(n))})).reduce((function(e,t){return[e,", ",t]}))}),Object.keys(n).length>0&&(0,A.jsxs)(A.Fragment,{children:[Z||(Z=(0,A.jsx)("span",{children:" / "})),Object.keys(n).map((function(e){var t=n[e],i=[].concat(S()(t.keys),S()(t.keysOtherBu)).length,a=t.keys.length>0&&o.ListLink?(0,A.jsx)(o.ListLink,{entityName:e,entityKeys:t.keys.slice(0,r),children:i}):(0,A.jsx)(I.ZP.Span,{children:i}),s=(0,A.jsx)(D,{relatedEntity:t,maxCountLink:r,children:a});return(0,A.jsx)(x().Fragment,{children:(0,A.jsxs)(F,{children:[t.entityLabel," (",s,")"]})},"entity-info-"+e)})).reduce((function(e,t){return[e,", ",t]}))]})]})};var z,H,W,Y=n(7281),q=T.ZP.div.withConfig({displayName:"StyledIconWrapper"})(z||(z=M()(["\n margin-bottom: ",";\n"])),Y.Z.space(.2));const Q=function(e){var t=e.dialogInfo,n=e.navigationStrategy;return(0,A.jsxs)(A.Fragment,{children:[H||(H=(0,A.jsx)(q,{children:(0,A.jsx)(N.Z,{size:"30px"})})),W||(W=(0,A.jsx)(I.ZP.P,{children:(0,A.jsx)(_.Z,{id:"client.delete.deleteInProgress"})})),(0,A.jsx)(U,{rootEntities:t.rootEntitiesDeletable,relatedEntities:t.relatedDeletable,maxCountLink:100,navigationStrategy:n},"infopart-deletable")]})};var $={doDelete:E};const V=(0,f.connect)((function(e,t){return{dialogInfo:e.del.dialogInfo,navigationStrategy:e.input.navigationStrategy}}),$)((0,d.ZP)(Q));var G,K,X=n(83324),J=n(23427),ee=n(59713),te=n.n(ee),ne=n(24875),re=[J.Z.condition.INFO,J.Z.condition.DANGER,J.Z.condition.SUCCESS,J.Z.condition.WARNING],oe=(G={},te()(G,J.Z.condition.DANGER,ne.FS.color("signal.danger")),te()(G,J.Z.condition.SUCCESS,ne.FS.color("signal.success")),te()(G,J.Z.condition.WARNING,ne.FS.color("signal.warning")),te()(G,J.Z.condition.INFO,ne.FS.color("signal.info")),G),ie=T.ZP.div.withConfig({displayName:"StyledSignalBox"})(K||(K=M()(["\n && {\n background-color: ",";\n padding: ",";\n margin-bottom: ",";\n\n * {\n color: ",";\n }\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n"])),(function(e){return function(e){return oe[e.condition]||oe[J.Z.condition.INFO]}(e)}),Y.Z.space(-1),Y.Z.space(-1),ne.FS.color("paper"));ie.propTypes={condition:J.Z.oneOfPropTypeAndCompletelyMapped(re,oe)};var ae=function(e){var t=e.condition,n=e.title,r=e.children,o=e.meta;return(0,A.jsxs)(ie,{condition:t,children:[n&&(0,A.jsx)(I.ZP.H5,{children:n}),x().Children.map(r,(function(e){return x().cloneElement(e)})),o&&(0,A.jsx)(I.ZP.Small,{children:o})]})};ae.defaultProps={condition:J.Z.condition.BASE};const se=ae;var ce,le,ue,de,fe,pe,he,me=n(65035),ye=n(36589),ge=T.ZP.div.withConfig({displayName:"StyledSectionWrapper"})(ce||(ce=M()(["\n padding-top: ",";\n"])),Y.Z.space(.6)),ve=T.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(le||(le=M()(["\n display: flex;\n justify-content: flex-end;\n\n "," {\n margin-right: 0;\n }\n"])),ye.Z);const be=function(e){var t=e.dialogInfo,n=t.rootEntitiesDeletable,r=t.rootEntitiesNotDeletable,o=t.relatedDeletable,i=t.relatedNotDeletable,a=t.hasUnreadableEntities,s=e.doDelete,c=e.onCancel,l=e.navigationStrategy;return(0,X.z)(c),(0,A.jsxs)(A.Fragment,{children:[ue||(ue=(0,A.jsx)(I.ZP.P,{children:(0,A.jsx)(_.Z,{id:"client.delete.confirmText"})})),(0,A.jsx)(U,{rootEntities:n,relatedEntities:o,maxCountLink:100,navigationStrategy:l},"infopart-deletable"),Object.keys(r).length>0&&(0,A.jsxs)(ge,{children:[de||(de=(0,A.jsx)(I.ZP.P,{children:(0,A.jsx)(_.Z,{id:"client.delete.textNotDeletable"})})),(0,A.jsx)(U,{rootEntities:r,relatedEntities:i,maxCountLink:100,navigationStrategy:l},"infopart-notdeletable")]}),a&&(fe||(fe=(0,A.jsx)(ge,{children:(0,A.jsx)(se,{condition:"warning",children:(0,A.jsx)(I.ZP.Span,{children:(0,A.jsx)(_.Z,{id:"client.delete.unreadableEntities"})})})}))),(0,A.jsx)(ge,{children:(0,A.jsxs)(ve,{children:[(0,A.jsx)(me.Z,{onClick:s,disabled:Object.keys(n).every((function(e){return 0===n[e].keys.length})),"data-cy":"btn-delete-ok",children:pe||(pe=(0,A.jsx)(_.Z,{id:"client.delete.deleteButton"}))}),(0,A.jsx)(me.Z,{ink:"primary",look:"raised",onClick:c,"data-cy":"btn-delete-cancel",children:he||(he=(0,A.jsx)(_.Z,{id:"client.delete.cancelButton"}))})]})})]})};var Ee={doDelete:E,onCancel:function(){return{type:g}}};const we=(0,f.connect)((function(e,t){return{dialogInfo:e.del.dialogInfo,navigationStrategy:e.input.navigationStrategy}}),Ee)((0,d.ZP)(be));var Oe,xe;const Ce=function(e){var t=e.loadDialogInfo,n=e.dialogInfo,r=e.deletingInProgress,o=e.intl;(0,O.useEffect)((function(){t()}),[t]);var i;return r?Oe||(Oe=(0,A.jsx)(V,{})):(0,A.jsx)(C.Z,{required:[n],loadingText:(i="client.delete.loadingText",o.formatMessage({id:i})),children:n&&(xe||(xe=(0,A.jsx)(we,{})))})};var _e={loadDialogInfo:function(){return{type:p}}};const Ne=(0,f.connect)((function(e,t){return{dialogInfo:e.del.dialogInfo,deletingInProgress:e.del.deletingInProgress}}),_e)((0,d.ZP)(Ce));var Ie,ke=n(81770),Se=(Ie={},te()(Ie,h,ke.Z.singleTransferReducer("dialogInfo")),te()(Ie,v,ke.Z.singleTransferReducer("entitiesToDelete")),te()(Ie,y,ke.Z.singleTransferReducer("deletingInProgress")),Ie),Re={dialogInfo:null,entitiesToDelete:null,deletingInProgress:!1};var Pe=n(87757),je=n.n(Pe),Me=n(34857),Te=n(81719),Le=n(5422);const Ae=function(e){var t=e.errors.map((function(e){var t=e.entityValidatorErrors;return Object.keys(t).map((function(e){return(0,A.jsx)(Le.Z.List,{children:t[e].map((function(t,n){return(0,A.jsx)(Le.Z.Item,{label:t},"entity-".concat(e,"-").concat(n))}))},e)}))}));return(0,A.jsx)(A.Fragment,{children:t})};var De=n(27361),Be=n.n(De);function Ze(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 Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(n),!0).forEach((function(t){te()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ue="DELETABLE",ze=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.rootEntity,o=r.entityName,i=r.entityLabel,a=r.key;if(a.includes("/")){var s=a.split("/"),c=P()(s,2),l=c[0],u=c[1];return Fe(Fe({},e),{},te()({},l,{entityLabel:i,keys:[].concat(S()(Be()(e,[l,"keys"],[])),S()(n?[u]:[]))}))}return Fe(Fe({},e),{},te()({},o,{entityLabel:i,keys:[].concat(S()(Be()(e,[o,"keys"],[])),S()(n?[a]:[]))}))},He=function(e){return e.rootEntity.deleteStatus===Ue&&!e.affectedEntities.find((function(e){return e.deleteStatus!==Ue}))},We=function(e,t){var n=e.entitiesToDelete;return n.reduce((function(e,n){var r=He(n),o=r?"relatedDeletable":"relatedNotDeletable";return Fe(Fe(Fe({},e),{},{rootEntitiesDeletable:ze(e.rootEntitiesDeletable,n,r)},!r&&{rootEntitiesNotDeletable:ze(e.rootEntitiesNotDeletable,n)}),{},te()({},o,function(e,t,n,r){return Fe({},t.affectedEntities.reduce((function(e,t){return Fe(Fe({},e),n||t.deleteStatus!==Ue?te()({},t.entityName,Fe(Fe({},Be()(e,t.entityName,{keys:[],keysOtherBu:[],entityLabel:t.entityLabel})),null===t.businessUnitId||t.businessUnitId===r?{keys:Array.from(new Set([].concat(S()(Be()(e,[t.entityName,"keys"],[])),[t.key])))}:{keysOtherBu:Array.from(new Set([].concat(S()(Be()(e,[t.entityName,"keysOtherBu"],[])),[t.key])))})):{})}),Fe({},e)))}(e[o],n,r,t)))}),{rootEntitiesDeletable:{},rootEntitiesNotDeletable:{},relatedDeletable:{},relatedNotDeletable:{},hasUnreadableEntities:!!n.find((function(e){return e.unreadableEntities}))})},Ye=function(e){var t=e.entitiesToDelete;return{entityName:Be()(t,"[0].rootEntity.entityName"),keys:t.reduce((function(e,t){return[].concat(S()(e),S()(He(t)?[t.rootEntity.key]:[]))}),[])}},qe=i().shape({entityLabel:i().string,keys:i().arrayOf(i().string),keysOtherBu:i().arrayOf(i().string)}),Qe=(i().shape({rootEntitiesDeletable:i().objectOf(qe).isRequired,rootEntitiesNotDeletable:i().objectOf(qe).isRequired,relatedDeletable:i().objectOf(qe).isRequired,relatedNotDeletable:i().objectOf(qe).isRequired,hasUnreadableEntities:i().bool}),je().mark(nt)),$e=je().mark(rt),Ve=je().mark(ot),Ge=je().mark(it),Ke=je().mark(at),Xe=je().mark(st),Je=function(e){return e.input},et=function(e){return e.intl.messages},tt=function(e){return e.del.entitiesToDelete};function nt(){var e,t,n;return je().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Me.Ys)(Je);case 2:return e=r.sent,t=e.selection,r.next=6,(0,Me.RE)(u.Z.getEntities,t,Te.Z.fetchAllEntities);case 6:return n=r.sent,r.abrupt("return",{entityModel:n.entityName,keys:n.keys});case 8:case"end":return r.stop()}}),Qe)}function rt(){var e,t;return je().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Me.Ys)(Je);case 2:return e=n.sent,t=e.customDeleteEndpoint,n.abrupt("return",t||"client/delete");case 5:case"end":return n.stop()}}),$e)}function ot(){var e,t,n,r,o,i,a,s;return je().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,Me.RE)(nt);case 2:return e=c.sent,c.next=5,(0,Me.RE)(rt);case 5:return t=c.sent,c.next=8,(0,Me.$6)([(0,Me.RE)(Te.Z.requestSaga,"".concat(t,"/dialog"),{method:"POST",body:e}),(0,Me.RE)(Te.Z.fetchPrincipal)]);case 8:return n=c.sent,r=P()(n,2),o=r[0],i=r[1],c.next=14,(0,Me.RE)(We,o.body,i.currentBusinessUnit.id);case 14:return a=c.sent,c.next=17,(0,Me.gz)(b(a));case 17:return c.next=19,(0,Me.RE)(Ye,o.body);case 19:return s=c.sent,c.next=22,(0,Me.gz)(w(s));case 22:case"end":return c.stop()}}),Ve)}function it(){var e,t,n,r,o,i,a,s;return je().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(0,Me.Ys)(tt);case 2:return e=l.sent,l.next=5,(0,Me.gz)({type:y,payload:{deletingInProgress:!0}});case 5:return l.next=7,(0,Me.RE)(rt);case 7:return t=l.sent,l.next=10,(0,Me.RE)(Te.Z.requestSaga,t,{method:"POST",body:{entityModel:e.entityName,keys:e.keys},acceptedErrorCodes:["VALIDATION_FAILED"],acceptedStatusCodes:[500,400,409]});case 10:return n=l.sent,l.next=13,(0,Me.Ys)(et);case 13:if(r=l.sent,!n.ok){l.next=22;break}return o=n.body,i=Object.keys(o.deletedEntities).reduce((function(e,t){return[].concat(S()(e),S()(o.deletedEntities[t].map((function(e){return{entityName:t,key:e}}))))}),[]),a=[{type:"entity-delete-event",payload:{entities:i}}],l.next=20,(0,Me.gz)(c.Z.fireExternalEvent("onSuccess",{message:r["client.delete.successfullyMessage"],remoteEvents:a}));case 20:l.next=35;break;case 22:if(409!==n.status||!n.body.information){l.next=27;break}return l.next=25,(0,Me.gz)(c.Z.fireExternalEvent("onError",{message:n.body.information}));case 25:l.next=35;break;case 27:if(400!==n.status||"VALIDATION_FAILED"!==n.body.errorCode){l.next=33;break}return s=function(){return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{children:r["client.delete.validationErrorMessage"]}),(0,A.jsx)(Ae,{errors:n.body.errors})]})},l.next=31,(0,Me.gz)(c.Z.fireExternalEvent("onError",{message:s}));case 31:l.next=35;break;case 33:return l.next=35,(0,Me.gz)(c.Z.fireExternalEvent("onError",{message:r["client.delete.errorMessage"]}));case 35:case"end":return l.stop()}}),Ge)}function at(){return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Me.gz)(c.Z.fireExternalEvent("onCancel"));case 2:case"end":return e.stop()}}),Ke)}function st(){return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Me.$6)([(0,Me.Fm)(p,ot),(0,Me.Fm)(m,it),(0,Me.Fm)(g,at)]);case 2:case"end":return e.stop()}}),Xe)}const ct={del:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Re,t=arguments.length>1?arguments[1]:void 0,n=Se[t.type];return n?n(e,t):e}};var lt,ut=[st],dt="delete",ft=["onSuccess","onCancel","onError","emitAction"],pt=function(e,t,n,r){var o=lt||(lt=(0,A.jsx)(Ne,{})),i=s.Z.createStore(ct,ut,t,dt);a.Z.addToStore(i,(function(e){return e.input.emitAction}));var u=!n.emitAction;return l.Z.addToStore(i,u),c.Z.addToStore(i,(function(e){return s.Z.getEvents(ft,e.input)})),s.Z.createApp(dt,o,i,{input:t,events:n,actions:[],publicPath:r,textResourceModules:["component","common",dt]})};s.Z.registerAppInRegistry(dt,pt);var ht=function(e){return s.Z.useApp({initApp:pt,props:e,packageName:dt,externalEvents:ft}).component};ht.propTypes={selection:u.Z.propType.isRequired,customDeleteEndpoint:i().string};const mt=ht;s.Z.createBundleableApp(dt,pt,ht)},73665:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n(45697),o=n.n(r);const i={ID:"ID",QUERY:"QUERY"},a=o().shape({entityName:o().string.isRequired,ids:function(e,t,n){if(e.selection&&e.selection.type===i.ID&&!e.selection[t])return new Error("Selection.ids prop not defined. Component: ".concat(n,"'."))},query:function(e,t,n){if(e.selection&&e.selection.type===i.QUERY&&!e.selection[t])return new Error("Selection.query prop not defined. Component: ".concat(n,"'."))},type:o().oneOf(Object.keys(i)).isRequired,count:o().number});var s=n(59713),c=n.n(s),l=n(87757),u=n.n(l),d=n(34857),f=u().mark(m);function p(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 h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){var n,r;return u().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(n=e.entityName,e.type!==i.QUERY){o.next=6;break}return o.next=4,(0,d.RE)(t,e.entityName,h({},e.query));case 4:return r=o.sent,o.abrupt("return",{entityName:n,keys:r.map((function(e){return e.key}))});case 6:return o.abrupt("return",{entityName:n,keys:e.ids});case 7:case"end":return o.stop()}}),f)}const y={getEntities:m,getSingleKey:function(e,t){if(e.entityName!==t)throw new Error("Only selection of ".concat(t," supported"));if("ID"!==e.type)throw new Error("Only ID selection type supported");if(!e.ids||1!==e.ids.length)throw new Error("Exactly one ".concat(t," must be selected"));return e.ids[0]},propType:a,selectionTypes:i}},36392:(e,t,n)=>{"use strict";n.d(t,{lX:()=>k});var r=n(30670),o=n.n(r),i=n(41143),a=n.n(i),s=n(14149),c=(n(54545),function(e){return"/"===e.charAt(0)?e:"/"+e}),l=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},u=function(e,t){return l(e,t)?e.substr(t.length):e},d=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},f=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h=function(e,t,n,r){var o=void 0;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=p({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=(0,s.default)(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o};const m=function(){var e=null,t=[];return{setPrompt:function(t){return o()(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,i):(o()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},appendListener:function(e){var n=!0,r=function(){n&&e.apply(void 0,arguments)};return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}};var y=!("undefined"==typeof window||!window.document||!window.document.createElement),g=function(e,t,n){return e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},v=function(e,t,n){return e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},b=function(e,t){return t(window.confirm(e))},E=function(){var e=window.navigator.userAgent;return(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&(window.history&&"pushState"in window.history)},w=function(){return-1===window.navigator.userAgent.indexOf("Trident")},O=function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")},x="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},C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_="popstate",N="hashchange",I=function(){try{return window.history.state||{}}catch(e){return{}}};const k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a()(y,"Browser history needs a DOM");var t=window.history,n=E(),r=!w(),i=e.forceRefresh,s=void 0!==i&&i,p=e.getUserConfirmation,k=void 0===p?b:p,S=e.keyLength,R=void 0===S?6:S,P=e.basename?d(c(e.basename)):"",j=function(e){var t=e||{},n=t.key,r=t.state,i=window.location,a=i.pathname+i.search+i.hash;return o()(!P||l(a,P),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+P+'".'),P&&(a=u(a,P)),h(a,r,n)},M=function(){return Math.random().toString(36).substr(2,R)},T=m(),L=function(e){C(ee,e),ee.length=t.length,T.notifyListeners(ee.location,ee.action)},A=function(e){O(e)||Z(j(e.state))},D=function(){Z(j(I()))},B=!1,Z=function(e){if(B)B=!1,L();else{T.confirmTransitionTo(e,"POP",k,(function(t){t?L({action:"POP",location:e}):F(e)}))}},F=function(e){var t=ee.location,n=z.indexOf(t.key);-1===n&&(n=0);var r=z.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(B=!0,q(o))},U=j(I()),z=[U.key],H=function(e){return P+f(e)},W=function(e,r){o()(!("object"===(void 0===e?"undefined":x(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i="PUSH",a=h(e,r,M(),ee.location);T.confirmTransitionTo(a,i,k,(function(e){if(e){var r=H(a),c=a.key,l=a.state;if(n)if(t.pushState({key:c,state:l},null,r),s)window.location.href=r;else{var u=z.indexOf(ee.location.key),d=z.slice(0,-1===u?0:u+1);d.push(a.key),z=d,L({action:i,location:a})}else o()(void 0===l,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}}))},Y=function(e,r){o()(!("object"===(void 0===e?"undefined":x(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i="REPLACE",a=h(e,r,M(),ee.location);T.confirmTransitionTo(a,i,k,(function(e){if(e){var r=H(a),c=a.key,l=a.state;if(n)if(t.replaceState({key:c,state:l},null,r),s)window.location.replace(r);else{var u=z.indexOf(ee.location.key);-1!==u&&(z[u]=a.key),L({action:i,location:a})}else o()(void 0===l,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}}))},q=function(e){t.go(e)},Q=function(){return q(-1)},$=function(){return q(1)},V=0,G=function(e){1===(V+=e)?(g(window,_,A),r&&g(window,N,D)):0===V&&(v(window,_,A),r&&v(window,N,D))},K=!1,X=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=T.setPrompt(e);return K||(G(1),K=!0),function(){return K&&(K=!1,G(-1)),t()}},J=function(e){var t=T.appendListener(e);return G(1),function(){G(-1),t()}},ee={length:t.length,action:"POP",location:U,createHref:H,push:W,replace:Y,go:q,goBack:Q,goForward:$,block:X,listen:J};return ee};Object.assign;"function"==typeof Symbol&&Symbol.iterator,Object.assign},96425:(e,t,n)=>{var r=n(3118),o=n(9435);function i(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}i.prototype=r(o.prototype),i.prototype.constructor=i,e.exports=i},7548:(e,t,n)=>{var r=n(3118),o=n(9435);function i(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}i.prototype=r(o.prototype),i.prototype.constructor=i,e.exports=i},9435:e=>{e.exports=function(){}},28045:e=>{e.exports=function(e){return e}},52157:e=>{var t=Math.max;e.exports=function(e,n,r,o){for(var i=-1,a=e.length,s=r.length,c=-1,l=n.length,u=t(a-s,0),d=Array(l+u),f=!o;++c<l;)d[c]=n[c];for(;++i<s;)(f||i<a)&&(d[r[i]]=e[i]);for(;u--;)d[c++]=e[i++];return d}},14054:e=>{var t=Math.max;e.exports=function(e,n,r,o){for(var i=-1,a=e.length,s=-1,c=r.length,l=-1,u=n.length,d=t(a-c,0),f=Array(d+u),p=!o;++i<d;)f[i]=e[i];for(var h=i;++l<u;)f[h+l]=n[l];for(;++s<c;)(p||i<a)&&(f[h+r[s]]=e[i++]);return f}},97991:e=>{e.exports=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}},22402:(e,t,n)=>{var r=n(71774),o=n(55639);e.exports=function(e,t,n){var i=1&t,a=r(e);return function t(){var r=this&&this!==o&&this instanceof t?a:e;return r.apply(i?n:this,arguments)}}},71774:(e,t,n)=>{var r=n(3118),o=n(13218);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),i=e.apply(n,t);return o(i)?i:n}}},46347:(e,t,n)=>{var r=n(96874),o=n(71774),i=n(86935),a=n(94487),s=n(20893),c=n(46460),l=n(55639);e.exports=function(e,t,n){var u=o(e);return function o(){for(var d=arguments.length,f=Array(d),p=d,h=s(o);p--;)f[p]=arguments[p];var m=d<3&&f[0]!==h&&f[d-1]!==h?[]:c(f,h);if((d-=m.length)<n)return a(e,t,i,o.placeholder,void 0,f,m,void 0,void 0,n-d);var y=this&&this!==l&&this instanceof o?u:e;return r(y,this,f)}}},23468:(e,t,n)=>{var r=n(7548),o=n(99021),i=n(66833),a=n(97658),s=n(1469),c=n(86528);e.exports=function(e){return o((function(t){var n=t.length,o=n,l=r.prototype.thru;for(e&&t.reverse();o--;){var u=t[o];if("function"!=typeof u)throw new TypeError("Expected a function");if(l&&!d&&"wrapper"==a(u))var d=new r([],!0)}for(o=d?o:n;++o<n;){u=t[o];var f=a(u),p="wrapper"==f?i(u):void 0;d=p&&c(p[0])&&424==p[1]&&!p[4].length&&1==p[9]?d[a(p[0])].apply(d,p[3]):1==u.length&&c(u)?d[f]():d.thru(u)}return function(){var e=arguments,r=e[0];if(d&&1==e.length&&s(r))return d.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}},86935:(e,t,n)=>{var r=n(52157),o=n(14054),i=n(97991),a=n(71774),s=n(94487),c=n(20893),l=n(90451),u=n(46460),d=n(55639);e.exports=function e(t,n,f,p,h,m,y,g,v,b){var E=128&n,w=1&n,O=2&n,x=24&n,C=512&n,_=O?void 0:a(t);return function N(){for(var I=arguments.length,k=Array(I),S=I;S--;)k[S]=arguments[S];if(x)var R=c(N),P=i(k,R);if(p&&(k=r(k,p,h,x)),m&&(k=o(k,m,y,x)),I-=P,x&&I<b){var j=u(k,R);return s(t,n,e,N.placeholder,f,k,j,g,v,b-I)}var M=w?f:this,T=O?M[t]:t;return I=k.length,g?k=l(k,g):C&&I>1&&k.reverse(),E&&v<I&&(k.length=v),this&&this!==d&&this instanceof N&&(T=_||a(T)),T.apply(M,k)}}},84375:(e,t,n)=>{var r=n(96874),o=n(71774),i=n(55639);e.exports=function(e,t,n,a){var s=1&t,c=o(e);return function t(){for(var o=-1,l=arguments.length,u=-1,d=a.length,f=Array(d+l),p=this&&this!==i&&this instanceof t?c:e;++u<d;)f[u]=a[u];for(;l--;)f[u++]=arguments[++o];return r(p,s?n:this,f)}}},94487:(e,t,n)=>{var r=n(86528),o=n(258),i=n(69255);e.exports=function(e,t,n,a,s,c,l,u,d,f){var p=8&t;t|=p?32:64,4&(t&=~(p?64:32))||(t&=-4);var h=[e,t,s,p?c:void 0,p?l:void 0,p?void 0:c,p?void 0:l,u,d,f],m=n.apply(void 0,h);return r(e)&&o(m,h),m.placeholder=a,i(m,e,t)}},97727:(e,t,n)=>{var r=n(28045),o=n(22402),i=n(46347),a=n(86935),s=n(84375),c=n(66833),l=n(63833),u=n(258),d=n(69255),f=n(40554),p=Math.max;e.exports=function(e,t,n,h,m,y,g,v){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var E=h?h.length:0;if(E||(t&=-97,h=m=void 0),g=void 0===g?g:p(f(g),0),v=void 0===v?v:f(v),E-=m?m.length:0,64&t){var w=h,O=m;h=m=void 0}var x=b?void 0:c(e),C=[e,t,n,h,m,w,O,y,g,v];if(x&&l(C,x),e=C[0],t=C[1],n=C[2],h=C[3],m=C[4],!(v=C[9]=void 0===C[9]?b?0:e.length:p(C[9]-E,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?i(e,t,v):32!=t&&33!=t||m.length?a.apply(void 0,C):s(e,t,n,h);else var _=o(e,t,n);return d((x?r:u)(_,C),e,t)}},66833:e=>{e.exports=function(){}},97658:(e,t,n)=>{var r=n(52060),o=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",n=r[t],i=o.call(r,t)?n.length:0;i--;){var a=n[i],s=a.func;if(null==s||s==e)return a.name}return t}},20893:e=>{e.exports=function(){}},86528:(e,t,n)=>{var r=n(96425),o=n(66833),i=n(97658),a=n(8111);e.exports=function(e){var t=i(e),n=a[t];if("function"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var s=o(n);return!!s&&e===s[0]}},63833:e=>{e.exports=function(e){return e}},52060:e=>{e.exports={}},90451:(e,t,n)=>{var r=n(278),o=n(65776),i=Math.min;e.exports=function(e,t){for(var n=e.length,a=i(t.length,n),s=r(e);a--;){var c=t[a];e[a]=o(c,n)?s[c]:void 0}return e}},46460:e=>{e.exports=function(){return[]}},258:e=>{e.exports=function(e){return e}},69255:e=>{e.exports=function(e){return e}},60169:(e,t,n)=>{var r=n(96425),o=n(7548),i=n(278);e.exports=function(e){if(e instanceof r)return e.clone();var t=new o(e.__wrapped__,e.__chain__);return t.__actions__=i(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},40087:(e,t,n)=>{var r=n(97727);function o(e,t,n){var i=r(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return i.placeholder=o.placeholder,i}o.placeholder={},e.exports=o},59242:(e,t,n)=>{var r=n(23468)();e.exports=r},8111:(e,t,n)=>{var r=n(96425),o=n(7548),i=n(9435),a=n(1469),s=n(37005),c=n(60169),l=Object.prototype.hasOwnProperty;function u(e){if(s(e)&&!a(e)&&!(e instanceof r)){if(e instanceof o)return e;if(l.call(e,"__wrapped__"))return c(e)}return new o(e)}u.prototype=i.prototype,u.prototype.constructor=u,e.exports=u},84059:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>N});var r,o=n(1024),i=n.n(o),a=Object.defineProperty,s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d=(e,t)=>{for(var n in t||(t={}))c.call(t,n)&&u(e,n,t[n]);if(s)for(var n of s(t))l.call(t,n)&&u(e,n,t[n]);return e},f=(e,t)=>{var n={};for(var r in e)c.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&s)for(var r of s(e))t.indexOf(r)<0&&l.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,o){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let a=[];for(let e=0;e<this.size;e++)a.push(!1);for(let e=0;e<this.size;e++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();const s=this.addEccAndInterleave(r);if(this.drawCodewords(s),-1==o){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(o=t,e=n),this.applyMask(t)}}i(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(n,r){const o=e.QrSegment.makeSegments(n);return t.encodeSegments(o,r)}static encodeBinary(n,r){const o=e.QrSegment.makeBytes(n);return t.encodeSegments([o],r)}static encodeSegments(e,n,o=1,a=40,c=-1,l=!0){if(!(t.MIN_VERSION<=o&&o<=a&&a<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=o;;u++){const r=8*t.getNumDataCodewords(u,n),o=s.getTotalBits(e,u);if(o<=r){d=o;break}if(u>=a)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let f=[];for(const t of e){r(t.mode.modeBits,4,f),r(t.numChars,t.mode.numCharCountBits(u),f);for(const e of t.getData())f.push(e)}i(f.length==d);const p=8*t.getNumDataCodewords(u,n);i(f.length<=p),r(0,Math.min(4,p-f.length),f),r(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.length<p;e^=253)r(e,8,f);let h=[];for(;8*h.length<f.length;)h.push(0);return f.forEach(((e,t)=>h[t>>>3]|=e<<7-(7&t))),new t(u,n,h,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);i(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,o(r,e));this.setFunctionModule(8,7,o(r,6)),this.setFunctionModule(8,8,o(r,7)),this.setFunctionModule(7,8,o(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,o(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,o(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,o(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){const n=o(t,e),r=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(r,i,n),this.setFunctionModule(i,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const o=Math.max(Math.abs(r),Math.abs(n)),i=e+r,a=t+n;0<=i&&i<this.size&&0<=a&&a<this.size&&this.setFunctionModule(i,a,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const o=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],a=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],s=Math.floor(t.getNumRawDataModules(n)/8),c=o-s%o,l=Math.floor(s/o);let u=[];const d=t.reedSolomonComputeDivisor(a);for(let n=0,r=0;n<o;n++){let o=e.slice(r,r+l-a+(n<c?0:1));r+=o.length;const i=t.reedSolomonComputeRemainder(o,d);n<c&&o.push(0),u.push(o.concat(i))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,n)=>{(e!=l-a||n>=c)&&f.push(t[e])}));return i(f.length==s),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const a=t-i,s=0==(t+1&2)?this.size-1-r:r;!this.isFunction[s][a]&&n<8*e.length&&(this.modules[s][a]=o(e[n>>>3],7-(7&n)),n++)}}i(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,o=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[n][a]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[n][a],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,i)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,o=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][n]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),r||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),r=this.modules[a][n],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,i)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const o=this.modules[n][r];o==this.modules[n][r+1]&&o==this.modules[n+1][r]&&o==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,o=Math.ceil(Math.abs(20*n-10*r)/r)-1;return i(0<=o&&o<=9),e+=o*t.PENALTY_N4,i(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return i(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let o=0;o<e;o++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const o of e){const e=o^r.shift();r.push(0),n.forEach(((n,o)=>r[o]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return i(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];i(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function o(e,t){return 0!=(e>>>t&1)}function i(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const a=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new a(a.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!a.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const o=Math.min(e.length-n,3);r(parseInt(e.substr(n,o),10),3*o+1,t),n+=o}return new a(a.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!a.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let o=45*a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));o+=a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(o,11,n)}return t<e.length&&r(a.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new a(a.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:a.isNumeric(e)?[a.makeNumeric(e)]:a.isAlphanumeric(e)?[a.makeAlphanumeric(e)]:[a.makeBytes(a.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new a(a.Mode.ECI,0,t)}static isNumeric(e){return a.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return a.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let s=a;s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=s})(r||(r={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})(t=e.QrCode||(e.QrCode={}))})(r||(r={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(t=e.QrSegment||(e.QrSegment={}))})(r||(r={}));var p=r,h={L:p.QrCode.Ecc.LOW,M:p.QrCode.Ecc.MEDIUM,Q:p.QrCode.Ecc.QUARTILE,H:p.QrCode.Ecc.HIGH},m=128,y="L",g="#FFFFFF",v="#000000",b=!1;
|
|
2
|
+
/**
|
|
3
|
+
* @license qrcode.react
|
|
4
|
+
* Copyright (c) Paul O'Shannessy
|
|
5
|
+
* SPDX-License-Identifier: ISC
|
|
6
|
+
*/function E(e,t=0){const n=[];return e.forEach((function(e,r){let o=null;e.forEach((function(i,a){if(!i&&null!==o)return n.push(`M${o+t} ${r+t}h${a-o}v1H${o+t}z`),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?n.push(`M${a+t},${r+t} h1v1H${a+t}z`):n.push(`M${o+t},${r+t} h${a+1-o}v1H${o+t}z`)}}))})),n.join("")}function w(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function O(e,t,n,r){if(null==r)return null;const o=n?4:0,i=e.length+2*o,a=Math.floor(.1*t),s=i/t,c=(r.width||a)*s,l=(r.height||a)*s,u=null==r.x?e.length/2-c/2:r.x*s,d=null==r.y?e.length/2-l/2:r.y*s;let f=null;if(r.excavate){let e=Math.floor(u),t=Math.floor(d);f={x:e,y:t,w:Math.ceil(c+u-e),h:Math.ceil(l+d-t)}}return{x:u,y:d,h:l,w:c,excavation:f}}var x=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function C(e){const t=e,{value:n,size:r=m,level:a=y,bgColor:s=g,fgColor:c=v,includeMargin:l=b,style:u,imageSettings:C}=t,_=f(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),N=null==C?void 0:C.src,I=(0,o.useRef)(null),k=(0,o.useRef)(null),[S,R]=(0,o.useState)(!1);(0,o.useEffect)((()=>{if(null!=I.current){const e=I.current,t=e.getContext("2d");if(!t)return;let o=p.QrCode.encodeText(n,h[a]).getModules();const i=l?4:0,u=o.length+2*i,d=O(o,r,l,C),f=k.current,m=null!=d&&null!==f&&f.complete&&0!==f.naturalHeight&&0!==f.naturalWidth;m&&null!=d.excavation&&(o=w(o,d.excavation));const y=window.devicePixelRatio||1;e.height=e.width=r*y;const g=r/u*y;t.scale(g,g),t.fillStyle=s,t.fillRect(0,0,u,u),t.fillStyle=c,x?t.fill(new Path2D(E(o,i))):o.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+i,n+i,1,1)}))})),m&&t.drawImage(f,d.x+i,d.y+i,d.w,d.h)}})),(0,o.useEffect)((()=>{R(!1)}),[N]);const P=d({height:r,width:r},u);let j=null;return null!=N&&(j=i().createElement("img",{src:N,key:N,style:{display:"none"},onLoad:()=>{R(!0)},ref:k})),i().createElement(i().Fragment,null,i().createElement("canvas",d({style:P,height:r,width:r,ref:I},_)),j)}function _(e){const t=e,{value:n,size:r=m,level:o=y,bgColor:a=g,fgColor:s=v,includeMargin:c=b,imageSettings:l}=t,u=f(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let x=p.QrCode.encodeText(n,h[o]).getModules();const C=c?4:0,_=x.length+2*C,N=O(x,r,c,l);let I=null;null!=l&&null!=N&&(null!=N.excavation&&(x=w(x,N.excavation)),I=i().createElement("image",{xlinkHref:l.src,height:N.h,width:N.w,x:N.x+C,y:N.y+C,preserveAspectRatio:"none"}));const k=E(x,C);return i().createElement("svg",d({height:r,width:r,viewBox:`0 0 ${_} ${_}`},u),i().createElement("path",{fill:a,d:`M0,0 h${_}v${_}H0z`,shapeRendering:"crispEdges"}),i().createElement("path",{fill:s,d:k,shapeRendering:"crispEdges"}),I)}var N=e=>{const t=e,{renderAs:n}=t,r=f(t,["renderAs"]);return"svg"===n?i().createElement(_,d({},r)):i().createElement(C,d({},r))}},36104:(e,t,n)=>{"use strict";var r=n(82637);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},9657:(e,t,n)=>{e.exports=n(36104)()},82637:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},14510:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e){return e&&e.__esModule?e:{default:e}}var a=n(1024),s=i(a),c=i(n(59479)),l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var c=s.get;if(void 0===c)return;return c.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,n=a,r=!0,s=l=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.state={hover:!1}}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"getLineStyle",value:function(e){return r({position:"absolute",height:"20%",left:0,right:0,top:2*e*20+"%",opacity:this.state.hover?.6:1},this.state.hover&&this.props.styles.bmBurgerBarsHover)}},{key:"render",value:function(){var e=this,t=void 0;if(this.props.customIcon){var n={className:("bm-icon "+(this.props.customIcon.props.className||"")).trim(),style:r({width:"100%",height:"100%"},this.props.styles.bmIcon)};t=s.default.cloneElement(this.props.customIcon,n)}else t=s.default.createElement("span",null,[0,1,2].map((function(t){return s.default.createElement("span",{key:t,className:("bm-burger-bars "+e.props.barClassName+" "+(e.state.hover?"bm-burger-bars-hover":"")).trim(),style:r({},e.getLineStyle(t),e.props.styles.bmBurgerBars)})})));return s.default.createElement("div",{className:("bm-burger-button "+this.props.className).trim(),style:r({zIndex:1e3},this.props.styles.bmBurgerButton)},s.default.createElement("button",{type:"button",id:"react-burger-menu-btn",onClick:this.props.onClick,onMouseOver:function(){e.setState({hover:!0}),e.props.onIconHoverChange&&e.props.onIconHoverChange({isMouseIn:!0})},onMouseOut:function(){e.setState({hover:!1}),e.props.onIconHoverChange&&e.props.onIconHoverChange({isMouseIn:!1})},style:{position:"absolute",left:0,top:0,zIndex:1,width:"100%",height:"100%",margin:0,padding:0,border:"none",fontSize:0,background:"transparent",cursor:"pointer"}},"Open Menu"),t)}}]),t}(a.Component);t.default=l,l.propTypes={barClassName:c.default.string,customIcon:c.default.element,styles:c.default.object},l.defaultProps={barClassName:"",className:"",styles:{}},e.exports=t.default},75430:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var c=s.get;if(void 0===c)return;return c.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,n=a,r=!0,s=l=void 0}};function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var c=n(1024),l=a(c),u=a(n(59479)),d=function(e){function t(){s(this,t),i(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"getCrossStyle",value:function(e){return{position:"absolute",width:3,height:14,transform:"before"===e?"rotate(45deg)":"rotate(-45deg)"}}},{key:"render",value:function(){var e,t=this;if(this.props.customIcon){var n={className:("bm-cross "+(this.props.customIcon.props.className||"")).trim(),style:r({width:"100%",height:"100%"},this.props.styles.bmCross)};e=l.default.cloneElement(this.props.customIcon,n)}else e=l.default.createElement("span",{style:{position:"absolute",top:"6px",right:"14px"}},["before","after"].map((function(e,n){return l.default.createElement("span",{key:n,className:("bm-cross "+t.props.crossClassName).trim(),style:r({},t.getCrossStyle(e),t.props.styles.bmCross)})})));return l.default.createElement("div",{className:("bm-cross-button "+this.props.className).trim(),style:r({},{position:"absolute",width:24,height:24,right:8,top:8},this.props.styles.bmCrossButton)},l.default.createElement("button",r({type:"button",id:"react-burger-cross-btn",onClick:this.props.onClick,style:{position:"absolute",left:0,top:0,zIndex:1,width:"100%",height:"100%",margin:0,padding:0,border:"none",fontSize:0,background:"transparent",cursor:"pointer"}},!this.props.isOpen&&{tabIndex:-1}),"Close Menu"),e)}}]),t}(c.Component);t.default=d,d.propTypes={crossClassName:u.default.string,customIcon:u.default.element,isOpen:u.default.bool,styles:u.default.object},d.defaultProps={crossClassName:"",className:"",styles:{},isOpen:!1},e.exports=t.default},86661:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={overlay:function(e){return{position:"fixed",zIndex:1e3,width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.3)",opacity:e?1:0,MozTransform:e?"":"translate3d(100%, 0, 0)",MsTransform:e?"":"translate3d(100%, 0, 0)",OTransform:e?"":"translate3d(100%, 0, 0)",WebkitTransform:e?"":"translate3d(100%, 0, 0)",transform:e?"":"translate3d(100%, 0, 0)",transition:e?"opacity 0.3s":"opacity 0.3s, transform 0s 0.3s"}},menuWrap:function(e,t,n){return{position:"fixed",right:n?0:"inherit",zIndex:1100,width:t,height:"100%",MozTransform:e?"":n?"translate3d(100%, 0, 0)":"translate3d(-100%, 0, 0)",MsTransform:e?"":n?"translate3d(100%, 0, 0)":"translate3d(-100%, 0, 0)",OTransform:e?"":n?"translate3d(100%, 0, 0)":"translate3d(-100%, 0, 0)",WebkitTransform:e?"":n?"translate3d(100%, 0, 0)":"translate3d(-100%, 0, 0)",transform:e?"":n?"translate3d(100%, 0, 0)":"translate3d(-100%, 0, 0)",transition:"all 0.5s"}},menu:function(){return{height:"100%",boxSizing:"border-box",overflow:"auto"}},itemList:function(){return{height:"100%"}},item:function(){return{display:"block"}}},e.exports=t.default},74660:(e,t)=>{"use strict";function n(){var e=Array.from(document.getElementsByClassName("bm-item")).shift();e&&e.focus()}function r(){var e=Array.from(document.getElementsByClassName("bm-item")).pop();e&&e.focus()}function o(){var e=document.getElementById("react-burger-cross-btn");e&&e.focus()}function i(e){if(document.activeElement.className.includes("bm-item")){var t=document.activeElement[e];t?t.focus():o()}else"previousElementSibling"===e?r():n()}Object.defineProperty(t,"__esModule",{value:!0}),t.focusOnFirstMenuItem=n,t.focusOnLastMenuItem=r,t.focusOnCrossButton=o,t.focusOnMenuButton=function(){var e=document.getElementById("react-burger-menu-btn");e&&e.focus()},t.focusOnMenuItem=i,t.focusOnNextMenuItem=function(){i("nextElementSibling")},t.focusOnPreviousMenuItem=function(){i("previousElementSibling")}},14126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function i(e){return e&&e.__esModule?e:{default:e}}var a=i(n(1024)),s=(i(n(30314)),i(n(59479))),c=i(n(86661)),l=n(74660),u=i(n(14510)),d=i(n(75430));t.default=function(e){if(!e)throw new Error("No styles supplied");var t="ArrowDown",n="ArrowUp";var i=function(i){var s,f,p=a.default.useState(!1),h=r(p,2),m=h[0],y=h[1],g=a.default.useRef(),v=a.default.useRef({}),b=(s=i.isOpen,f=a.default.useRef(s),a.default.useEffect((function(){f.current=s})),f.current);function E(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];v.current=e,_(),setTimeout((function(){y((function(t){return void 0!==e.isOpen?e.isOpen:!t}))}))}function w(){"function"==typeof i.onClose?i.onClose():E()}function O(e,t){var n=i.width,r=i.right;return e(m,"string"!=typeof n?n+"px":n,r,t)}function x(t,n,r){var a="bm"+t.replace(t.charAt(0),t.charAt(0).toUpperCase()),s=c.default[t]?O(c.default[t]):{};return e[t]&&(s=o({},s,O(e[t],n+1))),i.styles[a]&&(s=o({},s,i.styles[a])),r&&(s=o({},s,r)),i.noTransition&&delete s.transition,s}function C(e,t,n){var r=document.getElementById(e);if(r){var o=O(t);for(var a in o)o.hasOwnProperty(a)&&(r.style[a]=n?o[a]:"");var s=function(e){return e.style["overflow-x"]=n?"hidden":""};i.htmlClassName||s(document.querySelector("html")),i.bodyClassName||s(document.querySelector("body"))}else console.error("Element with ID '"+e+"' not found")}function _(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0],n=function(e,n){return e.classList[t?"add":"remove"](n)};i.htmlClassName&&n(document.querySelector("html"),i.htmlClassName),i.bodyClassName&&n(document.querySelector("body"),i.bodyClassName),e.pageWrap&&i.pageWrapId&&C(i.pageWrapId,e.pageWrap,t),e.outerContainer&&i.outerContainerId&&C(i.outerContainerId,e.outerContainer,t);var r=document.querySelector(".bm-menu-wrap");r&&(t?r.removeAttribute("hidden"):r.setAttribute("hidden",!0))}function N(){g.current&&clearTimeout(g.current)}function I(e){switch((e=e||window.event).key){case"Escape":i.disableCloseOnEsc||(w(),(0,l.focusOnMenuButton)());break;case t:(0,l.focusOnNextMenuItem)();break;case n:(0,l.focusOnPreviousMenuItem)();break;case"Home":(0,l.focusOnFirstMenuItem)();break;case"End":(0,l.focusOnLastMenuItem)()}}function k(e){if((e=e||window.event).target===document.getElementById("react-burger-menu-btn"))switch(e.key){case t:case" ":E();break;case n:E({focusOnLastItem:!0})}}return a.default.useEffect((function(){return i.isOpen&&E({isOpen:!0,noStateChange:!0}),function(){_(!1),N()}}),[]),a.default.useEffect((function(){var t,n;void 0!==i.isOpen&&i.isOpen!==m&&i.isOpen!==b?E():e.svg&&(t=document.getElementById("bm-morph-shape"),n=e.svg.lib(t).select("path"),m?e.svg.animate(n):setTimeout((function(){n.attr("d",e.svg.pathInitial)}),300))})),a.default.useEffect((function(){var e=v.current,t=e.noStateChange,n=e.focusOnLastItem;t||i.onStateChange({isOpen:m}),i.disableAutoFocus||(m?n?(0,l.focusOnLastMenuItem)():(0,l.focusOnFirstMenuItem)():document.activeElement?document.activeElement.blur():document.body.blur()),N(),g.current=setTimeout((function(){g.current=null,m||_(!1)}),500);var r=m?I:k,o=i.customOnKeyDown||r;return window.addEventListener("keydown",o),function(){window.removeEventListener("keydown",o)}}),[m]),a.default.createElement("div",null,!i.noOverlay&&a.default.createElement("div",{className:("bm-overlay "+i.overlayClassName).trim(),onClick:function(){!0===i.disableOverlayClick||"function"==typeof i.disableOverlayClick&&i.disableOverlayClick()||w()},style:x("overlay")}),!1!==i.customBurgerIcon&&a.default.createElement("div",{style:x("burgerIcon")},a.default.createElement(u.default,{onClick:function(){"function"==typeof i.onOpen?i.onOpen():E()},styles:i.styles,customIcon:i.customBurgerIcon,className:i.burgerButtonClassName,barClassName:i.burgerBarClassName,onIconStateChange:i.onIconStateChange})),a.default.createElement("div",{id:i.id,className:("bm-menu-wrap "+i.className).trim(),style:x("menuWrap"),"aria-hidden":!m},e.svg&&a.default.createElement("div",{id:"bm-morph-shape",className:("bm-morph-shape "+i.morphShapeClassName).trim(),style:x("morphShape")},a.default.createElement("svg",{width:"100%",height:"100%",viewBox:"0 0 100 800",preserveAspectRatio:"none"},a.default.createElement("path",{d:e.svg.pathInitial}))),a.default.createElement("div",{className:("bm-menu "+i.menuClassName).trim(),style:x("menu")},a.default.createElement(i.itemListElement,{className:("bm-item-list "+i.itemListClassName).trim(),style:x("itemList")},a.default.Children.map(i.children,(function(e,t){if(e){var n=["bm-item",i.itemClassName,e.props.className].filter((function(e){return!!e})).join(" "),r=o({key:t,className:n,style:x("item",t,e.props.style)},!m&&{tabIndex:-1});return a.default.cloneElement(e,r)}})))),!1!==i.customCrossIcon&&a.default.createElement("div",{style:x("closeButton")},a.default.createElement(d.default,{onClick:w,styles:i.styles,customIcon:i.customCrossIcon,className:i.crossButtonClassName,crossClassName:i.crossClassName,isOpen:m}))))};return i.propTypes={bodyClassName:s.default.string,burgerBarClassName:s.default.string,burgerButtonClassName:s.default.string,className:s.default.string,crossButtonClassName:s.default.string,crossClassName:s.default.string,customBurgerIcon:s.default.oneOfType([s.default.element,s.default.oneOf([!1])]),customCrossIcon:s.default.oneOfType([s.default.element,s.default.oneOf([!1])]),customOnKeyDown:s.default.func,disableAutoFocus:s.default.bool,disableCloseOnEsc:s.default.bool,disableOverlayClick:s.default.oneOfType([s.default.bool,s.default.func]),htmlClassName:s.default.string,id:s.default.string,isOpen:s.default.bool,itemClassName:s.default.string,itemListClassName:s.default.string,itemListElement:s.default.oneOf(["div","nav"]),menuClassName:s.default.string,morphShapeClassName:s.default.string,noOverlay:s.default.bool,noTransition:s.default.bool,onClose:s.default.func,onIconHoverChange:s.default.func,onOpen:s.default.func,onStateChange:s.default.func,outerContainerId:e&&e.outerContainer?s.default.string.isRequired:s.default.string,overlayClassName:s.default.string,pageWrapId:e&&e.pageWrap?s.default.string.isRequired:s.default.string,right:s.default.bool,styles:s.default.object,width:s.default.oneOfType([s.default.number,s.default.string])},i.defaultProps={bodyClassName:"",burgerBarClassName:"",burgerButtonClassName:"",className:"",crossButtonClassName:"",crossClassName:"",disableAutoFocus:!1,disableCloseOnEsc:!1,htmlClassName:"",id:"",itemClassName:"",itemListClassName:"",menuClassName:"",morphShapeClassName:"",noOverlay:!1,noTransition:!1,onStateChange:function(){},outerContainerId:"",overlayClassName:"",pageWrapId:"",styles:{},width:300,onIconHoverChange:function(){},itemListElement:"nav"},i},e.exports=t.default},66432:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(14126),i=(r=o)&&r.__esModule?r:{default:r};t.default=(0,i.default)({}),e.exports=t.default},6830:(e,t,n)=>{"use strict";var r=n(41838);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},59479:(e,t,n)=>{e.exports=n(6830)()},41838:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},77678:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var r=n(1024),o=n.n(r),i=n(99860),a=n.n(i);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var l=function(e){var t,n;function r(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(c(t)),t.handleErrored=t.handleErrored.bind(c(t)),t.handleChange=t.handleChange.bind(c(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(c(t)),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getValue=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this.props.grecaptcha.getResponse(this._widgetId):null},i.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},i.execute=function(){var e=this.props.grecaptcha;if(e&&void 0!==this._widgetId)return e.execute(this._widgetId);this._executeRequested=!0},i.executeAsync=function(){var e=this;return new Promise((function(t,n){e.executionResolve=t,e.executionReject=n,e.execute()}))},i.reset=function(){this.props.grecaptcha&&void 0!==this._widgetId&&this.props.grecaptcha.reset(this._widgetId)},i.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},i.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},i.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},i.explicitRender=function(){if(this.props.grecaptcha&&this.props.grecaptcha.render&&void 0===this._widgetId){var e=document.createElement("div");this._widgetId=this.props.grecaptcha.render(e,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge}),this.captcha.appendChild(e)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},i.componentDidMount=function(){this.explicitRender()},i.componentDidUpdate=function(){this.explicitRender()},i.componentWillUnmount=function(){void 0!==this._widgetId&&(this.delayOfCaptchaIframeRemoving(),this.reset())},i.delayOfCaptchaIframeRemoving=function(){var e=document.createElement("div");for(document.body.appendChild(e),e.style.display="none";this.captcha.firstChild;)e.appendChild(this.captcha.firstChild);setTimeout((function(){document.body.removeChild(e)}),5e3)},i.handleRecaptchaRef=function(e){this.captcha=e},i.render=function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl"]));return o().createElement("div",s({},t,{ref:this.handleRecaptchaRef}))},r}(o().Component);l.displayName="ReCAPTCHA",l.propTypes={sitekey:a().string.isRequired,onChange:a().func,grecaptcha:a().object,theme:a().oneOf(["dark","light"]),type:a().oneOf(["image","audio"]),tabindex:a().number,onExpired:a().func,onErrored:a().func,size:a().oneOf(["compact","normal","invisible"]),stoken:a().string,hl:a().string,badge:a().oneOf(["bottomright","bottomleft","inline"])},l.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var u=n(9657),d=n.n(u),f=n(8679),p=n.n(f);function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var m={},y=0;var g="onloadcallback";var v,b;const E=(v=function(){return"https://"+(("undefined"!=typeof window&&window.recaptchaOptions||{}).useRecaptchaNet?"recaptcha.net":"www.google.com")+"/recaptcha/api.js?onload="+g+"&render=explicit"},b=(b={callbackName:g,globalName:"grecaptcha"})||{},function(e){var t=e.displayName||e.name||"Component",n=function(t){var n,o;function i(e,n){var r;return(r=t.call(this,e,n)||this).state={},r.__scriptURL="",r}o=t,(n=i).prototype=Object.create(o.prototype),n.prototype.constructor=n,n.__proto__=o;var a=i.prototype;return a.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+y++),this.__scriptLoaderID},a.setupScriptURL=function(){return this.__scriptURL="function"==typeof v?v():v,this.__scriptURL},a.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,(function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)}))},a.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=m[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var t in e.observers)e.observers[t](e);delete window[b.callbackName]},a.componentDidMount=function(){var e=this,t=this.setupScriptURL(),n=this.asyncScriptLoaderGetScriptLoaderID(),r=b,o=r.globalName,i=r.callbackName,a=r.scriptId;if(o&&void 0!==window[o]&&(m[t]={loaded:!0,observers:{}}),m[t]){var s=m[t];return s&&(s.loaded||s.errored)?void this.asyncScriptLoaderHandleLoad(s):void(s.observers[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var c={};c[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)},m[t]={loaded:!1,observers:c};var l=document.createElement("script");for(var u in l.src=t,l.async=!0,b.attributes)l.setAttribute(u,b.attributes[u]);a&&(l.id=a);var d=function(e){if(m[t]){var n=m[t].observers;for(var r in n)e(n[r])&&delete n[r]}};i&&"undefined"!=typeof window&&(window[i]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),l.onload=function(){var e=m[t];e&&(e.loaded=!0,d((function(t){return!i&&(t(e),!0)})))},l.onerror=function(){var e=m[t];e&&(e.errored=!0,d((function(t){return t(e),!0})))},document.body.appendChild(l)},a.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===b.removeOnUnmount)for(var t=document.getElementsByTagName("script"),n=0;n<t.length;n+=1)t[n].src.indexOf(e)>-1&&t[n].parentNode&&t[n].parentNode.removeChild(t[n]);var r=m[e];r&&(delete r.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===b.removeOnUnmount&&delete m[e])},a.render=function(){var t=b.globalName,n=this.props,o=(n.asyncScriptOnLoad,n.forwardedRef),i=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(n,["asyncScriptOnLoad","forwardedRef"]);return t&&"undefined"!=typeof window&&(i[t]=void 0!==window[t]?window[t]:void 0),i.ref=o,(0,r.createElement)(e,i)},i}(r.Component),o=(0,r.forwardRef)((function(e,t){return(0,r.createElement)(n,h({},e,{forwardedRef:t}))}));return o.displayName="AsyncScriptLoader("+t+")",o.propTypes={asyncScriptOnLoad:d().func},p()(o,e)})(l)},93485:(e,t,n)=>{"use strict";var r=n(34072);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},99860:(e,t,n)=>{e.exports=n(93485)()},34072:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}}]);
|