X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fsw.js;h=d01b6b2495426393b9ddb276673abab2d4a8196d;hb=57d5ff57d6fb7cfe8d67588d5f95c2b9cdfab436;hp=4b7940486d16a62e6d2738160345270258fa9546;hpb=4e72762322a5616ce426df62888ee3bc7af19dc8;p=akkoma diff --git a/priv/static/sw.js b/priv/static/sw.js index 4b7940486..d01b6b249 100644 --- a/priv/static/sw.js +++ b/priv/static/sw.js @@ -1,3 +1,3 @@ -var __wpo = {"assets":{"main":[],"additional":[],"optional":[]},"externals":[],"hashesMap":{},"strategy":"changed","responseStrategy":"cache-first","version":"3/7/2019, 10:51:00 AM","name":"webpack-offline:mastodon","pluginVersion":"5.0.6","relativePaths":false}; +var __wpo = {"assets":{"main":[],"additional":[],"optional":[]},"externals":["/emoji/1f602.svg","/emoji/sheet_10.png"],"hashesMap":{},"strategy":"changed","responseStrategy":"cache-first","version":"4/11/2019, 5:19:34 AM","name":"webpack-offline:mastodon","pluginVersion":"5.0.6","relativePaths":false}; -!function(e){var n={};function i(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=n,i.d=function(t,o,e){i.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:e})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(o,t){if(1&t&&(o=i(o)),8&t)return o;if(4&t&&"object"==typeof o&&o&&o.__esModule)return o;var e=Object.create(null);if(i.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:o}),2&t&&"string"!=typeof o)for(var n in o)i.d(e,n,function(t){return o[t]}.bind(null,n));return e},i.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(o,"a",o),o},i.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},i.p="/packs/",i(i.s=5)}([function(t,o,e){var n=e(8).Symbol;t.exports=n},function(t,o,e){"use strict";o.extend=function(t){var o,e,n,i,a=Array.prototype.slice.call(arguments,1);for(o=0,e=a.length;o",""":'"',"'":"'"});t.exports=n},function(t,o){t.exports=function(o){return function(t){return null==o?void 0:o[t]}}},function(t,o,e){"use strict";var n=e(21),i=e(26);n.default.__addLocaleData(i.default),n.default.defaultLocale="en",o.default=n.default},function(t,o,e){"use strict";var c=e(1),s=e(22),i=e(23),n=e(24);function u(o,t,e){var n="string"==typeof o?u.__parse(o):o;if(!n||"messageFormatPattern"!==n.type)throw new TypeError("A message must be provided as a String or AST.");e=this._mergeFormats(u.formats,e),s.defineProperty(this,"_locale",{value:this._resolveLocale(t)});var i=this._findPluralRuleFunction(this._locale),a=this._compilePattern(n,t,e,i),r=this;this.format=function(t){try{return r._format(a,t)}catch(t){throw t.variableId?new Error("The intl string context variable '"+t.variableId+"' was not provided to the string '"+o+"'"):t}}}o.default=u,s.defineProperty(u,"formats",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),s.defineProperty(u,"__localeData__",{value:s.objCreate(null)}),s.defineProperty(u,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");u.__localeData__[t.locale.toLowerCase()]=t}}),s.defineProperty(u,"__parse",{value:n.default.parse}),s.defineProperty(u,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),u.prototype.resolvedOptions=function(){return{locale:this._locale}},u.prototype._compilePattern=function(t,o,e,n){return new i.default(o,e,n).compile(t)},u.prototype._findPluralRuleFunction=function(t){for(var o=u.__localeData__,e=o[t.toLowerCase()];e;){if(e.pluralRuleFunction)return e.pluralRuleFunction;e=e.parentLocale&&o[e.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+t)},u.prototype._format=function(t,o){var e,n,i,a,r,s,u="";for(e=0,n=t.length;eo.description?1:0});o/g,"\n").replace(/<\/p>

/g,"\n\n").replace(/<[^>]*>/g,""))},d=function(t){return{action:"expand",icon:"/web-push-icon_expand.png",title:m("status.show_more",t)}},h=function(t){return{action:"reblog",icon:"/web-push-icon_reblog.png",title:m("status.reblog",t)}},v=function(t){return{action:"favourite",icon:"/web-push-icon_favourite.png",title:m("status.favourite",t)}},g=function(t){var o=t.find(function(t){return t.focused}),e=t.find(function(t){return"visible"===t.visibilityState});return o||e||t[0]},b=function(t,o){var e=l(t);return e.actions=e.actions.filter(function(t){return t.action!==o}),self.registration.showNotification(e.title,e)};self.addEventListener("push",function(t){var o=t.data.json(),e=o.access_token,n=o.notification_id,i=o.preferred_locale,a=o.title,r=o.body,s=o.icon;t.waitUntil(f("/api/v1/notifications/"+n,"get",e).then(function(t){var o={};return o.title=m("notification."+t.type,i,{name:0",""":'"',"'":"'"});t.exports=e},function(t,o){t.exports=function(o){return function(t){return null==o?void 0:o[t]}}},function(t,o,n){"use strict";var e=n(21),i=n(26);e.default.__addLocaleData(i.default),e.default.defaultLocale="en",o.default=e.default},function(t,o,n){"use strict";var c=n(1),s=n(22),i=n(23),e=n(24);function u(o,t,n){var e="string"==typeof o?u.__parse(o):o;if(!e||"messageFormatPattern"!==e.type)throw new TypeError("A message must be provided as a String or AST.");n=this._mergeFormats(u.formats,n),s.defineProperty(this,"_locale",{value:this._resolveLocale(t)});var i=this._findPluralRuleFunction(this._locale),a=this._compilePattern(e,t,n,i),r=this;this.format=function(t){try{return r._format(a,t)}catch(t){throw t.variableId?new Error("The intl string context variable '"+t.variableId+"' was not provided to the string '"+o+"'"):t}}}o.default=u,s.defineProperty(u,"formats",{enumerable:!0,value:{number:{currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}),s.defineProperty(u,"__localeData__",{value:s.objCreate(null)}),s.defineProperty(u,"__addLocaleData",{value:function(t){if(!t||!t.locale)throw new Error("Locale data provided to IntlMessageFormat is missing a `locale` property");u.__localeData__[t.locale.toLowerCase()]=t}}),s.defineProperty(u,"__parse",{value:e.default.parse}),s.defineProperty(u,"defaultLocale",{enumerable:!0,writable:!0,value:void 0}),u.prototype.resolvedOptions=function(){return{locale:this._locale}},u.prototype._compilePattern=function(t,o,n,e){return new i.default(o,n,e).compile(t)},u.prototype._findPluralRuleFunction=function(t){for(var o=u.__localeData__,n=o[t.toLowerCase()];n;){if(n.pluralRuleFunction)return n.pluralRuleFunction;n=n.parentLocale&&o[n.parentLocale.toLowerCase()]}throw new Error("Locale data added to IntlMessageFormat is missing a `pluralRuleFunction` for :"+t)},u.prototype._format=function(t,o){var n,e,i,a,r,s,u="";for(n=0,e=t.length;no.description?1:0});o/g,"\n").replace(/<\/p>

/g,"\n\n").replace(/<[^>]*>/g,""))},d=function(t){return{action:"expand",icon:"/web-push-icon_expand.png",title:m("status.show_more",t)}},h=function(t){return{action:"reblog",icon:"/web-push-icon_reblog.png",title:m("status.reblog",t)}},v=function(t){return{action:"favourite",icon:"/web-push-icon_favourite.png",title:m("status.favourite",t)}},g=function(t){var o=t.find(function(t){return t.focused}),n=t.find(function(t){return"visible"===t.visibilityState});return o||n||t[0]},b=function(t,o){var n=f(t);return n.actions=n.actions.filter(function(t){return t.action!==o}),self.registration.showNotification(n.title,n)};self.addEventListener("push",function(t){var o=t.data.json(),n=o.access_token,e=o.notification_id,i=o.preferred_locale,a=o.title,r=o.body,s=o.icon;t.waitUntil(l("/api/v1/notifications/"+e,"get",n).then(function(t){var o={};return o.title=m("notification."+t.type,i,{name:0