{"size": 2192, "ext": "js", "max_stars_repo_path": "docs/workbox/workbox-v3.6.3/workbox-cacheable-response.dev.js", "max_stars_repo_name": "arskama/webnfc-groceries", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "docs/workbox/workbox-v3.6.3/workbox-cacheable-response.dev.js", "max_issues_repo_name": "arskama/webnfc-groceries", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "docs/workbox/workbox-v3.6.3/workbox-cacheable-response.dev.js", "max_forks_repo_name": "arskama/webnfc-groceries", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 1096.0, "max_line_length": 2191, "alphanum_fraction": 0.7842153285}
this.workbox=this.workbox||{},this.workbox.cacheableResponse=function(o,c,t,n,s){"use strict";try{self.workbox.v["workbox:cacheable-response:3.6.3"]=1}catch(e){}class l{constructor(e={}){{if(!(e.statuses||e.headers))throw new c.WorkboxError("statuses-or-headers-required",{moduleName:"workbox-cacheable-response",className:"CacheableResponse",funcName:"constructor"});e.statuses&&t.assert.isArray(e.statuses,{moduleName:"workbox-cacheable-response",className:"CacheableResponse",funcName:"constructor",paramName:"config.statuses"}),e.headers&&t.assert.isType(e.headers,"object",{moduleName:"workbox-cacheable-response",className:"CacheableResponse",funcName:"constructor",paramName:"config.headers"})}this._statuses=e.statuses,this._headers=e.headers}isResponseCacheable(e){t.assert.isInstance(e,Response,{moduleName:"workbox-cacheable-response",className:"CacheableResponse",funcName:"isResponseCacheable",paramName:"response"});let r=!0;if(this._statuses&&(r=this._statuses.includes(e.status)),this._headers&&r&&(r=Object.keys(this._headers).some(a=>e.headers.get(a)===this._headers[a])),!r){s.logger.groupCollapsed(`The request for '${n.getFriendlyURL(e.url)}' returned a response that does not meet the criteria for being cached.`),s.logger.groupCollapsed("View cacheability criteria here."),s.logger.unprefixed.log("Cacheable statuses: "+JSON.stringify(this._statuses)),s.logger.unprefixed.log("Cacheable headers: "+JSON.stringify(this._headers,null,2)),s.logger.groupEnd();const a={};e.headers.forEach((i,u)=>{a[u]=i}),s.logger.groupCollapsed("View response status and headers here."),s.logger.unprefixed.log("Response status: "+e.status),s.logger.unprefixed.log("Response headers: "+JSON.stringify(a,null,2)),s.logger.groupEnd(),s.logger.groupCollapsed("View full response details here."),s.logger.unprefixed.log(e.headers),s.logger.unprefixed.log(e),s.logger.groupEnd(),s.logger.groupEnd()}return r}}class h{constructor(e){this._cacheableResponse=new l(e)}cacheWillUpdate({response:e}){return this._cacheableResponse.isResponseCacheable(e)?e:null}}return o.CacheableResponse=l,o.Plugin=h,o}({},workbox.core._private,workbox.core._private,workbox.core._private,workbox.core._private);
