ttk-app-core
Version:
enterprise develop framework
1 lines • 3.13 kB
JavaScript
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("jQuery"));else if("function"==typeof define&&define.amd)define(["jQuery"],t);else{var o=t("object"==typeof exports?require("jQuery"):e.jQuery);for(var n in o)("object"==typeof exports?exports:e)[n]=o[n]}}(this,function(e){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){e.exports=o(1)},function(e,t,o){(function(e){"use strict";function t(e){return e&&e.__esModule?e:{"default":e}}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r=o(3),u=t(r);e.ajaxTransport("+*",function(t,o,r){if(t.crossDomain&&(document.addEventListener||document.querySelector)&&!window.atob&&window.XDomainRequest){var i=function(){var n=new XDomainRequest,i=t.type.toUpperCase(),s=t.contentType||o.contentType,a=t.url.substring(0,t.url.indexOf(":")).toUpperCase(),c=t.url,f=o.data||{},p=function(t,o){return{send:function(e,n){n(-1,u["default"].get(t,o))},abort:e.noop}};return n?o.forceMethod||-1!==e.inArray(i,["GET","POST"])?-1===e.inArray(a,["HTTP","HTTPS"])?{v:p(3,a)}:a!==location.protocol.substring(0,location.protocol.indexOf(":")).toUpperCase()?{v:p(4)}:(o.forceMethod&&("HEAD"===i&&(i="GET",c+=(-1===t.url.indexOf("?")?"?":"&")+"__method="+i),-1!==e.inArray(i,["PUT","DELETE","PATCH"])&&(i="POST",e.isPlainObject(f)?f.__method=i:"string"==typeof f&&(f+=(f.length?"&":"")+"__method="+i))),o.forceContentType&&("GET"===i&&(c+=(-1===t.url.indexOf("?")?"?":"&")+"__contentType="+encodeURIComponent(s)),"POST"===i&&(e.isPlainObject(f)?f.__contentType=s:"string"==typeof f&&(f+=(f.length?"&":"")+e.param({__contentType:s})))),t.timeout&&(n.timeout=t.timeout),n.onprogress=e.noop,{v:{send:function(s,a){n.onload=function(){var o={},r=null;switch(t.dataType){case"json":try{o.json=e.parseJSON(n.responseText)}catch(i){r=i.message}break;case"xml":try{o.xml=e.parseXML(n.responseText)}catch(i){r=i.message}break;case"text":o.text=n.responseText;break;case"html":o.html=n.responseText}if(r)return a(500,u["default"].get(6,r));var s=["Content-Type: "+n.contentType,"Content-Length: "+n.responseText.length];a(200,"OK",o,s.join("\r\n"))},n.onerror=function(){a(500,u["default"].get(7))},n.ontimeout=function(){a(500,u["default"].get(8))},o.__test===!0&&(r.__method=i,r.__uri=c),n.open(i,c),setTimeout(function(){n.send("POST"===i?"string"==typeof f?f:e.isPlainObject(f)?e.param(f):null:null)},0)},abort:function(){n.abort()}}}):{v:p(2,i)}:{v:p(1)}}();if("object"===("undefined"==typeof i?"undefined":n(i)))return i.v}})}).call(t,o(2))},function(t,o){t.exports=e},function(e,t){"use strict";e.exports={get:function(e,t){var o={0:"Unknown Error",1:"No Transport",2:t+" Method Not Allowed",3:t+" Scheme Not Supported",4:"URI source and target scheme must be the same",5:"No Data",6:"Bad Data: "+t,7:"Network Error",8:"Timeout"};return o[e in o?e:0]}}}])});