You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.3 MiB

5 years ago
webpackJsonp([0],{"../../../../shared/node_modules/@jianshu/fe-helpers/dist/fe-helpers.esm.js":function(e,t,n){"use strict";function o(e,t,n){if(void 0===n&&(n=!0),!e)return"";var o={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":n?e.getHours():e.getHours()%12==0?12:e.getHours()%12,"H+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()},a={0:"日",1:"一",2:"二",3:"三",4:"四",5:"五",6:"六"};return/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(""+e.getFullYear()).substr(4-RegExp.$1.length))),/(E+)/.test(t)&&(t=t.replace(RegExp.$1,(RegExp.$1.length>1?RegExp.$1.length>2?"星期":"周":"")+a[""+e.getDay()])),!n&&/(A+)/.test(t)&&(t=t.replace(RegExp.$1,_(e))),Object.keys(o).forEach(function(e){new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?o[e]:("00"+o[e]).substr((""+o[e]).length)))}),t}function a(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function s(e,t){if(e){for(var n=e.className,o=(t||"").split(" "),s=0,r=o.length;s<r;s++){var i=o[s];i&&(e.classList?e.classList.add(i):a(e,i)||(n+=" "+i))}e.classList||(e.className=n)}}function r(e,t){if(e&&t){for(var n=t.split(" "),o=" "+e.className+" ",s=0,r=n.length;s<r;s++){var i=n[s];i&&(e.classList?e.classList.remove(i):a(e,i)&&(o=o.replace(" "+i+" "," ")))}e.classList||(e.className=f(o))}}function i(e,t,n,o){void 0===o&&(o=!1),e.addEventListener?e.addEventListener(t,n,o):e.attachEvent&&e.attachEvent("on"+t,function(t){n.call(e,t||window.event)})}function l(e,t,n,o){void 0===o&&(o=!1),e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent&&e.detachEvent("on"+t,n)}function d(e){return encodeURI(decodeURIComponent(e))}function c(){try{if(void 0!==window.__supportWebP__)return window.__supportWebP__}catch(e){return!1}try{var e=document.createElement("canvas");if(e.getContext&&e.getContext("2d")){var t=0===e.toDataURL("image/webp").indexOf("data:image/webp");return window.__supportWebP__=t,t}}catch(e){return!1}return!1}function u(e,t,n,o){void 0===n&&(n=!1);var a=e;try{a=d(e)}catch(t){a=e}var s=a,r=a;if(a.match(w))if(a.indexOf("?")>=0)s=a,r=a.replace(/\?(\w|\W)*$/g,"");else{var i="";i=n?y+(t>=1e3?1e3:t):y+(t>=700?700:t),s=a+i,r=a,!c()||o&&o>1e4||(s+="/format/webp")}return{originalUrl:r,zoomedUrl:s}}function m(e,t){void 0===t&&(t=700);var n=e;try{n=d(e)}catch(t){n=e}var o=n;if(n.match(w)){n=n.replace(/\?(\w|\W)*$/g,"");o=n+(x+"/w/"+t+"/h/"+t),c()&&(o+="/format/webp")}return o}function p(e,t){void 0===t&&(t={});var n=[];return Object.keys(t).forEach(function(e){n.push(e+"="+encodeURIComponent(t[e]))}),n.length>0?e+(/\?/.test(e)?"&":"?")+n.join("&"):e}function h(e,t){void 0===t&&(t=null);var n=e.replace(/^[\w\W]*\?/,""),o=n.split("&").reduce(function(e,t){var n=t.split("="),o=n[0],a=n[1];return e[o]=decodeURIComponent(a),e},{});return t?o[t]:o}n.d(t,"a",function(){return b}),n.d(t,"b",function(){return v}),n.d(t,"c",function(){return C});var _=function(e){return e.getHours()>12?"下午":"上午"},g=Object.freeze({formatDate:o}),f=function(e){return void 0===e&&(e=""),e.replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},b=Object.freeze({hasClass:a,addClass:s,removeClass:r}),v=Object.freeze({on:i,off:l}),y="?imageMogr2/auto-orient/strip%7CimageView2/2/w/",x="?imageMogr2/auto-orient/strip%7CimageView2/1",w=/^(http(s?):)?\/\/(upload-images\.jianshu\.io\/upload_images\/|jianshu-(dev\.u|staging)\.qiniudn\.com\/|upload\.jianshu\.io\/users\/upload_avatars\/)/i,C=Object.freeze({getEncodedUrl:d,canUseWebP:c,getImageUrl:u,squareImage:m}),E=Object.freeze({getQueryString:p,getParams:h}),S={date:g,dom:b,event:v,image:C,qs:E};S.version="1.0.10"},"../../../../shared/node_modules/@jianshu/lazy-load/dist/lazy-load.esm.js":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n("../../../../shared/node_modules/@jianshu/fe-helpers/dist/fe-helpers.esm.js"),a=n("../../../../shared/node_modules/@jianshu/lazy-load/node_modules/lodash/throttle.js"),s=n.n(a),r=n(
//# sourceMappingURL=entry-82e44627b2e2d73431d6.js.map