@abtnode/blocklet-services 1.16.19-beta-7d3ef675 → 1.16.19-beta-ba354e01
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/build/asset-manifest.json +61 -61
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/service-worker.js.map +1 -1
- package/build/static/css/{1233.dba37e64.chunk.css → 424.13cf051c.chunk.css} +1 -1
- package/build/static/js/1946.dd7542b8.chunk.js +2 -0
- package/build/static/js/2761.a62dc611.chunk.js +2 -0
- package/build/static/js/2988.62cc135c.chunk.js +2 -0
- package/build/static/js/3131.0f8fd01b.chunk.js +2 -0
- package/build/static/js/3490.4d3a51ea.chunk.js +2 -0
- package/build/static/js/356.df75c406.chunk.js +2 -0
- package/build/static/js/3842.c535fcce.chunk.js +3 -0
- package/build/static/js/{4023.623d31df.chunk.js → 4023.8c5c7db4.chunk.js} +2 -2
- package/build/static/js/424.d91b48b7.chunk.js +3 -0
- package/build/static/js/4881.8ba32996.chunk.js +2 -0
- package/build/static/js/530.a11fe287.chunk.js +2 -0
- package/build/static/js/5403.1ee6610b.chunk.js +3 -0
- package/build/static/js/5673.0dd67df6.chunk.js +2 -0
- package/build/static/js/5710.a221ffa5.chunk.js +2 -0
- package/build/static/js/5725.c401d636.chunk.js +3 -0
- package/build/static/js/5856.8f363ad8.chunk.js +3 -0
- package/build/static/js/5982.2fbc5d75.chunk.js +2 -0
- package/build/static/js/6032.1a233c60.chunk.js +2 -0
- package/build/static/js/6112.55185ef9.chunk.js +2 -0
- package/build/static/js/779.ba47be45.chunk.js +2 -0
- package/build/static/js/{7892.46f78f2c.chunk.js → 7892.029c9f9b.chunk.js} +2 -2
- package/build/static/js/8792.13a6919f.chunk.js +2 -0
- package/build/static/js/8944.d6df0376.chunk.js +2 -0
- package/build/static/js/8983.c87cf7ed.chunk.js +2 -0
- package/build/static/js/9194.8e4efb4f.chunk.js +2 -0
- package/build/static/js/9596.5b13ea7d.chunk.js +2 -0
- package/build/static/js/9900.31422ac9.chunk.js +2 -0
- package/build/static/js/main.9d12d0ab.js +3 -0
- package/package.json +18 -18
- package/build/static/js/1233.43c6131b.chunk.js +0 -3
- package/build/static/js/1905.656cb960.chunk.js +0 -2
- package/build/static/js/2506.dd9284b6.chunk.js +0 -2
- package/build/static/js/2838.bc235457.chunk.js +0 -3
- package/build/static/js/3131.99541aca.chunk.js +0 -2
- package/build/static/js/3708.937e3176.chunk.js +0 -3
- package/build/static/js/371.5ff795df.chunk.js +0 -2
- package/build/static/js/3842.e1bb702b.chunk.js +0 -3
- package/build/static/js/468.bbc69bbf.chunk.js +0 -2
- package/build/static/js/5982.4f8369df.chunk.js +0 -2
- package/build/static/js/6139.4c62883c.chunk.js +0 -2
- package/build/static/js/6271.0a698298.chunk.js +0 -2
- package/build/static/js/6311.d6addc15.chunk.js +0 -2
- package/build/static/js/7305.465df4a1.chunk.js +0 -2
- package/build/static/js/7648.955e20c7.chunk.js +0 -3
- package/build/static/js/779.21153e82.chunk.js +0 -2
- package/build/static/js/8016.3ef64a2c.chunk.js +0 -2
- package/build/static/js/8792.0f55707c.chunk.js +0 -2
- package/build/static/js/8944.7444f668.chunk.js +0 -2
- package/build/static/js/8983.6213f391.chunk.js +0 -2
- package/build/static/js/9033.ebf65926.chunk.js +0 -2
- package/build/static/js/9107.7f32925d.chunk.js +0 -2
- package/build/static/js/9596.a4eead04.chunk.js +0 -2
- package/build/static/js/9865.d5dfa72b.chunk.js +0 -2
- package/build/static/js/9900.3b72165e.chunk.js +0 -2
- package/build/static/js/main.81fbc388.js +0 -3
- /package/build/static/js/{3842.e1bb702b.chunk.js.LICENSE.txt → 3842.c535fcce.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1233.43c6131b.chunk.js.LICENSE.txt → 424.d91b48b7.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7648.955e20c7.chunk.js.LICENSE.txt → 5403.1ee6610b.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2838.bc235457.chunk.js.LICENSE.txt → 5725.c401d636.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{3708.937e3176.chunk.js.LICENSE.txt → 5856.8f363ad8.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.81fbc388.js.LICENSE.txt → main.9d12d0ab.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[4881],{21802:function(n,e,t){t.d(e,{Z:function(){return y}});var i,o=t(71171),r=t(30969),a=t(24974),l=t.n(a),s=t(19611),d=t.n(s),c=t(16380),u=t(61398),p=t.n(u),f=t(38361),m=t(65667),h=t.n(m),g=t(26022),x=t(37574),v=(0,r.lazy)((function(){return Promise.all([t.e(4917),t.e(5547)]).then(t.bind(t,25547)).then((function(n){return{default:n.Uploader}}))})),b="/blocklet/logo/upload";function y(n){var e=n.url,t=n.height,i=n.width,o=n.enabled,a=n.type,l=n.did,s=n.prefix,c=n.headers,u=n.onUploaded,p=(0,g.PE)().t,m=(0,r.useRef)(null),y={cursor:o?"pointer":"default","&::after":{content:'"'.concat(p("common.switch"),'"')}};return(0,x.jsxs)(Z,{id:"uploader-".concat(l,"-").concat(a),children:[(0,x.jsx)(v,{ref:m,popup:!0,onUploadFinish:function(){var n;u(),null===(n=m.current)||void 0===n||n.close()},plugins:["ImageEditor"],apiPathProps:{uploader:d()(s,b,a,l),disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*",".jpg",".jpeg",".png",".gif",".svg"],maxFileSize:10485760,maxNumberOfFiles:1}},tusProps:{headers:c}}),(0,x.jsx)(f.Z,{className:h()("uploader-wrapper",o&&"enabled"),sx:y,onClick:function(){var n;null===(n=m.current)||void 0===n||n.open()},children:(0,x.jsx)("img",{alt:"Logo",src:e,style:{height:t,width:i}})})]},"uploader-".concat(l,"-").concat(a))}y.propTypes={url:l().string.isRequired,type:l().oneOf(["square","rect","favicon"]).isRequired,did:l().string.isRequired,prefix:l().string.isRequired,headers:l().func,onUploaded:l().func,height:l().number,width:l().any,enabled:l().bool},y.defaultProps={height:80,width:"auto",enabled:!0,headers:function(){return{}},onUploaded:p()};var Z=c.Z.div(i||(i=(0,o.Z)(["\n .uploader-wrapper {\n display: inline-flex;\n position: relative;\n font-size: 0px;\n &.enabled {\n cursor: pointer;\n }\n &::after {\n display: none;\n }\n &.enabled::after {\n display: block;\n opacity: 0;\n position: absolute;\n bottom: 0;\n background: rgba(0, 0, 0, 0.2);\n left: 0;\n right: 0;\n height: 2.2em;\n color: white;\n text-align: center;\n font-size: 12px;\n line-height: 2em;\n transition: opacity 0.3s ease;\n }\n &:hover::after {\n opacity: 1;\n }\n }\n"])))},28412:function(n,e,t){var i,o=t(71171),r=t(16380),a=t(38361);e.Z=(0,r.Z)(a.Z)(i||(i=(0,o.Z)(["\n width: 100%;\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n /* max-height: 60vh; */\n }\n\n .form-item {\n width: 100%;\n margin-bottom: 24px;\n position: relative;\n "," {\n flex-wrap: wrap;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n }\n\n .form-item-body {\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 4px;\n }\n\n .form-item-label {\n line-height: 1.2;\n font-size: 14px;\n color: #888;\n font-weight: bold;\n\n "," {\n text-align: left;\n width: auto;\n flex-grow: 1;\n }\n }\n\n .form-item-input {\n flex-grow: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n &.slot {\n height: 40px;\n line-height: 40px;\n background: #f8f8f8;\n font-size: 16px;\n\n .MuiChip-root {\n margin-top: -4px;\n }\n }\n\n .MuiSelect-select {\n padding: 8px;\n }\n }\n\n .form-item-action {\n // width: 100px;\n text-align: left;\n margin-left: 12px;\n flex-shrink: 0;\n "," {\n width: auto;\n margin-left: 0px;\n }\n .MuiIconButton-root {\n padding: 8px;\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n }\n"])),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.down("md")}))},14458:function(n,e,t){var i,o=t(71171),r=t(16380).Z.span(i||(i=(0,o.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(function(n){return n.theme.palette.error.main}));e.Z=r},44876:function(n,e,t){t.d(e,{Z:function(){return p}});var i,o=t(71171),r=t(33028),a=t(59740),l=t(16380),s=t(24974),d=t.n(s),c=t(37574),u=["children"];function p(n){var e=n.children,t=(0,a.Z)(n,u);return(0,c.jsx)(f,(0,r.Z)((0,r.Z)({},t),{},{children:e}))}p.propTypes={children:d().any.isRequired};var f=l.Z.div(i||(i=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(function(n){return n.theme.breakpoints.up("md")}),(function(n){return n.theme.breakpoints.down("md")}),(function(n){return n.theme.breakpoints.up("sm")}),(function(n){return n.theme.breakpoints.down("md")}))},8016:function(n,e,t){t.d(e,{Z:function(){return S}});var i=t(71171),o=t(56666),r=t(96234),a=t(33028),l=t(30969),s=t(24974),d=t.n(s),c=t(16380),u=t(38361),p=t(1484),f=t(88581),m=t(27724),h=t(94551),g=t(94308),x=t(83176),v=t(98545),b={description:d().string,editing:d().bool,onChange:d().func,required:d().bool,value:d().any,componentProps:d().object,render:d().func,renderFormItem:d().func},y=t(37574);function Z(n){var e=n.editing,t=n.value,i=n.onChange,o=(0,l.useState)(!1),a=(0,r.Z)(o,2),s=a[0],d=a[1],c=(0,l.useRef)(),p=(0,l.useRef)(t);(0,l.useEffect)((function(){var n=null;return e&&(n=setTimeout((function(){d(!0)}),50)),function(){clearTimeout(n)}}),[e]);var f=function(n){p.current=n,i(n)},m=(0,y.jsx)(u.Z,{className:"form-item-input slot",px:1,children:(0,y.jsxs)(u.Z,{display:"flex",alignItems:"center",children:[t,"auto"!==t&&(0,y.jsx)("div",{style:{marginLeft:4,backgroundColor:t,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),h=(0,y.jsxs)(u.Z,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:function(){d(!1),i(p.current)},children:[(0,y.jsx)(u.Z,{display:"flex",alignItems:"center",onClick:function(){return d(!0)},children:(0,y.jsx)("div",{ref:c,style:{flexShrink:0,marginLeft:"8px",backgroundColor:t,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:"auto"===t?"default":"pointer"}})}),(0,y.jsx)(x.ZP,{open:s,anchorEl:c.current,onClose:function(){return d(!1)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,y.jsx)(v.AI,{color:t,onChange:function(n){return f(n.hex)}})})]});return e?h:m}Z.propTypes=b;var w=t(59740),j=t(87006),k=["editing","description","value","onChange","componentProps"];function C(n){var e=n.editing,t=n.description,i=n.value,o=n.onChange,r=n.componentProps,s=(0,w.Z)(n,k),d=r.placeholder,c=(0,l.useRef)(i),p=function(n){c.current=n,o(n)};return e?(0,y.jsx)(j.Z,(0,a.Z)({style:{flex:1},fullWidth:!0,value:i,onChange:function(n){n.persist(),p(n.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:t||d,onKeyDown:function(n){"Enter"===n.key&&o(c.current,"confirm")}},s)):(0,y.jsx)(u.Z,{px:1,className:"form-item-input slot",children:i})}C.propTypes=b,C.defaultProps={componentProps:{}};var P=t(52469),R=t.n(P),_=t(84938),z=t(7017),N=["editing","value","onChange","componentProps"];function q(n){var e=n.editing,t=n.value,i=n.onChange,o=n.componentProps,r=(0,w.Z)(n,N),l=o.blocklet,s="auto"===t?(0,_.getPassportColorFromDid)(l.appDid):t;return(0,y.jsxs)(u.Z,{display:"flex",alignItems:"center",children:[(0,y.jsx)("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:R()({title:"Owner",issuer:(0,z.getDisplayName)(l),issuerDid:l.appDid,ownerName:"Your Name",ownerDid:l.appDid,preferredColor:t||"auto"})}}),(0,y.jsx)(Z,(0,a.Z)((0,a.Z)({},r),{},{editing:e,value:e?s:t,onChange:i,componentProps:o}))]})}q.propTypes=(0,a.Z)((0,a.Z)({},b),{},{componentProps:d().shape({blocklet:d().object.isRequired}).isRequired}),q.defaultProps={};var I,T=t(14458),D=t(28412),F=t(21802);function S(n){var e=n.schema,t=n.loading,i=n.value,s=n.defaultValue,d=n.onChange,c=n.style,x=n.disabled,v="[object Object]"===Object.prototype.toString.call(i),b=(0,l.useState)(null),w=(0,r.Z)(b,2),j=w[0],k=w[1],P=(0,l.useState)(v?i:s),R=(0,r.Z)(P,2),_=R[0],z=R[1],N=(0,l.useRef)();function I(n,e,t){var i=n.key,r=n.secure,l=_[i]!==e,s=(0,a.Z)((0,a.Z)({},_),{},(0,o.Z)({},i,e));l&&z(s),d((0,o.Z)({},i,e),{allValues:s,action:t,currentItem:n}),"confirm"===t&&r&&z((0,a.Z)((0,a.Z)({},_),{},(0,o.Z)({},i,"__encrypted__"))),["confirm","cancel"].includes(t)?D(null):D(n)}function D(n){if(n)return N.current=_[n.key],void k(n);N.current=null,k(null)}return(0,y.jsx)(O,{className:"form",style:c,children:null===e||void 0===e?void 0:e.map((function(n){var e=n.key,o=n.description,r=n.required,l=n.solo,s=void 0!==l&&l,d=n.hidden,c=void 0!==d&&d,b=n.componentProps,w=void 0===b?{}:b;if(c)return null;var k=!(!j||e!==j.key),P=function(n,e){var t=e.editing,o=void 0!==t&&t,r=n.key,a=v?i[r]:_[r];return"__encrypted__"===a?o?"":"******":a}(n,{editing:k}),R=function(n,e){var t=e.editing,i=void 0!==t&&t,o=n.componentType,r=void 0===o?"input":o,l=n.render,s=n.renderFormItem;return i&&s?s:!i&&l?l:{input:C,color:Z,passport:q,uploader:function(n){return(0,y.jsx)(F.Z,(0,a.Z)({},n.componentProps))}}[null===r||void 0===r?void 0:r.toLowerCase()]}(n,{editing:k}),z={inputProps:{"data-cy":"schema-form-item-component"},key:e,description:o,editing:k,value:P,onChange:function(e){return I(n,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"change")},componentProps:w};return(0,y.jsxs)(u.Z,{className:"form-item",children:[!s&&(0,y.jsxs)(u.Z,{className:"form-item-label",style:{color:r&&!P?"#ff0000":"#333"},children:[o,r&&(0,y.jsx)(T.Z,{})]}),(0,y.jsxs)(u.Z,{className:"form-item-body",children:[(0,y.jsx)(u.Z,{className:"form-item-input",sx:{textAlign:s?"center":"left"},children:(0,y.jsx)(R,(0,a.Z)({},z))}),!s&&(0,y.jsx)(u.Z,{className:"form-item-action",children:k?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(h.Z,{"data-cy":"schema-form-item-confirm",onClick:function(){I(n,P,"confirm")},disabled:x||t,size:"large",children:t?(0,y.jsx)(g.Z,{size:24}):(0,y.jsx)(m.Z,{})}),(0,y.jsx)(h.Z,{"data-cy":"schema-form-item-cancel",onClick:function(){I(n,N.current,"cancel")},disabled:x||t,size:"large",children:(0,y.jsx)(f.default,{})})]}):(0,y.jsx)(h.Z,{"data-cy":"schema-form-item-edit",onClick:function(){I(n,_[e],"edit")},disabled:x||j,size:"large",children:(0,y.jsx)(p.Z,{})})})]})]},e)}))})}S.propTypes={schema:d().array.isRequired,loading:d().bool,onChange:d().func.isRequired,value:d().object,defaultValue:d().object,style:d().object,disabled:d().bool},S.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};var O=(0,c.Z)(D.Z)(I||(I=(0,i.Z)([""])))}}]);
|
|
2
|
+
//# sourceMappingURL=4881.8ba32996.chunk.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_blocklet_services=self.webpackChunk_abtnode_blocklet_services||[]).push([[530],{8479:function(n,t,e){e.d(t,{Z:function(){return B}});var r=e(71171),a=e(33028),o=e(32723),i=e(34795),c=e(96234),u=e(59740),s=e(30969),p=e(24974),l=e.n(p),f=e(16380),d=e(84636),h=e(94308),v=e(91862),m=e(87130),x=e(43207),b=e(38357),Z=e(18877),k=e(94702),w=e(75255),g=e(26022),y=e(29996),C=e(24891),_=e(45555);var P,j=function(){var n=(0,_.Z)();return{minWidth:(0,w.Z)(n.breakpoints.down("md"))?300:n.breakpoints.values.sm}},E=e(37574),L=["title","description","showCancel","cancel","confirm","color","params","onCancel","onConfirm","loading"];function B(n){var t=n.title,e=n.description,r=n.showCancel,p=n.cancel,l=n.confirm,f=n.color,d=n.params,_=n.onCancel,P=n.onConfirm,B=n.loading,K=(0,u.Z)(n,L),O=(0,s.useState)(d),R=(0,c.Z)(O,2),S=R[0],U=R[1],A=(0,s.useState)(!0),D=(0,c.Z)(A,2),N=D[0],I=D[1],W=(0,s.useState)(!1),M=(0,c.Z)(W,2),$=M[0],q=M[1],z=(0,s.useState)(""),F=(0,c.Z)(z,2),Y=F[0],G=F[1],J=(0,g.PE)().t,Q=(0,k.Z)(),V=function(){var n=(0,i.Z)((0,o.Z)().mark((function n(t){return(0,o.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("function"!==typeof t){n.next=17;break}return q(!0),n.prev=2,n.next=5,t(S);case 5:I(!1),n.next=12;break;case 8:n.prev=8,n.t0=n.catch(2),G((0,C.Z)(n.t0)),console.error(n.t0);case 12:return n.prev=12,q(!1),n.finish(12);case 15:n.next=18;break;case 17:I(!1);case 18:case"end":return n.stop()}}),n,null,[[2,8,12,15]])})));return function(t){return n.apply(this,arguments)}}(),X="function"===typeof t?t():t,H="function"===typeof e?e(S,U,G):e,nn=(0,w.Z)(Q.breakpoints.down("md")),tn=j().minWidth;return(0,E.jsxs)(T,(0,a.Z)((0,a.Z)({onClick:function(n){n.stopPropagation()},fullScreen:nn,open:N,style:{minWidth:tn}},K),{},{children:[(0,E.jsx)(b.Z,{children:X}),(0,E.jsxs)(m.Z,{style:{minWidth:tn},children:[(0,E.jsx)(x.Z,{component:"div",children:H}),!!Y&&(0,E.jsx)(Z.Z,{severity:"error",style:{width:"100%",marginTop:8},children:Y})]}),(0,E.jsxs)(v.Z,{className:"delete-actions",style:{padding:"8px 24px 24px"},children:[r&&(0,E.jsx)(y.Z,{onClick:function(n){n.stopPropagation(),V(_)},color:"inherit","data-cy":"cancel-confirm-dialog",children:p||J("common.cancel")}),(0,E.jsxs)(y.Z,{onClick:function(n){n.stopPropagation(),V(P)},color:f,disabled:S.__disableConfirm||$||B,variant:"contained","data-cy":"submit-confirm-dialog",autoFocus:!0,children:[($||B)&&(0,E.jsx)(h.Z,{size:16,sx:{mr:1}}),l]})]})]}))}B.propTypes={title:l().any.isRequired,description:l().any.isRequired,showCancel:l().bool,cancel:l().string,color:l().string,confirm:l().string,params:l().object,onCancel:l().func,onConfirm:l().func.isRequired,loading:l().bool},B.defaultProps={onCancel:function(){},showCancel:!0,cancel:"",confirm:"Confirm",color:"error",params:{},loading:!1};var T=(0,f.Z)(d.Z)(P||(P=(0,r.Z)(["\n .delete-actions .Mui-disabled {\n color: rgba(0, 0, 0, 0.26) !important;\n box-shadow: none;\n background-color: rgba(0, 0, 0, 0.12) !important;\n }\n"])))},77370:function(n,t,e){e.d(t,{B:function(){return a.B3},T:function(){return o}});var r=e(30969),a=e(41333);function o(){return(0,r.useContext)(a.B3)}},54559:function(n,t,e){e.d(t,{hi:function(){return o},od:function(){return a.a}});var r=e(95803),a=e.n(r);a().defaults.timeout=1e4;var o=a().create()},30134:function(n,t,e){e.d(t,{EJ:function(){return C},Jf:function(){return y},LQ:function(){return d},Nb:function(){return h},UV:function(){return _},Xv:function(){return l},Z3:function(){return j},ag:function(){return b},mo:function(){return m},nD:function(){return f},nU:function(){return w},w2:function(){return Z}});var r=e(32723),a=e(34795),o=e(92522),i=e.n(o),c=e(59505),u=e(50576),s=e(43430),p=e(54559);function l(n){var t=n.replace(/\/api\/space\/.+/,""),e=n.replace(/\/$/,"").split("/"),r=e.at(-4),a=e.at(-2);return(0,s.xn)(t,"space",r,"apps",a,"explorer?key=/apps/".concat(a,"/.did-objects/").concat(a,"/"))}function f(n){var t=n.replace(/\/api\/space\/.+/,""),e=n.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"space",e)}function d(n){return n.replace(/\/$/,"").split("/").at(-4)}function h(n){return v.apply(this,arguments)}function v(){return(v=(0,a.Z)((0,r.Z)().mark((function n(t){var e,a;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,i()(t)){n.next=3;break}return n.abrupt("return",!1);case 3:return n.next=5,p.hi.head(t,{timeout:5e3});case 5:return e=n.sent,a=e.headers,n.abrupt("return","true"===a["x-listable"]&&"true"===a["x-readable"]&&"true"===a["x-writeable"]);case 10:return n.prev=10,n.t0=n.catch(0),console.error(n.t0),n.abrupt("return",!1);case 14:case"end":return n.stop()}}),n,null,[[0,10]])})))).apply(this,arguments)}function m(n){var t;return(null===n||void 0===n||null===(t=n.find((function(n){return n.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT})))||void 0===t?void 0:t.value)||""}function x(n){return null===n||void 0===n?void 0:n.replace(/\/api\/space\/.+/,"")}function b(n){var t=new URL(n);return(0,s.xn)(t.origin,t.pathname)}function Z(n){return k.apply(this,arguments)}function k(){return(k=(0,a.Z)((0,r.Z)().mark((function n(t){var e,a,o,c,l;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,i()(t)){n.next=3;break}return n.abrupt("return",!1);case 3:return e=b(t),a=(0,s.xn)(e,"space/api/did/one-click-authorization/token"),n.next=7,p.hi.get(a,{timeout:5e3});case 7:return o=n.sent,c=o.status,l=o.data,n.abrupt("return",200===c&&(0,u.isObject)(l));case 13:return n.prev=13,n.t0=n.catch(0),console.error(n.t0),n.abrupt("return",!1);case 17:case"end":return n.stop()}}),n,null,[[0,13]])})))).apply(this,arguments)}function w(n){return g.apply(this,arguments)}function g(){return g=(0,a.Z)((0,r.Z)().mark((function n(t){var e,a,o,c,u=arguments;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e=(u.length>1&&void 0!==u[1]?u[1]:{timeout:3e3}).timeout,n.prev=1,i()(t)){n.next=4;break}return n.abrupt("return","");case 4:return n.next=6,p.hi.head(t,{timeout:e});case 6:return a=n.sent,o=a.headers,c=o["x-space-name"],n.abrupt("return",c?decodeURIComponent(c):"");case 12:return n.prev=12,n.t0=n.catch(1),console.error(n.t0),n.abrupt("return","");case 16:case"end":return n.stop()}}),n,null,[[1,12]])}))),g.apply(this,arguments)}function y(n){var t=n.replace(/\/api\/space\/.+/,""),e=n.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"/api/space/nft/display?spaceDid=".concat(e))}var C=function(n){var t,e;return(null===n||void 0===n||null===(t=n.configs)||void 0===t||null===(e=t.find((function(n){return n.key===c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT})))||void 0===e?void 0:e.value)||null};function _(n){return P.apply(this,arguments)}function P(){return(P=(0,a.Z)((0,r.Z)().mark((function n(t){var e;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(e={}).did=d(t),n.next=4,w(t);case 4:return e.name=n.sent,e.url=x(t),e.endpoint=t,n.abrupt("return",e);case 8:case"end":return n.stop()}}),n)})))).apply(this,arguments)}function j(n){return E.apply(this,arguments)}function E(){return E=(0,a.Z)((0,r.Z)().mark((function n(t){var e,a,o,i,c,l,f,d,h,v=arguments;return(0,r.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=v.length>1&&void 0!==v[1]?v[1]:{timeout:3e4,withSearchParams:!0},(0,u.isString)(t)){n.next=3;break}throw new Error("url(".concat(t,") must be a string"));case 3:return o=t.startsWith("http")?t:"https://".concat(t),i=new URL(o),n.next=7,p.hi.get((0,s.xn)(i.origin,"/__blocklet__.js?type=json"),{timeout:a.timeout});case 7:if(c=n.sent,l=c.data,f=null===(e=l.componentMountPoints.findLast((function(n){return"z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf"===n.did})))||void 0===e?void 0:e.mountPoint){n.next=12;break}throw new Error("MountPoint(".concat(f,") not found"));case 12:return d=(0,s.xn)(i.origin,f),h=a.withSearchParams&&i.searchParams.get("spaceDid")?(0,s.xn)(d,"?spaceDid=".concat(i.searchParams.get("spaceDid"))):d,n.abrupt("return",h);case 15:case"end":return n.stop()}}),n)}))),E.apply(this,arguments)}}}]);
|
|
2
|
+
//# sourceMappingURL=530.a11fe287.chunk.js.map
|