goog.provide('ajax.xhrio'); (goog.net.XhrIo.prototype.ajax$protocols$AjaxImpl$ = cljs.core.PROTOCOL_SENTINEL); (goog.net.XhrIo.prototype.ajax$protocols$AjaxImpl$_js_ajax_request$arity$3 = (function (this$,p__47157,handler){ var map__47158 = p__47157; var map__47158__$1 = cljs.core.__destructure_map(map__47158); var uri = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47158__$1,new cljs.core.Keyword(null,"uri","uri",-774711847)); var method = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47158__$1,new cljs.core.Keyword(null,"method","method",55703592)); var body = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47158__$1,new cljs.core.Keyword(null,"body","body",-2049205669)); var headers = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47158__$1,new cljs.core.Keyword(null,"headers","headers",-835030129)); var timeout = cljs.core.get.cljs$core$IFn$_invoke$arity$3(map__47158__$1,new cljs.core.Keyword(null,"timeout","timeout",-318625318),(0)); var with_credentials = cljs.core.get.cljs$core$IFn$_invoke$arity$3(map__47158__$1,new cljs.core.Keyword(null,"with-credentials","with-credentials",-1163127235),false); var response_format = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47158__$1,new cljs.core.Keyword(null,"response-format","response-format",1664465322)); var progress_handler = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47158__$1,new cljs.core.Keyword(null,"progress-handler","progress-handler",333585589)); var this$__$1 = this; var temp__5804__auto___47186 = new cljs.core.Keyword(null,"type","type",1174270348).cljs$core$IFn$_invoke$arity$1(response_format); if(cljs.core.truth_(temp__5804__auto___47186)){ var response_type_47191 = temp__5804__auto___47186; this$__$1.setResponseType(cljs.core.name(response_type_47191)); } else { } if(cljs.core.fn_QMARK_(progress_handler)){ var G__47164_47192 = this$__$1; G__47164_47192.setProgressEventsEnabled(true); goog.events.listen(G__47164_47192,goog.net.EventType.UPLOAD_PROGRESS,progress_handler); } else { } var G__47165 = this$__$1; goog.events.listen(G__47165,goog.net.EventType.COMPLETE,(function (p1__47155_SHARP_){ var G__47166 = p1__47155_SHARP_.target; return (handler.cljs$core$IFn$_invoke$arity$1 ? handler.cljs$core$IFn$_invoke$arity$1(G__47166) : handler.call(null,G__47166)); })); G__47165.setTimeoutInterval(timeout); G__47165.setWithCredentials(with_credentials); G__47165.send(uri,method,body,cljs.core.clj__GT_js(headers)); return G__47165; })); (goog.net.XhrIo.prototype.ajax$protocols$AjaxRequest$ = cljs.core.PROTOCOL_SENTINEL); (goog.net.XhrIo.prototype.ajax$protocols$AjaxRequest$_abort$arity$1 = (function (this$){ var this$__$1 = this; return this$__$1.abort(goog.net.ErrorCode.ABORT); })); (goog.net.XhrIo.prototype.ajax$protocols$AjaxResponse$ = cljs.core.PROTOCOL_SENTINEL); (goog.net.XhrIo.prototype.ajax$protocols$AjaxResponse$_body$arity$1 = (function (this$){ var this$__$1 = this; return this$__$1.getResponse(); })); (goog.net.XhrIo.prototype.ajax$protocols$AjaxResponse$_status$arity$1 = (function (this$){ var this$__$1 = this; return this$__$1.getStatus(); })); (goog.net.XhrIo.prototype.ajax$protocols$AjaxResponse$_status_text$arity$1 = (function (this$){ var this$__$1 = this; return this$__$1.getStatusText(); })); (goog.net.XhrIo.prototype.ajax$protocols$AjaxResponse$_get_all_headers$arity$1 = (function (this$){ var this$__$1 = this; return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$1(this$__$1.getResponseHeaders()); })); (goog.net.XhrIo.prototype.ajax$protocols$AjaxResponse$_get_response_header$arity$2 = (function (this$,header){ var this$__$1 = this; return this$__$1.getResponseHeader(header); })); (goog.net.XhrIo.prototype.ajax$protocols$AjaxResponse$_was_aborted$arity$1 = (function (this$){ var this$__$1 = this; return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(this$__$1.getLastErrorCode(),goog.net.ErrorCode.ABORT); })); (goog.net.XhrManager.prototype.ajax$protocols$AjaxImpl$ = cljs.core.PROTOCOL_SENTINEL); (goog.net.XhrManager.prototype.ajax$protocols$AjaxImpl$_js_ajax_request$arity$3 = (function (this$,p__47174,handler){ var map__47178 = p__47174; var map__47178__$1 = cljs.core.__destructure_map(map__47178); var uri = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47178__$1,new cljs.core.Keyword(null,"uri","uri",-774711847)); var method = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47178__$1,new cljs.core.Keyword(null,"method","method",55703592)); var body = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47178__$1,new cljs.core.Keyword(null,"body","body",-2049205669)); var headers = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47178__$1,new cljs.core.Keyword(null,"headers","headers",-835030129)); var id = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47178__$1,new cljs.core.Keyword(null,"id","id",-1388402092)); var timeout = cljs.core.get.cljs$core$IFn$_invoke$arity$3(map__47178__$1,new cljs.core.Keyword(null,"timeout","timeout",-318625318),(0)); var priority = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47178__$1,new cljs.core.Keyword(null,"priority","priority",1431093715)); var max_retries = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__47178__$1,new cljs.core.Keyword(null,"max-retries","max-retries",-1933762121)); var this$__$1 = this; var G__47179 = this$__$1; G__47179.setTimeoutInterval(timeout); G__47179.send(id,uri,method,body,cljs.core.clj__GT_js(headers),priority,handler,max_retries); return G__47179; })); //# sourceMappingURL=ajax.xhrio.js.map