Files
2026-10-08 10:39:09 -06:00

1 line
1.4 KiB
JavaScript

(()=>{var t={935(t){const r=jQuery;t.exports={random:function(t,r){let n="";for(let r=0;r<t;r++)n+="abcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(36*Math.random()));return r?n+r:n},form:function(t){return r(t).serializeArray()},ucfirst:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},list:function(t){if(r.isPlainObject(t)){const n=[],e=decodeURIComponent(r.param(t)).split("&");return r.each(e,function(t,r){const e=r.split("=");n.push({name:e[0],value:e[1]})}),n}return t},findValueByName:function(t,r){if(r in t)return t[r];const n=t.find(t=>t.name===r);return n?n.value:void 0},json:function(t){if("string"==typeof t){const r=t.match(/{[\s\S]+}/);if(null!==r)return r[0]}return!1},handleAuthError:function(t){return(400===t.status||401===t.status||403===t.status)&&(alert(ai1wm_locale.session_expired),window.location.reload(),!0)},sizeFormat:function(t){if(0===parseInt(t))return"0 B";const r=Math.floor(Math.log(t)/Math.log(1024)),n=1*(t/Math.pow(1024,r)).toFixed(2);return isNaN(n)?"0 B":n+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][r]},dirname:function(t){return t.replace(/\\/g,"/").replace(/\/[^/]*\/?$/,"")},basename:function(t){return t.replace(/\\/g,"/").replace(/.*\//,"")}}}},r={};const n=function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}(935);globalThis.Ai1wm=jQuery.extend({},globalThis.Ai1wm,{Util:n})})();