silverstripe-framework/admin/client/dist/js/bundle-framework.js

8 lines
163 KiB
JavaScript
Raw Normal View History

2016-07-29 04:40:11 +02:00
!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _jQuery=require("jQuery"),_jQuery2=_interopRequireDefault(_jQuery),_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),_reactRedux=require("react-redux"),_reactRouter=require("react-router"),_createBrowserHistory=require("history/lib/createBrowserHistory"),_createBrowserHistory2=_interopRequireDefault(_createBrowserHistory),_Config=require("lib/Config"),_Config2=_interopRequireDefault(_Config),_Router=require("lib/Router"),_Router2=_interopRequireDefault(_Router),_ReactRouteRegister=require("lib/ReactRouteRegister"),_ReactRouteRegister2=_interopRequireDefault(_ReactRouteRegister),_App=require("containers/App/App"),_App2=_interopRequireDefault(_App),_reactRouterRedux=require("react-router-redux"),BootRoutes=function(){function BootRoutes(store){_classCallCheck(this,BootRoutes),this.store=store;var base=_Config2["default"].get("absoluteBaseUrl");_Router2["default"].setAbsoluteBase(base)}return BootRoutes.prototype.start=function(location){this.matchesLegacyRoute(location)?this.initLegacyRouter():this.initReactRouter()},BootRoutes.prototype.matchesLegacyRoute=function(location){var sections=_Config2["default"].get("sections"),currentPath=_Router2["default"].resolveURLToBase(location).replace(/\/$/,"");return!!Object.keys(sections).find(function(key){var section=sections[key],route=_Router2["default"].resolveURLToBase(section.url).replace(/\/$/,"");return section.reactRouter?!1:currentPath.match(route)})},BootRoutes.prototype.initReactRouter=function(){_ReactRouteRegister2["default"].updateRootRoute({component:_App2["default"]});var history=(0,_reactRouterRedux.syncHistoryWithStore)((0,_reactRouter.useRouterHistory)(_createBrowserHistory2["default"])({basename:_Config2["default"].get("baseUrl")}),this.store);_reactDom2["default"].render(_react2["default"].createElement(_reactRedux.Provider,{store:this.store},_react2["default"].createElement(_reactRouter.Router,{history:history,routes:_ReactRouteRegister2["default"].getRootRoute()})),document.getElementsByClassName("cms-content")[0])},BootRoutes.prototype.initLegacyRouter=function(){var sections=_Config2["default"].get("sections"),store=this.store;(0,_Router2["default"])("*",function(ctx,next){ctx.store=store,next()});var lastPath=null;Object.keys(sections).forEach(function(key){var route=_Router2["default"].resolveURLToBase(sections[key].url);route=route.replace(/\/$/,""),route+="(/*?)?",(0,_Router2["default"])(route,function(ctx,next){if("complete"!==document.readyState||ctx.init)return void next();lastPath||(lastPath=window.location.pathname);var forceReload=ctx.data&&ctx.data.__forceReload;(ctx.path!==lastPath||forceReload)&&(lastPath=ctx.path.replace(/#.*$/,""),(0,_jQuery2["default"])(".cms-container").entwine("ss").handleStateChange(null,ctx.state))})}),_Router2["default"].start()},BootRoutes}();exports["default"]=BootRoutes},{"containers/App/App":10,"history/lib/createBrowserHistory":49,jQuery:"jQuery","lib/Config":16,"lib/ReactRouteRegister":"lib/ReactRouteRegister","lib/Router":18,react:"react","react-dom":"react-dom","react-redux":"react-redux","react-router":"react-router","react-router-redux":"react-router-redux"}],2:[function(require,module,exports){"use strict";function _interopRequireWildcard(obj){if(obj&&obj.__esMod
}function mapStateToProps(state){return{config:state.config,campaignId:state.campaign.campaignId,view:state.campaign.view,breadcrumbs:state.breadcrumbs,sectionConfig:state.config.sections.CampaignAdmin,securityId:state.config.SecurityID}}function mapDispatchToProps(dispatch){return{breadcrumbsActions:(0,_redux.bindActionCreators)(breadcrumbsActions,dispatch)}}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_redux=require("redux"),_reactRouter=require("react-router"),_Backend=require("lib/Backend"),_Backend2=_interopRequireDefault(_Backend),_BreadcrumbsActions=require("state/breadcrumbs/BreadcrumbsActions"),breadcrumbsActions=_interopRequireWildcard(_BreadcrumbsActions),_Breadcrumb=require("components/Breadcrumb/Breadcrumb"),_Breadcrumb2=_interopRequireDefault(_Breadcrumb),_SilverStripeComponent=require("lib/SilverStripeComponent"),_SilverStripeComponent2=_interopRequireDefault(_SilverStripeComponent),_FormAction=require("components/FormAction/FormAction"),_FormAction2=_interopRequireDefault(_FormAction),_i18n=require("i18n"),_i18n2=_interopRequireDefault(_i18n),_Toolbar=require("components/Toolbar/Toolbar"),_Toolbar2=_interopRequireDefault(_Toolbar),_FormBuilder=require("components/FormBuilder/FormBuilder"),_FormBuilder2=_interopRequireDefault(_FormBuilder),_CampaignAdminList=require("./CampaignAdminList"),_CampaignAdminList2=_interopRequireDefault(_CampaignAdminList),CampaignAdmin=function(_SilverStripeComponen){function CampaignAdmin(props){_classCallCheck(this,CampaignAdmin);var _this=_possibleConstructorReturn(this,_SilverStripeComponen.call(this,props));return _this.publishApi=_Backend2["default"].createEndpointFetcher({url:_this.props.sectionConfig.publishEndpoint.url,method:_this.props.sectionConfig.publishEndpoint.method,defaultData:{SecurityID:_this.props.securityId},payloadSchema:{id:{urlReplacement:":id",remove:!0}}}),_this.handleBackButtonClick=_this.handleBackButtonClick.bind(_this),_this}return _inherits(CampaignAdmin,_SilverStripeComponen),CampaignAdmin.prototype.componentWillMount=function(){0===this.props.breadcrumbs.length&&this.setBreadcrumbs(this.props.params.view,this.props.params.id)},CampaignAdmin.prototype.componentWillReceiveProps=function(props){var hasChangedRoute=this.props.params.id!==props.params.id||this.props.params.view!==props.params.view;hasChangedRoute&&this.setBreadcrumbs(props.params.view,props.params.id)},CampaignAdmin.prototype.setBreadcrumbs=function(view,id){var breadcrumbs=[{text:_i18n2["default"]._t("Campaigns.CAMPAIGN","Campaigns"),href:this.props.sectionConfig.url}];switch(view){case"show":break;case"edit":breadcrumbs.push({text:_i18n2["default"]._t("Campaigns.EDIT_CAMPAIGN","Editing Campaign"),href:this.getActionRoute(id,view)});break;case"create":breadcrumbs.push({text:_i18n2["default"]._t("Campaigns.ADD_CAMPAIGN","Add Campaign"),href:this.getActionRoute(id,view)})}this.props.breadcrumbsActions.setBreadcrumbs(breadcrumbs)},CampaignAdmin.prototype.handleBackButtonClick=function(event){if(this.props.breadcrumbs.length>1){var last=this.props.breadcrumbs[this.props.breadcrumbs.length-2];if(last&&last.href)return event.preventDefault(),void this.props.router.push(last.href)}},CampaignAdmin.prototype.render=function(){var view=null;switch(this.props.params.view){case"show":view=this.renderItemListView();break;case"edit":view=this.renderDetailEditView();break;case"create":view=this.renderCreateView();break;default:view=this.renderIndexView()}return view},CampaignAdmin.prototype.renderIndexView=function(){var schemaUrl=this.props.sectionConfig.form.EditForm.schemaUrl,formActionProps={title:_i18n2["default"]._t("Campaigns.ADDCAMPAIGN"),icon:"plus",handleClick:this.addCampaign.bind(this)},formBuilderProps={createFn:this.campaignListCreateFn.bind(this),schemaUrl:sche
default:return null}},Injector.prototype.register=function(name,component){this.components[name]=component},Injector}();window.ss=window.ss||{},window.ss.injector=window.ss.injector||new Injector,exports["default"]=window.ss.injector},{}],18:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function resolveURLToBase(path){var absoluteBase=_page2["default"].getAbsoluteBase(),absolutePath=_url2["default"].resolve(absoluteBase,path);return 0!==absolutePath.indexOf(absoluteBase)?absolutePath:absolutePath.substring(absoluteBase.length-1)}function show(pageShow){return function(path,state,dispatch,push){return pageShow(_page2["default"].resolveURLToBase(path),state,dispatch,push)}}function routeAppliesToCurrentLocation(route){var r=new _page2["default"].Route(route);return r.match(_page2["default"].current,{})}function getAbsoluteBase(){return _page2["default"].absoluteBaseURL}function setAbsoluteBase(base){_page2["default"].absoluteBaseURL=base;var a=document.createElement("a");a.href=base;var basePath=a.pathname;basePath=basePath.replace(/\/$/,""),basePath.match(/^[^\/]/)&&(basePath="/"+basePath),_page2["default"].base(basePath)}Object.defineProperty(exports,"__esModule",{value:!0});var _page=require("page.js"),_page2=_interopRequireDefault(_page),_url=require("url"),_url2=_interopRequireDefault(_url);_page2["default"].oldshow||(_page2["default"].oldshow=_page2["default"].show),_page2["default"].setAbsoluteBase=setAbsoluteBase.bind(_page2["default"]),_page2["default"].getAbsoluteBase=getAbsoluteBase.bind(_page2["default"]),_page2["default"].resolveURLToBase=resolveURLToBase.bind(_page2["default"]),_page2["default"].show=show(_page2["default"].oldshow),_page2["default"].routeAppliesToCurrentLocation=routeAppliesToCurrentLocation,window.ss=window.ss||{},window.ss.router=window.ss.router||_page2["default"],exports["default"]=window.ss.router},{"page.js":"page.js",url:64}],19:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]={SET_BREADCRUMBS:"SET_BREADCRUMBS"}},{}],20:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function reducer(){var state=arguments.length<=0||void 0===arguments[0]?initialState:arguments[0],action=arguments[1];switch(action.type){case _BreadcrumbsActionTypes2["default"].SET_BREADCRUMBS:return(0,_deepFreezeStrict2["default"])(_extends([],action.payload.breadcrumbs));default:return state}}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_deepFreezeStrict=require("deep-freeze-strict"),_deepFreezeStrict2=_interopRequireDefault(_deepFreezeStrict),_BreadcrumbsActionTypes=require("./BreadcrumbsActionTypes"),_BreadcrumbsActionTypes2=_interopRequireDefault(_BreadcrumbsActionTypes),initialState=(0,_deepFreezeStrict2["default"])([]);exports["default"]=reducer},{"./BreadcrumbsActionTypes":19,"deep-freeze-strict":"deep-freeze-strict"}],21:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]={SET_CAMPAIGN_ACTIVE_CHANGESET:"SET_CAMPAIGN_ACTIVE_CHANGESET",SET_CAMPAIGN_SELECTED_CHANGESETITEM:"SET_CAMPAIGN_SELECTED_CHANGESETITEM",PUBLISH_CAMPAIGN_REQUEST:"PUBLISH_CAMPAIGN_REQUEST",PUBLISH_CAMPAIGN_SUCCESS:"PUBLISH_CAMPAIGN_SUCCESS",PUBLISH_CAMPAIGN_FAILURE:"PUBLISH_CAMPAIGN_FAILURE"}},{}],22:[function(require,module,exports){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function selectChangeSetItem(changeSetItemId){return{type:_CampaignActionTypes2["default"].SET_CAMPAIGN_SELECTED_CHANGESETITEM,payload:{changeSetItemId:changeSetItemId}}}function showCampaignView(campaignId,view){return function(dispatch){dispatch({type:_CampaignActionTypes2["default"].SET_CA
lib$es6$promise$asap$$queue[i]=void 0,lib$es6$promise$asap$$queue[i+1]=void 0}lib$es6$promise$asap$$len=0}function lib$es6$promise$asap$$attemptVertx(){try{var r=require,vertx=r("vertx");return lib$es6$promise$asap$$vertxNext=vertx.runOnLoop||vertx.runOnContext,lib$es6$promise$asap$$useVertxTimer()}catch(e){return lib$es6$promise$asap$$useSetTimeout()}}function lib$es6$promise$then$$then(onFulfillment,onRejection){var parent=this,state=parent._state;if(state===lib$es6$promise$$internal$$FULFILLED&&!onFulfillment||state===lib$es6$promise$$internal$$REJECTED&&!onRejection)return this;var child=new this.constructor(lib$es6$promise$$internal$$noop),result=parent._result;if(state){var callback=arguments[state-1];lib$es6$promise$asap$$asap(function(){lib$es6$promise$$internal$$invokeCallback(state,child,callback,result)})}else lib$es6$promise$$internal$$subscribe(parent,child,onFulfillment,onRejection);return child}function lib$es6$promise$promise$resolve$$resolve(object){var Constructor=this;if(object&&"object"==typeof object&&object.constructor===Constructor)return object;var promise=new Constructor(lib$es6$promise$$internal$$noop);return lib$es6$promise$$internal$$resolve(promise,object),promise}function lib$es6$promise$$internal$$noop(){}function lib$es6$promise$$internal$$selfFulfillment(){return new TypeError("You cannot resolve a promise with itself")}function lib$es6$promise$$internal$$cannotReturnOwn(){return new TypeError("A promises callback cannot return that same promise.")}function lib$es6$promise$$internal$$getThen(promise){try{return promise.then}catch(error){return lib$es6$promise$$internal$$GET_THEN_ERROR.error=error,lib$es6$promise$$internal$$GET_THEN_ERROR}}function lib$es6$promise$$internal$$tryThen(then,value,fulfillmentHandler,rejectionHandler){try{then.call(value,fulfillmentHandler,rejectionHandler)}catch(e){return e}}function lib$es6$promise$$internal$$handleForeignThenable(promise,thenable,then){lib$es6$promise$asap$$asap(function(promise){var sealed=!1,error=lib$es6$promise$$internal$$tryThen(then,thenable,function(value){sealed||(sealed=!0,thenable!==value?lib$es6$promise$$internal$$resolve(promise,value):lib$es6$promise$$internal$$fulfill(promise,value))},function(reason){sealed||(sealed=!0,lib$es6$promise$$internal$$reject(promise,reason))},"Settle: "+(promise._label||" unknown promise"));!sealed&&error&&(sealed=!0,lib$es6$promise$$internal$$reject(promise,error))},promise)}function lib$es6$promise$$internal$$handleOwnThenable(promise,thenable){thenable._state===lib$es6$promise$$internal$$FULFILLED?lib$es6$promise$$internal$$fulfill(promise,thenable._result):thenable._state===lib$es6$promise$$internal$$REJECTED?lib$es6$promise$$internal$$reject(promise,thenable._result):lib$es6$promise$$internal$$subscribe(thenable,void 0,function(value){lib$es6$promise$$internal$$resolve(promise,value)},function(reason){lib$es6$promise$$internal$$reject(promise,reason)})}function lib$es6$promise$$internal$$handleMaybeThenable(promise,maybeThenable,then){maybeThenable.constructor===promise.constructor&&then===lib$es6$promise$then$$default&&constructor.resolve===lib$es6$promise$promise$resolve$$default?lib$es6$promise$$internal$$handleOwnThenable(promise,maybeThenable):then===lib$es6$promise$$internal$$GET_THEN_ERROR?lib$es6$promise$$internal$$reject(promise,lib$es6$promise$$internal$$GET_THEN_ERROR.error):void 0===then?lib$es6$promise$$internal$$fulfill(promise,maybeThenable):lib$es6$promise$utils$$isFunction(then)?lib$es6$promise$$internal$$handleForeignThenable(promise,maybeThenable,then):lib$es6$promise$$internal$$fulfill(promise,maybeThenable)}function lib$es6$promise$$internal$$resolve(promise,value){promise===value?lib$es6$promise$$internal$$reject(promise,lib$es6$promise$$internal$$selfFulfillment()):lib$es6$promise$utils$$objectOrFunction(value)?lib$es6$promise$$internal$$handleMaybeThenable(promise,value,lib$es6$promise$$internal$$getThen(value)):lib$es6$promise$$internal$$fulfill(promise,value)}function lib$es6$promise$$internal$$publishRejection(promise){promise._onerror&&promise._onerror(promise._resu
2016-07-29 04:40:11 +02:00
exports["default"]=createHistory,module.exports=exports["default"]}).call(this,require("_process"))},{"./Actions":43,"./AsyncUtils":44,"./PathUtils":48,"./createLocation":52,"./deprecate":53,"./runTransitionHook":54,_process:34,"deep-equal":39,warning:56}],52:[function(require,module,exports){(function(process){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function createLocation(){var location=arguments.length<=0||void 0===arguments[0]?"/":arguments[0],action=arguments.length<=1||void 0===arguments[1]?_Actions.POP:arguments[1],key=arguments.length<=2||void 0===arguments[2]?null:arguments[2],_fourthArg=arguments.length<=3||void 0===arguments[3]?null:arguments[3];"string"==typeof location&&(location=_PathUtils.parsePath(location)),"object"==typeof action&&("production"!==process.env.NODE_ENV?_warning2["default"](!1,"The state (2nd) argument to createLocation is deprecated; use a location descriptor instead"):void 0,location=_extends({},location,{state:action}),action=key||_Actions.POP,key=_fourthArg);var pathname=location.pathname||"/",search=location.search||"",hash=location.hash||"",state=location.state||null;return{pathname:pathname,search:search,hash:hash,state:state,action:action,key:key}}exports.__esModule=!0;var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_warning=require("warning"),_warning2=_interopRequireDefault(_warning),_Actions=require("./Actions"),_PathUtils=require("./PathUtils");exports["default"]=createLocation,module.exports=exports["default"]}).call(this,require("_process"))},{"./Actions":43,"./PathUtils":48,_process:34,warning:56}],53:[function(require,module,exports){(function(process){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function deprecate(fn,message){return function(){return"production"!==process.env.NODE_ENV?_warning2["default"](!1,"[history] "+message):void 0,fn.apply(this,arguments)}}exports.__esModule=!0;var _warning=require("warning"),_warning2=_interopRequireDefault(_warning);exports["default"]=deprecate,module.exports=exports["default"]}).call(this,require("_process"))},{_process:34,warning:56}],54:[function(require,module,exports){(function(process){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function runTransitionHook(hook,location,callback){var result=hook(location,callback);hook.length<2?callback(result):"production"!==process.env.NODE_ENV?_warning2["default"](void 0===result,'You should not "return" in a transition hook with a callback argument; call the callback instead'):void 0}exports.__esModule=!0;var _warning=require("warning"),_warning2=_interopRequireDefault(_warning);exports["default"]=runTransitionHook,module.exports=exports["default"]}).call(this,require("_process"))},{_process:34,warning:56}],55:[function(require,module,exports){"use strict";var invariant=function(condition,format,a,b,c,d,e,f){if(!condition){var error;if(void 0===format)error=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var args=[a,b,c,d,e,f],argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++]})),error.name="Invariant Violation"}throw error.framesToPop=1,error}};module.exports=invariant},{}],56:[function(require,module,exports){"use strict";var warning=function(){};module.exports=warning},{}],57:[function(require,module,exports){require("whatwg-fetch"),module.exports=self.fetch.bind(self)},{"whatwg-fetch":66}],58:[function(require,module,exports){!function(isNode){function merge_recursive(base,extend){if("object"!==typeOf(base))return extend;for(var key in extend)"object"===typeOf(base[key])&&"object"===typeOf(extend[key])?base[key]=merge_recursive(base[key],extend[key]):base[key]=extend[key];return base}function merge(clone,recursive,argv){var result=ar
"string"==typeof body)this._bodyText=body;else if(support.blob&&Blob.prototype.isPrototypeOf(body))this._bodyBlob=body;else if(support.formData&&FormData.prototype.isPrototypeOf(body))this._bodyFormData=body;else if(body){if(!support.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(body))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof body?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type&&this.headers.set("content-type",this._bodyBlob.type))},support.blob?(this.blob=function(){var rejected=consumed(this);if(rejected)return rejected;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(readBlobAsArrayBuffer)},this.text=function(){var rejected=consumed(this);if(rejected)return rejected;if(this._bodyBlob)return readBlobAsText(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var rejected=consumed(this);return rejected?rejected:Promise.resolve(this._bodyText)},support.formData&&(this.formData=function(){return this.text().then(decode)}),this.json=function(){return this.text().then(JSON.parse)},this}function normalizeMethod(method){var upcased=method.toUpperCase();return methods.indexOf(upcased)>-1?upcased:method}function Request(input,options){options=options||{};var body=options.body;if(Request.prototype.isPrototypeOf(input)){if(input.bodyUsed)throw new TypeError("Already read");this.url=input.url,this.credentials=input.credentials,options.headers||(this.headers=new Headers(input.headers)),this.method=input.method,this.mode=input.mode,body||(body=input._bodyInit,input.bodyUsed=!0)}else this.url=input;if(this.credentials=options.credentials||this.credentials||"omit",!options.headers&&this.headers||(this.headers=new Headers(options.headers)),this.method=normalizeMethod(options.method||this.method||"GET"),this.mode=options.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&body)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(body)}function decode(body){var form=new FormData;return body.trim().split("&").forEach(function(bytes){if(bytes){var split=bytes.split("="),name=split.shift().replace(/\+/g," "),value=split.join("=").replace(/\+/g," ");form.append(decodeURIComponent(name),decodeURIComponent(value))}}),form}function headers(xhr){var head=new Headers,pairs=xhr.getAllResponseHeaders().trim().split("\n");return pairs.forEach(function(header){var split=header.trim().split(":"),key=split.shift().trim(),value=split.join(":").trim();head.append(key,value)}),head}function Response(bodyInit,options){options||(options={}),this.type="default",this.status=options.status,this.ok=this.status>=200&&this.status<300,this.statusText=options.statusText,this.headers=options.headers instanceof Headers?options.headers:new Headers(options.headers),this.url=options.url||"",this._initBody(bodyInit)}if(!self.fetch){Headers.prototype.append=function(name,value){name=normalizeName(name),value=normalizeValue(value);var list=this.map[name];list||(list=[],this.map[name]=list),list.push(value)},Headers.prototype["delete"]=function(name){delete this.map[normalizeName(name)]},Headers.prototype.get=function(name){var values=this.map[normalizeName(name)];return values?values[0]:null},Headers.prototype.getAll=function(name){return this.map[normalizeName(name)]||[]},Headers.prototype.has=function(name){return this.map.hasOwnProperty(normalizeName(name))},Headers.prototype.set=function(name,value){this.map[normalizeName(name)]=[normalizeValue(value)]},Headers.prototype.forEach=function(callback,thisArg){Object.getOwnPropertyNames(this.map).forEach(function(name){this.map[name].forEach(function(value){callback.call(thisArg,value,name,this)},this)},this)};var support={blob:"FileReader"in self&
2016-04-07 13:43:43 +02:00
//# sourceMappingURL=bundle-framework.js.map