youtil 3.0.4 → 3.0.5
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/cjs/index.d.ts +1 -0
- package/cjs/index.js +1 -0
- package/cjs/other.d.ts +14 -0
- package/cjs/other.js +86 -0
- package/cjs/string.d.ts +42 -0
- package/cjs/string.js +108 -0
- package/docs/404.html +4 -4
- package/docs/api/functions/copyToClipboard/index.html +5 -5
- package/docs/api/functions/createEnum/index.html +5 -5
- package/docs/api/functions/decodeHtml/index.html +5 -5
- package/docs/api/functions/deepCopy/index.html +5 -5
- package/docs/api/functions/delParam/index.html +5 -5
- package/docs/api/functions/encodeHtml/index.html +5 -5
- package/docs/api/functions/formatDate/index.html +5 -5
- package/docs/api/functions/formatJson/index.html +17 -0
- package/docs/api/functions/getIdCardLastChar/index.html +16 -0
- package/docs/api/functions/getParam/index.html +6 -6
- package/docs/api/functions/getParamInt/index.html +5 -5
- package/docs/api/functions/getParams/index.html +6 -6
- package/docs/api/functions/getRandom/index.html +21 -0
- package/docs/api/functions/getRandomStr/index.html +16 -0
- package/docs/api/functions/hideLoading/index.html +5 -5
- package/docs/api/functions/initWindowMessage/index.html +5 -5
- package/docs/api/functions/parseDate/index.html +5 -5
- package/docs/api/functions/request/index.html +5 -5
- package/docs/api/functions/setParam/index.html +5 -5
- package/docs/api/functions/showLoading/index.html +5 -5
- package/docs/api/functions/sleep/index.html +6 -6
- package/docs/api/functions/toHump/index.html +18 -0
- package/docs/api/functions/toUnderline/index.html +16 -0
- package/docs/api/functions/toUrlParams/index.html +5 -5
- package/docs/api/functions/validateIdCard/index.html +16 -0
- package/docs/api/globals/index.html +5 -5
- package/docs/api/index.html +4 -4
- package/docs/api/interfaces/IRequestOptions/index.html +5 -5
- package/docs/api/interfaces/IShowLoadingConfig/index.html +5 -5
- package/docs/api/variables/Request/index.html +5 -5
- package/docs/api/variables/keyCodes/index.html +16 -0
- package/docs/assets/js/00078de9.10589ab0.js +1 -0
- package/docs/assets/js/04050071.a8002edc.js +1 -0
- package/docs/assets/js/08f709b9.20175186.js +1 -0
- package/docs/assets/js/094cfbf1.059dc44b.js +1 -0
- package/docs/assets/js/0c2147ef.2bfcc843.js +1 -0
- package/docs/assets/js/1501a739.9c46a1a0.js +1 -0
- package/docs/assets/js/1608b181.ee556934.js +1 -0
- package/docs/assets/js/1774.902f2e94.js +1 -0
- package/docs/assets/js/17896441.7fc5704e.js +1 -0
- package/docs/assets/js/194adc5f.096b8bfb.js +1 -0
- package/docs/assets/js/1be78505.71fee479.js +1 -0
- package/docs/assets/js/26a70007.2f9f1f09.js +1 -0
- package/docs/assets/js/2ac048f8.1f1f0188.js +1 -0
- package/docs/assets/js/2e314e38.bd93e1d2.js +1 -0
- package/docs/assets/js/{3b14ef11.f71babe0.js → 3b14ef11.f58d4bf4.js} +1 -1
- package/docs/assets/js/3ec39cd5.55864cc1.js +1 -0
- package/docs/assets/js/4638.9d9de9b8.js +2 -0
- package/docs/assets/js/479af78b.79861c79.js +1 -0
- package/docs/assets/js/5888.a314615c.js +2 -0
- package/docs/assets/js/66592e46.2632f241.js +1 -0
- package/docs/assets/js/{6bc50bd8.d7b46cc0.js → 6bc50bd8.c3b8079b.js} +1 -1
- package/docs/assets/js/7830.006c8eaa.js +1 -0
- package/docs/assets/js/7891b53e.f1a0b9c7.js +1 -0
- package/docs/assets/js/8b76e124.7c5e5eb2.js +1 -0
- package/docs/assets/js/901a7e9f.918395a0.js +1 -0
- package/docs/assets/js/9104954f.5585963d.js +1 -0
- package/docs/assets/js/92b7d874.503e9b92.js +1 -0
- package/docs/assets/js/9334cb7c.a3af00d3.js +1 -0
- package/docs/assets/js/935f2afb.6c90f018.js +1 -0
- package/docs/assets/js/969412eb.49b9b427.js +1 -0
- package/docs/assets/js/9be94766.21974141.js +1 -0
- package/docs/assets/js/9dd5329b.a634d68f.js +1 -0
- package/docs/assets/js/a0c44371.f387576d.js +1 -0
- package/docs/assets/js/ab2af742.1ab27925.js +1 -0
- package/docs/assets/js/b01f3e06.7955089a.js +1 -0
- package/docs/assets/js/ba6f0f15.a19814c2.js +1 -0
- package/docs/assets/js/ccb851b4.69f9aa12.js +1 -0
- package/docs/assets/js/d4323bca.58cb2228.js +1 -0
- package/docs/assets/js/d9f162ad.0b37af81.js +1 -0
- package/docs/assets/js/e2aa7f69.620e7b98.js +1 -0
- package/docs/assets/js/ef3f9d02.479dddf7.js +1 -0
- package/docs/assets/js/f4c916b9.107e0062.js +1 -0
- package/docs/assets/js/f7d87c57.b1f858d9.js +1 -0
- package/docs/assets/js/f97ec998.c74cdecd.js +1 -0
- package/docs/assets/js/f9953324.47131b26.js +1 -0
- package/docs/assets/js/{fc1c80db.cfb5338b.js → fc1c80db.e33d9024.js} +1 -1
- package/docs/assets/js/fdb649b1.5d0fff7c.js +1 -0
- package/docs/assets/js/main.98944413.js +2 -0
- package/docs/assets/js/runtime~main.91fe50fb.js +1 -0
- package/docs/demos/IcePkgDemo_doc_01_request_0/index.html +4 -4
- package/docs/demos/IcePkgDemo_doc_01_request_1/index.html +4 -4
- package/docs/demos/IcePkgDemo_doc_02_time_0/index.html +4 -4
- package/docs/demos/IcePkgDemo_doc_03_loading_0/index.html +4 -4
- package/docs/index.html +4 -4
- package/docs/loading/index.html +18 -18
- package/docs/request/index.html +32 -32
- package/docs/sitemap.xml +1 -1
- package/docs/time/index.html +18 -18
- package/es/index.mjs +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/other.d.ts +14 -0
- package/esm/other.js +85 -0
- package/esm/string.d.ts +42 -0
- package/esm/string.js +106 -0
- package/package.json +1 -1
- package/umd/index.js +1 -1
- package/docs/assets/js/00078de9.a02a731a.js +0 -1
- package/docs/assets/js/04050071.0825974f.js +0 -1
- package/docs/assets/js/08f709b9.811f5e45.js +0 -1
- package/docs/assets/js/094cfbf1.2b58cb63.js +0 -1
- package/docs/assets/js/0c2147ef.6eb74fc2.js +0 -2
- package/docs/assets/js/1501a739.5f21617c.js +0 -1
- package/docs/assets/js/1608b181.b1c51f75.js +0 -1
- package/docs/assets/js/17896441.6674ffec.js +0 -1
- package/docs/assets/js/194adc5f.0203fec9.js +0 -1
- package/docs/assets/js/1be78505.537008e6.js +0 -1
- package/docs/assets/js/2ac048f8.ee6f4e82.js +0 -1
- package/docs/assets/js/2e314e38.995f71c6.js +0 -1
- package/docs/assets/js/3ec39cd5.3e1ed37e.js +0 -1
- package/docs/assets/js/66592e46.f0e51f16.js +0 -2
- package/docs/assets/js/66592e46.f0e51f16.js.LICENSE.txt +0 -1
- package/docs/assets/js/774.fa0d167d.js +0 -1
- package/docs/assets/js/7891b53e.0e060d15.js +0 -1
- package/docs/assets/js/830.d8724ce6.js +0 -1
- package/docs/assets/js/888.800281f1.js +0 -2
- package/docs/assets/js/8b76e124.68a54c9e.js +0 -1
- package/docs/assets/js/9104954f.a1a72ca6.js +0 -1
- package/docs/assets/js/92b7d874.a69b898c.js +0 -1
- package/docs/assets/js/9334cb7c.2d33ddf8.js +0 -1
- package/docs/assets/js/935f2afb.a8948813.js +0 -1
- package/docs/assets/js/969412eb.cb2451c8.js +0 -1
- package/docs/assets/js/9be94766.2925f488.js +0 -1
- package/docs/assets/js/9dd5329b.6f458fc4.js +0 -1
- package/docs/assets/js/ab2af742.ff411c9b.js +0 -1
- package/docs/assets/js/ba6f0f15.5a9e407a.js +0 -1
- package/docs/assets/js/ccb851b4.71647e94.js +0 -1
- package/docs/assets/js/d4323bca.9bf7bf5a.js +0 -2
- package/docs/assets/js/d4323bca.9bf7bf5a.js.LICENSE.txt +0 -1
- package/docs/assets/js/e2aa7f69.b5afb674.js +0 -1
- package/docs/assets/js/ef3f9d02.841c2fab.js +0 -1
- package/docs/assets/js/f7d87c57.af927e77.js +0 -1
- package/docs/assets/js/f97ec998.133018f9.js +0 -1
- package/docs/assets/js/fdb649b1.86925c6b.js +0 -1
- package/docs/assets/js/main.98037fba.js +0 -2
- package/docs/assets/js/runtime~main.7aa653bc.js +0 -1
- /package/docs/assets/js/{0c2147ef.6eb74fc2.js.LICENSE.txt → 4638.9d9de9b8.js.LICENSE.txt} +0 -0
- /package/docs/assets/js/{888.800281f1.js.LICENSE.txt → 5888.a314615c.js.LICENSE.txt} +0 -0
- /package/docs/assets/js/{main.98037fba.js.LICENSE.txt → main.98944413.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[830],{5640:e=>{e.exports={codeBlockContainer:"codeBlockContainer_Ckt0"}},6665:(e,t,n)=>{"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(n(6540));function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){return 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},c.apply(this,arguments)}function s(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u=o.default.createContext({}),p=function(e){var t=o.default.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.default.createElement(o.default.Fragment,{},t)}},f=o.default.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),f=r,m=u["".concat(c,".").concat(f)]||u[f]||d[f]||a;return n?o.default.createElement(m,i(i({ref:t},s),{},{components:n})):o.default.createElement(m,i({ref:t},s))}));f.displayName="MDXCreateElement",t.xA=function(e){var t=p(e.components);return o.default.createElement(u.Provider,{value:t},e.children)},t.yg=function(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,c=new Array(a);c[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:r,c[1]=s;for(var l=2;l<a;l++)c[l]=n[l];return o.default.createElement.apply(null,c)}return o.default.createElement.apply(null,n)}},6833:e=>{e.exports={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"}},6861:(e,t,n)=>{"use strict";function r(e,t){var n=(void 0===t?{}:t).target,r=void 0===n?document.body:n;if("string"!=typeof e)throw new TypeError("Expected parameter `text` to be a `string`, got `"+typeof e+"`.");var o=document.createElement("textarea"),a=document.activeElement;o.value=e,o.setAttribute("readonly",""),o.style.contain="strict",o.style.position="absolute",o.style.left="-9999px",o.style.fontSize="12pt";var c=document.getSelection(),s=c.rangeCount>0&&c.getRangeAt(0);r.append(o),o.select(),o.selectionStart=0,o.selectionEnd=e.length;var i=!1;try{i=document.execCommand("copy")}catch(l){}return o.remove(),s&&(c.removeAllRanges(),c.addRange(s)),a&&a.focus(),i}n.d(t,{A:()=>r})},7359:e=>{e.exports={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"}},8426:(e,t)=>{function n(e){let t,n=[];for(let r of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(r))n.push(parseInt(r,10));else if(t=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,r,o,a]=t;if(r&&a){r=parseInt(r),a=parseInt(a);const e=r<a?1:-1;"-"!==o&&".."!==o&&"\u2025"!==o||(a+=e);for(let t=r;t!==a;t+=e)n.push(t)}}return n}t.default=n,e.exports=n},8742:e=>{e.exports={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"}},9694:(e,t,n)=>{"use strict";n.d(t,{A:()=>fe});var r=n(8168),o=n(8587),a=n(6540),c=n(2303),s=n(53),i=n(5293),l=n(6342);function u(){var e=(0,l.p)().prism,t=(0,i.G)().colorMode,n=e.theme,r=e.darkTheme||n;return"dark"===t?r:n}var p=n(7559),d=n(3909),f=n(8426),m=n.n(f),y=(0,d.A)(/title=(["'])(.*?)\1/,{quote:1,title:2}),g=(0,d.A)(/\{([\d,-]+)\}/,{range:1}),v={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}};function b(e,t){var n=e.map((function(e){var n=v[e],r=n.start,o=n.end;return"(?:"+r+"\\s*("+t.flatMap((function(e){var t,n;return[e.line,null==(t=e.block)?void 0:t.start,null==(n=e.block)?void 0:n.end].filter(Boolean)})).join("|")+")\\s*"+o+")"})).join("|");return new RegExp("^\\s*(?:"+n+")\\s*$")}function h(e,t){var n=e.replace(/\n$/,""),r=t.language,o=t.magicComments,a=t.metastring;if(a&&g.test(a)){var c=a.match(g).groups.range;if(0===o.length)throw new Error("A highlight range has been given in code block's metastring (``` "+a+"), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.");var s=o[0].className,i=m()(c).filter((function(e){return e>0})).map((function(e){return[e-1,[s]]}));return{lineClassNames:Object.fromEntries(i),code:n}}if(void 0===r)return{lineClassNames:{},code:n};for(var l=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return b(["js","jsBlock"],t);case"jsx":case"tsx":return b(["js","jsBlock","jsx"],t);case"html":return b(["js","jsBlock","html"],t);case"python":case"py":case"bash":return b(["bash"],t);case"markdown":case"md":return b(["html","jsx","bash"],t);default:return b(Object.keys(v),t)}}(r,o),u=n.split("\n"),p=Object.fromEntries(o.map((function(e){return[e.className,{start:0,range:""}]}))),d=Object.fromEntries(o.filter((function(e){return e.line})).map((function(e){var t=e.className;return[e.line,t]}))),f=Object.fromEntries(o.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.start,t]}))),y=Object.fromEntries(o.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.end,t]}))),h=0;h<u.length;){var k=u[h].match(l);if(k){var B=k.slice(1).find((function(e){return void 0!==e}));d[B]?p[d[B]].range+=h+",":f[B]?p[f[B]].start=h:y[B]&&(p[y[B]].range+=p[y[B]].start+"-"+(h-1)+","),u.splice(h,1)}else h+=1}n=u.join("\n");var N={};return Object.entries(p).forEach((function(e){var t=e[0],n=e[1].range;m()(n).forEach((function(e){null!=N[e]||(N[e]=[]),N[e].push(t)}))})),{lineClassNames:N,code:n}}var k=n(5640),B=n.n(k),N=n(757).A,w=["as"];function j(e){var t=e.as,n=(0,o.A)(e,w),a=function(e){var t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((function(e){var r=e[0],o=e[1],a=t[r];a&&"string"==typeof o&&(n[a]=o)})),n}(u());return N(t,(0,r.A)({},n,{style:a,className:(0,s.A)(n.className,B().codeBlockContainer,p.G.common.codeBlock)}))}var A=n(8742),C=n.n(A),O=n(757).A;function E(e){var t=e.children,n=e.className;return O(j,{as:"pre",tabIndex:0,className:(0,s.A)(C().codeBlockStandalone,"thin-scrollbar",n)},O("code",{className:C().codeBlockLines},t))}var L=n(3807),x={attributes:!0,characterData:!0,childList:!0,subtree:!0};function T(e,t){var n=(0,a.useState)(),r=n[0],o=n[1],c=(0,a.useCallback)((function(){var t;o(null==(t=e.current)?void 0:t.closest("[role=tabpanel][hidden]"))}),[e,o]);(0,a.useEffect)((function(){c()}),[c]),function(e,t,n){void 0===n&&(n=x);var r=(0,L._q)(t),o=(0,L.Be)(n);(0,a.useEffect)((function(){var t=new MutationObserver(r);return e&&t.observe(e,o),function(){return t.disconnect()}}),[e,r,o])}(r,(function(e){e.forEach((function(e){"attributes"===e.type&&"hidden"===e.attributeName&&(t(),c())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}const P={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]};var S={Prism:n(1258).A,theme:P};function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(){return I=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},I.apply(this,arguments)}var D=/\r\n|\r|\n/,W=function(e){0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},H=function(e,t){var n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)};function M(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var z=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),_(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?function(e,t){var n=e.plain,r=Object.create(null),o=e.styles.reduce((function(e,n){var r=n.languages,o=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=I({},e[t],o);e[t]=n})),e}),r);return o.root=n,o.plain=I({},n,{backgroundColor:null}),o}(e.theme,e.language):void 0;return t.themeDict=n})),_(this,"getLineProps",(function(e){var n=e.key,r=e.className,o=e.style,a=I({},M(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),c=t.getThemeDict(t.props);return void 0!==c&&(a.style=c.plain),void 0!==o&&(a.style=void 0!==a.style?I({},a.style,o):o),void 0!==n&&(a.key=n),r&&(a.className+=" "+r),a})),_(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,o=n.length,a=t.getThemeDict(t.props);if(void 0!==a){if(1===o&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===o&&!r)return a[n[0]];var c=r?{display:"inline-block"}:{},s=n.map((function(e){return a[e]}));return Object.assign.apply(Object,[c].concat(s))}})),_(this,"getTokenProps",(function(e){var n=e.key,r=e.className,o=e.style,a=e.token,c=I({},M(e,["key","className","style","token"]),{className:"token "+a.types.join(" "),children:a.content,style:t.getStyleForToken(a),key:void 0});return void 0!==o&&(c.style=void 0!==c.style?I({},c.style,o):o),void 0!==n&&(c.key=n),r&&(c.className+=" "+r),c})),_(this,"tokenize",(function(e,t,n,r){var o={code:t,grammar:n,language:r,tokens:[]};e.hooks.run("before-tokenize",o);var a=o.tokens=e.tokenize(o.code,o.grammar,o.language);return e.hooks.run("after-tokenize",o),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,o=e.children,a=this.getThemeDict(this.props),c=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],r=[0],o=[e.length],a=0,c=0,s=[],i=[s];c>-1;){for(;(a=r[c]++)<o[c];){var l=void 0,u=t[c],p=n[c][a];if("string"==typeof p?(u=c>0?u:["plain"],l=p):(u=H(u,p.type),p.alias&&(u=H(u,p.alias)),l=p.content),"string"==typeof l){var d=l.split(D),f=d.length;s.push({types:u,content:d[0]});for(var m=1;m<f;m++)W(s),i.push(s=[]),s.push({types:u,content:d[m]})}else c++,t.push(u),n.push(l),r.push(0),o.push(l.length)}c--,t.pop(),n.pop(),r.pop(),o.pop()}return W(s),i}(void 0!==c?this.tokenize(t,r,c,n):[r]),className:"prism-code language-"+n,style:void 0!==a?a.root:{},getLineProps:this.getLineProps,getTokenProps:this.getTokenProps})},t}(a.Component);const V=z;var R=n(6833),F=n.n(R),G=n(757).A,q=n(6540).Fragment;function $(e){var t=e.line,n=e.classNames,o=e.showLineNumbers,a=e.getLineProps,c=e.getTokenProps;1===t.length&&"\n"===t[0].content&&(t[0].content="");var i=a({line:t,className:(0,s.A)(n,o&&F().codeLine)}),l=t.map((function(e,t){return G("span",(0,r.A)({key:t},c({token:e,key:t})))}));return G("span",i,o?G(q,null,G("span",{className:F().codeLineNumber}),G("span",{className:F().codeLineContent},l)):l,G("br",null))}var Z=n(6861),J=n(1312),K=n(757).A;function X(e){return K("svg",(0,r.A)({viewBox:"0 0 24 24"},e),K("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}))}var Y=n(757).A;function Q(e){return Y("svg",(0,r.A)({viewBox:"0 0 24 24"},e),Y("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}var U=n(9908),ee=n.n(U),te=n(757).A;function ne(e){var t=e.code,n=e.className,r=(0,a.useState)(!1),o=r[0],c=r[1],i=(0,a.useRef)(void 0),l=(0,a.useCallback)((function(){(0,Z.A)(t),c(!0),i.current=window.setTimeout((function(){c(!1)}),1e3)}),[t]);return(0,a.useEffect)((function(){return function(){return window.clearTimeout(i.current)}}),[]),te("button",{type:"button","aria-label":o?(0,J.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,J.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,J.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,s.A)("clean-btn",n,ee().copyButton,o&&ee().copyButtonCopied),onClick:l},te("span",{className:ee().copyButtonIcons,"aria-hidden":"true"},te(X,{className:ee().copyButtonIcon}),te(Q,{className:ee().copyButtonSuccessIcon})))}var re=n(757).A;function oe(e){return re("svg",(0,r.A)({viewBox:"0 0 24 24"},e),re("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}var ae=n(7359),ce=n.n(ae),se=n(757).A;function ie(e){var t=e.className,n=e.onClick,r=e.isEnabled,o=(0,J.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return se("button",{type:"button",onClick:n,className:(0,s.A)("clean-btn",t,r&&ce().wordWrapButtonEnabled),"aria-label":o,title:o},se(oe,{className:ce().wordWrapButtonIcon,"aria-hidden":"true"}))}var le=n(757).A;function ue(e){var t,n,o,c,i,p,d,f,m,g,v,b=e.children,k=e.className,B=void 0===k?"":k,N=e.metastring,w=e.title,A=e.showLineNumbers,O=e.language,E=(0,l.p)().prism,L=E.defaultLanguage,x=E.magicComments,P=null!=(t=null!=O?O:null==(n=B.split(" ").find((function(e){return e.startsWith("language-")})))?void 0:n.replace(/language-/,""))?t:L,_=u(),I=(o=(0,a.useState)(!1),c=o[0],i=o[1],p=(0,a.useState)(!1),d=p[0],f=p[1],m=(0,a.useRef)(null),g=(0,a.useCallback)((function(){var e=m.current.querySelector("code");c?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),i((function(e){return!e}))}),[m,c]),v=(0,a.useCallback)((function(){var e=m.current,t=e.scrollWidth>e.clientWidth||m.current.querySelector("code").hasAttribute("style");f(t)}),[m]),T(m,v),(0,a.useEffect)((function(){v()}),[c,v]),(0,a.useEffect)((function(){return window.addEventListener("resize",v,{passive:!0}),function(){window.removeEventListener("resize",v)}}),[v]),{codeBlockRef:m,isEnabled:c,isCodeScrollable:d,toggle:g}),D=function(e){var t,n;return null!=(t=null==e||null==(n=e.match(y))?void 0:n.groups.title)?t:""}(N)||w,W=h(b,{metastring:N,language:P,magicComments:x}),H=W.lineClassNames,M=W.code,z=null!=A?A:function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(N);return le(j,{as:"div",className:(0,s.A)(B,P&&!B.includes("language-"+P)&&"language-"+P)},D&&le("div",{className:C().codeBlockTitle},D),le("div",{className:C().codeBlockContent},le(V,(0,r.A)({},S,{theme:_,code:M,language:null!=P?P:"text"}),(function(e){var t=e.className,n=e.tokens,r=e.getLineProps,o=e.getTokenProps;return le("pre",{tabIndex:0,ref:I.codeBlockRef,className:(0,s.A)(t,C().codeBlock,"thin-scrollbar")},le("code",{className:(0,s.A)(C().codeBlockLines,z&&C().codeBlockLinesWithNumbering)},n.map((function(e,t){return le($,{key:t,line:e,getLineProps:r,getTokenProps:o,classNames:H[t],showLineNumbers:z})}))))})),le("div",{className:C().buttonGroup},(I.isEnabled||I.isCodeScrollable)&&le(ie,{className:C().codeButton,onClick:function(){return I.toggle()},isEnabled:I.isEnabled}),le(ne,{className:C().codeButton,code:M}))))}var pe=n(757).A,de=["children"];function fe(e){var t=e.children,n=(0,o.A)(e,de),s=(0,c.A)(),i=function(e){return a.Children.toArray(e).some((function(e){return(0,a.isValidElement)(e)}))?e:Array.isArray(e)?e.join(""):e}(t);return pe("string"==typeof i?ue:E,(0,r.A)({key:String(s)},n),i)}},9908:e=>{e.exports={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 888.800281f1.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[888],{1020:(t,e,r)=>{"use strict";var n=r(6540),o=60103;if("function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,r){var n,i={},c=null,u=null;for(n in void 0!==r&&(c=""+r),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(u=e.ref),e)s.call(e,n)&&!l.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===i[n]&&(i[n]=e[n]);return{$$typeof:o,type:t,key:c,ref:u,props:i,_owner:a.current}}e.jsx=c,e.jsxs=c},4308:t=>{t.exports={container:"container_jJsY",unfoldContainer:"unfoldContainer_TzKO",preview:"preview_yMOi",operations:"operations_Fpkw",item:"item_b5wY",codeWrapper:"codeWrapper_udwJ",mobileWrapper:"mobileWrapper_DSG0",iframeWrapper:"iframeWrapper_YdFS",mobilePreviewWrapper:"mobilePreviewWrapper_jrwF",mobilePreviewArea:"mobilePreviewArea_kH_F",mobileOperations:"mobileOperations_YR6C",mobileCodeWrapper:"mobileCodeWrapper_NG24",operationItem:"operationItem_BQul",dialog:"dialog_EwpE"}},4848:(t,e,r)=>{"use strict";t.exports=r(1020)},8279:(t,e,r)=>{"use strict";r.d(e,{A:()=>Va});var n=r(4848),o=r(5895);function i(t,e,r,o,i){return(0,n.jsx)(t,s(e),r,o,i)}function a(t,e,r,o,i){return(0,n.jsxs)(t,s(e),r,o,i)}function s(t){if(t&&"style"in t){var e=t.style;if("object"==typeof e){var r=Object.assign({},t),n={};for(var i in e)n[i]="string"==typeof e[i]?(0,o.oU)(e[i]):e[i];return r.style=n,r}}return t}var l=r(6540),c=r(9694),u=r(5556),f=r.n(u),d="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),p=new Uint8Array(16);function h(){if(!d)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return d(p)}for(var v=[],g=0;g<256;++g)v[g]=(g+256).toString(16).substr(1);const m=function(t,e){var r=e||0,n=v;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")};const b=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||h)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||m(o)};function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach((function(e){O(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function E(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C(){return C=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},C.apply(this,arguments)}function T(t){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},T(t)}function L(t,e){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},L(t,e)}function S(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function A(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=T(t);if(e){var o=T(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S(this,r)}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function R(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}var M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},x=function(t){return t&&t.Math==Math&&t},P=x("object"==typeof globalThis&&globalThis)||x("object"==typeof window&&window)||x("object"==typeof self&&self)||x("object"==typeof M&&M)||function(){return this}()||Function("return this")(),k={},j=function(t){try{return!!t()}catch(e){return!0}},N=!j((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I=!j((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),z=I,H=Function.prototype.call,B=z?H.bind(H):function(){return H.apply(H,arguments)},D={},F={}.propertyIsEnumerable,U=Object.getOwnPropertyDescriptor,W=U&&!F.call({1:2},1);D.f=W?function(t){var e=U(this,t);return!!e&&e.enumerable}:F;var V,Y,$=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Q=I,X=Function.prototype,G=X.call,K=Q&&X.bind.bind(G,G),Z=function(t){return Q?K(t):function(){return G.apply(t,arguments)}},J=Z,q=J({}.toString),tt=J("".slice),et=function(t){return tt(q(t),8,-1)},rt=et,nt=Z,ot=function(t){if("Function"===rt(t))return nt(t)},it=j,at=et,st=Object,lt=ot("".split),ct=it((function(){return!st("z").propertyIsEnumerable(0)}))?function(t){return"String"==at(t)?lt(t,""):st(t)}:st,ut=function(t){return null==t},ft=ut,dt=TypeError,pt=function(t){if(ft(t))throw dt("Can't call method on "+t);return t},ht=ct,vt=pt,gt=function(t){return ht(vt(t))},mt="object"==typeof document&&document.all,bt={all:mt,IS_HTMLDDA:void 0===mt&&void 0!==mt},yt=bt.all,wt=bt.IS_HTMLDDA?function(t){return"function"==typeof t||t===yt}:function(t){return"function"==typeof t},Et=wt,Ot=bt.all,Ct=bt.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:Et(t)||t===Ot}:function(t){return"object"==typeof t?null!==t:Et(t)},Tt=P,Lt=wt,St=function(t,e){return arguments.length<2?(r=Tt[t],Lt(r)?r:void 0):Tt[t]&&Tt[t][e];var r},At=ot({}.isPrototypeOf),_t=P,Rt=St("navigator","userAgent")||"",Mt=_t.process,xt=_t.Deno,Pt=Mt&&Mt.versions||xt&&xt.version,kt=Pt&&Pt.v8;kt&&(Y=(V=kt.split("."))[0]>0&&V[0]<4?1:+(V[0]+V[1])),!Y&&Rt&&(!(V=Rt.match(/Edge\/(\d+)/))||V[1]>=74)&&(V=Rt.match(/Chrome\/(\d+)/))&&(Y=+V[1]);var jt=Y,Nt=j,It=!!Object.getOwnPropertySymbols&&!Nt((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&jt&&jt<41})),zt=It&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ht=St,Bt=wt,Dt=At,Ft=Object,Ut=zt?function(t){return"symbol"==typeof t}:function(t){var e=Ht("Symbol");return Bt(e)&&Dt(e.prototype,Ft(t))},Wt=String,Vt=wt,Yt=function(t){try{return Wt(t)}catch(e){return"Object"}},$t=TypeError,Qt=function(t){if(Vt(t))return t;throw $t(Yt(t)+" is not a function")},Xt=Qt,Gt=ut,Kt=B,Zt=wt,Jt=Ct,qt=TypeError,te={exports:{}},ee=P,re=Object.defineProperty,ne=function(t,e){try{re(ee,t,{value:e,configurable:!0,writable:!0})}catch(r){ee[t]=e}return e},oe=ne,ie="__core-js_shared__",ae=P[ie]||oe(ie,{}),se=ae;(te.exports=function(t,e){return se[t]||(se[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.5",mode:"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE",source:"https://github.com/zloirock/core-js"});var le=pt,ce=Object,ue=function(t){return ce(le(t))},fe=ue,de=ot({}.hasOwnProperty),pe=Object.hasOwn||function(t,e){return de(fe(t),e)},he=ot,ve=0,ge=Math.random(),me=he(1..toString),be=function(t){return"Symbol("+(void 0===t?"":t)+")_"+me(++ve+ge,36)},ye=P,we=te.exports,Ee=pe,Oe=be,Ce=It,Te=zt,Le=we("wks"),Se=ye.Symbol,Ae=Se&&Se.for,_e=Te?Se:Se&&Se.withoutSetter||Oe,Re=function(t){if(!Ee(Le,t)||!Ce&&"string"!=typeof Le[t]){var e="Symbol."+t;Ce&&Ee(Se,t)?Le[t]=Se[t]:Le[t]=Te&&Ae?Ae(e):_e(e)}return Le[t]},Me=B,xe=Ct,Pe=Ut,ke=function(t,e){var r=t[e];return Gt(r)?void 0:Xt(r)},je=function(t,e){var r,n;if("string"===e&&Zt(r=t.toString)&&!Jt(n=Kt(r,t)))return n;if(Zt(r=t.valueOf)&&!Jt(n=Kt(r,t)))return n;if("string"!==e&&Zt(r=t.toString)&&!Jt(n=Kt(r,t)))return n;throw qt("Can't convert object to primitive value")},Ne=TypeError,Ie=Re("toPrimitive"),ze=function(t,e){if(!xe(t)||Pe(t))return t;var r,n=ke(t,Ie);if(n){if(void 0===e&&(e="default"),r=Me(n,t,e),!xe(r)||Pe(r))return r;throw Ne("Can't convert object to primitive value")}return void 0===e&&(e="number"),je(t,e)},He=Ut,Be=function(t){var e=ze(t,"string");return He(e)?e:e+""},De=Ct,Fe=P.document,Ue=De(Fe)&&De(Fe.createElement),We=function(t){return Ue?Fe.createElement(t):{}},Ve=We,Ye=!N&&!j((function(){return 7!=Object.defineProperty(Ve("div"),"a",{get:function(){return 7}}).a})),$e=N,Qe=B,Xe=D,Ge=$,Ke=gt,Ze=Be,Je=pe,qe=Ye,tr=Object.getOwnPropertyDescriptor;k.f=$e?tr:function(t,e){if(t=Ke(t),e=Ze(e),qe)try{return tr(t,e)}catch(r){}if(Je(t,e))return Ge(!Qe(Xe.f,t,e),t[e])};var er={},rr=N&&j((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),nr=Ct,or=String,ir=TypeError,ar=function(t){if(nr(t))return t;throw ir(or(t)+" is not an object")},sr=N,lr=Ye,cr=rr,ur=ar,fr=Be,dr=TypeError,pr=Object.defineProperty,hr=Object.getOwnPropertyDescriptor,vr="enumerable",gr="configurable",mr="writable";er.f=sr?cr?function(t,e,r){if(ur(t),e=fr(e),ur(r),"function"==typeof t&&"prototype"===e&&"value"in r&&mr in r&&!r[mr]){var n=hr(t,e);n&&n[mr]&&(t[e]=r.value,r={configurable:gr in r?r[gr]:n[gr],enumerable:vr in r?r[vr]:n[vr],writable:!1})}return pr(t,e,r)}:pr:function(t,e,r){if(ur(t),e=fr(e),ur(r),lr)try{return pr(t,e,r)}catch(n){}if("get"in r||"set"in r)throw dr("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var br=er,yr=$,wr=N?function(t,e,r){return br.f(t,e,yr(1,r))}:function(t,e,r){return t[e]=r,t},Er={exports:{}},Or=N,Cr=pe,Tr=Function.prototype,Lr=Or&&Object.getOwnPropertyDescriptor,Sr=Cr(Tr,"name"),Ar={EXISTS:Sr,PROPER:Sr&&"something"===function(){}.name,CONFIGURABLE:Sr&&(!Or||Or&&Lr(Tr,"name").configurable)},_r=wt,Rr=ae,Mr=ot(Function.toString);_r(Rr.inspectSource)||(Rr.inspectSource=function(t){return Mr(t)});var xr,Pr,kr,jr=Rr.inspectSource,Nr=wt,Ir=P.WeakMap,zr=Nr(Ir)&&/native code/.test(String(Ir)),Hr=te.exports,Br=be,Dr=Hr("keys"),Fr=function(t){return Dr[t]||(Dr[t]=Br(t))},Ur={},Wr=zr,Vr=P,Yr=Ct,$r=wr,Qr=pe,Xr=ae,Gr=Fr,Kr=Ur,Zr="Object already initialized",Jr=Vr.TypeError,qr=Vr.WeakMap;if(Wr||Xr.state){var tn=Xr.state||(Xr.state=new qr);tn.get=tn.get,tn.has=tn.has,tn.set=tn.set,xr=function(t,e){if(tn.has(t))throw Jr(Zr);return e.facade=t,tn.set(t,e),e},Pr=function(t){return tn.get(t)||{}},kr=function(t){return tn.has(t)}}else{var en=Gr("state");Kr[en]=!0,xr=function(t,e){if(Qr(t,en))throw Jr(Zr);return e.facade=t,$r(t,en,e),e},Pr=function(t){return Qr(t,en)?t[en]:{}},kr=function(t){return Qr(t,en)}}var rn={set:xr,get:Pr,has:kr,enforce:function(t){return kr(t)?Pr(t):xr(t,{})},getterFor:function(t){return function(e){var r;if(!Yr(e)||(r=Pr(e)).type!==t)throw Jr("Incompatible receiver, "+t+" required");return r}}},nn=j,on=wt,an=pe,sn=N,ln=Ar.CONFIGURABLE,cn=jr,un=rn.enforce,fn=rn.get,dn=Object.defineProperty,pn=sn&&!nn((function(){return 8!==dn((function(){}),"length",{value:8}).length})),hn=String(String).split("String"),vn=Er.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!an(t,"name")||ln&&t.name!==e)&&(sn?dn(t,"name",{value:e,configurable:!0}):t.name=e),pn&&r&&an(r,"arity")&&t.length!==r.arity&&dn(t,"length",{value:r.arity});try{r&&an(r,"constructor")&&r.constructor?sn&&dn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(o){}var n=un(t);return an(n,"source")||(n.source=hn.join("string"==typeof e?e:"")),t};Function.prototype.toString=vn((function(){return on(this)&&fn(this).source||cn(this)}),"toString");var gn=wt,mn=er,bn=Er.exports,yn=ne,wn={},En=Math.ceil,On=Math.floor,Cn=Math.trunc||function(t){var e=+t;return(e>0?On:En)(e)},Tn=function(t){var e=+t;return e!=e||0===e?0:Cn(e)},Ln=Tn,Sn=Math.max,An=Math.min,_n=Tn,Rn=Math.min,Mn=function(t){return t>0?Rn(_n(t),9007199254740991):0},xn=function(t){return Mn(t.length)},Pn=gt,kn=function(t,e){var r=Ln(t);return r<0?Sn(r+e,0):An(r,e)},jn=xn,Nn=function(t){return function(e,r,n){var o,i=Pn(e),a=jn(i),s=kn(n,a);if(t&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===r)return t||s||0;return!t&&-1}},In={includes:Nn(!0),indexOf:Nn(!1)},zn=pe,Hn=gt,Bn=In.indexOf,Dn=Ur,Fn=ot([].push),Un=function(t,e){var r,n=Hn(t),o=0,i=[];for(r in n)!zn(Dn,r)&&zn(n,r)&&Fn(i,r);for(;e.length>o;)zn(n,r=e[o++])&&(~Bn(i,r)||Fn(i,r));return i},Wn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Vn=Un,Yn=Wn.concat("length","prototype");wn.f=Object.getOwnPropertyNames||function(t){return Vn(t,Yn)};var $n={};$n.f=Object.getOwnPropertySymbols;var Qn=St,Xn=wn,Gn=$n,Kn=ar,Zn=ot([].concat),Jn=Qn("Reflect","ownKeys")||function(t){var e=Xn.f(Kn(t)),r=Gn.f;return r?Zn(e,r(t)):e},qn=pe,to=Jn,eo=k,ro=er,no=j,oo=wt,io=/#|\.prototype\./,ao=function(t,e){var r=lo[so(t)];return r==uo||r!=co&&(oo(e)?no(e):!!e)},so=ao.normalize=function(t){return String(t).replace(io,".").toLowerCase()},lo=ao.data={},co=ao.NATIVE="N",uo=ao.POLYFILL="P",fo=ao,po=P,ho=k.f,vo=wr,go=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(gn(r)&&bn(r,i,n),n.global)o?t[e]=r:yn(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(a){}o?t[e]=r:mn.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},mo=ne,bo=function(t,e,r){for(var n=to(e),o=ro.f,i=eo.f,a=0;a<n.length;a++){var s=n[a];qn(t,s)||r&&qn(r,s)||o(t,s,i(e,s))}},yo=fo,wo=Qt,Eo=I,Oo=ot(ot.bind),Co=et,To=Array.isArray||function(t){return"Array"==Co(t)},Lo={};Lo[Re("toStringTag")]="z";var So="[object z]"===String(Lo),Ao=wt,_o=et,Ro=Re("toStringTag"),Mo=Object,xo="Arguments"==_o(function(){return arguments}()),Po=ot,ko=j,jo=wt,No=So?_o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(r){}}(e=Mo(t),Ro))?r:xo?_o(e):"Object"==(n=_o(e))&&Ao(e.callee)?"Arguments":n},Io=jr,zo=function(){},Ho=[],Bo=St("Reflect","construct"),Do=/^\s*(?:class|function)\b/,Fo=Po(Do.exec),Uo=!Do.exec(zo),Wo=function(t){if(!jo(t))return!1;try{return Bo(zo,Ho,t),!0}catch(e){return!1}},Vo=function(t){if(!jo(t))return!1;switch(No(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Uo||!!Fo(Do,Io(t))}catch(e){return!0}};Vo.sham=!0;var Yo=!Bo||ko((function(){var t;return Wo(Wo.call)||!Wo(Object)||!Wo((function(){t=!0}))||t}))?Vo:Wo,$o=To,Qo=Yo,Xo=Ct,Go=Re("species"),Ko=Array,Zo=function(t){var e;return $o(t)&&(e=t.constructor,(Qo(e)&&(e===Ko||$o(e.prototype))||Xo(e)&&null===(e=e[Go]))&&(e=void 0)),void 0===e?Ko:e},Jo=function(t,e){return wo(t),void 0===e?t:Eo?Oo(t,e):function(){return t.apply(e,arguments)}},qo=ct,ti=ue,ei=xn,ri=function(t,e){return new(Zo(t))(0===e?0:e)},ni=ot([].push),oi=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=7==t,s=5==t||i;return function(l,c,u,f){for(var d,p,h=ti(l),v=qo(h),g=Jo(c,u),m=ei(v),b=0,y=f||ri,w=e?y(l,m):r||a?y(l,0):void 0;m>b;b++)if((s||b in v)&&(p=g(d=v[b],b,h),t))if(e)w[b]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:ni(w,d)}else switch(t){case 4:return!1;case 7:ni(w,d)}return i?-1:n||o?o:w}},ii={forEach:oi(0),map:oi(1),filter:oi(2),some:oi(3),every:oi(4),find:oi(5),findIndex:oi(6),filterReject:oi(7)},ai={},si=Un,li=Wn,ci=Object.keys||function(t){return si(t,li)},ui=N,fi=rr,di=er,pi=ar,hi=gt,vi=ci;ai.f=ui&&!fi?Object.defineProperties:function(t,e){pi(t);for(var r,n=hi(e),o=vi(e),i=o.length,a=0;i>a;)di.f(t,r=o[a++],n[r]);return t};var gi,mi=St("document","documentElement"),bi=ar,yi=ai,wi=Wn,Ei=Ur,Oi=mi,Ci=We,Ti="prototype",Li="script",Si=Fr("IE_PROTO"),Ai=function(){},_i=function(t){return"<"+Li+">"+t+"</"+Li+">"},Ri=function(t){t.write(_i("")),t.close();var e=t.parentWindow.Object;return t=null,e},Mi=function(){try{gi=new ActiveXObject("htmlfile")}catch(o){}var t,e,r;Mi="undefined"!=typeof document?document.domain&&gi?Ri(gi):(e=Ci("iframe"),r="java"+Li+":",e.style.display="none",Oi.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(_i("document.F=Object")),t.close(),t.F):Ri(gi);for(var n=wi.length;n--;)delete Mi[Ti][wi[n]];return Mi()};Ei[Si]=!0;var xi=Re,Pi=Object.create||function(t,e){var r;return null!==t?(Ai[Ti]=bi(t),r=new Ai,Ai[Ti]=null,r[Si]=t):r=Mi(),void 0===e?r:yi.f(r,e)},ki=er.f,ji=xi("unscopables"),Ni=Array.prototype;null==Ni[ji]&&ki(Ni,ji,{configurable:!0,value:Pi(null)});var Ii=function(t,e){var r,n,o,i,a,s=t.target,l=t.global,c=t.stat;if(r=l?po:c?po[s]||mo(s,{}):(po[s]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(a=ho(r,n))&&a.value:r[n],!yo(l?n:s+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;bo(i,o)}(t.sham||o&&o.sham)&&vo(i,"sham",!0),go(r,n,i,t)}},zi=ii.find,Hi=function(t){Ni[ji][t]=!0},Bi="find",Di=!0;Bi in[]&&Array(1)[Bi]((function(){Di=!1})),Ii({target:"Array",proto:!0,forced:Di},{find:function(t){return zi(this,t,arguments.length>1?arguments[1]:void 0)}}),Hi(Bi);var Fi={HIDE:"__react_tooltip_hide_event",REBUILD:"__react_tooltip_rebuild_event",SHOW:"__react_tooltip_show_event"},Ui=function(t,e){var r;"function"==typeof window.CustomEvent?r=new window.CustomEvent(t,{detail:e}):(r=document.createEvent("Event")).initEvent(t,!1,!0,e),window.dispatchEvent(r)};var Wi=function(t,e){var r=this.state.show,n=this.props.id,o=this.isCapture(e.currentTarget),i=e.currentTarget.getAttribute("currentItem");o||e.stopPropagation(),r&&"true"===i?t||this.hideTooltip(e):(e.currentTarget.setAttribute("currentItem","true"),Vi(e.currentTarget,this.getTargetArray(n)),this.showTooltip(e))},Vi=function(t,e){for(var r=0;r<e.length;r++)t!==e[r]?e[r].setAttribute("currentItem","false"):e[r].setAttribute("currentItem","true")},Yi={id:"9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf",set:function(t,e,r){this.id in t?t[this.id][e]=r:Object.defineProperty(t,this.id,{configurable:!0,value:O({},e,r)})},get:function(t,e){var r=t[this.id];if(void 0!==r)return r[e]}};var $i=function(t,e,r){for(var n,o,i=e.respectEffect,a=void 0!==i&&i,s=e.customEvent,l=void 0!==s&&s,c=this.props.id,u=null,f=r.target;null===u&&null!==f;)o=f,u=f.getAttribute("data-tip")||null,n=f.getAttribute("data-for")||null,f=f.parentElement;if(f=o||r.target,!this.isCustomEvent(f)||l){var d=null==c&&null==n||n===c;if(null!=u&&(!a||"float"===this.getEffect(f))&&d){var p=function(t){var e={};for(var r in t)"function"==typeof t[r]?e[r]=t[r].bind(t):e[r]=t[r];return e}(r);p.currentTarget=f,t(p)}}},Qi=function(t,e){var r={};return t.forEach((function(t){var n=t.getAttribute(e);n&&n.split(" ").forEach((function(t){return r[t]=!0}))})),r},Xi=function(){return document.getElementsByTagName("body")[0]};function Gi(t,e,r,n,o,i,a){var s=Ki(r),l=s.width,c=s.height,u=Ki(e),f=u.width,d=u.height,p=Zi(t,e,i),h=p.mouseX,v=p.mouseY,g=Ji(i,f,d,l,c),m=qi(a),b=m.extraOffsetX,y=m.extraOffsetY,w=window.innerWidth,E=window.innerHeight,O=ta(r),C=O.parentTop,T=O.parentLeft,L=function(t){var e=g[t].l;return h+e+b},S=function(t){var e=g[t].t;return v+e+y},A=function(t){return function(t){var e=g[t].r;return h+e+b}(t)>w},_=function(t){return function(t){var e=g[t].b;return v+e+y}(t)>E},M=function(t){return function(t){return L(t)<0}(t)||A(t)||function(t){return S(t)<0}(t)||_(t)},x=function(t){return!M(t)},P={top:x("top"),bottom:x("bottom"),left:x("left"),right:x("right")};var k,j=function(){var t,e=R(o.split(",").concat(n,["top","bottom","left","right"]));try{for(e.s();!(t=e.n()).done;){var r=t.value;if(P[r])return r}}catch(i){e.e(i)}finally{e.f()}return n}(),N=!1;return j&&j!==n&&(N=!0,k=j),N?{isNewState:!0,newState:{place:k}}:{isNewState:!1,position:{left:parseInt(L(n)-T,10),top:parseInt(S(n)-C,10)}}}var Ki=function(t){var e=t.getBoundingClientRect(),r=e.height,n=e.width;return{height:parseInt(r,10),width:parseInt(n,10)}},Zi=function(t,e,r){var n=e.getBoundingClientRect(),o=n.top,i=n.left,a=Ki(e),s=a.width,l=a.height;return"float"===r?{mouseX:t.clientX,mouseY:t.clientY}:{mouseX:i+s/2,mouseY:o+l/2}},Ji=function(t,e,r,n,o){var i,a,s,l;return"float"===t?(i={l:-n/2,r:n/2,t:-(o+3+2),b:-3},s={l:-n/2,r:n/2,t:15,b:o+3+2+12},l={l:-(n+3+2),r:-3,t:-o/2,b:o/2},a={l:3,r:n+3+2,t:-o/2,b:o/2}):"solid"===t&&(i={l:-n/2,r:n/2,t:-(r/2+o+2),b:-r/2},s={l:-n/2,r:n/2,t:r/2,b:r/2+o+2},l={l:-(n+e/2+2),r:-e/2,t:-o/2,b:o/2},a={l:e/2,r:n+e/2+2,t:-o/2,b:o/2}),{top:i,bottom:s,left:l,right:a}},qi=function(t){var e=0,r=0;for(var n in"[object String]"===Object.prototype.toString.apply(t)&&(t=JSON.parse(t.toString().replace(/'/g,'"'))),t)"top"===n?r-=parseInt(t[n],10):"bottom"===n?r+=parseInt(t[n],10):"left"===n?e-=parseInt(t[n],10):"right"===n&&(e+=parseInt(t[n],10));return{extraOffsetX:e,extraOffsetY:r}},ta=function(t){for(var e=t;e;){var r=window.getComputedStyle(e);if("none"!==r.getPropertyValue("transform")||"transform"===r.getPropertyValue("will-change"))break;e=e.parentElement}return{parentTop:e&&e.getBoundingClientRect().top||0,parentLeft:e&&e.getBoundingClientRect().left||0}};function ea(t,e,r,n){if(e)return e;if(null!=r)return r;if(null===r)return null;var o=/<br\s*\/?>/;return n&&"false"!==n&&o.test(t)?t.split(o).map((function(t,e){return l.createElement("span",{key:e,className:"multi-line"},t)})):t}function ra(t){var e={};return Object.keys(t).filter((function(t){return/(^aria-\w+$|^role$)/.test(t)})).forEach((function(r){e[r]=t[r]})),e}function na(t){var e=t.length;return t.hasOwnProperty?Array.prototype.slice.call(t):new Array(e).fill().map((function(e){return t[e]}))}var oa={dark:{text:"#fff",background:"#222",border:"transparent",arrow:"#222"},success:{text:"#fff",background:"#8DC572",border:"transparent",arrow:"#8DC572"},warning:{text:"#fff",background:"#F0AD4E",border:"transparent",arrow:"#F0AD4E"},error:{text:"#fff",background:"#BE6464",border:"transparent",arrow:"#BE6464"},info:{text:"#fff",background:"#337AB7",border:"transparent",arrow:"#337AB7"},light:{text:"#222",background:"#fff",border:"transparent",arrow:"#fff"}};var ia,aa,sa="8px 21px",la={tooltip:3,arrow:0};function ca(t,e,r,n,o,i){return function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:sa,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:la,o=e.text,i=e.background,a=e.border,s=e.arrow,l=n.arrow,c=n.tooltip;return"\n \t.".concat(t," {\n\t color: ").concat(o,";\n\t background: ").concat(i,";\n\t border: 1px solid ").concat(a,";\n\t border-radius: ").concat(c,"px;\n\t padding: ").concat(r,";\n \t}\n\n \t.").concat(t,".place-top {\n margin-top: -10px;\n }\n .").concat(t,'.place-top::before {\n content: "";\n background-color: inherit;\n position: absolute;\n z-index: 2;\n width: 20px;\n height: 12px;\n }\n .').concat(t,'.place-top::after {\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-top-right-radius: ').concat(l,"px;\n border: 1px solid ").concat(a,";\n background-color: ").concat(s,";\n z-index: -2;\n bottom: -6px;\n left: 50%;\n margin-left: -6px;\n transform: rotate(135deg);\n }\n\n .").concat(t,".place-bottom {\n margin-top: 10px;\n }\n .").concat(t,'.place-bottom::before {\n content: "";\n background-color: inherit;\n position: absolute;\n z-index: -1;\n width: 18px;\n height: 10px;\n }\n .').concat(t,'.place-bottom::after {\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-top-right-radius: ').concat(l,"px;\n border: 1px solid ").concat(a,";\n background-color: ").concat(s,";\n z-index: -2;\n top: -6px;\n left: 50%;\n margin-left: -6px;\n transform: rotate(45deg);\n }\n\n .").concat(t,".place-left {\n margin-left: -10px;\n }\n .").concat(t,'.place-left::before {\n content: "";\n background-color: inherit;\n position: absolute;\n z-index: -1;\n width: 10px;\n height: 18px;\n }\n .').concat(t,'.place-left::after {\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-top-right-radius: ').concat(l,"px;\n border: 1px solid ").concat(a,";\n background-color: ").concat(s,";\n z-index: -2;\n right: -6px;\n top: 50%;\n margin-top: -6px;\n transform: rotate(45deg);\n }\n\n .").concat(t,".place-right {\n margin-left: 10px;\n }\n .").concat(t,'.place-right::before {\n content: "";\n background-color: inherit;\n position: absolute;\n z-index: -1;\n width: 10px;\n height: 18px;\n }\n .').concat(t,'.place-right::after {\n content: "";\n position: absolute;\n width: 10px;\n height: 10px;\n border-top-right-radius: ').concat(l,"px;\n border: 1px solid ").concat(a,";\n background-color: ").concat(s,";\n z-index: -2;\n left: -6px;\n top: 50%;\n margin-top: -6px;\n transform: rotate(-135deg);\n }\n ")}(t,function(t,e,r){var n=t.text,o=t.background,i=t.border,a=t.arrow?t.arrow:t.background,s=function(t){return oa[t]?w({},oa[t]):void 0}(e);n&&(s.text=n);o&&(s.background=o);r&&(s.border=i||("light"===e?"black":"white"));a&&(s.arrow=a);return s}(e,r,n),o,i)}var ua,fa=function(t){t.hide=function(t){Ui(Fi.HIDE,{target:t})},t.rebuild=function(){Ui(Fi.REBUILD)},t.show=function(t){Ui(Fi.SHOW,{target:t})},t.prototype.globalRebuild=function(){this.mount&&(this.unbindListener(),this.bindListener())},t.prototype.globalShow=function(t){if(this.mount){var e=!!(t&&t.detail&&t.detail.target);this.showTooltip({currentTarget:e&&t.detail.target},!0)}},t.prototype.globalHide=function(t){if(this.mount){var e=!!(t&&t.detail&&t.detail.target);this.hideTooltip({currentTarget:e&&t.detail.target},e)}}}(ia=function(t){t.prototype.bindWindowEvents=function(t){window.removeEventListener(Fi.HIDE,this.globalHide),window.addEventListener(Fi.HIDE,this.globalHide,!1),window.removeEventListener(Fi.REBUILD,this.globalRebuild),window.addEventListener(Fi.REBUILD,this.globalRebuild,!1),window.removeEventListener(Fi.SHOW,this.globalShow),window.addEventListener(Fi.SHOW,this.globalShow,!1),t&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},t.prototype.unbindWindowEvents=function(){window.removeEventListener(Fi.HIDE,this.globalHide),window.removeEventListener(Fi.REBUILD,this.globalRebuild),window.removeEventListener(Fi.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},t.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(ia=function(t){t.prototype.isCustomEvent=function(t){return this.state.event||!!t.getAttribute("data-event")},t.prototype.customBindListener=function(t){var e=this,r=this.state,n=r.event,o=r.eventOff,i=t.getAttribute("data-event")||n,a=t.getAttribute("data-event-off")||o;i.split(" ").forEach((function(r){t.removeEventListener(r,Yi.get(t,r));var n=Wi.bind(e,a);Yi.set(t,r,n),t.addEventListener(r,n,!1)})),a&&a.split(" ").forEach((function(r){t.removeEventListener(r,e.hideTooltip),t.addEventListener(r,e.hideTooltip,!1)}))},t.prototype.customUnbindListener=function(t){var e=this.state,r=e.event,n=e.eventOff,o=r||t.getAttribute("data-event"),i=n||t.getAttribute("data-event-off");t.removeEventListener(o,Yi.get(t,r)),i&&t.removeEventListener(i,this.hideTooltip)}}(ia=function(t){t.prototype.isCapture=function(t){return t&&"true"===t.getAttribute("data-iscapture")||this.props.isCapture||!1}}(ia=function(t){t.prototype.getEffect=function(t){return t.getAttribute("data-effect")||this.props.effect||"float"}}(ia=function(t){t.prototype.isBodyMode=function(){return!!this.props.bodyMode},t.prototype.bindBodyListener=function(t){var e=this,r=this.state,n=r.event,o=r.eventOff,i=r.possibleCustomEvents,a=r.possibleCustomEventsOff,s=Xi(),l=Qi(t,"data-event"),c=Qi(t,"data-event-off");null!=n&&(l[n]=!0),null!=o&&(c[o]=!0),i.split(" ").forEach((function(t){return l[t]=!0})),a.split(" ").forEach((function(t){return c[t]=!0})),this.unbindBodyListener(s);var u=this.bodyModeListeners={};for(var f in null==n&&(u.mouseover=$i.bind(this,this.showTooltip,{}),u.mousemove=$i.bind(this,this.updateTooltip,{respectEffect:!0}),u.mouseout=$i.bind(this,this.hideTooltip,{})),l)u[f]=$i.bind(this,(function(t){var r=t.currentTarget.getAttribute("data-event-off")||o;Wi.call(e,r,t)}),{customEvent:!0});for(var d in c)u[d]=$i.bind(this,this.hideTooltip,{customEvent:!0});for(var p in u)s.addEventListener(p,u[p])},t.prototype.unbindBodyListener=function(t){t=t||Xi();var e=this.bodyModeListeners;for(var r in e)t.removeEventListener(r,e[r])}}((aa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&L(t,e)}(i,t);var e,r,n,o=A(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).state={uuid:t.uuid||"t"+b(),place:t.place||"top",desiredPlace:t.place||"top",type:t.type||"dark",effect:t.effect||"float",show:!1,border:!1,borderClass:"border",customColors:{},customRadius:{},offset:{},padding:t.padding,extraClass:"",html:!1,delayHide:0,delayShow:0,event:t.event||null,eventOff:t.eventOff||null,currentEvent:null,currentTarget:null,ariaProps:ra(t),isEmptyTip:!1,disable:!1,possibleCustomEvents:t.possibleCustomEvents||"",possibleCustomEventsOff:t.possibleCustomEventsOff||"",originTooltip:null,isMultiline:!1},e.bind(["showTooltip","updateTooltip","hideTooltip","hideTooltipOnScroll","getTooltipContent","globalRebuild","globalShow","globalHide","onWindowResize","mouseOnToolTip"]),e.mount=!0,e.delayShowLoop=null,e.delayHideLoop=null,e.delayReshow=null,e.intervalUpdateContent=null,e}return e=i,r=[{key:"bind",value:function(t){var e=this;t.forEach((function(t){e[t]=e[t].bind(e)}))}},{key:"componentDidMount",value:function(){var t=this.props;t.insecure;var e=t.resizeHide,r=t.disableInternalStyle;this.mount=!0,this.bindListener(),this.bindWindowEvents(e),r||this.injectStyles()}},{key:"componentWillUnmount",value:function(){this.mount=!1,this.clearTimer(),this.unbindListener(),this.removeScrollListener(this.state.currentTarget),this.unbindWindowEvents()}},{key:"injectStyles",value:function(){var t=this.tooltipRef;if(t){for(var e,r=t.parentNode;r.parentNode;)r=r.parentNode;switch(r.constructor.name){case"Document":case"HTMLDocument":case void 0:e=r.head;break;default:e=r}if(!e.querySelector("style[data-react-tooltip]")){var n=document.createElement("style");n.textContent='.__react_component_tooltip {\n border-radius: 3px;\n display: inline-block;\n font-size: 13px;\n left: -999em;\n opacity: 0;\n position: fixed;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n top: -999em;\n visibility: hidden;\n z-index: 999;\n}\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\n pointer-events: auto;\n}\n.__react_component_tooltip::before, .__react_component_tooltip::after {\n content: "";\n width: 0;\n height: 0;\n position: absolute;\n}\n.__react_component_tooltip.show {\n opacity: 0.9;\n margin-top: 0;\n margin-left: 0;\n visibility: visible;\n}\n.__react_component_tooltip.place-top::before {\n bottom: 0;\n left: 50%;\n margin-left: -11px;\n}\n.__react_component_tooltip.place-bottom::before {\n top: 0;\n left: 50%;\n margin-left: -11px;\n}\n.__react_component_tooltip.place-left::before {\n right: 0;\n top: 50%;\n margin-top: -9px;\n}\n.__react_component_tooltip.place-right::before {\n left: 0;\n top: 50%;\n margin-top: -9px;\n}\n.__react_component_tooltip .multi-line {\n display: block;\n padding: 2px 0;\n text-align: center;\n}',n.setAttribute("data-react-tooltip","true"),e.appendChild(n)}}}},{key:"mouseOnToolTip",value:function(){return!(!this.state.show||!this.tooltipRef)&&(this.tooltipRef.matches||(this.tooltipRef.msMatchesSelector?this.tooltipRef.matches=this.tooltipRef.msMatchesSelector:this.tooltipRef.matches=this.tooltipRef.mozMatchesSelector),this.tooltipRef.matches(":hover"))}},{key:"getTargetArray",value:function(t){var e,r=[];if(t){var n=t.replace(/\\/g,"\\\\").replace(/"/g,'\\"');e='[data-tip][data-for="'.concat(n,'"]')}else e="[data-tip]:not([data-for])";return na(document.getElementsByTagName("*")).filter((function(t){return t.shadowRoot})).forEach((function(t){r=r.concat(na(t.shadowRoot.querySelectorAll(e)))})),r.concat(na(document.querySelectorAll(e)))}},{key:"bindListener",value:function(){var t=this,e=this.props,r=e.id,n=e.globalEventOff,o=e.isCapture,i=this.getTargetArray(r);i.forEach((function(e){null===e.getAttribute("currentItem")&&e.setAttribute("currentItem","false"),t.unbindBasicListener(e),t.isCustomEvent(e)&&t.customUnbindListener(e)})),this.isBodyMode()?this.bindBodyListener(i):i.forEach((function(e){var r=t.isCapture(e),n=t.getEffect(e);t.isCustomEvent(e)?t.customBindListener(e):(e.addEventListener("mouseenter",t.showTooltip,r),e.addEventListener("focus",t.showTooltip,r),"float"===n&&e.addEventListener("mousemove",t.updateTooltip,r),e.addEventListener("mouseleave",t.hideTooltip,r),e.addEventListener("blur",t.hideTooltip,r))})),n&&(window.removeEventListener(n,this.hideTooltip),window.addEventListener(n,this.hideTooltip,o)),this.bindRemovalTracker()}},{key:"unbindListener",value:function(){var t=this,e=this.props,r=e.id,n=e.globalEventOff;this.isBodyMode()?this.unbindBodyListener():this.getTargetArray(r).forEach((function(e){t.unbindBasicListener(e),t.isCustomEvent(e)&&t.customUnbindListener(e)})),n&&window.removeEventListener(n,this.hideTooltip),this.unbindRemovalTracker()}},{key:"unbindBasicListener",value:function(t){var e=this.isCapture(t);t.removeEventListener("mouseenter",this.showTooltip,e),t.removeEventListener("mousemove",this.updateTooltip,e),t.removeEventListener("mouseleave",this.hideTooltip,e)}},{key:"getTooltipContent",value:function(){var t,e=this.props,r=e.getContent,n=e.children;return r&&(t=Array.isArray(r)?r[0]&&r[0](this.state.originTooltip):r(this.state.originTooltip)),ea(this.state.originTooltip,n,t,this.state.isMultiline)}},{key:"isEmptyTip",value:function(t){return"string"==typeof t&&""===t||null===t}},{key:"showTooltip",value:function(t,e){if(this.tooltipRef){if(e&&!this.getTargetArray(this.props.id).some((function(e){return e===t.currentTarget})))return;var r=this.props,n=r.multiline,o=r.getContent,i=t.currentTarget.getAttribute("data-tip"),a=t.currentTarget.getAttribute("data-multiline")||n||!1,s=t instanceof window.FocusEvent||e,l=!0;t.currentTarget.getAttribute("data-scroll-hide")?l="true"===t.currentTarget.getAttribute("data-scroll-hide"):null!=this.props.scrollHide&&(l=this.props.scrollHide),t&&t.currentTarget&&t.currentTarget.setAttribute&&t.currentTarget.setAttribute("aria-describedby",this.props.id||this.state.uuid);var c=t.currentTarget.getAttribute("data-place")||this.props.place||"top",u=s?"solid":this.getEffect(t.currentTarget),f=t.currentTarget.getAttribute("data-offset")||this.props.offset||{},d=Gi(t,t.currentTarget,this.tooltipRef,c.split(",")[0],c,u,f);d.position&&this.props.overridePosition&&(d.position=this.props.overridePosition(d.position,t,t.currentTarget,this.tooltipRef,c,c,u,f));var p=d.isNewState?d.newState.place:c.split(",")[0];this.clearTimer();var h=t.currentTarget,v=this.state.show?h.getAttribute("data-delay-update")||this.props.delayUpdate:0,g=this,m=function(){g.setState({originTooltip:i,isMultiline:a,desiredPlace:c,place:p,type:h.getAttribute("data-type")||g.props.type||"dark",customColors:{text:h.getAttribute("data-text-color")||g.props.textColor||null,background:h.getAttribute("data-background-color")||g.props.backgroundColor||null,border:h.getAttribute("data-border-color")||g.props.borderColor||null,arrow:h.getAttribute("data-arrow-color")||g.props.arrowColor||null},customRadius:{tooltip:h.getAttribute("data-tooltip-radius")||g.props.tooltipRadius||"3",arrow:h.getAttribute("data-arrow-radius")||g.props.arrowRadius||"0"},effect:u,offset:f,padding:h.getAttribute("data-padding")||g.props.padding,html:(h.getAttribute("data-html")?"true"===h.getAttribute("data-html"):g.props.html)||!1,delayShow:h.getAttribute("data-delay-show")||g.props.delayShow||0,delayHide:h.getAttribute("data-delay-hide")||g.props.delayHide||0,delayUpdate:h.getAttribute("data-delay-update")||g.props.delayUpdate||0,border:(h.getAttribute("data-border")?"true"===h.getAttribute("data-border"):g.props.border)||!1,borderClass:h.getAttribute("data-border-class")||g.props.borderClass||"border",extraClass:h.getAttribute("data-class")||g.props.class||g.props.className||"",disable:(h.getAttribute("data-tip-disable")?"true"===h.getAttribute("data-tip-disable"):g.props.disable)||!1,currentTarget:h},(function(){l&&g.addScrollListener(g.state.currentTarget),g.updateTooltip(t),o&&Array.isArray(o)&&(g.intervalUpdateContent=setInterval((function(){if(g.mount){var t=g.props.getContent,e=ea(i,"",t[0](),a),r=g.isEmptyTip(e);g.setState({isEmptyTip:r}),g.updatePosition()}}),o[1]))}))};v?this.delayReshow=setTimeout(m,v):m()}}},{key:"updateTooltip",value:function(t){var e=this,r=this.state,n=r.delayShow,o=r.disable,i=this.props,a=i.afterShow,s=i.disable,l=this.getTooltipContent(),c=t.currentTarget||t.target;if(!this.mouseOnToolTip()&&!(this.isEmptyTip(l)||o||s)){var u=this.state.show?0:parseInt(n,10),f=function(){if(Array.isArray(l)&&l.length>0||l){var r=!e.state.show;e.setState({currentEvent:t,currentTarget:c,show:!0},(function(){e.updatePosition((function(){r&&a&&a(t)}))}))}};this.delayShowLoop&&clearTimeout(this.delayShowLoop),u?this.delayShowLoop=setTimeout(f,u):(this.delayShowLoop=null,f())}}},{key:"listenForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.addEventListener("mouseleave",this.hideTooltip)}},{key:"removeListenerForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.removeEventListener("mouseleave",this.hideTooltip)}},{key:"hideTooltip",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isScroll:!1},o=this.state.disable,i=n.isScroll?0:this.state.delayHide,a=this.props,s=a.afterHide,l=a.disable,c=this.getTooltipContent();if(this.mount&&!(this.isEmptyTip(c)||o||l)){if(e&&(!this.getTargetArray(this.props.id).some((function(e){return e===t.currentTarget}))||!this.state.show))return;t&&t.currentTarget&&t.currentTarget.removeAttribute&&t.currentTarget.removeAttribute("aria-describedby");var u=function(){var e=r.state.show;r.mouseOnToolTip()?r.listenForTooltipExit():(r.removeListenerForTooltipExit(),r.setState({show:!1},(function(){r.removeScrollListener(r.state.currentTarget),e&&s&&s(t)})))};this.clearTimer(),i?this.delayHideLoop=setTimeout(u,parseInt(i,10)):u()}}},{key:"hideTooltipOnScroll",value:function(t,e){this.hideTooltip(t,e,{isScroll:!0})}},{key:"addScrollListener",value:function(t){var e=this.isCapture(t);window.addEventListener("scroll",this.hideTooltipOnScroll,e)}},{key:"removeScrollListener",value:function(t){var e=this.isCapture(t);window.removeEventListener("scroll",this.hideTooltipOnScroll,e)}},{key:"updatePosition",value:function(t){var e=this,r=this.state,n=r.currentEvent,o=r.currentTarget,i=r.place,a=r.desiredPlace,s=r.effect,l=r.offset,c=this.tooltipRef,u=Gi(n,o,c,i,a,s,l);if(u.position&&this.props.overridePosition&&(u.position=this.props.overridePosition(u.position,n,o,c,i,a,s,l)),u.isNewState)return this.setState(u.newState,(function(){e.updatePosition(t)}));t&&"function"==typeof t&&t(),c.style.left=u.position.left+"px",c.style.top=u.position.top+"px"}},{key:"clearTimer",value:function(){this.delayShowLoop&&(clearTimeout(this.delayShowLoop),this.delayShowLoop=null),this.delayHideLoop&&(clearTimeout(this.delayHideLoop),this.delayHideLoop=null),this.delayReshow&&(clearTimeout(this.delayReshow),this.delayReshow=null),this.intervalUpdateContent&&(clearInterval(this.intervalUpdateContent),this.intervalUpdateContent=null)}},{key:"hasCustomColors",value:function(){var t=this;return Boolean(Object.keys(this.state.customColors).find((function(e){return"border"!==e&&t.state.customColors[e]}))||this.state.border&&this.state.customColors.border)}},{key:"render",value:function(){var t=this,e=this.state,r=e.extraClass,n=e.html,o=e.ariaProps,a=e.disable,s=e.uuid,c=this.getTooltipContent(),u=this.isEmptyTip(c),f=this.props.disableInternalStyle?"":ca(this.state.uuid,this.state.customColors,this.state.type,this.state.border,this.state.padding,this.state.customRadius),d="__react_component_tooltip"+" ".concat(this.state.uuid)+(!this.state.show||a||u?"":" show")+(this.state.border?" "+this.state.borderClass:"")+" place-".concat(this.state.place)+" type-".concat(this.hasCustomColors()?"custom":this.state.type)+(this.props.delayUpdate?" allow_hover":"")+(this.props.clickable?" allow_click":""),p=this.props.wrapper;i.supportedWrappers.indexOf(p)<0&&(p=i.defaultProps.wrapper);var h=[d,r].filter(Boolean).join(" ");if(n){var v="".concat(c).concat(f?'\n<style aria-hidden="true">'.concat(f,"</style>"):"");return l.createElement(p,C({className:"".concat(h),id:this.props.id||s,ref:function(e){return t.tooltipRef=e}},o,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:v}}))}return l.createElement(p,C({className:"".concat(h),id:this.props.id||s},o,{ref:function(e){return t.tooltipRef=e},"data-id":"tooltip"}),f&&l.createElement("style",{dangerouslySetInnerHTML:{__html:f},"aria-hidden":"true"}),c)}}],n=[{key:"propTypes",get:function(){return{uuid:f().string,children:f().any,place:f().string,type:f().string,effect:f().string,offset:f().object,padding:f().string,multiline:f().bool,border:f().bool,borderClass:f().string,textColor:f().string,backgroundColor:f().string,borderColor:f().string,arrowColor:f().string,arrowRadius:f().string,tooltipRadius:f().string,insecure:f().bool,class:f().string,className:f().string,id:f().string,html:f().bool,delayHide:f().number,delayUpdate:f().number,delayShow:f().number,event:f().string,eventOff:f().string,isCapture:f().bool,globalEventOff:f().string,getContent:f().any,afterShow:f().func,afterHide:f().func,overridePosition:f().func,disable:f().bool,scrollHide:f().bool,resizeHide:f().bool,wrapper:f().string,bodyMode:f().bool,possibleCustomEvents:f().string,possibleCustomEventsOff:f().string,clickable:f().bool,disableInternalStyle:f().bool}}},{key:"getDerivedStateFromProps",value:function(t,e){var r=e.ariaProps,n=ra(t);return Object.keys(n).some((function(t){return n[t]!==r[t]}))?w(w({},e),{},{ariaProps:n}):null}}],r&&E(e.prototype,r),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),i}(l.Component),O(aa,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),O(aa,"supportedWrappers",["div","span"]),O(aa,"displayName","ReactTooltip"),(ua=ia=aa).prototype.bindRemovalTracker=function(){var t=this,e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(null!=e){var r=new e((function(e){for(var r=0;r<e.length;r++)for(var n=e[r],o=0;o<n.removedNodes.length;o++)if(n.removedNodes[o]===t.state.currentTarget)return void t.hideTooltip()}));r.observe(window.document,{childList:!0,subtree:!0}),this.removalTracker=r}},ia=void(ua.prototype.unbindRemovalTracker=function(){this.removalTracker&&(this.removalTracker.disconnect(),this.removalTracker=null)})||ia))||ia)||ia)||ia)||ia)||ia)||ia,da=r(6861),pa=r(4308),ha=r.n(pa);function va(){return i("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",fill:"currentColor",children:i("path",{d:"M14.4307124,13.5667899 L15.1349452,14.276759 L10.7473676,18.6288871 L6.42783259,14.2738791 L7.13782502,13.5696698 L10.7530744,17.2147744 L14.4307124,13.5667899 Z M4.79130753,8.067524 L16.3824174,11.1733525 L16.1235984,12.1392784 L4.53248848,9.03344983 L4.79130753,8.067524 Z M10.8154102,1.57503552 L15.1349452,5.93004351 L14.4249528,6.63425282 L10.809949,2.98914817 L7.13206544,6.6371327 L6.42783259,5.92716363 L10.8154102,1.57503552 Z",transform:"translate(10.457453, 10.101961) rotate(90.000000) translate(-10.457453, -10.101961) "})})}function ga(){return i("svg",{viewBox:"0 0 20 20",focusable:"false","data-icon":"snippets",width:"20px",height:"20px",fill:"currentColor","aria-hidden":"true",children:i("path",{d:"M15,5 L15,18 L2,18 L2,5 L15,5 Z M14,6 L3,6 L3,17 L14,17 L14,6 Z M18,2 L18,15 L16,15 L16,13.999 L17,14 L17,3 L6,3 L6,4 L5,4 L5,2 L18,2 Z M9,8 L9,11 L12,11 L12,12 L9,12 L9,15 L8,15 L8,12 L5,12 L5,11 L8,11 L8,8 L9,8 Z"})})}const ma=function(t){var e=t.children,r=t.code,n=(0,l.useState)(!1),o=n[0],s=n[1];return a("div",{children:[a("div",{className:[ha().container,!o&&ha().unfoldContainer].filter(Boolean).join(" "),children:[i("div",{className:ha().preview,children:e}),i(fa,{effect:"solid"}),a("div",{className:ha().operations,children:[i("div",{className:ha().item,onClick:function(){(0,da.A)(r)},"data-tip":"\u590d\u5236",children:i(ga,{})}),i("div",{className:ha().item,onClick:function(){return s((function(t){return!t}))},"data-tip":o?"\u6536\u8d77":"\u5c55\u5f00",children:i(va,{})})]})]}),i("div",{className:ha().codeWrapper,children:o&&i(c.A,{children:r,className:"language-jsx",mdxType:"code",originalType:"code",parentName:"pre"})})]})};function ba(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ya(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){ba(t,e,r[e])}))}return t}function wa(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})),t}var Ea,Oa=Object.defineProperty,Ca=Object.getOwnPropertySymbols,Ta=Object.prototype.hasOwnProperty,La=Object.prototype.propertyIsEnumerable,Sa=(t,e,r)=>e in t?Oa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Aa=(t,e)=>{for(var r in e||(e={}))Ta.call(e,r)&&Sa(t,r,e[r]);if(Ca)for(var r of Ca(e))La.call(e,r)&&Sa(t,r,e[r]);return t},_a=(t,e)=>{var r={};for(var n in t)Ta.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&Ca)for(var n of Ca(t))e.indexOf(n)<0&&La.call(t,n)&&(r[n]=t[n]);return r};(t=>{const e=class{constructor(t,r,n,o){if(this.version=t,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],t<e.MIN_VERSION||t>e.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*t+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(n);if(this.drawCodewords(s),-1==o){let t=1e9;for(let e=0;e<8;e++){this.applyMask(e),this.drawFormatBits(e);const r=this.getPenaltyScore();r<t&&(o=e,t=r),this.applyMask(e)}}i(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(r,n){const o=t.QrSegment.makeSegments(r);return e.encodeSegments(o,n)}static encodeBinary(r,n){const o=t.QrSegment.makeBytes(r);return e.encodeSegments([o],n)}static encodeSegments(t,r,o=1,a=40,l=-1,c=!0){if(!(e.MIN_VERSION<=o&&o<=a&&a<=e.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,f;for(u=o;;u++){const n=8*e.getNumDataCodewords(u,r),o=s.getTotalBits(t,u);if(o<=n){f=o;break}if(u>=a)throw new RangeError("Data too long")}for(const n of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])c&&f<=8*e.getNumDataCodewords(u,n)&&(r=n);let d=[];for(const e of t){n(e.mode.modeBits,4,d),n(e.numChars,e.mode.numCharCountBits(u),d);for(const t of e.getData())d.push(t)}i(d.length==f);const p=8*e.getNumDataCodewords(u,r);i(d.length<=p),n(0,Math.min(4,p-d.length),d),n(0,(8-d.length%8)%8,d),i(d.length%8==0);for(let e=236;d.length<p;e^=253)n(e,8,d);let h=[];for(;8*h.length<d.length;)h.push(0);return d.forEach(((t,e)=>h[e>>>3]|=t<<7-(7&e))),new e(u,r,h,l)}getModule(t,e){return 0<=t&&t<this.size&&0<=e&&e<this.size&&this.modules[e][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2==0),this.setFunctionModule(r,6,r%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),e=t.length;for(let r=0;r<e;r++)for(let n=0;n<e;n++)0==r&&0==n||0==r&&n==e-1||r==e-1&&0==n||this.drawAlignmentPattern(t[r],t[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const e=this.errorCorrectionLevel.formatBits<<3|t;let r=e;for(let o=0;o<10;o++)r=r<<1^1335*(r>>>9);const n=21522^(e<<10|r);i(n>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,o(n,i));this.setFunctionModule(8,7,o(n,6)),this.setFunctionModule(8,8,o(n,7)),this.setFunctionModule(7,8,o(n,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,o(n,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,o(n,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,o(n,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let r=0;r<12;r++)t=t<<1^7973*(t>>>11);const e=this.version<<12|t;i(e>>>18==0);for(let r=0;r<18;r++){const t=o(e,r),n=this.size-11+r%3,i=Math.floor(r/3);this.setFunctionModule(n,i,t),this.setFunctionModule(i,n,t)}}drawFinderPattern(t,e){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const o=Math.max(Math.abs(n),Math.abs(r)),i=t+n,a=e+r;0<=i&&i<this.size&&0<=a&&a<this.size&&this.setFunctionModule(i,a,2!=o&&4!=o)}}drawAlignmentPattern(t,e){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(t+n,e+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(t,e,r){this.modules[e][t]=r,this.isFunction[e][t]=!0}addEccAndInterleave(t){const r=this.version,n=this.errorCorrectionLevel;if(t.length!=e.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const o=e.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],a=e.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],s=Math.floor(e.getNumRawDataModules(r)/8),l=o-s%o,c=Math.floor(s/o);let u=[];const f=e.reedSolomonComputeDivisor(a);for(let i=0,p=0;i<o;i++){let r=t.slice(p,p+c-a+(i<l?0:1));p+=r.length;const n=e.reedSolomonComputeRemainder(r,f);i<l&&r.push(0),u.push(r.concat(n))}let d=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,r)=>{(e!=c-a||r>=l)&&d.push(t[e])}));return i(d.length==s),d}drawCodewords(t){if(t.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let e=this.size-1;e>=1;e-=2){6==e&&(e=5);for(let n=0;n<this.size;n++)for(let i=0;i<2;i++){const a=e-i,s=!(e+1&2)?this.size-1-n:n;!this.isFunction[s][a]&&r<8*t.length&&(this.modules[s][a]=o(t[r>>>3],7-(7&r)),r++)}}i(r==8*t.length)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let e=0;e<this.size;e++)for(let r=0;r<this.size;r++){let n;switch(t){case 0:n=(r+e)%2==0;break;case 1:n=e%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+e)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(e/2))%2==0;break;case 5:n=r*e%2+r*e%3==0;break;case 6:n=(r*e%2+r*e%3)%2==0;break;case 7:n=((r+e)%2+r*e%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[e][r]&&n&&(this.modules[e][r]=!this.modules[e][r])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let r=!1,n=0,o=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[i][a]==r?(n++,5==n?t+=e.PENALTY_N1:n>5&&t++):(this.finderPenaltyAddHistory(n,o),r||(t+=this.finderPenaltyCountPatterns(o)*e.PENALTY_N3),r=this.modules[i][a],n=1);t+=this.finderPenaltyTerminateAndCount(r,n,o)*e.PENALTY_N3}for(let i=0;i<this.size;i++){let r=!1,n=0,o=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][i]==r?(n++,5==n?t+=e.PENALTY_N1:n>5&&t++):(this.finderPenaltyAddHistory(n,o),r||(t+=this.finderPenaltyCountPatterns(o)*e.PENALTY_N3),r=this.modules[a][i],n=1);t+=this.finderPenaltyTerminateAndCount(r,n,o)*e.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let r=0;r<this.size-1;r++){const n=this.modules[i][r];n==this.modules[i][r+1]&&n==this.modules[i+1][r]&&n==this.modules[i+1][r+1]&&(t+=e.PENALTY_N2)}let r=0;for(const e of this.modules)r=e.reduce(((t,e)=>t+(e?1:0)),r);const n=this.size*this.size,o=Math.ceil(Math.abs(20*r-10*n)/n)-1;return i(0<=o&&o<=9),t+=o*e.PENALTY_N4,i(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(1==this.version)return[];{const t=Math.floor(this.version/7)+2,e=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*t-2));let r=[6];for(let n=this.size-7;r.length<t;n-=e)r.splice(1,0,n);return r}}static getNumRawDataModules(t){if(t<e.MIN_VERSION||t>e.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;r-=(25*e-10)*e-55,t>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(t,r){return Math.floor(e.getNumRawDataModules(t)/8)-e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t]*e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");let r=[];for(let e=0;e<t-1;e++)r.push(0);r.push(1);let n=1;for(let o=0;o<t;o++){for(let t=0;t<r.length;t++)r[t]=e.reedSolomonMultiply(r[t],n),t+1<r.length&&(r[t]^=r[t+1]);n=e.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(t,r){let n=r.map((t=>0));for(const o of t){const t=o^n.shift();n.push(0),r.forEach(((r,o)=>n[o]^=e.reedSolomonMultiply(r,t)))}return n}static reedSolomonMultiply(t,e){if(t>>>8!=0||e>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(e>>>n&1)*t;return i(r>>>8==0),r}finderPenaltyCountPatterns(t){const e=t[1];i(e<=3*this.size);const r=e>0&&t[2]==e&&t[3]==3*e&&t[4]==e&&t[5]==e;return(r&&t[0]>=4*e&&t[6]>=e?1:0)+(r&&t[6]>=4*e&&t[0]>=e?1:0)}finderPenaltyTerminateAndCount(t,e,r){return t&&(this.finderPenaltyAddHistory(e,r),e=0),e+=this.size,this.finderPenaltyAddHistory(e,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(t,e){0==e[0]&&(t+=this.size),e.pop(),e.unshift(t)}};let r=e;function n(t,e,r){if(e<0||e>31||t>>>e!=0)throw new RangeError("Value out of range");for(let n=e-1;n>=0;n--)r.push(t>>>n&1)}function o(t,e){return!!(t>>>e&1)}function i(t){if(!t)throw new Error("Assertion error")}r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.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]],r.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]],t.QrCode=r;const a=class{constructor(t,e,r){if(this.mode=t,this.numChars=e,this.bitData=r,e<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let e=[];for(const r of t)n(r,8,e);return new a(a.Mode.BYTE,t.length,e)}static makeNumeric(t){if(!a.isNumeric(t))throw new RangeError("String contains non-numeric characters");let e=[];for(let r=0;r<t.length;){const o=Math.min(t.length-r,3);n(parseInt(t.substr(r,o),10),3*o+1,e),r+=o}return new a(a.Mode.NUMERIC,t.length,e)}static makeAlphanumeric(t){if(!a.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let e,r=[];for(e=0;e+2<=t.length;e+=2){let o=45*a.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e));o+=a.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),n(o,11,r)}return e<t.length&&n(a.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,r),new a(a.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return""==t?[]:a.isNumeric(t)?[a.makeNumeric(t)]:a.isAlphanumeric(t)?[a.makeAlphanumeric(t)]:[a.makeBytes(a.toUtf8ByteArray(t))]}static makeEci(t){let e=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)n(t,8,e);else if(t<16384)n(2,2,e),n(t,14,e);else{if(!(t<1e6))throw new RangeError("ECI assignment value out of range");n(6,3,e),n(t,21,e)}return new a(a.Mode.ECI,0,e)}static isNumeric(t){return a.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return a.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(t,e){let r=0;for(const n of t){const t=n.mode.numCharCountBits(e);if(n.numChars>=1<<t)return 1/0;r+=4+t+n.bitData.length}return r}static toUtf8ByteArray(t){t=encodeURI(t);let e=[];for(let r=0;r<t.length;r++)"%"!=t.charAt(r)?e.push(t.charCodeAt(r)):(e.push(parseInt(t.substr(r+1,2),16)),r+=2);return e}};let s=a;s.NUMERIC_REGEX=/^[0-9]*$/,s.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,s.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.QrSegment=s})(Ea||(Ea={})),(t=>{let e;(t=>{const e=class{constructor(t,e){this.ordinal=t,this.formatBits=e}};let r=e;r.LOW=new e(0,1),r.MEDIUM=new e(1,0),r.QUARTILE=new e(2,3),r.HIGH=new e(3,2),t.Ecc=r})(e=t.QrCode||(t.QrCode={}))})(Ea||(Ea={})),(t=>{let e;(t=>{const e=class{constructor(t,e){this.modeBits=t,this.numBitsCharCount=e}numCharCountBits(t){return this.numBitsCharCount[Math.floor((t+7)/17)]}};let r=e;r.NUMERIC=new e(1,[10,12,14]),r.ALPHANUMERIC=new e(2,[9,11,13]),r.BYTE=new e(4,[8,16,16]),r.KANJI=new e(8,[8,10,12]),r.ECI=new e(7,[0,0,0]),t.Mode=r})(e=t.QrSegment||(t.QrSegment={}))})(Ea||(Ea={}));var Ra=Ea,Ma={L:Ra.QrCode.Ecc.LOW,M:Ra.QrCode.Ecc.MEDIUM,Q:Ra.QrCode.Ecc.QUARTILE,H:Ra.QrCode.Ecc.HIGH},xa=128,Pa="L",ka="#FFFFFF",ja="#000000",Na=!1;function Ia(t,e=0){const r=[];return t.forEach((function(t,n){let o=null;t.forEach((function(i,a){if(!i&&null!==o)return r.push(`M${o+e} ${n+e}h${a-o}v1H${o+e}z`),void(o=null);if(a!==t.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?r.push(`M${a+e},${n+e} h1v1H${a+e}z`):r.push(`M${o+e},${n+e} h${a+1-o}v1H${o+e}z`)}}))})),r.join("")}function za(t,e){return t.slice().map(((t,r)=>r<e.y||r>=e.y+e.h?t:t.map(((t,r)=>(r<e.x||r>=e.x+e.w)&&t))))}function Ha(t,e,r,n){if(null==n)return null;const o=r?4:0,i=t.length+2*o,a=Math.floor(.1*e),s=i/e,l=(n.width||a)*s,c=(n.height||a)*s,u=null==n.x?t.length/2-l/2:n.x*s,f=null==n.y?t.length/2-c/2:n.y*s;let d=null;if(n.excavate){let t=Math.floor(u),e=Math.floor(f);d={x:t,y:e,w:Math.ceil(l+u-t),h:Math.ceil(c+f-e)}}return{x:u,y:f,h:c,w:l,excavation:d}}!function(){try{(new Path2D).addPath(new Path2D)}catch(t){return!1}}();function Ba(t){const e=t,{value:r,size:n=xa,level:o=Pa,bgColor:i=ka,fgColor:a=ja,includeMargin:s=Na,imageSettings:c}=e,u=_a(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let f=Ra.QrCode.encodeText(r,Ma[o]).getModules();const d=s?4:0,p=f.length+2*d,h=Ha(f,n,s,c);let v=null;null!=c&&null!=h&&(null!=h.excavation&&(f=za(f,h.excavation)),v=l.createElement("image",{xlinkHref:c.src,height:h.h,width:h.w,x:h.x+d,y:h.y+d,preserveAspectRatio:"none"}));const g=Ia(f,d);return l.createElement("svg",Aa({height:n,width:n,viewBox:`0 0 ${p} ${p}`},u),l.createElement("path",{fill:i,d:`M0,0 h${p}v${p}H0z`,shapeRendering:"crispEdges"}),l.createElement("path",{fill:a,d:g,shapeRendering:"crispEdges"}),v)}function Da(t){return i("svg",wa(ya({width:"20px",height:"20px",viewBox:"0 0 16 16"},t),{children:a("g",{fill:"currentColor",children:[i("path",{d:"M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"}),i("path",{fillRule:"evenodd",d:"M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182a.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"})]})}))}function Fa(t){return i("svg",wa(ya({width:"15px",height:"15px",viewBox:"0 0 16 16"},t),{children:i("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707zm4.344 0a.5.5 0 0 1 .707 0l4.096 4.096V11.5a.5.5 0 1 1 1 0v3.975a.5.5 0 0 1-.5.5H11.5a.5.5 0 0 1 0-1h2.768l-4.096-4.096a.5.5 0 0 1 0-.707zm0-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707zm-4.344 0a.5.5 0 0 1-.707 0L1.025 1.732V4.5a.5.5 0 0 1-1 0V.525a.5.5 0 0 1 .5-.5H4.5a.5.5 0 0 1 0 1H1.732l4.096 4.096a.5.5 0 0 1 0 .707z"})}))}function Ua(t){return a("svg",wa(ya({width:"20px",height:"20px",viewBox:"0 0 1024 1024"},t),{version:"1.1",xmlns:"https://www.w3.org/2000/svg","p-id":"2552",children:[i("path",{d:"M468 128H160c-17.7 0-32 14.3-32 32v308c0 4.4 3.6 8 8 8h332c4.4 0 8-3.6 8-8V136c0-4.4-3.6-8-8-8z m-56 284H192V192h220v220z","p-id":"2553",fill:"#666666"}),i("path",{d:"M274 338h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM468 548H136c-4.4 0-8 3.6-8 8v308c0 17.7 14.3 32 32 32h308c4.4 0 8-3.6 8-8V556c0-4.4-3.6-8-8-8z m-56 284H192V612h220v220z","p-id":"2554",fill:"#666666"}),i("path",{d:"M274 758h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM864 128H556c-4.4 0-8 3.6-8 8v332c0 4.4 3.6 8 8 8h332c4.4 0 8-3.6 8-8V160c0-17.7-14.3-32-32-32z m-32 284H612V192h220v220z","p-id":"2555",fill:"#666666"}),i("path",{d:"M694 338h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM888 548h-48c-4.4 0-8 3.6-8 8v134h-78V556c0-4.4-3.6-8-8-8H556c-4.4 0-8 3.6-8 8v332c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V644h78v102c0 4.4 3.6 8 8 8h190c4.4 0 8-3.6 8-8V556c0-4.4-3.6-8-8-8z","p-id":"2556",fill:"#666666"}),i("path",{d:"M746 832h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM888 832h-48c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z","p-id":"2557",fill:"#666666"})]}))}const Wa=function(t){var e=t.code,r=t.url,n=(0,l.useRef)(null),o=(0,l.useState)(!1),s=o[0],u=o[1];return a("div",{className:ha().mobileWrapper+" mobile-previewer",children:[i("div",{className:ha().mobileCodeWrapper,children:i(c.A,{children:e,className:"language-jsx",mdxType:"code",originalType:"code",parentName:"pre"})}),a("div",{className:ha().mobilePreviewArea,children:[a("div",{className:ha().mobileOperations,children:[a("div",{className:ha().operationItem,onClick:function(){var t;null==n||null===(t=n.current)||void 0===t||t.contentWindow.location.reload()},children:[i(Da,{})," \xa0\u5237\u65b0"]}),a("div",{className:ha().operationItem,onClick:function(){window.open(r)},children:[i(Fa,{})," \xa0\u5168\u5c4f\u6a21\u5f0f"]}),a("div",{className:ha().operationItem,onClick:function(){u(!0)},children:[i(Ua,{})," \xa0\u4e8c\u7ef4\u7801"]})]}),a("div",{className:ha().iframeWrapper,children:[i("iframe",{ref:n,style:{width:"325px",height:"600px",backgroundColor:"#FFF"},scrolling:"yes",frameBorder:"0",src:r}),s&&i("div",{className:ha().dialog,onClick:function(){u(!1)},children:i(Ba,{value:""+location.origin+r,size:100})})]})]})]})};const Va=function(t){var e=t.mobilePreview,r=t.children,n=t.code,o=t.url,a=(n||"").replace(/`/g,"`").replace(/$/g,"$");return e?i(Wa,{code:a,url:o}):i(ma,{code:a,children:r})}},8478:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});r(6540);var n=r(2303),o=r(757).A,i=r(6540).Fragment;function a(t){var e=t.children,r=t.fallback;return(0,n.A)()?o(i,null,null==e?void 0:e()):null!=r?r:null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[702],{3074:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>y,contentTitle:()=>o,default:()=>d,frontMatter:()=>p,metadata:()=>u,toc:()=>g});var l=t(8168),a=t(8587),r=(t(6540),t(6665)),i=["components"],p={},o=void 0,u={unversionedId:"api/README",id:"api/README",title:"README",description:"youtil",source:"@site/doc/api/README.md",sourceDirName:"api",slug:"/api/",permalink:"/api/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"loading",permalink:"/loading"},next:{title:"copyToClipboard",permalink:"/api/functions/copyToClipboard"}},y={},g=[{value:"\u5982\u4f55\u4f7f\u7528",id:"\u5982\u4f55\u4f7f\u7528",level:2},{value:"API",id:"api",level:2},{value:"\u5173\u4e8e\u547d\u540d",id:"\u5173\u4e8e\u547d\u540d",level:2},{value:"\u6a21\u5757\u5f00\u53d1",id:"\u6a21\u5757\u5f00\u53d1",level:2},{value:"\u76ee\u5f55\u7ed3\u6784\u4ecb\u7ecd",id:"\u76ee\u5f55\u7ed3\u6784\u4ecb\u7ecd",level:3},{value:"\u4ee3\u7801\u63d0\u4ea4\u987a\u5e8f",id:"\u4ee3\u7801\u63d0\u4ea4\u987a\u5e8f",level:3},{value:"\u5173\u4e8e@swc/helper\u7684\u7248\u672c",id:"\u5173\u4e8eswchelper\u7684\u7248\u672c",level:3},{value:"\u9644\u5f55",id:"\u9644\u5f55",level:3}],c={toc:g},m="wrapper";function d(e){var n=e.components,t=(0,a.A)(e,i);return(0,r.yg)(m,(0,l.A)({},c,t,{components:n,mdxType:"MDXLayout"}),(0,r.yg)("p",null,(0,r.yg)("strong",{parentName:"p"},"youtil")),(0,r.yg)("hr",null),(0,r.yg)("h1",{id:"youtil"},"youtil"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"youtil"),"\uff0c\u53d1\u97f3\u540c",(0,r.yg)("inlineCode",{parentName:"p"},"util"),"\uff0c\u4e2d\u6587\u53ef\u4ee5\u53eb\u505a",(0,r.yg)("inlineCode",{parentName:"p"},"\u6cb9\u68af"),"\uff0c\u4e00\u4e2a\u4e0e\u6846\u67b6\uff08",(0,r.yg)("inlineCode",{parentName:"p"},"Vue"),"\u3001",(0,r.yg)("inlineCode",{parentName:"p"},"React"),"\u7b49\uff09\u3001\u73af\u5883\uff08",(0,r.yg)("inlineCode",{parentName:"p"},"Nodejs"),"\u3001",(0,r.yg)("inlineCode",{parentName:"p"},"Browser"),"\u7b49\uff09\u65e0\u5173\u7684\u5c0f\u5de7\u3001\u7cbe\u7b80\u3001\u5b9e\u7528\u3001\u4e0d\u4f9d\u8d56\u4efb\u4f55\u7b2c\u4e09\u65b9\u5e93\u7684",(0,r.yg)("inlineCode",{parentName:"p"},"JavaScript"),"\u5de5\u5177\u5e93\u3002"),(0,r.yg)("blockquote",null,(0,r.yg)("ol",{parentName:"blockquote"},(0,r.yg)("li",{parentName:"ol"},"\u4ee3\u7801\u8fd8\u5728\u4e0d\u65ad\u8865\u5145\u5b8c\u5584\uff0c\u656c\u8bf7\u671f\u5f85\uff01"),(0,r.yg)("li",{parentName:"ol"},"\u5c11\u6570\u65b9\u6cd5\u53ef\u80fd\u4f9d\u8d56DOM\uff0c\u4f8b\u5982",(0,r.yg)("inlineCode",{parentName:"li"},"showLoading"),"\uff1b"))),(0,r.yg)("h2",{id:"\u5982\u4f55\u4f7f\u7528"},"\u5982\u4f55\u4f7f\u7528"),(0,r.yg)("p",null,"\u5b89\u88c5\uff1a",(0,r.yg)("inlineCode",{parentName:"p"},"npm i youtil -S")),(0,r.yg)("p",null,"\u4f7f\u7528\u793a\u4f8b\uff1a"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-js"},"import { formatDate, parseDate } from youtil;\nconsole.log(formatDate(Date.now()));\nconssole.log(parseDate('2023-02-14', 'yyyy-MM-dd'));\n")),(0,r.yg)("h2",{id:"api"},"API"),(0,r.yg)("p",null,"\u53c2\u89c1",(0,r.yg)("a",{parentName:"p",href:"https://youtil.haoji.me/api/globals"},"API\u6587\u6863"),";"),(0,r.yg)("h2",{id:"\u5173\u4e8e\u547d\u540d"},"\u5173\u4e8e\u547d\u540d"),(0,r.yg)("p",null,"\u4e4b\u524d\u60f3\u4e86\u5f88\u591a\u540d\u5b57\uff0c\u5305\u62ec",(0,r.yg)("inlineCode",{parentName:"p"},"autil"),"\u3001",(0,r.yg)("inlineCode",{parentName:"p"},"zutil"),"\u3001",(0,r.yg)("inlineCode",{parentName:"p"},"feutil"),"\u7b49\uff0c\u4ecea-z\u8bd5\u4e0b\u6765\u53ea\u6709\u51e0\u4e2a\u6ca1\u6709\u88ab\u6ce8\u518c\uff0c\u4f46\u662f\u4e0d\u597d\u8bb0\uff0c\u6700\u540e\u624d\u53d6\u4e86\u8fd9\u4e2a\u540d\u5b57\uff0c\u56e0\u4e3a\u6bd4\u8f83\u597d\u8bb0\u3002"),(0,r.yg)("h2",{id:"\u6a21\u5757\u5f00\u53d1"},"\u6a21\u5757\u5f00\u53d1"),(0,r.yg)("p",null,"\u4f9d\u8d56",(0,r.yg)("inlineCode",{parentName:"p"},"node@18"),"\u73af\u5883\uff0c\u6267\u884c",(0,r.yg)("inlineCode",{parentName:"p"},"cnpm run dev"),"\u5c06\u81ea\u52a8\u6253\u5f00\u672c\u5730\u9884\u89c8\u3002"),(0,r.yg)("h3",{id:"\u76ee\u5f55\u7ed3\u6784\u4ecb\u7ecd"},"\u76ee\u5f55\u7ed3\u6784\u4ecb\u7ecd"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"src\uff1a \u6e90\u6587\u4ef6\uff1b"),(0,r.yg)("li",{parentName:"ul"},"docs\uff1a \u6587\u6863\uff1b"),(0,r.yg)("li",{parentName:"ul"},"test\uff1a\u6d4b\u8bd5\u7528\u4f8b\uff1b"),(0,r.yg)("li",{parentName:"ul"},"dist\uff1a\u4f9b\u6d4f\u89c8\u5668\u76f4\u63a5\u4f7f\u7528\u7684bundle\u6a21\u5f0f\u4ea7\u7269\uff1b"),(0,r.yg)("li",{parentName:"ul"},"esm\uff1a\u4f9b\u5176\u4ed6\u9879\u76ee\u5f15\u5165\uff1b"),(0,r.yg)("li",{parentName:"ul"},"build\uff1a\u6587\u6863\u4e4b\u7c7b\u7684\u6784\u5efa\u4ea7\u7269\uff1b")),(0,r.yg)("h3",{id:"\u4ee3\u7801\u63d0\u4ea4\u987a\u5e8f"},"\u4ee3\u7801\u63d0\u4ea4\u987a\u5e8f"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},"\u66f4\u65b0\u4ee3\u7801\uff1b"),(0,r.yg)("li",{parentName:"ul"},"\u66f4\u65b0",(0,r.yg)("inlineCode",{parentName:"li"},"package.json"),"\u548c",(0,r.yg)("inlineCode",{parentName:"li"},"changelog"),"\uff1b"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"npm publish"),"\uff1b"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"npm run after-publish"),"\u52a1\u5fc5\u4e0d\u80fd\u6f0f\u4e86\uff01"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"git push"),"\uff1b")),(0,r.yg)("p",null,"\u6ce8\u610f\uff1a@ice/pkg\u548c@swc/helpers \u5347\u7ea7\u52300.5.0\u4ee5\u4e0a\u7248\u672c\u65f6\u5176\u4ed6\u4e1a\u52a1\u53ef\u80fd\u62a5\u9519\uff0c\u975e\u5e38\u5751\uff01\u76ee\u524d\u5199\u6b7b\u7248\u672c"),(0,r.yg)("h3",{id:"\u5173\u4e8eswchelper\u7684\u7248\u672c"},"\u5173\u4e8e@swc/helper\u7684\u7248\u672c"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"@swc/helper"),"\u5728\u5347\u7ea7\u52300.5.0\u4e4b\u540e\u6709\u4e00\u4e9b\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u4e00\u4e9b\u8001\u5de5\u7a0b\uff08\u5982node14+webpack4\uff09\u6784\u5efa\u4f1a\u5931\u8d25\u3002"),(0,r.yg)("p",null,"\u76ee\u524d\u6ca1\u6709\u95ee\u9898\u7684\u7248\u672c\uff1a"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"@swc/helper"),"\u5199\u6b7b",(0,r.yg)("inlineCode",{parentName:"li"},"0.4.14"),"\uff08\u90e8\u5206\u6784\u5efa\u4ea7\u7269\uff1a",(0,r.yg)("inlineCode",{parentName:"li"},'import _instanceof from "@swc/helpers/src/_instanceof.mjs"'),"\uff09\uff1b"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"@ice/pkg"),"\u5199\u6b7b",(0,r.yg)("inlineCode",{parentName:"li"},"1.5.5"),"\uff1b")),(0,r.yg)("p",null,"\u6709\u95ee\u9898\u7684\u7248\u672c\uff1a"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"@swc/helper"),"\u5199\u6b7b",(0,r.yg)("inlineCode",{parentName:"li"},"^0.5.0"),"\uff08\u90e8\u5206\u6784\u5efa\u4ea7\u7269\uff1a",(0,r.yg)("inlineCode",{parentName:"li"},'import { _ as _instanceof } from "@swc/helpers/_/_instanceof"'),"\uff09\uff1b"),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("inlineCode",{parentName:"li"},"@ice/pkg"),"\u5199\u6b7b",(0,r.yg)("inlineCode",{parentName:"li"},"^1.5.5"),"\uff1b")),(0,r.yg)("h3",{id:"\u9644\u5f55"},"\u9644\u5f55"),(0,r.yg)("p",null,"\u4ed3\u5e93\u811a\u624b\u67b6\u6765\u6e90\uff1a"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre",className:"language-bash"},"npm install -g cnpm --registry=https://registry.npmmirror.com\ncnpm init @ice/pkg youtil # \u9009\u62e9\u524d\u7aef\u7c7b\u5e93\n# \u9ed8\u8ba4\u4e0d\u652f\u6301\u6587\u6863\u9884\u89c8\uff0c\u9700\u624b\u52a8\u5f00\u542f\ncnpm i @ice/pkg-plugin-docusaurus react react-dom -D\n# \u53c2\u8003 https://pkg.ice.work/guide/preview \u8fdb\u884c build.config.mts \u914d\u7f6e\ncd youtil\nmkdir docs\nvim index.md\ncnpm start\n")))}d.isMDXComponent=!0},6665:(e,n,t)=>{function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=l(t(6540));function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(){return i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(this,arguments)}function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function u(e,n){if(null==e)return{};var t,l,a=function(e,n){if(null==e)return{};var t,l,a={},r=Object.keys(e);for(l=0;l<r.length;l++)t=r[l],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l<r.length;l++)t=r[l],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var y=a.default.createContext({}),g=function(e){var n=a.default.useContext(y),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c={inlineCode:"code",wrapper:function(e){var n=e.children;return a.default.createElement(a.default.Fragment,{},n)}},m=a.default.forwardRef((function(e,n){var t=e.components,l=e.mdxType,r=e.originalType,i=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),y=g(t),m=l,d=y["".concat(i,".").concat(m)]||y[m]||c[m]||r;return t?a.default.createElement(d,o(o({ref:n},p),{},{components:t})):a.default.createElement(d,o({ref:n},p))}));m.displayName="MDXCreateElement",n.xA=function(e){var n=g(e.components);return a.default.createElement(y.Provider,{value:n},e.children)},n.yg=function(e,n){var t=arguments,l=n&&n.mdxType;if("string"==typeof e||l){var r=t.length,i=new Array(r);i[0]=m;var p={};for(var o in n)hasOwnProperty.call(n,o)&&(p[o]=n[o]);p.originalType=e,p.mdxType="string"==typeof e?e:l,i[1]=p;for(var u=2;u<r;u++)i[u]=t[u];return a.default.createElement.apply(null,i)}return a.default.createElement.apply(null,t)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[641],{2655:(n,e,t)=>{function r(n,e,t,r,o,a,c){try{var i=n[a](c),l=i.value}catch(n){return void t(n)}i.done?e(l):Promise.resolve(l).then(r,o)}function o(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})))),r.forEach((function(e){var r,o;r=n,o=t[e],e in r?Object.defineProperty(r,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[e]=o}))}return n}t.d(e,{Kd:()=>d,Yq:()=>f,RZ:()=>c,Em:()=>s,Cs:()=>a}),"function"==typeof SuppressedError&&SuppressedError;var a=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\u8bf7\u7a0d\u5019",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(t=Object.assign({},{hasMask:!1,maskColor:"#00000070",onCancel:null,cancelInline:!1,id:"com_global_page_loading"},t)).id,o=t.hasMask,a=t.maskColor,i=t.onCancel,l=t.cancelInline,s="_".concat(r,"_timeout");window[s]&&clearTimeout(window[s]);var u=document.getElementById(r);u||((u=document.createElement("div")).id=r,u.className=r,document.body.append(u));var d="".concat(r,"_style");if(!document.getElementById(d)){var f=document.createElement("style");f.id=d,f.innerHTML="\n .".concat(r," {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n z-index: 10000;\n }\n .").concat(r,".show-mask {\n pointer-events: unset;\n background: #00000070;\n }\n .").concat(r," .mask-wrapper {\n position: fixed;\n }\n .").concat(r," .loading-wrapper {\n width: 120px;\n height: 120px;\n z-index: 8000;\n background: rgba(0, 0, 0, 0.6);\n border-radius: 8px;\n text-align: center;\n color: white;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n pointer-events: initial;\n line-height: 1.3;\n }\n .").concat(r," .loading-wrapper img {\n width: 50px;\n height: 50px;\n margin-bottom: 10px;\n }\n .").concat(r," .loading-wrapper a {\n color: #6ab2ff;\n }"),document.head.appendChild(f)}if(u.innerHTML='\n <div class="loading-wrapper">\n <img src="https://img.alicdn.com/tfs/TB1bnUsQBLoK1RjSZFuXXXn0XXa-32-32.svg" alt="\u52a0\u8f7d\u4e2d">\n <div>\n <span>'.concat(n,"</span>\n ").concat(l?"":"<br />","\n ").concat(i?'<a href="javascript:;" class="cancel">\u53d6\u6d88</a>':"","\n </div>\n </div>"),i){var p=u.querySelector(".cancel");p&&p.addEventListener("click",(function(){c(),i()}))}u.addEventListener("click",(function(){c()})),u.style.display="flex",u.style.background=o?a:"transparent",u.className="".concat(r," ").concat(o?"show-mask":""),e>0&&(window[s]=setTimeout((function(){c()}),1e3*e))},c=function(){var n=document.getElementById("com_global_page_loading");n&&(n.style.display="none")};var i=function(n){return Object.keys(n||{}).filter((function(e){return void 0!==n[e]})).map((function(e){var t="object"==typeof n[e]?JSON.stringify(n[e]):n[e];return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t))})).join("&")},l=function(n,e){var t=Object.assign({},(null==n?void 0:n.headers)||{},(null==e?void 0:e.headers)||{}),r=Object.assign({},(null==n?void 0:n.fetchOptions)||{},(null==e?void 0:e.fetchOptions)||{});return Object.assign({},n||{},e||{},{headers:t,fetchOptions:r})},s=function(){var n=function(n){return function(){var e=this,t=arguments;return new Promise((function(o,a){var c=n.apply(e,t);function i(n){r(c,o,a,i,l,"next",n)}function l(n){r(c,o,a,i,l,"throw",n)}i(void 0)}))}}((function(n,e){var t,r,a,c,s,u,d,f,p,h,v,g,b,m,y,w,k,O,j,C,x;return function(n,e){var t,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=i(0),c.throw=i(1),c.return=i(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function i(i){return function(l){return function(i){if(t)throw TypeError("Generator is already executing.");for(;c&&(c=0,i[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(n,a)}catch(n){i=[6,n],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}(this,(function(E){switch(E.label){case 0:if(r=(t=(e=l({errorMessage:"\u7cfb\u7edf\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5",errorHandler:function(n){var t;(null==e?void 0:e.silent)||(null==e||null===(t=e.toastHandler)||void 0===t||t.call(e,n));throw Error(n)},baseUrl:"",headers:{},fetchOptions:{credentials:"include"},checkSuccess:function(n){return 0==(null==n?void 0:n.code)||200==(null==n?void 0:n.code)},toastHandler:function(n){return console.error("[\u60a8\u8fd8\u6ca1\u6709\u914d\u7f6etoastHandler\uff0c\u8bf7\u6839\u636e\u60a8\u7684UI\u7ec4\u4ef6\u5e93\u914d\u7f6e\u5408\u9002\u7684\u63d0\u793a\u65b9\u6cd5] ".concat(n||""))},onFetchResponse:function(n){if(200===n.status)return n.json();var e={code:n.status,status:n.status,message:n.statusText,headers:n.headers,_response:n},t=Error(e.message);throw t.response=e,t}},e))||{}).params,a=t.data,c=t.formData,s=t.json,u=t.method,d=t.headers,f=t.baseUrl,p=t.fetchOptions,h=t.checkSuccess,v=t.afterRequest,g=t.errorHandler,b=t.errorMessage,m=t.responseConverter,y=t.onFetchResponse,p.headers=o({},d||{},p.headers||{}),r&&(p.method=u||"GET",n="".concat(n).concat(n.indexOf("?")>=0?"&":"?").concat(i(r))),a)Object.assign(p,{method:u||"POST",body:i(a),headers:o({"Content-Type":"application/x-www-form-urlencoded;charset=utf-8"},p.headers||{})});else if(c){if(w=c,!(c instanceof FormData))for(var S in w=new FormData,c)w.append(S,c[S]);Object.assign(p,{method:u||"POST",body:w})}else s&&Object.assign(p,{method:u||"POST",body:JSON.stringify(s),headers:o({"Content-Type":"application/json;charset=utf-8"},p.headers||{})});k=null,E.label=1;case 1:return E.trys.push([1,3,,4]),0===(O="".concat(/^(http|\/\/)/g.test(n)?"":f||"").concat(n)).indexOf("//")&&"blob:"===location.protocol&&(O="".concat(null===(j=location.pathname.split(":"))||void 0===j?void 0:j[0],":").concat(O)),[4,fetch(O,p).then(y)];case 2:return k=E.sent(),[3,4];case 3:return console.error(C=E.sent()),null==v||v(!1,{message:null==C?void 0:C.message}),null==g||g((null===(x=C.response)||void 0===x?void 0:x.message)||b||"",C.response),[2,void 0];case 4:return k=m?m(k):k,(null==h?void 0:h(k))?(null==v||v(!0,k),[2,k.data]):(null==v||v(!1,k),null==g||g(k.message||k.msg||b||"",k),[2,void 0])}}))}));return function(e,t){return n.apply(this,arguments)}}(),u=function(n){var e=l(this.overrideDefaultOptions,n),t=function(n,t){return s(n,l(e,t))};return t.overrideDefaultOptions=e,t.create=u.bind(t),t};s.create=u.bind(s);var d=function(n,e){var t=e;return e||(t=n,n=s),function(e,r){return n(e,o({},t||{},r||{}))}},f=function(n,e){var t=function(n){e=e.replace(RegExp("".concat(n,"+"),"g"),(function(e){var t="".concat(r[n]);if("w"===n)return"".concat(e.length>2?"\u661f\u671f":"\u5468").concat(o[t]);for(var a=0,c=t.length;a<e.length-c;a++)t="0".concat(t);return 1===e.length?t:t.substring(t.length-e.length)}))};if(!n)return"";if("number"==typeof n)n=new Date(n);else if("string"==typeof n)if(/^\d{12,13}$/g.test(n))n=new Date(parseInt(n,10));else{if(!/^.{10}T.{8,12}Z?$/g.test(n))return n;n=new Date(n)}if(!(n instanceof Date))throw Error("formatDate error: not date.");if(isNaN(null==n?void 0:n.getFullYear()))throw Error("formatDate error: invalid date.");e=e||"yyyy-MM-dd HH:mm:ss";var r={y:n.getFullYear(),M:n.getMonth()+1,d:n.getDate(),q:Math.floor((n.getMonth()+3)/3),w:n.getDay(),H:n.getHours(),h:n.getHours()%12==0?12:n.getHours()%12,m:n.getMinutes(),s:n.getSeconds(),S:n.getMilliseconds()},o=["\u5929","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"];for(var a in r)t(a);return e}},6363:(n,e,t)=>{t.d(e,{A:()=>a});var r=t(2655),o=(t(6540),t(757).A);const a=function(){return o("div",null,o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",10)}},"\u663e\u793aloading\uff0810\u79d2\u81ea\u52a8\u5173\u95ed\uff09"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.RZ)()}},"\u5173\u95edloading"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",0)}},"\u4e00\u76f4\u663e\u793a"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",0,{onCancel:function(){return alert("\u4f60\u70b9\u51fb\u4e86\u53d6\u6d88")}})}},"\u652f\u6301\u53d6\u6d88"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",0,{onCancel:function(){return alert("\u4f60\u70b9\u51fb\u4e86\u53d6\u6d88")},cancelInline:!0})}},"\u53d6\u6d88\u4e0d\u6362\u884c"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u53d1\u751f\u7684\u5bb6\u4e50\u9e21\u7c89\u53d7\u6253\u51fb\u4e86\u653e\u5927\u968f\u673a\u53d1\u9001\u8fbe\u4e86",0)}},"\u8d85\u5bbd\u6587\u5b57"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d",10,{hasMask:!0})}},"\u663e\u793a\u906e\u7f69"),o("br",null))}},7050:(n,e,t)=>{t.r(e),t.d(e,{default:()=>a});var r=t(8478),o=t(757).A;const a=function(){return o(r.A,null,(function(){var n=t(6363).A;return o(n,null)}))}},8478:(n,e,t)=>{t.d(e,{A:()=>c});t(6540);var r=t(2303),o=t(757).A,a=t(6540).Fragment;function c(n){var e=n.children,t=n.fallback;return(0,r.A)()?o(a,null,null==e?void 0:e()):null!=t?t:null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[934],{1885:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>s,toc:()=>g});var r=t(8168),a=t(8587),l=(t(6540),t(6665)),p=["components"],i={},o=void 0,s={unversionedId:"api/interfaces/IRequestOptions",id:"api/interfaces/IRequestOptions",title:"IRequestOptions",description:"youtil",source:"@site/doc/api/interfaces/IRequestOptions.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/IRequestOptions",permalink:"/api/interfaces/IRequestOptions",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"globals",permalink:"/api/globals"},next:{title:"IShowLoadingConfig",permalink:"/api/interfaces/IShowLoadingConfig"}},u={},g=[{value:"Properties",id:"properties",level:2},{value:"afterRequest()?",id:"afterrequest",level:3},{value:"Parameters",id:"parameters",level:4},{value:"success",id:"success",level:5},{value:"resp?",id:"resp",level:5},{value:"Returns",id:"returns",level:4},{value:"baseUrl?",id:"baseurl",level:3},{value:"checkSuccess()?",id:"checksuccess",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"resp",id:"resp-1",level:5},{value:"Returns",id:"returns-1",level:4},{value:"data?",id:"data",level:3},{value:"errorHandler()?",id:"errorhandler",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"message",id:"message",level:5},{value:"resp?",id:"resp-2",level:5},{value:"Returns",id:"returns-2",level:4},{value:"errorMessage?",id:"errormessage",level:3},{value:"fetchOptions?",id:"fetchoptions",level:3},{value:"formData?",id:"formdata",level:3},{value:"headers?",id:"headers",level:3},{value:"json?",id:"json",level:3},{value:"method?",id:"method",level:3},{value:"onFetchResponse()?",id:"onfetchresponse",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"response",id:"response",level:5},{value:"Returns",id:"returns-3",level:4},{value:"params?",id:"params",level:3},{value:"responseConverter()?",id:"responseconverter",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"resp",id:"resp-3",level:5},{value:"Returns",id:"returns-4",level:4},{value:"silent?",id:"silent",level:3},{value:"toastHandler()?",id:"toasthandler",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"message",id:"message-1",level:5},{value:"Returns",id:"returns-5",level:4}],y={toc:g},d="wrapper";function c(e){var n=e.components,t=(0,a.A)(e,p);return(0,l.yg)(d,(0,r.A)({},y,t,{components:n,mdxType:"MDXLayout"}),(0,l.yg)("p",null,(0,l.yg)("a",{parentName:"p",href:"/api/"},(0,l.yg)("strong",{parentName:"a"},"youtil"))),(0,l.yg)("hr",null),(0,l.yg)("p",null,(0,l.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / IRequestOptions"),(0,l.yg)("h1",{id:"interface-irequestoptions"},"Interface: IRequestOptions"),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L4"},"request.ts:4")),(0,l.yg)("p",null,"requestAPI\u7684\u7b2c\u4e8c\u4e2a\u53c2\u6570\u7c7b\u578b"),(0,l.yg)("h2",{id:"properties"},"Properties"),(0,l.yg)("h3",{id:"afterrequest"},"afterRequest()?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"afterRequest"),": (",(0,l.yg)("inlineCode",{parentName:"p"},"success"),", ",(0,l.yg)("inlineCode",{parentName:"p"},"resp"),"?) => ",(0,l.yg)("inlineCode",{parentName:"p"},"void"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L22"},"request.ts:22")),(0,l.yg)("p",null,"\u8bf7\u6c42\u5b8c\u6210\u4e4b\u540e\u89e6\u53d1\u7684\u94a9\u5b50\uff0c\u65e0\u8bba\u6210\u529f\u4e0e\u5426\u5747\u4f1a\u89e6\u53d1"),(0,l.yg)("h4",{id:"parameters"},"Parameters"),(0,l.yg)("h5",{id:"success"},"success"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"boolean")),(0,l.yg)("h5",{id:"resp"},"resp?"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"any")),(0,l.yg)("h4",{id:"returns"},"Returns"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"void")),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"baseurl"},"baseUrl?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"baseUrl"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"string"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L14"},"request.ts:14")),(0,l.yg)("p",null,"API\u524d\u7f00\uff0c\u4e0d\u4f20\u9ed8\u8ba4\u4e3a\u7a7a"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"checksuccess"},"checkSuccess()?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"checkSuccess"),": (",(0,l.yg)("inlineCode",{parentName:"p"},"resp"),") => ",(0,l.yg)("inlineCode",{parentName:"p"},"boolean"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L24"},"request.ts:24")),(0,l.yg)("p",null,"\u5224\u65ad\u63a5\u53e3\u662f\u5426\u8c03\u7528\u6210\u529f\uff0c\u9ed8\u8ba4\u89c4\u5219 resp => resp.code == 0 || resp.code == 200"),(0,l.yg)("h4",{id:"parameters-1"},"Parameters"),(0,l.yg)("h5",{id:"resp-1"},"resp"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"any")),(0,l.yg)("h4",{id:"returns-1"},"Returns"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"boolean")),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"data"},"data?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"data"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"Record"),"\\<",(0,l.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,l.yg)("inlineCode",{parentName:"p"},"any"),">")),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L8"},"request.ts:8")),(0,l.yg)("p",null,"POST\u8bf7\u6c42\u65f6\u4f20\u9012\u7684\u53c2\u6570"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"errorhandler"},"errorHandler()?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"errorHandler"),": (",(0,l.yg)("inlineCode",{parentName:"p"},"message"),", ",(0,l.yg)("inlineCode",{parentName:"p"},"resp"),"?) => ",(0,l.yg)("inlineCode",{parentName:"p"},"void"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L30"},"request.ts:30")),(0,l.yg)("p",null,"\u53d1\u751f\u5f02\u5e38\u65f6\u7684\u5904\u7406\u65b9\u6cd5\uff0c\u4e00\u822c\u4e0d\u592a\u5efa\u8bae\u91cd\u5199\u6b64\u65b9\u6cd5"),(0,l.yg)("h4",{id:"parameters-2"},"Parameters"),(0,l.yg)("h5",{id:"message"},"message"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"string")),(0,l.yg)("h5",{id:"resp-2"},"resp?"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"any")),(0,l.yg)("h4",{id:"returns-2"},"Returns"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"void")),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"errormessage"},"errorMessage?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"errorMessage"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"string"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L28"},"request.ts:28")),(0,l.yg)("p",null,"\u540e\u7aef\u672a\u8fd4\u56de message \u65f6\u7684\u515c\u5e95\u5f02\u5e38\u6587\u6848"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"fetchoptions"},"fetchOptions?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"fetchOptions"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"RequestInit"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L20"},"request.ts:20")),(0,l.yg)("p",null,"\u5176\u5b83\u81ea\u5b9a\u4e49fetchOptions\uff0c\u4f18\u5148\u7ea7\u9ad8\u4e8e\u4e0a\u9762\u6240\u6709\u53c2\u6570"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"formdata"},"formData?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"formData"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"Record"),"\\<",(0,l.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,l.yg)("inlineCode",{parentName:"p"},"any"),">")),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L10"},"request.ts:10")),(0,l.yg)("p",null,"\u91c7\u7528formData\u6a21\u5f0f\u8bf7\u6c42\uff0c\u53ef\u4ee5\u4f20\u5165\u666e\u901a\u7684\u5bf9\u8c61\uff0c\u4e5f\u53ef\u4ee5\u4f20\u5165\u6807\u51c6\u7684formData"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"headers"},"headers?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"headers"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"Record"),"\\<",(0,l.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,l.yg)("inlineCode",{parentName:"p"},"any"),">")),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L18"},"request.ts:18")),(0,l.yg)("p",null,"headers"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"json"},"json?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"json"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"Record"),"\\<",(0,l.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,l.yg)("inlineCode",{parentName:"p"},"any"),">")),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L12"},"request.ts:12")),(0,l.yg)("p",null,"postJson\u8bf7\u6c42\u65f6\u4f20\u9012\u7684\u53c2\u6570"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"method"},"method?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"method"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"string"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L16"},"request.ts:16")),(0,l.yg)("p",null,"\u8bf7\u6c42\u65b9\u6cd5\uff0c\u7edd\u5927\u90e8\u5206\u60c5\u51b5\u65e0\u9700\u624b\u52a8\u6307\u5b9a"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"onfetchresponse"},"onFetchResponse()?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"onFetchResponse"),": (",(0,l.yg)("inlineCode",{parentName:"p"},"response"),") => ",(0,l.yg)("inlineCode",{parentName:"p"},"any"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L36"},"request.ts:36")),(0,l.yg)("p",null,"\u81ea\u5b9a\u4e49 fetch.then() \uff0c\u975e\u5e38\u5e95\u5c42\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u975e\u5fc5\u8981\u8bf7\u52ff\u4f7f\u7528"),(0,l.yg)("h4",{id:"parameters-3"},"Parameters"),(0,l.yg)("h5",{id:"response"},"response"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"Response")),(0,l.yg)("h4",{id:"returns-3"},"Returns"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"any")),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"params"},"params?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"params"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"Record"),"\\<",(0,l.yg)("inlineCode",{parentName:"p"},"string"),", ",(0,l.yg)("inlineCode",{parentName:"p"},"any"),">")),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L6"},"request.ts:6")),(0,l.yg)("p",null,"GET\u8bf7\u6c42\u65f6\u4f20\u9012\u7684\u53c2\u6570"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"responseconverter"},"responseConverter()?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"responseConverter"),": (",(0,l.yg)("inlineCode",{parentName:"p"},"resp"),") => ",(0,l.yg)("inlineCode",{parentName:"p"},"any"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L26"},"request.ts:26")),(0,l.yg)("p",null,"\u5bf9\u54cd\u5e94\u8fdb\u884c\u81ea\u5b9a\u4e49\u683c\u5f0f\u5316\u5904\u7406\uff0c\u5305\u542b checkSuccess \u5168\u90e8\u80fd\u529b"),(0,l.yg)("h4",{id:"parameters-4"},"Parameters"),(0,l.yg)("h5",{id:"resp-3"},"resp"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"any")),(0,l.yg)("h4",{id:"returns-4"},"Returns"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"any")),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"silent"},"silent?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"silent"),": ",(0,l.yg)("inlineCode",{parentName:"p"},"boolean"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L34"},"request.ts:34")),(0,l.yg)("p",null,"\u662f\u5426\u5173\u95ed\u9ed8\u8ba4\u7684\u5f02\u5e38toast"),(0,l.yg)("hr",null),(0,l.yg)("h3",{id:"toasthandler"},"toastHandler()?"),(0,l.yg)("blockquote",null,(0,l.yg)("p",{parentName:"blockquote"},(0,l.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,l.yg)("strong",{parentName:"p"},"toastHandler"),": (",(0,l.yg)("inlineCode",{parentName:"p"},"message"),") => ",(0,l.yg)("inlineCode",{parentName:"p"},"void"))),(0,l.yg)("p",null,"Defined in: ",(0,l.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L32"},"request.ts:32")),(0,l.yg)("p",null,"\u81ea\u5b9a\u4e49toast\u5b9e\u73b0\uff0c\u4e3a\u4e86\u548cUI\u89e3\u8026\uff0c\u65b9\u6cd5\u9ed8\u8ba4\u4e0d\u5305\u542bUI\u5904\u7406\u4ee3\u7801"),(0,l.yg)("h4",{id:"parameters-5"},"Parameters"),(0,l.yg)("h5",{id:"message-1"},"message"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"string")),(0,l.yg)("h4",{id:"returns-5"},"Returns"),(0,l.yg)("p",null,(0,l.yg)("inlineCode",{parentName:"p"},"void")))}c.isMDXComponent=!0},6665:(e,n,t)=>{function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(t(6540));function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function p(){return p=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},p.apply(this,arguments)}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){l(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=a.default.createContext({}),g=function(e){var n=a.default.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},y={inlineCode:"code",wrapper:function(e){var n=e.children;return a.default.createElement(a.default.Fragment,{},n)}},d=a.default.forwardRef((function(e,n){var t=e.components,r=e.mdxType,l=e.originalType,p=e.parentName,i=s(e,["components","mdxType","originalType","parentName"]),u=g(t),d=r,c=u["".concat(p,".").concat(d)]||u[d]||y[d]||l;return t?a.default.createElement(c,o(o({ref:n},i),{},{components:t})):a.default.createElement(c,o({ref:n},i))}));d.displayName="MDXCreateElement",n.xA=function(e){var n=g(e.components);return a.default.createElement(u.Provider,{value:n},e.children)},n.yg=function(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=t.length,p=new Array(l);p[0]=d;var i={};for(var o in n)hasOwnProperty.call(n,o)&&(i[o]=n[o]);i.originalType=e,i.mdxType="string"==typeof e?e:r,p[1]=i;for(var s=2;s<l;s++)p[s]=t[s];return a.default.createElement.apply(null,p)}return a.default.createElement.apply(null,t)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[135],{6665:(e,t,n)=>{function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(n(6540));function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=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},i.apply(this,arguments)}function l(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=a.default.createContext({}),c=function(e){var t=a.default.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.default.createElement(a.default.Fragment,{},t)}},y=a.default.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),s=c(n),y=r,m=s["".concat(i,".").concat(y)]||s[y]||f[y]||o;return n?a.default.createElement(m,p(p({ref:t},l),{},{components:n})):a.default.createElement(m,p({ref:t},l))}));y.displayName="MDXCreateElement",t.xA=function(e){var t=c(e.components);return a.default.createElement(s.Provider,{value:t},e.children)},t.yg=function(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=y;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var u=2;u<o;u++)i[u]=n[u];return a.default.createElement.apply(null,i)}return a.default.createElement.apply(null,n)}},9927:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>p,default:()=>m,frontMatter:()=>l,metadata:()=>u,toc:()=>c});var r=n(8168),a=n(8587),o=(n(6540),n(6665)),i=["components"],l={},p=void 0,u={unversionedId:"api/functions/sleep",id:"api/functions/sleep",title:"sleep",description:"youtil",source:"@site/doc/api/functions/sleep.md",sourceDirName:"api/functions",slug:"/api/functions/sleep",permalink:"/api/functions/sleep",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"showLoading",permalink:"/api/functions/showLoading"},next:{title:"toUrlParams",permalink:"/api/functions/toUrlParams"}},s={},c=[{value:"Parameters",id:"parameters",level:2},{value:"ms?",id:"ms",level:3},{value:"Returns",id:"returns",level:2}],f={toc:c},y="wrapper";function m(e){var t=e.components,n=(0,a.A)(e,i);return(0,o.yg)(y,(0,r.A)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/"},(0,o.yg)("strong",{parentName:"a"},"youtil"))),(0,o.yg)("hr",null),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / sleep"),(0,o.yg)("h1",{id:"function-sleep"},"Function: sleep()"),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("strong",{parentName:"p"},"sleep"),"(",(0,o.yg)("inlineCode",{parentName:"p"},"ms"),"?): ",(0,o.yg)("inlineCode",{parentName:"p"},"Promise"),"\\<",(0,o.yg)("inlineCode",{parentName:"p"},"unknown"),">")),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/time.ts#L91"},"time.ts:91")),(0,o.yg)("p",null,"\u4f11\u606f\u4e00\u6bb5\u65f6\u95f4\uff0c\u5355\u4f4d\u6beb\u79d2\n\u793a\u4f8b\uff1aawait sleep(200); // \u4f11\u606f200\u6beb\u79d2"),(0,o.yg)("h2",{id:"parameters"},"Parameters"),(0,o.yg)("h3",{id:"ms"},"ms?"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"number")),(0,o.yg)("p",null,"\u8981\u4f11\u606f\u7684\u65f6\u95f4\uff0c\u5355\u4f4d\u6beb\u79d2\uff0c\u4e0d\u4f20\u9ed8\u8ba40"),(0,o.yg)("h2",{id:"returns"},"Returns"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"Promise"),"\\<",(0,o.yg)("inlineCode",{parentName:"p"},"unknown"),">"))}m.isMDXComponent=!0}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[581],{5610:i=>{i.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"defaultSidebar":[{"type":"link","label":"\u9996\u9875","href":"/","docId":"index"},{"type":"link","label":"request","href":"/request","docId":"request"},{"type":"link","label":"\u6d4b\u8bd5","href":"/time","docId":"time"},{"type":"link","label":"loading","href":"/loading","docId":"loading"},{"type":"category","label":"README","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"functions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"copyToClipboard","href":"/api/functions/copyToClipboard","docId":"api/functions/copyToClipboard"},{"type":"link","label":"createEnum","href":"/api/functions/createEnum","docId":"api/functions/createEnum"},{"type":"link","label":"decodeHtml","href":"/api/functions/decodeHtml","docId":"api/functions/decodeHtml"},{"type":"link","label":"deepCopy","href":"/api/functions/deepCopy","docId":"api/functions/deepCopy"},{"type":"link","label":"delParam","href":"/api/functions/delParam","docId":"api/functions/delParam"},{"type":"link","label":"encodeHtml","href":"/api/functions/encodeHtml","docId":"api/functions/encodeHtml"},{"type":"link","label":"formatDate","href":"/api/functions/formatDate","docId":"api/functions/formatDate"},{"type":"link","label":"getParam","href":"/api/functions/getParam","docId":"api/functions/getParam"},{"type":"link","label":"getParamInt","href":"/api/functions/getParamInt","docId":"api/functions/getParamInt"},{"type":"link","label":"getParams","href":"/api/functions/getParams","docId":"api/functions/getParams"},{"type":"link","label":"hideLoading","href":"/api/functions/hideLoading","docId":"api/functions/hideLoading"},{"type":"link","label":"initWindowMessage","href":"/api/functions/initWindowMessage","docId":"api/functions/initWindowMessage"},{"type":"link","label":"parseDate","href":"/api/functions/parseDate","docId":"api/functions/parseDate"},{"type":"link","label":"request","href":"/api/functions/request","docId":"api/functions/request"},{"type":"link","label":"setParam","href":"/api/functions/setParam","docId":"api/functions/setParam"},{"type":"link","label":"showLoading","href":"/api/functions/showLoading","docId":"api/functions/showLoading"},{"type":"link","label":"sleep","href":"/api/functions/sleep","docId":"api/functions/sleep"},{"type":"link","label":"toUrlParams","href":"/api/functions/toUrlParams","docId":"api/functions/toUrlParams"}]},{"type":"link","label":"globals","href":"/api/globals","docId":"api/globals"},{"type":"category","label":"interfaces","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"IRequestOptions","href":"/api/interfaces/IRequestOptions","docId":"api/interfaces/IRequestOptions"},{"type":"link","label":"IShowLoadingConfig","href":"/api/interfaces/IShowLoadingConfig","docId":"api/interfaces/IShowLoadingConfig"}]},{"type":"category","label":"variables","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Request","href":"/api/variables/Request","docId":"api/variables/Request"}]}],"href":"/api/"}]},"docs":{"api/functions/copyToClipboard":{"id":"api/functions/copyToClipboard","title":"copyToClipboard","description":"youtil","sidebar":"defaultSidebar"},"api/functions/createEnum":{"id":"api/functions/createEnum","title":"createEnum","description":"youtil","sidebar":"defaultSidebar"},"api/functions/decodeHtml":{"id":"api/functions/decodeHtml","title":"decodeHtml","description":"youtil","sidebar":"defaultSidebar"},"api/functions/deepCopy":{"id":"api/functions/deepCopy","title":"deepCopy","description":"youtil","sidebar":"defaultSidebar"},"api/functions/delParam":{"id":"api/functions/delParam","title":"delParam","description":"youtil","sidebar":"defaultSidebar"},"api/functions/encodeHtml":{"id":"api/functions/encodeHtml","title":"encodeHtml","description":"youtil","sidebar":"defaultSidebar"},"api/functions/formatDate":{"id":"api/functions/formatDate","title":"formatDate","description":"youtil","sidebar":"defaultSidebar"},"api/functions/getParam":{"id":"api/functions/getParam","title":"getParam","description":"youtil","sidebar":"defaultSidebar"},"api/functions/getParamInt":{"id":"api/functions/getParamInt","title":"getParamInt","description":"youtil","sidebar":"defaultSidebar"},"api/functions/getParams":{"id":"api/functions/getParams","title":"getParams","description":"youtil","sidebar":"defaultSidebar"},"api/functions/hideLoading":{"id":"api/functions/hideLoading","title":"hideLoading","description":"youtil","sidebar":"defaultSidebar"},"api/functions/initWindowMessage":{"id":"api/functions/initWindowMessage","title":"initWindowMessage","description":"youtil","sidebar":"defaultSidebar"},"api/functions/parseDate":{"id":"api/functions/parseDate","title":"parseDate","description":"youtil","sidebar":"defaultSidebar"},"api/functions/request":{"id":"api/functions/request","title":"request","description":"youtil","sidebar":"defaultSidebar"},"api/functions/setParam":{"id":"api/functions/setParam","title":"setParam","description":"youtil","sidebar":"defaultSidebar"},"api/functions/showLoading":{"id":"api/functions/showLoading","title":"showLoading","description":"youtil","sidebar":"defaultSidebar"},"api/functions/sleep":{"id":"api/functions/sleep","title":"sleep","description":"youtil","sidebar":"defaultSidebar"},"api/functions/toUrlParams":{"id":"api/functions/toUrlParams","title":"toUrlParams","description":"youtil","sidebar":"defaultSidebar"},"api/globals":{"id":"api/globals","title":"globals","description":"youtil","sidebar":"defaultSidebar"},"api/interfaces/IRequestOptions":{"id":"api/interfaces/IRequestOptions","title":"IRequestOptions","description":"youtil","sidebar":"defaultSidebar"},"api/interfaces/IShowLoadingConfig":{"id":"api/interfaces/IShowLoadingConfig","title":"IShowLoadingConfig","description":"youtil","sidebar":"defaultSidebar"},"api/README":{"id":"api/README","title":"README","description":"youtil","sidebar":"defaultSidebar"},"api/variables/Request":{"id":"api/variables/Request","title":"Request","description":"youtil","sidebar":"defaultSidebar"},"index":{"id":"index","title":"index","description":"","sidebar":"defaultSidebar"},"loading":{"id":"loading","title":"loading","description":"","sidebar":"defaultSidebar"},"request":{"id":"request","title":"request","description":"request\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684API\u8bf7\u6c42\u51fd\u6570\uff0c\u4e3b\u8981\u7279\u70b9\uff1a","sidebar":"defaultSidebar"},"time":{"id":"time","title":"\u6d4b\u8bd5","description":"","sidebar":"defaultSidebar"}}}')}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[441],{1283:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>p,default:()=>g,frontMatter:()=>l,metadata:()=>u,toc:()=>s});var r=t(8168),a=t(8587),o=(t(6540),t(6665)),i=["components"],l={},p=void 0,u={unversionedId:"api/functions/showLoading",id:"api/functions/showLoading",title:"showLoading",description:"youtil",source:"@site/doc/api/functions/showLoading.md",sourceDirName:"api/functions",slug:"/api/functions/showLoading",permalink:"/api/functions/showLoading",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"setParam",permalink:"/api/functions/setParam"},next:{title:"sleep",permalink:"/api/functions/sleep"}},c={},s=[{value:"Parameters",id:"parameters",level:2},{value:"text",id:"text",level:3},{value:"seconds",id:"seconds",level:3},{value:"config",id:"config",level:3},{value:"Returns",id:"returns",level:2}],f={toc:s},d="wrapper";function g(e){var n=e.components,t=(0,a.A)(e,i);return(0,o.yg)(d,(0,r.A)({},f,t,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/"},(0,o.yg)("strong",{parentName:"a"},"youtil"))),(0,o.yg)("hr",null),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / showLoading"),(0,o.yg)("h1",{id:"function-showloading"},"Function: showLoading()"),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("strong",{parentName:"p"},"showLoading"),"(",(0,o.yg)("inlineCode",{parentName:"p"},"text"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"seconds"),", ",(0,o.yg)("inlineCode",{parentName:"p"},"config"),"): ",(0,o.yg)("inlineCode",{parentName:"p"},"void"))),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/loading.ts#L16"},"loading.ts:16")),(0,o.yg)("p",null,"\u663e\u793a\u5168\u5c40loading\uff0c\u4e0d\u4f9d\u8d56\u4efb\u4f55\u6846\u67b6"),(0,o.yg)("h2",{id:"parameters"},"Parameters"),(0,o.yg)("h3",{id:"text"},"text"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"string")," = ",(0,o.yg)("inlineCode",{parentName:"p"},"'\u8bf7\u7a0d\u5019'")),(0,o.yg)("p",null,"\u63d0\u793a\u6587\u6848"),(0,o.yg)("h3",{id:"seconds"},"seconds"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"number")," = ",(0,o.yg)("inlineCode",{parentName:"p"},"10")),(0,o.yg)("p",null,"\u8d85\u65f6\u81ea\u52a8\u5173\u95ed\u65f6\u95f4\uff0c\u5355\u4f4d\u79d2"),(0,o.yg)("h3",{id:"config"},"config"),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/interfaces/IShowLoadingConfig"},(0,o.yg)("inlineCode",{parentName:"a"},"IShowLoadingConfig"))," = ",(0,o.yg)("inlineCode",{parentName:"p"},"{}")),(0,o.yg)("h2",{id:"returns"},"Returns"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"void")))}g.isMDXComponent=!0},6665:(e,n,t)=>{function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(t(6540));function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(){return i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(this,arguments)}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function u(e,n){if(null==e)return{};var t,r,a=function(e,n){if(null==e)return{};var t,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var c=a.default.createContext({}),s=function(e){var n=a.default.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):p(p({},n),e)),t},f={inlineCode:"code",wrapper:function(e){var n=e.children;return a.default.createElement(a.default.Fragment,{},n)}},d=a.default.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),c=s(t),d=r,g=c["".concat(i,".").concat(d)]||c[d]||f[d]||o;return t?a.default.createElement(g,p(p({ref:n},l),{},{components:t})):a.default.createElement(g,p({ref:n},l))}));d.displayName="MDXCreateElement",n.xA=function(e){var n=s(e.components);return a.default.createElement(c.Provider,{value:n},e.children)},n.yg=function(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=d;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var u=2;u<o;u++)i[u]=t[u];return a.default.createElement.apply(null,i)}return a.default.createElement.apply(null,t)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[95],{4099:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>l,metadata:()=>c,toc:()=>f});var a=t(8168),r=t(8587),o=(t(6540),t(6665)),i=["components"],l={},p=void 0,c={unversionedId:"api/interfaces/IShowLoadingConfig",id:"api/interfaces/IShowLoadingConfig",title:"IShowLoadingConfig",description:"youtil",source:"@site/doc/api/interfaces/IShowLoadingConfig.md",sourceDirName:"api/interfaces",slug:"/api/interfaces/IShowLoadingConfig",permalink:"/api/interfaces/IShowLoadingConfig",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"IRequestOptions",permalink:"/api/interfaces/IRequestOptions"},next:{title:"Request",permalink:"/api/variables/Request"}},u={},f=[{value:"Properties",id:"properties",level:2},{value:"cancelInline?",id:"cancelinline",level:3},{value:"hasMask?",id:"hasmask",level:3},{value:"id?",id:"id",level:3},{value:"maskColor?",id:"maskcolor",level:3},{value:"onCancel?",id:"oncancel",level:3}],g={toc:f},s="wrapper";function d(e){var n=e.components,t=(0,r.A)(e,i);return(0,o.yg)(s,(0,a.A)({},g,t,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/"},(0,o.yg)("strong",{parentName:"a"},"youtil"))),(0,o.yg)("hr",null),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / IShowLoadingConfig"),(0,o.yg)("h1",{id:"interface-ishowloadingconfig"},"Interface: IShowLoadingConfig"),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/loading.ts#L2"},"loading.ts:2")),(0,o.yg)("p",null,"showLoading\u914d\u7f6e"),(0,o.yg)("h2",{id:"properties"},"Properties"),(0,o.yg)("h3",{id:"cancelinline"},"cancelInline?"),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,o.yg)("strong",{parentName:"p"},"cancelInline"),": ",(0,o.yg)("inlineCode",{parentName:"p"},"boolean"))),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/loading.ts#L5"},"loading.ts:5")),(0,o.yg)("hr",null),(0,o.yg)("h3",{id:"hasmask"},"hasMask?"),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,o.yg)("strong",{parentName:"p"},"hasMask"),": ",(0,o.yg)("inlineCode",{parentName:"p"},"boolean"))),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/loading.ts#L3"},"loading.ts:3")),(0,o.yg)("hr",null),(0,o.yg)("h3",{id:"id"},"id?"),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,o.yg)("strong",{parentName:"p"},"id"),": ",(0,o.yg)("inlineCode",{parentName:"p"},"string"))),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/loading.ts#L7"},"loading.ts:7")),(0,o.yg)("hr",null),(0,o.yg)("h3",{id:"maskcolor"},"maskColor?"),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,o.yg)("strong",{parentName:"p"},"maskColor"),": ",(0,o.yg)("inlineCode",{parentName:"p"},"string"))),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/loading.ts#L4"},"loading.ts:4")),(0,o.yg)("hr",null),(0,o.yg)("h3",{id:"oncancel"},"onCancel?"),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("inlineCode",{parentName:"p"},"optional")," ",(0,o.yg)("strong",{parentName:"p"},"onCancel"),": ",(0,o.yg)("inlineCode",{parentName:"p"},"Function"))),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/loading.ts#L6"},"loading.ts:6")))}d.isMDXComponent=!0},6665:(e,n,t)=>{function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(t(6540));function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(){return i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},i.apply(this,arguments)}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)t=o[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var u=r.default.createContext({}),f=function(e){var n=r.default.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):p(p({},n),e)),t},g={inlineCode:"code",wrapper:function(e){var n=e.children;return r.default.createElement(r.default.Fragment,{},n)}},s=r.default.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),u=f(t),s=a,d=u["".concat(i,".").concat(s)]||u[s]||g[s]||o;return t?r.default.createElement(d,p(p({ref:n},l),{},{components:t})):r.default.createElement(d,p({ref:n},l))}));s.displayName="MDXCreateElement",n.xA=function(e){var n=f(e.components);return r.default.createElement(u.Provider,{value:n},e.children)},n.yg=function(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=s;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var c=2;c<o;c++)i[c]=t[c];return r.default.createElement.apply(null,i)}return r.default.createElement.apply(null,t)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[367],{3673:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>p,default:()=>c,frontMatter:()=>o,metadata:()=>s,toc:()=>g});var a=t(8168),r=t(8587),i=(t(6540),t(6665)),l=["components"],o={},p=void 0,s={unversionedId:"api/functions/initWindowMessage",id:"api/functions/initWindowMessage",title:"initWindowMessage",description:"youtil",source:"@site/doc/api/functions/initWindowMessage.md",sourceDirName:"api/functions",slug:"/api/functions/initWindowMessage",permalink:"/api/functions/initWindowMessage",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"hideLoading",permalink:"/api/functions/hideLoading"},next:{title:"parseDate",permalink:"/api/functions/parseDate"}},u={},g=[{value:"Parameters",id:"parameters",level:2},{value:"scene",id:"scene",level:3},{value:"targetWindow?",id:"targetwindow",level:3},{value:"Returns",id:"returns",level:2},{value:"onMessage()",id:"onmessage",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"eventName",id:"eventname",level:5},{value:"listener",id:"listener",level:5},{value:"Returns",id:"returns-1",level:4},{value:"postMessage()",id:"postmessage",level:3},{value:"Type Parameters",id:"type-parameters",level:4},{value:"T",id:"t",level:5},{value:"Parameters",id:"parameters-2",level:4},{value:"eventName",id:"eventname-1",level:5},{value:"payload?",id:"payload",level:5},{value:"Returns",id:"returns-2",level:4}],y={toc:g},d="wrapper";function c(e){var n=e.components,t=(0,r.A)(e,l);return(0,i.yg)(d,(0,a.A)({},y,t,{components:n,mdxType:"MDXLayout"}),(0,i.yg)("p",null,(0,i.yg)("a",{parentName:"p",href:"/api/"},(0,i.yg)("strong",{parentName:"a"},"youtil"))),(0,i.yg)("hr",null),(0,i.yg)("p",null,(0,i.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / initWindowMessage"),(0,i.yg)("h1",{id:"function-initwindowmessage"},"Function: initWindowMessage()"),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"initWindowMessage"),"(",(0,i.yg)("inlineCode",{parentName:"p"},"scene"),", ",(0,i.yg)("inlineCode",{parentName:"p"},"targetWindow"),"?): ",(0,i.yg)("inlineCode",{parentName:"p"},"object"))),(0,i.yg)("p",null,"Defined in: ",(0,i.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/message.ts#L9"},"message.ts:9")),(0,i.yg)("p",null,"\u521d\u59cb\u5316\u7a97\u53e3\u901a\u4fe1"),(0,i.yg)("h2",{id:"parameters"},"Parameters"),(0,i.yg)("h3",{id:"scene"},"scene"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"string")),(0,i.yg)("p",null,"\u573a\u666f\uff0c\u5fc5\u4f20\uff0c\u4e92\u76f8\u901a\u4fe1\u76842\u4e2a\u7a97\u53e3\u5fc5\u987b\u4fdd\u8bc1 scene \u76f8\u540c"),(0,i.yg)("h3",{id:"targetwindow"},"targetWindow?"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"Window")),(0,i.yg)("p",null,"\u76ee\u6807\u7a97\u53e3\u5bf9\u8c61(\u7236\u7a97\u53e3\u6216\u5b50\u7a97\u53e3)\uff0c\u4e92\u76f8\u901a\u4fe1\u65f6\u5141\u8bb8\u6709\u4e00\u65b9\u4e0d\u4f20\uff0c\u81ea\u52a8\u4ece event.source \u83b7\u53d6"),(0,i.yg)("h2",{id:"returns"},"Returns"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"object")),(0,i.yg)("p",null,"\u8fd4\u56depostMessage\u548conMessage\u65b9\u6cd5"),(0,i.yg)("h3",{id:"onmessage"},"onMessage()"),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"onMessage"),": (",(0,i.yg)("inlineCode",{parentName:"p"},"eventName"),", ",(0,i.yg)("inlineCode",{parentName:"p"},"listener"),") => ",(0,i.yg)("inlineCode",{parentName:"p"},"void"))),(0,i.yg)("p",null,"\u76d1\u542c\u6d88\u606f"),(0,i.yg)("h4",{id:"parameters-1"},"Parameters"),(0,i.yg)("h5",{id:"eventname"},"eventName"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"string")),(0,i.yg)("p",null,"\u4e8b\u4ef6\u540d\u79f0"),(0,i.yg)("h5",{id:"listener"},"listener"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"onMessageListener")),(0,i.yg)("p",null,"\u76d1\u542c\u51fd\u6570(\u652f\u6301\u5f02\u6b65)\uff1a(...params) => callbackValue"),(0,i.yg)("h4",{id:"returns-1"},"Returns"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"void")),(0,i.yg)("h3",{id:"postmessage"},"postMessage()"),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"postMessage"),": \\<",(0,i.yg)("inlineCode",{parentName:"p"},"T"),">","(",(0,i.yg)("inlineCode",{parentName:"p"},"eventName"),", ...",(0,i.yg)("inlineCode",{parentName:"p"},"payload"),"?) => ",(0,i.yg)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,i.yg)("inlineCode",{parentName:"p"},"Promise"),"\\<",(0,i.yg)("inlineCode",{parentName:"p"},"T"),">")),(0,i.yg)("p",null,"\u53d1\u9001\u6d88\u606f\u5e76\u7b49\u5f85\u54cd\u5e94"),(0,i.yg)("h4",{id:"type-parameters"},"Type Parameters"),(0,i.yg)("h5",{id:"t"},"T"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"T")),(0,i.yg)("h4",{id:"parameters-2"},"Parameters"),(0,i.yg)("h5",{id:"eventname-1"},"eventName"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"string")),(0,i.yg)("p",null,"\u4e8b\u4ef6\u540d\u79f0"),(0,i.yg)("h5",{id:"payload"},"payload?"),(0,i.yg)("p",null,"...",(0,i.yg)("inlineCode",{parentName:"p"},"any"),"[]"),(0,i.yg)("p",null,"\u8d1f\u8f7d\u6570\u636e"),(0,i.yg)("h4",{id:"returns-2"},"Returns"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"void")," ","|"," ",(0,i.yg)("inlineCode",{parentName:"p"},"Promise"),"\\<",(0,i.yg)("inlineCode",{parentName:"p"},"T"),">"),(0,i.yg)("p",null,"\u8fd4\u56de\u4e00\u4e2aPromise\uff0cresolve\u63a5\u6536\u56de\u8c03\u6570\u636e"))}c.isMDXComponent=!0},6665:(e,n,t)=>{function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(t(6540));function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(){return l=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},l.apply(this,arguments)}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e,n){if(null==e)return{};var t,a,r=function(e,n){if(null==e)return{};var t,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var u=r.default.createContext({}),g=function(e){var n=r.default.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):p(p({},n),e)),t},y={inlineCode:"code",wrapper:function(e){var n=e.children;return r.default.createElement(r.default.Fragment,{},n)}},d=r.default.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,o=s(e,["components","mdxType","originalType","parentName"]),u=g(t),d=a,c=u["".concat(l,".").concat(d)]||u[d]||y[d]||i;return t?r.default.createElement(c,p(p({ref:n},o),{},{components:t})):r.default.createElement(c,p({ref:n},o))}));d.displayName="MDXCreateElement",n.xA=function(e){var n=g(e.components);return r.default.createElement(u.Provider,{value:n},e.children)},n.yg=function(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,l=new Array(i);l[0]=d;var o={};for(var p in n)hasOwnProperty.call(n,p)&&(o[p]=n[p]);o.originalType=e,o.mdxType="string"==typeof e?e:a,l[1]=o;for(var s=2;s<i;s++)l[s]=t[s];return r.default.createElement.apply(null,l)}return r.default.createElement.apply(null,t)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[214],{2655:(n,e,t)=>{function r(n,e,t,r,o,a,i){try{var c=n[a](i),s=c.value}catch(n){return void t(n)}c.done?e(s):Promise.resolve(s).then(r,o)}function o(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})))),r.forEach((function(e){var r,o;r=n,o=t[e],e in r?Object.defineProperty(r,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[e]=o}))}return n}t.d(e,{Kd:()=>d,Yq:()=>f,RZ:()=>i,Em:()=>l,Cs:()=>a}),"function"==typeof SuppressedError&&SuppressedError;var a=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"\u8bf7\u7a0d\u5019",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(t=Object.assign({},{hasMask:!1,maskColor:"#00000070",onCancel:null,cancelInline:!1,id:"com_global_page_loading"},t)).id,o=t.hasMask,a=t.maskColor,c=t.onCancel,s=t.cancelInline,l="_".concat(r,"_timeout");window[l]&&clearTimeout(window[l]);var u=document.getElementById(r);u||((u=document.createElement("div")).id=r,u.className=r,document.body.append(u));var d="".concat(r,"_style");if(!document.getElementById(d)){var f=document.createElement("style");f.id=d,f.innerHTML="\n .".concat(r," {\n position: fixed;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n z-index: 10000;\n }\n .").concat(r,".show-mask {\n pointer-events: unset;\n background: #00000070;\n }\n .").concat(r," .mask-wrapper {\n position: fixed;\n }\n .").concat(r," .loading-wrapper {\n width: 120px;\n height: 120px;\n z-index: 8000;\n background: rgba(0, 0, 0, 0.6);\n border-radius: 8px;\n text-align: center;\n color: white;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n pointer-events: initial;\n line-height: 1.3;\n }\n .").concat(r," .loading-wrapper img {\n width: 50px;\n height: 50px;\n margin-bottom: 10px;\n }\n .").concat(r," .loading-wrapper a {\n color: #6ab2ff;\n }"),document.head.appendChild(f)}if(u.innerHTML='\n <div class="loading-wrapper">\n <img src="https://img.alicdn.com/tfs/TB1bnUsQBLoK1RjSZFuXXXn0XXa-32-32.svg" alt="\u52a0\u8f7d\u4e2d">\n <div>\n <span>'.concat(n,"</span>\n ").concat(s?"":"<br />","\n ").concat(c?'<a href="javascript:;" class="cancel">\u53d6\u6d88</a>':"","\n </div>\n </div>"),c){var p=u.querySelector(".cancel");p&&p.addEventListener("click",(function(){i(),c()}))}u.addEventListener("click",(function(){i()})),u.style.display="flex",u.style.background=o?a:"transparent",u.className="".concat(r," ").concat(o?"show-mask":""),e>0&&(window[l]=setTimeout((function(){i()}),1e3*e))},i=function(){var n=document.getElementById("com_global_page_loading");n&&(n.style.display="none")};var c=function(n){return Object.keys(n||{}).filter((function(e){return void 0!==n[e]})).map((function(e){var t="object"==typeof n[e]?JSON.stringify(n[e]):n[e];return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t))})).join("&")},s=function(n,e){var t=Object.assign({},(null==n?void 0:n.headers)||{},(null==e?void 0:e.headers)||{}),r=Object.assign({},(null==n?void 0:n.fetchOptions)||{},(null==e?void 0:e.fetchOptions)||{});return Object.assign({},n||{},e||{},{headers:t,fetchOptions:r})},l=function(){var n=function(n){return function(){var e=this,t=arguments;return new Promise((function(o,a){var i=n.apply(e,t);function c(n){r(i,o,a,c,s,"next",n)}function s(n){r(i,o,a,c,s,"throw",n)}c(void 0)}))}}((function(n,e){var t,r,a,i,l,u,d,f,p,h,g,v,m,b,y,w,k,j,C,O,x;return function(n,e){var t,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(t)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(n,a)}catch(n){c=[6,n],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}(this,(function(_){switch(_.label){case 0:if(r=(t=(e=s({errorMessage:"\u7cfb\u7edf\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5",errorHandler:function(n){var t;(null==e?void 0:e.silent)||(null==e||null===(t=e.toastHandler)||void 0===t||t.call(e,n));throw Error(n)},baseUrl:"",headers:{},fetchOptions:{credentials:"include"},checkSuccess:function(n){return 0==(null==n?void 0:n.code)||200==(null==n?void 0:n.code)},toastHandler:function(n){return console.error("[\u60a8\u8fd8\u6ca1\u6709\u914d\u7f6etoastHandler\uff0c\u8bf7\u6839\u636e\u60a8\u7684UI\u7ec4\u4ef6\u5e93\u914d\u7f6e\u5408\u9002\u7684\u63d0\u793a\u65b9\u6cd5] ".concat(n||""))},onFetchResponse:function(n){if(200===n.status)return n.json();var e={code:n.status,status:n.status,message:n.statusText,headers:n.headers,_response:n},t=Error(e.message);throw t.response=e,t}},e))||{}).params,a=t.data,i=t.formData,l=t.json,u=t.method,d=t.headers,f=t.baseUrl,p=t.fetchOptions,h=t.checkSuccess,g=t.afterRequest,v=t.errorHandler,m=t.errorMessage,b=t.responseConverter,y=t.onFetchResponse,p.headers=o({},d||{},p.headers||{}),r&&(p.method=u||"GET",n="".concat(n).concat(n.indexOf("?")>=0?"&":"?").concat(c(r))),a)Object.assign(p,{method:u||"POST",body:c(a),headers:o({"Content-Type":"application/x-www-form-urlencoded;charset=utf-8"},p.headers||{})});else if(i){if(w=i,!(i instanceof FormData))for(var D in w=new FormData,i)w.append(D,i[D]);Object.assign(p,{method:u||"POST",body:w})}else l&&Object.assign(p,{method:u||"POST",body:JSON.stringify(l),headers:o({"Content-Type":"application/json;charset=utf-8"},p.headers||{})});k=null,_.label=1;case 1:return _.trys.push([1,3,,4]),0===(j="".concat(/^(http|\/\/)/g.test(n)?"":f||"").concat(n)).indexOf("//")&&"blob:"===location.protocol&&(j="".concat(null===(C=location.pathname.split(":"))||void 0===C?void 0:C[0],":").concat(j)),[4,fetch(j,p).then(y)];case 2:return k=_.sent(),[3,4];case 3:return console.error(O=_.sent()),null==g||g(!1,{message:null==O?void 0:O.message}),null==v||v((null===(x=O.response)||void 0===x?void 0:x.message)||m||"",O.response),[2,void 0];case 4:return k=b?b(k):k,(null==h?void 0:h(k))?(null==g||g(!0,k),[2,k.data]):(null==g||g(!1,k),null==v||v(k.message||k.msg||m||"",k),[2,void 0])}}))}));return function(e,t){return n.apply(this,arguments)}}(),u=function(n){var e=s(this.overrideDefaultOptions,n),t=function(n,t){return l(n,s(e,t))};return t.overrideDefaultOptions=e,t.create=u.bind(t),t};l.create=u.bind(l);var d=function(n,e){var t=e;return e||(t=n,n=l),function(e,r){return n(e,o({},t||{},r||{}))}},f=function(n,e){var t=function(n){e=e.replace(RegExp("".concat(n,"+"),"g"),(function(e){var t="".concat(r[n]);if("w"===n)return"".concat(e.length>2?"\u661f\u671f":"\u5468").concat(o[t]);for(var a=0,i=t.length;a<e.length-i;a++)t="0".concat(t);return 1===e.length?t:t.substring(t.length-e.length)}))};if(!n)return"";if("number"==typeof n)n=new Date(n);else if("string"==typeof n)if(/^\d{12,13}$/g.test(n))n=new Date(parseInt(n,10));else{if(!/^.{10}T.{8,12}Z?$/g.test(n))return n;n=new Date(n)}if(!(n instanceof Date))throw Error("formatDate error: not date.");if(isNaN(null==n?void 0:n.getFullYear()))throw Error("formatDate error: invalid date.");e=e||"yyyy-MM-dd HH:mm:ss";var r={y:n.getFullYear(),M:n.getMonth()+1,d:n.getDate(),q:Math.floor((n.getMonth()+3)/3),w:n.getDay(),H:n.getHours(),h:n.getHours()%12==0?12:n.getHours()%12,m:n.getMinutes(),s:n.getSeconds(),S:n.getMilliseconds()},o=["\u5929","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"];for(var a in r)t(a);return e}},3773:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>p,contentTitle:()=>d,default:()=>m,frontMatter:()=>u,metadata:()=>f,toc:()=>h});var r,o=t(8168),a=t(8587),i=(t(6540),t(6665)),c=t(8478),s=t(8279),l=["components"],u={},d="loading",f={unversionedId:"loading",id:"loading",title:"loading",description:"",source:"@site/doc/03-loading.md",sourceDirName:".",slug:"/loading",permalink:"/loading",draft:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"defaultSidebar",previous:{title:"\u6d4b\u8bd5",permalink:"/time"},next:{title:"README",permalink:"/api/"}},p={},h=[],g=(r="IcePkgDemo_doc_03_loading_0",{toc:h}),v="wrapper";function m(n){var e=n.components,r=(0,a.A)(n,l);return(0,i.yg)(v,(0,o.A)({},g,r,{components:e,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"loading"},"loading"),(0,i.yg)(s.A,{code:"import { showLoading, hideLoading } from 'youtil';\nimport { useEffect } from 'react';\n\nconst App = () => {\n return <div>\n <a href=\"javascript:;\" onClick={() => showLoading('\u6b63\u5728\u52a0\u8f7d...', 10)}>\u663e\u793aloading\uff0810\u79d2\u81ea\u52a8\u5173\u95ed\uff09</a><br />\n <a href=\"javascript:;\" onClick={() => hideLoading()}>\u5173\u95edloading</a><br />\n <a href=\"javascript:;\" onClick={() => showLoading('\u6b63\u5728\u52a0\u8f7d...', 0)}>\u4e00\u76f4\u663e\u793a</a><br />\n <a href=\"javascript:;\" onClick={() => showLoading('\u6b63\u5728\u52a0\u8f7d...', 0, {\n onCancel: () => alert('\u4f60\u70b9\u51fb\u4e86\u53d6\u6d88')\n })}>\u652f\u6301\u53d6\u6d88</a><br />\n <a href=\"javascript:;\" onClick={() => showLoading('\u6b63\u5728\u52a0\u8f7d...', 0, {\n onCancel: () => alert('\u4f60\u70b9\u51fb\u4e86\u53d6\u6d88'),\n cancelInline: true,\n })}>\u53d6\u6d88\u4e0d\u6362\u884c</a><br />\n <a href=\"javascript:;\" onClick={() => showLoading('\u53d1\u751f\u7684\u5bb6\u4e50\u9e21\u7c89\u53d7\u6253\u51fb\u4e86\u653e\u5927\u968f\u673a\u53d1\u9001\u8fbe\u4e86', 0)}>\u8d85\u5bbd\u6587\u5b57</a><br />\n <a href=\"javascript:;\" onClick={() => showLoading('\u6b63\u5728\u52a0\u8f7d', 10, { hasMask: true })}>\u663e\u793a\u906e\u7f69</a><br />\n </div>;\n}\n\nexport default App;",mobilePreview:!1,url:"/demos/IcePkgDemo_doc_03_loading_0/?",mdxType:"Previewer"},(0,i.yg)(c.A,{mdxType:"BrowserOnly"},(function(){var n=t(6363).A;return(0,i.yg)(n,{mdxType:"IcePkgDemo_doc_03_loading_0"})}))))}m.isMDXComponent=!0},6363:(n,e,t)=>{t.d(e,{A:()=>a});var r=t(2655),o=(t(6540),t(757).A);const a=function(){return o("div",null,o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",10)}},"\u663e\u793aloading\uff0810\u79d2\u81ea\u52a8\u5173\u95ed\uff09"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.RZ)()}},"\u5173\u95edloading"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",0)}},"\u4e00\u76f4\u663e\u793a"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",0,{onCancel:function(){return alert("\u4f60\u70b9\u51fb\u4e86\u53d6\u6d88")}})}},"\u652f\u6301\u53d6\u6d88"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d...",0,{onCancel:function(){return alert("\u4f60\u70b9\u51fb\u4e86\u53d6\u6d88")},cancelInline:!0})}},"\u53d6\u6d88\u4e0d\u6362\u884c"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u53d1\u751f\u7684\u5bb6\u4e50\u9e21\u7c89\u53d7\u6253\u51fb\u4e86\u653e\u5927\u968f\u673a\u53d1\u9001\u8fbe\u4e86",0)}},"\u8d85\u5bbd\u6587\u5b57"),o("br",null),o("a",{href:"javascript:;",onClick:function(){return(0,r.Cs)("\u6b63\u5728\u52a0\u8f7d",10,{hasMask:!0})}},"\u663e\u793a\u906e\u7f69"),o("br",null))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[292],{3829:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>u,default:()=>d,frontMatter:()=>l,metadata:()=>p,toc:()=>s});var n=r(8168),a=r(8587),o=(r(6540),r(6665)),i=["components"],l={},u=void 0,p={unversionedId:"api/variables/Request",id:"api/variables/Request",title:"Request",description:"youtil",source:"@site/doc/api/variables/Request.md",sourceDirName:"api/variables",slug:"/api/variables/Request",permalink:"/api/variables/Request",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"IShowLoadingConfig",permalink:"/api/interfaces/IShowLoadingConfig"}},c={},s=[{value:"Deprecated",id:"deprecated",level:2}],f={toc:s},y="wrapper";function d(e){var t=e.components,r=(0,a.A)(e,i);return(0,o.yg)(y,(0,n.A)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/"},(0,o.yg)("strong",{parentName:"a"},"youtil"))),(0,o.yg)("hr",null),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / Request"),(0,o.yg)("h1",{id:"variable-request"},"Variable: ",(0,o.yg)("del",{parentName:"h1"},"Request")),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("inlineCode",{parentName:"p"},"const")," ",(0,o.yg)("strong",{parentName:"p"},"Request"),": ",(0,o.yg)("inlineCode",{parentName:"p"},"RequestConstructor"))),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/request.ts#L197"},"request.ts:197")),(0,o.yg)("p",null,"\u652f\u6301\u5b9e\u4f8b\u5316\u4e00\u4e2a\u65b0\u7684request\u65b9\u6cd5\uff0c\u8986\u76d6\u9ed8\u8ba4\u7684\u90e8\u5206\u914d\u7f6e\u9879"),(0,o.yg)("h2",{id:"deprecated"},"Deprecated"),(0,o.yg)("p",null,"\u63a8\u8350\u4f7f\u7528 request.create() \u5b9e\u4f8b\u5316\u65b0\u7684request"))}d.isMDXComponent=!0},6665:(e,t,r)=>{function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(r(6540));function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=a.default.createContext({}),s=function(e){var t=a.default.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):u(u({},t),e)),r},f={inlineCode:"code",wrapper:function(e){var t=e.children;return a.default.createElement(a.default.Fragment,{},t)}},y=a.default.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=p(e,["components","mdxType","originalType","parentName"]),c=s(r),y=n,d=c["".concat(i,".").concat(y)]||c[y]||f[y]||o;return r?a.default.createElement(d,u(u({ref:t},l),{},{components:r})):a.default.createElement(d,u({ref:t},l))}));y.displayName="MDXCreateElement",t.xA=function(e){var t=s(e.components);return a.default.createElement(c.Provider,{value:t},e.children)},t.yg=function(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=y;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l.mdxType="string"==typeof e?e:n,i[1]=l;for(var p=2;p<o;p++)i[p]=r[p];return a.default.createElement.apply(null,i)}return a.default.createElement.apply(null,r)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkyoutil=self.webpackChunkyoutil||[]).push([[251],{2705:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>s,frontMatter:()=>i,metadata:()=>u,toc:()=>f});var r=n(8168),a=n(8587),o=(n(6540),n(6665)),p=["components"],i={},l=void 0,u={unversionedId:"api/functions/deepCopy",id:"api/functions/deepCopy",title:"deepCopy",description:"youtil",source:"@site/doc/api/functions/deepCopy.md",sourceDirName:"api/functions",slug:"/api/functions/deepCopy",permalink:"/api/functions/deepCopy",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"defaultSidebar",previous:{title:"decodeHtml",permalink:"/api/functions/decodeHtml"},next:{title:"delParam",permalink:"/api/functions/delParam"}},c={},f=[{value:"Parameters",id:"parameters",level:2},{value:"obj",id:"obj",level:3},{value:"Returns",id:"returns",level:2}],y={toc:f},d="wrapper";function s(e){var t=e.components,n=(0,a.A)(e,p);return(0,o.yg)(d,(0,r.A)({},y,n,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/"},(0,o.yg)("strong",{parentName:"a"},"youtil"))),(0,o.yg)("hr",null),(0,o.yg)("p",null,(0,o.yg)("a",{parentName:"p",href:"/api/globals"},"youtil")," / deepCopy"),(0,o.yg)("h1",{id:"function-deepcopy"},"Function: deepCopy()"),(0,o.yg)("blockquote",null,(0,o.yg)("p",{parentName:"blockquote"},(0,o.yg)("strong",{parentName:"p"},"deepCopy"),"(",(0,o.yg)("inlineCode",{parentName:"p"},"obj"),"): ",(0,o.yg)("inlineCode",{parentName:"p"},"any"))),(0,o.yg)("p",null,"Defined in: ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sxei/youtil/blob/e9d9c25d07efbfa634f42eb667207471f12fbd7c/src/other.ts#L6"},"other.ts:6")),(0,o.yg)("p",null,"\u57fa\u4e8eJSON\u7684\u7b80\u5355\u6df1\u62f7\u8d1d"),(0,o.yg)("h2",{id:"parameters"},"Parameters"),(0,o.yg)("h3",{id:"obj"},"obj"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"any")),(0,o.yg)("p",null,"\u8981\u590d\u5236\u7684\u5bf9\u8c61\uff0c\u975e\u5bf9\u8c61\u683c\u5f0f\u4f1a\u76f4\u63a5\u8fd4\u56de"),(0,o.yg)("h2",{id:"returns"},"Returns"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"any")))}s.isMDXComponent=!0},6665:(e,t,n)=>{function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(n(6540));function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){return 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},p.apply(this,arguments)}function i(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=a.default.createContext({}),f=function(e){var t=a.default.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},y={inlineCode:"code",wrapper:function(e){var t=e.children;return a.default.createElement(a.default.Fragment,{},t)}},d=a.default.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,i=u(e,["components","mdxType","originalType","parentName"]),c=f(n),d=r,s=c["".concat(p,".").concat(d)]||c[d]||y[d]||o;return n?a.default.createElement(s,l(l({ref:t},i),{},{components:n})):a.default.createElement(s,l({ref:t},i))}));d.displayName="MDXCreateElement",t.xA=function(e){var t=f(e.components);return a.default.createElement(c.Provider,{value:t},e.children)},t.yg=function(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,p=new Array(o);p[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:r,p[1]=i;for(var u=2;u<o;u++)p[u]=n[u];return a.default.createElement.apply(null,p)}return a.default.createElement.apply(null,n)}}}]);
|