PageSourceSearch

https://patch.com/_next/static/chunks/14j3c~rekjvzg.js

js patch.com collected 2026-10-01 08:34:16 UTC 43,180 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,710705,t=>{"use strict";function e(t){for(var e=arguments.length,a=Array(e>1?e-1:0),r=1;r<e;r++)a[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(a.length?" "+a.map(function(t){return"'"+t+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function a(t){return!!t&&!!t[B]}function r(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var a=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return a===Object||"function"==typeof a&&Function.toString.call(a)===x}(t)||Array.isArray(t)||!!t[k]||!!t.constructor[k]||u(t)||l(t))}function i(t,e,a){void 0===a&&(a=!1),0===n(t)?(a?Object.keys:W)(t).forEach(function(r){a&&"symbol"==typeof r||e(r,t[r],t)}):t.forEach(function(a,r){return e(r,a,t)})}function n(t){var e=t[B];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:u(t)?2:3*!!l(t)}function o(t,e){return 2===n(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function s(t,e,a){var r=n(t);2===r?t.set(e,a):3===r?(t.delete(e),t.add(a)):t[e]=a}function c(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function u(t){return j&&t instanceof Map}function l(t){return F&&t instanceof Set}function f(t){return t.o||t.t}function d(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=G(t);delete e[B];for(var a=W(e),r=0;r<a.length;r++){var i=a[r],n=e[i];!1===n.writable&&(n.writable=!0,n.configurable=!0),(n.get||n.set)&&(e[i]={configurable:!0,writable:!0,enumerable:n.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function p(t,e){return void 0===e&&(e=!1),m(t)||a(t)||!r(t)||(n(t)>1&&(t.set=t.add=t.clear=t.delete=h),Object.freeze(t),e&&i(t,function(t,e){return p(e,!0)},!0)),t}function h(){e(2)}function m(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function E(t){var a=H[t];return a||e(18,t),a}function y(t,e){e&&(E("Patches"),t.u=[],t.s=[],t.v=e)}function A(t){g(t),t.p.forEach(b),t.p=null}function g(t){t===D&&(D=t.l)}function P(t){return D={p:[],l:D,h:t,m:!0,_:0}}function b(t){var e=t[B];0===e.i||1===e.i?e.j():e.O=!0}function T(t,a){a._=a.p.length;var i=a.p[0],n=void 0!==t&&t!==i;return a.h.g||E("ES5").S(a,t,n),n?(i[B].P&&(A(a),e(4)),r(t)&&(t=O(a,t),a.l||_(a,t)),a.u&&E("Patches").M(i[B].t,t,a.u,a.s)):t=O(a,i,[]),A(a),a.u&&a.v(a.u,a.s),t!==z?t:void 0}function O(t,e,a){if(m(e))return e;var r=e[B];if(!r)return i(e,function(i,n){return C(t,r,e,i,n,a)},!0),e;if(r.A!==t)return e;if(!r.P)return _(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var n=4===r.i||5===r.i?r.o=d(r.k):r.o;i(3===r.i?new Set(n):n,function(e,i){return C(t,r,n,e,i,a)}),_(t,n,!1),a&&t.u&&E("Patches").R(r,a,t.u,t.s)}return r.o}function C(t,e,i,n,c,u){if(a(c)){var l=O(t,c,u&&e&&3!==e.i&&!o(e.D,n)?u.concat(n):void 0);if(s(i,n,l),!a(l))return;t.m=!1}if(r(c)&&!m(c)){if(!t.h.F&&t._<1)return;O(t,c),e&&e.A.l||_(t,c)}}function _(t,e,a){void 0===a&&(a=!1),t.h.F&&t.m&&p(e,a)}function v(t,e){var a=t[B];return(a?f(a):t)[e]}function w(t,e){if(e in t)for(var a=Object.getPrototypeOf(t);a;){var r=Object.getOwnPropertyDescriptor(a,e);if(r)return r;a=Object.getPrototypeOf(a)}}function N(t){t.P||(t.P=!0,t.l&&N(t.l))}function I(t){t.o||(t.o=d(t.t))}function S(t,e,a){var r,i,n,o,s,c,f,d=u(e)?E("MapSet").N(e,a):l(e)?E("MapSet").T(e,a):t.g?(n=i={i:+!!(r=Array.isArray(e)),A:a?a.A:D,P:!1,I:!1,D:{},l:a,t:e,k:null,o:null,j:null,C:!1},o=Y,r&&(n=[i],o=$),c=(s=Proxy.revocable(n,o)).revoke,i.k=f=s.proxy,i.j=c,f):E("ES5").J(e,a);return(a?a.A:D).p.push(d),d}function R(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return d(t)}var U,D,L="u">typeof Symbol&&"symbol"==typeof Symbol("x"),j="u">typeof Map,F="u">typeof Set,M="u">typeof Proxy&&void 0!==Proxy.revocable&&"u">typeof Reflect,z=L?Symbol.for("immer-nothing"):((U={})["immer-nothing"]=!0,U),k=L?Symbol.for("immer-draftable"):"__$immer_draftable",B=L?Symbol.for("immer-state"):"__$immer_state",x=""+Object.prototype.constructor,W="u">typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,G=Object.getOwnPropertyDescriptors||function(t){var e={};return W(t).forEach(function(a){e[a]=Object.getOwnPropertyDescriptor(t,a)}),e},H={},Y={get:function(t,e){if(e===B)return t;var a,i,n=f(t);if(!o(n,e))return(i=w(n,e))?"value"in i?i.value:null==(a=i.get)?void 0:a.call(t.k):void 0;var s=n[e];return t.I||!r(s)?s:s===v(t.t,e)?(I(t),t.o[e]=S(t.A.h,s,t)):s},has:function(t,e){return e in f(t)},ownKeys:function(t){return Reflect.ownKeys(f(t))},set:function(t,e,a){var r=w(f(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,a),!0;if(!t.P){var i=v(f(t),e),n=null==i?void 0:i[B];if(n&&n.t===a)return t.o[e]=a,t.D[e]=!1,!0;if(c(a,i)&&(void 0!==a||o(t.t,e)))return!0;I(t),N(t)}return t.o[e]===a&&"number"!=typeof a&&(void 0!==a||e in t.o)||(t.o[e]=a,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==v(t.t,e)||e in t.t?(t.D[e]=!1,I(t),N(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var a=f(t),r=Reflect.getOwnPropertyDescriptor(a,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:a[e]}:r},defineProperty:function(){e(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){e(12)}},$={};i(Y,function(t,e){$[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),$.deleteProperty=function(t,e){return $.set.call(this,t,e,void 0)},$.set=function(t,e,a){return Y.set.call(this,t[0],e,a,t[0])};var Q=new(function(){function t(t){var a=this;this.g=M,this.F=!0,this.produce=function(t,i,n){if("function"==typeof t&&"function"!=typeof i){var o,s=i;return i=t,function(t){var e=this;void 0===t&&(t=s);for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return a.produce(t,function(t){var a;return(a=i).call.apply(a,[e,t].concat(n))})}}if("function"!=typeof i&&e(6),void 0!==n&&"function"!=typeof n&&e(7),r(t)){var c=P(a),u=S(a,t,void 0),l=!0;try{o=i(u),l=!1}finally{l?A(c):g(c)}return"u">typeof Promise&&o instanceof Promise?o.then(function(t){return y(c,n),T(t,c)},function(t){throw A(c),t}):(y(c,n),T(o,c))}if(!t||"object"!=typeof t){if(void 0===(o=i(t))&&(o=t),o===z&&(o=void 0),a.F&&p(o,!0),n){var f=[],d=[];E("Patches").M(t,o,f,d),n(f,d)}return o}e(21,t)},this.produceWithPatches=function(t,e){if("function"==typeof t)return function(e){for(var r=arguments.length,i=Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return a.produceWithPatches(e,function(e){return t.apply(void 0,[e].concat(i))})};var r,i,n=a.produce(t,e,function(t,e){r=t,i=e});return"u">typeof Promise&&n instanceof Promise?n.then(function(t){return[t,r,i]}):[n,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}
1var o=t.prototype;return o.createDraft=function(t){r(t)||e(8),a(t)&&(a(o=t)||e(22,o),t=function t(e){if(!r(e))return e;var a,o=e[B],c=n(e);if(o){if(!o.P&&(o.i<4||!E("ES5").K(o)))return o.t;o.I=!0,a=R(e,c),o.I=!1}else a=R(e,c);return i(a,function(e,r){var i;o&&(i=o.t,(2===n(i)?i.get(e):i[e])===r)||s(a,e,t(r))}),3===c?new Set(a):a}(o));var o,c=P(this),u=S(this,t,void 0);return u[B].C=!0,g(c),u},o.finishDraft=function(t,e){var a=(t&&t[B]).A;return y(a,e),T(void 0,a)},o.setAutoFreeze=function(t){this.F=t},o.setUseProxies=function(t){t&&!M&&e(20),this.g=t},o.applyPatches=function(t,e){for(r=e.length-1;r>=0;r--){var r,i=e[r];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}r>-1&&(e=e.slice(r+1));var n=E("Patches").$;return a(t)?n(t,e):this.produce(t,function(t){return n(t,e)})},t}()),V=Q.produce;Q.produceWithPatches.bind(Q),Q.setAutoFreeze.bind(Q),Q.setUseProxies.bind(Q),Q.applyPatches.bind(Q),Q.createDraft.bind(Q),Q.finishDraft.bind(Q),t.s(["default",0,V,"enableES5",0,function(){function t(t,e){var a=s[t];return a?a.enumerable=e:s[t]=a={configurable:!0,enumerable:e,get:function(){var e=this[B];return Y.get(e,t)},set:function(e){var a=this[B];Y.set(a,t,e)}},a}function e(t){for(var e=t.length-1;e>=0;e--){var a=t[e][B];if(!a.P)switch(a.i){case 5:n(a)&&N(a);break;case 4:r(a)&&N(a)}}}function r(t){for(var e=t.t,a=t.k,r=W(a),i=r.length-1;i>=0;i--){var n=r[i];if(n!==B){var s=e[n];if(void 0===s&&!o(e,n))return!0;var u=a[n],l=u&&u[B];if(l?l.t!==s:!c(u,s))return!0}}var f=!!e[B];return r.length!==W(e).length+ +!f}function n(t){var e=t.k;if(e.length!==t.t.length)return!0;var a=Object.getOwnPropertyDescriptor(e,e.length-1);if(a&&!a.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var s={};H.ES5||(H.ES5={J:function(e,a){var r=Array.isArray(e),i=function(e,a){if(e){for(var r=Array(a.length),i=0;i<a.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var n=G(a);delete n[B];for(var o=W(n),s=0;s<o.length;s++){var c=o[s];n[c]=t(c,e||!!n[c].enumerable)}return Object.create(Object.getPrototypeOf(a),n)}(r,e),n={i:r?5:4,A:a?a.A:D,P:!1,I:!1,D:{},l:a,t:e,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,B,{value:n,writable:!0}),i}
1,S:function(t,r,s){s?a(r)&&r[B].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var a=e[B];if(a){var r=a.t,s=a.k,c=a.D,u=a.i;if(4===u)i(s,function(e){e!==B&&(void 0!==r[e]||o(r,e)?c[e]||t(s[e]):(c[e]=!0,N(a)))}),i(r,function(t){void 0!==s[t]||o(s,t)||(c[t]=!1,N(a))});else if(5===u){if(n(a)&&(N(a),c.length=!0),s.length<r.length)for(var l=s.length;l<r.length;l++)c[l]=!1;else for(var f=r.length;f<s.length;f++)c[f]=!0;for(var d=Math.min(s.length,r.length),p=0;p<d;p++)s.hasOwnProperty(p)||(c[p]=!0),void 0===c[p]&&t(s[p])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?r(t):n(t)}})},"freeze",0,p,"produce",0,V])},418682,t=>{"use strict";var e=t.i(350461),a=t.i(191788);let r=(0,t.i(645507).toBoolean)(e.default.env.NEXT_PUBLIC_LOG_REDUCER),i="border-left: 2px solid #00a4ff; color: #03A9F4; font-weight: bold; padding: 2px 0 2px 4px;";t.s(["default",0,(t,e,n)=>{if(!r)return(0,a.useReducer)(t,e,n);let o=(0,a.useRef)(e),[s,c]=(0,a.useReducer)(t,e,n),u=(0,a.useMemo)(()=>t=>(t.payload?(console.groupCollapsed("%cAction Type:",i,t.type),console.log("%cPayload: ","color: #0083cc; font-weight: bold;",t.payload),console.groupEnd()):console.log("%cAction Type:",i,t.type),c(t)),[c]);return(0,a.useEffect)(()=>{s!==e&&(console.groupCollapsed("%cState:",i),console.log("%cPrevious: ","color: #a8a8a8; font-weight: bold;",o.current),console.log("%cNext: ","color: #06c42a; font-weight: bold;",s),console.groupEnd()),o.current=s},[s]),[s,u]}])},413120,t=>{"use strict";var e=t.i(480906),a=t.i(191788);function r(){try{return localStorage.hasOwnProperty(e.HAS_PREVIOUSLY_LOGGED_IN)}catch(t){return!1}}t.s(["default",0,function(){let[t,e]=(0,a.useState)(null);return(0,a.useEffect)(()=>{e(r())},[]),t},"getUserPreviouslyLoggedIn",0,r,"setUserLoggedIn",0,function(){localStorage.hasOwnProperty(e.HAS_PREVIOUSLY_LOGGED_IN)||localStorage.setItem(e.HAS_PREVIOUSLY_LOGGED_IN,"true")}])},982725,t=>{"use strict";function e(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)t[r]=a[r]}return t}var a=function t(a,r){function i(t,i,n){if("u">typeof document){"number"==typeof(n=e({},r,n)).expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var s in n)n[s]&&(o+="; "+s,!0!==n[s]&&(o+="="+n[s].split(";")[0]));return document.cookie=t+"="+a.write(i,t)+o}}return Object.create({set:i,get:function(t){if("u">typeof document&&(!arguments.length||t)){for(var e=document.cookie?document.cookie.split("; "):[],r={},i=0;i<e.length;i++){var n=e[i].split("="),o=n.slice(1).join("=");try{var s=decodeURIComponent(n[0]);if(r[s]=a.read(o,s),t===s)break}catch(t){}}return t?r[t]:r}},remove:function(t,a){i(t,"",e({},a,{expires:-1}))},withAttributes:function(a){return t(this.converter,e({},this.attributes,a))},withConverter:function(a){return t(e({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(a)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});t.s(["default",0,a])},480906,t=>{"use strict";var e,a=((e=a||{}).auth0Cookie="auth0_jwt",e.jwtCookie="patch_secret",e.userHomePatch="patch_home_patch_shim",e);t.s(["HAS_PREVIOUSLY_LOGGED_IN",0,"hasPreviouslyLoggedIn","default",0,a])},878524,t=>{"use strict";var e,a;(a=e||(e={})).article="article",a.bizpost="bizpost",a.classified="classified",a.event="calendar_item",t.s(["ContentType",0,{article:"article",bizpost:"bizpost",classified:"classified",event:"event"},"LegacyContentType",0,e])},661174,t=>{"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.s(["default",()=>e])},435928,t=>{"use strict";var e,a;(a=e||(e={}))[a.CONTINUE=100]="CONTINUE",a[a.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",a[a.PROCESSING=102]="PROCESSING",a[a.EARLY_HINTS=103]="EARLY_HINTS",a[a.OK=200]="OK",a[a.CREATED=201]="CREATED",a[a.ACCEPTED=202]="ACCEPTED",a[a.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",a[a.NO_CONTENT=204]="NO_CONTENT",a[a.RESET_CONTENT=205]="RESET_CONTENT",a[a.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",a[a.MULTI_STATUS=207]="MULTI_STATUS",a[a.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",a[a.MOVED_PE
1RMANENTLY=301]="MOVED_PERMANENTLY",a[a.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",a[a.SEE_OTHER=303]="SEE_OTHER",a[a.NOT_MODIFIED=304]="NOT_MODIFIED",a[a.USE_PROXY=305]="USE_PROXY",a[a.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",a[a.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",a[a.BAD_REQUEST=400]="BAD_REQUEST",a[a.UNAUTHORIZED=401]="UNAUTHORIZED",a[a.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",a[a.FORBIDDEN=403]="FORBIDDEN",a[a.NOT_FOUND=404]="NOT_FOUND",a[a.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",a[a.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",a[a.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",a[a.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",a[a.CONFLICT=409]="CONFLICT",a[a.GONE=410]="GONE",a[a.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",a[a.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",a[a.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",a[a.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",a[a.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",a[a.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",a[a.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",a[a.IM_A_TEAPOT=418]="IM_A_TEAPOT",a[a.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",a[a.METHOD_FAILURE=420]="METHOD_FAILURE",a[a.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",a[a.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",a[a.LOCKED=423]="LOCKED",a[a.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",a[a.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",a[a.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",a[a.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",a[a.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",a[a.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",a[a.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",a[a.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",a[a.BAD_GATEWAY=502]="BAD_GATEWAY",a[a.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",a[a.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",a[a.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",a[a.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",a[a.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",t.s(["StatusCodes",0,e])},510531,t=>{"use strict";var e,a;(a=e||(e={})).community="community",a.deals="deals",a.national="national",a.seedling="seedling",a.smallBusiness="smallBusiness",a.state="state",a.county="county",t.s(["PatchMetadataType",0,e])},443699,t=>{"use strict";var e,a;(a=e||(e={})).patch="patch",a.region="region",a.county="county",a.zipcode="zipcode",t.s(["DataModelType",0,e])},968554,t=>{"use strict";var e,a;(a=e||(e={})).mature="mature",a.seed="seed",a.sprout="sprout",a.wildflower="wildflower",t.s(["PatchMetadataModel",0,e])},624231,t=>{"use strict";var e=t.i(840733),a=t.i(878524);let r=e.z.object({[a.ContentType.event]:e.z.number().int(),[a.ContentType.classified]:e.z.number().int(),[a.ContentType.bizpost]:e.z.number().int()});t.s(["PlatformPricingSchema",0,r])},772305,t=>{"use strict";let e=t.i(840733).z.number();t.s(["PatchMetadataIdSchema",0,e])},242766,t=>{"use strict";var e=t.i(982725),a=t.i(480906);t.s(["getAuth0JWTCookie",0,()=>e.default.get(a.default.auth0Cookie)||"","getJWTCookie",0,()=>e.default.get(a.default.jwtCookie)||""])},952782,196162,t=>{"use strict";var e,a=t.i(242766);t.i(350461);var r=t.i(430559),i=t.i(435928),n=t.i(968554),o=((e=o||{})[e.nameHasSpecialCharacters=311]="nameHasSpecialCharacters",e[e.emailIsAlreadySubscribedToNewsletter=382]="emailIsAlreadySubscribedToNewsletter",e[e.emailIsInvalid=385]="emailIsInvalid",e[e.noAccountWithResetPasswordEmailExists=420]="noAccountWithResetPasswordEmailExists",e[e.accountIsDisabled=580]="accountIsDisabled",e[e.noAccountWithEmailExists=575]="noAccountWithEmailExists",e[e.passwordIsIncorrect=576]="passwordIsIncorrect",e[e.failedToSendPasswordResetEmail=660]="failedToSendPasswordResetEmail",e[e.unableToCreateAccount=910]="unableToCreateAccount",e[e.ipAddressIsBanned=920]="ipAddressIsBanned",e[e.emailDomainIsBanned=925]="emailDomainIsBanned",e[e.emailIsTiedToExistingAccount=930]="emailIsTiedToExistingAccount",e[e.recaptchaFailed=957]="recaptchaFailed",e.missingCommunity="missingCommunity",e.noAccountWithEmailExistsButIsSubscribedToNewsletter="noAccountWithEmailExistsButIsSubscribedToNewsletter",e.passwordIsTooShort="passwordIsTooShort",e);function s(t){let{code:e,data:a,message:r,success:i}=t.data;if(!i){let t={code:e,isEmailTiedToExistingAccount:!1,message:"",patch:null};switch(e){case 382:t.message=r,t.isEmailTiedToExistingAccount=a?.userfound;break;case 930:t.isEmailTiedToExistingAccount=!0;break;case 311:break;case 957:case 910:case 925:case 385:case 920:t.message="We're sorry, but Patch is unable to create an account for you at this time. Please try again or c
1ontact [email protected].";break;case 580:t.message="Your account has been temporarily disabled. If you believe this to be an error, please contact [email protected]";break;case 660:t.message="Failed to send reset password email. Please try again.";break;case 576:t.message="Incorrect password. Please try again.";break;case 575:case 420:a.sailthru_info?.first_subscribed_patch_info?(t.patch={alias:`/${a.sailthru_info.first_subscribed_patch_info.patch_alias}`,id:Number(a.sailthru_info.first_subscribed_patch_info.id),model:n.PatchMetadataModel.mature,name:a.sailthru_info.first_subscribed_patch_info.name,county:{id:Number(a.sailthru_info.first_subscribed_patch_info.county_id),name:a.sailthru_info.first_subscribed_patch_info.county,code:a.sailthru_info.first_subscribed_patch_info.region_code,fipsCode:a.sailthru_info.first_subscribed_patch_info.county_fips_code},region:{alias:a.sailthru_info.first_subscribed_patch_info.region_alias??"",abbreviation:a.sailthru_info.first_subscribed_patch_info.region_code,id:Number(a.sailthru_info.first_subscribed_patch_info.region_id),name:a.sailthru_info.first_subscribed_patch_info.region_name,fipsCode:a.sailthru_info.first_subscribed_patch_info.region_fips_code}},t.code="noAccountWithEmailExistsButIsSubscribedToNewsletter"):t.message="Email not recognized. Please try again or sign up for a new account";break;default:t.message=r}return Promise.reject(t)}return t}t.s(["default",0,o,"userOpsApiResponseInterceptor",0,s],196162);var c=t.i(645507);let u=new class{frontEndURL;frontEndApi;myPatchApi;patchCalendarQueryApi;patchCalendarWriteApi;patchContentApi;patchWeatherApi;patchAmApi;myPatchUserOpsApi;myPatchFeApi;authUsersApi;authNApi;validationEmailApi;nextjsApi;constructor(t){this.frontEndURL=(0,c.toString)("https://patch.com"),this.frontEndApi=r.default.create({baseURL:`${this.frontEndURL}/api_v1`,timeout:15e3,httpsAgent:void 0,headers:{Accept:"application/json","Content-Type":"application/json"}}),this.authUsersApi=r.default.create({baseURL:(0,c.toString)("https://pep.patchapi.io/api/auth-users"),headers:{Accept:"application/json","Content-Type":"application/json","Patch-Authorization":`Bearer ${t}`}}),this.authNApi=r.default.create({baseURL:(0,c.toString)("https://pep.patchapi.io/api/authn"),headers:{Accept:"application/json","Content-Type":"application/json","Patch-Authorization":`Bearer ${t}`}}),this.validationEmailApi=r.default.create({baseURL:(0,c.toString)("https://pep.patchapi.io/api/validation/email"),headers:{Accept:"application/json","Content-Type":"application/json","Patch-Authorization":`Bearer ${t}`}}),this.nextjsApi=r.default.create({baseURL:"",headers:{Accept:"application/json","Content-Type":"application/json","Patch-Authorization":`Bearer ${t}`}}),this.myPatchApi=r.default.create({baseURL:`${(0,c.toString)("https://pep.patchapi.io/api/mypatch")}/api`,headers:{Accept:"application/json","Content-Type":"application/json","Patch-Authorization":`Bearer ${t}`}}),this.patchCalendarQueryApi=r.default.create({baseURL:(0,c.toString)("https://patch.com/api_v2/calendar_r"),timeout:15e3,httpsAgent:void 0,headers:{Accept:"application/json","Content-Type":"application/json"}}),this.patchCalendarWriteApi=r.default.create({baseURL:(0,c.toString)("https://api.patch.com/calendar/write-api"),headers:{Accept:"application/json","Content-Type":"application/json"}}),this.patchContentApi=r.default.create({baseURL:(0,c.toString)("https://patch.com/api_v2/content/"),headers:{Accept:"application/json","Content-Type":"application/json"}}),this.myPatchFeApi=r.default.create({baseURL:`${(0,c.toString)("https://pep.patchapi.io/api/mypatch")}/fe`,headers:{Accept:"application/json","Content-Type":"application/json","Patch-Authorization":`Bearer ${t}`}}),this.myPatchFeApi.interceptors.response.use(t=>{let{success:e,data:a}=t.data,{patch_jwt:r}=a;return e?t:Promise.reject({...t.data,status:r?i.StatusCodes.FORBIDDEN:i.StatusCodes.UNAUTHORIZED,message:r?t.data.message:"You have been logged out. Please log back in to continue."})},t=>Promise.reject(t)),this.myPatchUserOpsApi=r.default.create({baseURL:`${(0,c.toString)("https://pep.patchapi.io/api/mypatch")}/api/user-ops`,headers:{Accept:"application/json","Content-Type":"application/json","Patch-Authorization":`Bearer ${t}`},withCredentials:!0}),this.myPatchUserOpsApi.interceptors.response.use(s,t=>Promise.reject(t)),this.patchWeatherApi=r.default.create({baseURL:(0,c.toString)("https://patch.com/api_v2/buffer/weather"),timeout:15e3,httpsAgent:void 0,headers:{Accept:"application/json","Content-Type":"application/json"}}),this.patchAmApi=r.default.create({baseURL:(0,c.toString)("https://patch.am/api"),timeout:3e4})}addAuthorizationHeader(t){let e=`Bearer ${t}`;this.authNApi.defaults.headers["Patch-Authorization"]=e,this.authUsersApi.defaults.headers["Patch-Authorization"]=e,this.validationEmailApi.defaults.headers["Patch-Authorization"]=e,this.myPatchApi.defaults.headers["Patch-Authorization"]=e,this.myPatchFeApi.defaults.headers["Patch-Authorization"]=e,this.myPatchUserOpsApi.defaults.headers["Patch-Authorization"]=e,this.patchCalendarWriteApi.defaults.headers["Patch-Authorization"]=e,this.nextjsApi.defaults.headers["Patch-Authorization"]=e}removeAuthorizationHeader(){this.authNApi.defaults.headers["Patch-Authorization"]=null,this.authUsersApi.defaults.headers["Patch-Authorization"]=null,this.validationEmailApi.defaults.headers["Patch-Authorization"]=null,this.myPatchApi.defaults.headers["Patch-Authorization"]=null,this.myPatchFeApi.defaults.headers["Patch-Authorization"]=null,this.myPatchUserOpsApi.defaults.headers["Patch-Authorization"]=null,this.patchCalendarWriteApi.defaults.headers["Patch-Authorization"]=null,this.nextjsApi.defaults.headers["Patch-Authorization"]=null}async fetchAdtechConfig(){return this.frontEndApi.get("/adtech/all.json").then(t=>t.data)}fetchCommunity(t){return this.frontEndApi.get(`/patches/${t}.json`).then(t=>t.data)}async fetchLatestNewsNearby(t){return this.frontEndApi.get(`/news-nearby/${t}.json`).then(t=>t.data)}async fetchLatestNewsTrending(t=5){return this.frontEndApi.get("/services/news-trending.json",{params:{limit:t}}).then(t=>t.data)}async fetchAuthor(t){return this.frontEndApi.get(`/author/${t}.json`).then(t=>t.data)}async fetchAuthorContent(t,e,a=1){return this.frontEndApi.get(`/author-content/${t}/${e}.json`,{params:{page:a}}).then(t=>t.data)}async emailClassifiedAuthor(t){return this.myPatchApi.post("/email-classified-author",t)}async inviteFriend(t){return this.myPatchApi.post("/invite-friend",t)}async DEPRECATED_subscribeToNewsletter(t){return this.myPatchApi.put("/user-ops/subscribe-email",t)}getEmailSubscriptions(t){return this.myPatchApi.get("/email-subscriptions",{params:{sid:t}})}updateEmailSubscriptions(t,e){return this.myPatchApi.put("/email-subscriptions/update",{...t,sid:e})}optInEmailSubscriptions(t,e){return this.myPatchApi.put("/email-subscriptions/opt-in",{...t,sid:e})}optOutEmailSubscriptions(t,e){return this.myPatchApi.put("/email-subscriptions/opt-out",{...t,sid:e})}logout(t=!1){return this.myPatchUserOpsApi.post("/destroy-session",{full_logout:t}).then(t=>t.data)}async toggleDisplayClassifiedContactFormOption(t,e){return this.myPatchApi.put(`classified/${t}`,{show_contact_form:+e})}async deleteContent(t,e){return this.myPatchApi.delete(`${e}/${t}`)}}
1((0,a.getJWTCookie)());t.s(["default",0,u],952782)},874692,t=>{"use strict";var e=t.i(840733),a=t.i(968554),r=t.i(510531),i=t.i(443699),n=t.i(772305),o=t.i(624231);let s=e.z.object({id:n.PatchMetadataIdSchema,name:e.z.string(),alias:e.z.string(),code:e.z.string(),regionId:n.PatchMetadataIdSchema,regionPatchId:n.PatchMetadataIdSchema,dataModelType:e.z.literal(i.DataModelType.county),type:e.z.literal(r.PatchMetadataType.county),fipsCode:e.z.string(),weeklyViews:e.z.number(),platformPricingBase:o.PlatformPricingSchema.optional(),platformPricing:o.PlatformPricingSchema.optional()}).pick({id:!0,name:!0,code:!0,fipsCode:!0}),c=e.z.object({id:n.PatchMetadataIdSchema,abbreviation:e.z.string(),alias:e.z.string(),name:e.z.string(),fipsCode:e.z.string()}),u=e.z.object({alias:e.z.string(),id:n.PatchMetadataIdSchema,name:e.z.string(),model:e.z.nativeEnum(a.PatchMetadataModel),type:e.z.nativeEnum(r.PatchMetadataType),county:s,region:c});t.s(["PatchMetadataSchema",0,u],874692)},651894,t=>{"use strict";t.s(["parseItems",0,(t,e,a="schema")=>t.reduce((t,r)=>{try{let a=e.parse(r);t.push(a)}catch(t){console.warn(`Error parsing ${a}: `,t)}finally{return t}},[])])},799306,t=>{"use strict";t.s(["default",0,function(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}])},623886,699213,t=>{"use strict";var e=t.i(661174);function a(t,e){if(e.length<t)throw TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}t.s(["default",0,a],699213),t.s(["default",0,function(t){a(1,arguments);var r=Object.prototype.toString.call(t);return t instanceof Date||"object"===(0,e.default)(t)&&"[object Date]"===r?new Date(t.getTime()):"number"==typeof t||"[object Number]"===r?new Date(t):(("string"==typeof t||"[object String]"===r)&&"u">typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}],623886)},73230,t=>{"use strict";var e,a,r,i,n,o,s,c,u,l,f,d,p,h,m,E;(u=e||(e={})).AnonymousUser="Anonymous User",u.SuperAdmin="Super Admin",u.AuthenticatedUser="Authenticated User",u.Administrator="Administrator",u.PatchNationalStaff="Patch National Staff",u.PatchStaff="Patch Staff",u.PatchContributor="Patch Contributor",u.PatchPoster="Patch Poster",u.BrandPartner="Brand Partner",u.NewsPartner="News Partner",u.PatchContributingWriter="Patch Contributing Writer",u.Business="Business",u.Contributor="Contributor",u.NonProfit="NonProfit",u.NonProfitOrg="NonProfit Org",u.PatchMayor="Patch Mayor",u.ReadOnly="Read Only",u.PatchUser="Patch User",u.PatchData="Patch Data",(l=a||(a={}))[l.AnonymousUser=0]="AnonymousUser",l[l.SuperAdmin=1]="SuperAdmin",l[l.AuthenticatedUser=2]="AuthenticatedUser",l[l.Administrator=3]="Administrator",l[l.PatchNationalStaff=4]="PatchNationalStaff",l[l.PatchStaff=5]="PatchStaff",l[l.PatchContributor=6]="PatchContributor",l[l.PatchPoster=7]="PatchPoster",l[l.BrandPartner=8]="BrandPartner",l[l.NewsPartner=9]="NewsPartner",l[l.PatchContributingWriter=10]="PatchContributingWriter",l[l.Business=11]="Business",l[l.Contributor=12]="Contributor",l[l.NonProfit=13]="NonProfit",l[l.NonProfitOrg=14]="NonProfitOrg",l[l.PatchMayor=15]="PatchMayor",l[l.ReadOnly=16]="ReadOnly",l[l.PatchUser=17]="PatchUser",l[l.PatchData=18]="PatchData",(f=r||(r={})).brand="brand",f.editor="editor",f.neighbor="neighbor",f.staff="staff",f.internalstaff="internalstaff",f.UGC="UGC",f.articlewriter="articlewriter",(d=i||(i={})).business="Local Business",d.contributor="Community Contributor",d.localOfficial="Local Official",d.nationalOfficial="National Official",d.neighbor="Neighbor",d.nonprofit="Local Nonprofit",d.staff="Patch Staff";let y={[a.AnonymousUser]:{name:e.AnonymousUser,label:null,types:[]},[a.SuperAdmin]:{name:e.SuperAdmin,label:null,types:[]},[a.AuthenticatedUser]:{name:e.AuthenticatedUser,label:null,types:[]},[a.Administrator]:{name:e.Administrator,label:null,types:[]},[a.PatchNationalStaff]:{name:e.PatchNationalStaff,label:i.staff,types:[r.editor,r.staff,r.internalstaff,r.articlewriter]},[a.PatchStaff]:{name:e.PatchStaff,label:i.staff,types:[r.editor,r.staff,r.internalstaff,r.articlewriter]},[a.PatchData]:{name:e.PatchData,label:i.staff,types:[r.editor,r.staff,r.internalstaff,r.articlewriter]},[a.PatchContributor]:{name:e.PatchContributor,label:i.contributor,types:[r.UGC,r.articlewriter]},[a.PatchPoster]:{name:e.PatchPoster,label:i.neighbor,types:[r.UGC,r.neighbor,r.articlewriter]},[a.BrandPartner]:{name:e.BrandPartner,label:null,types:[r.brand,r.editor,r.articlewriter]},[a.NewsPartner]:{name:e.NewsPartner,label:null,types:[r.editor,r.articlewriter]},[a.PatchContributingWriter]:{name:e.PatchContributingWriter,label:null,types:[r.editor,r.staff,r.articlewriter]},[a.Business]:{name:e.Business,label:i.business,types:[r.UGC]},[a.Contributor]:{name:e.Contributor,label:null,types:[r.UGC,r.articlewriter]},[a.NonProfit]:{name:e.NonProfit,label:i.nonprofit,types:[r.UGC,r.articlewriter]},[a.NonProfitOrg]:{name:e.NonProfitOrg,label:null,types:[r.UGC]},[a.PatchMayor]:{name:e.PatchMayor,label:null,types:[r.UGC,r.articlewriter]},[a.ReadOnly]:{name:e.ReadOnly,label:i.neighbor,types:[r.UGC,r.neighbor]},[a.PatchUser]:{name:e.PatchUser,label:i.neighbor,types:[r.UGC,r.neighbor]}},A=t=>e=>Object.keys(y).map(t=>parseInt(t,10)).filter(e=>{let a=y[e];return a?.types.includes(t)}).includes(e),g=A(r.neighbor),P=A(r.brand),b=A(r.editor),T=A(r.UGC),O=A(r.staff),C=A(r.internalstaff);A(r.articlewriter),(p=n||(n={}))[p.PatchDeals=0x15d03a3]="PatchDeals",p[p.RealEstate=0x16039c3]="RealEstate",p[p.Weather=0x1623f65]="Weather",(h=o||(o={}))[h.RealEstate=0x16039c3]="RealEstate",h[h.Weather=0x1623f65]="Weather",(m=s||(s={})).verifiedUser="verified_user",m.verifiedLocalOfficial="verified_local_official",m.verifiedNationalOfficial="verified_national_official",(E=c||(c={})).verifiedUser="https://patch.com/img/cdn/assets/layout/badges/verified-user.svg",E.verifiedLocalOfficial="https://patch.com/img/cdn/assets/layout/badges/verified-local-official.svg",E.verifiedNationalOfficial="https://patch.com/img/cdn/assets/layout/badges/verified-national-official.svg",E.verifiedPatchStaff="https://patch.com/img/cdn/assets/layout/badges/verified-patch-staff.svg";let _=t=>e=>!!e?.find(e=>t.includes(e.type));_([s.verifiedLocalOfficial]),_([s.verifiedNationalOfficial]),_([s.verifiedLocalOfficial,s.verifiedUser]),t.s(["BadgeImage",0,c,"BadgeType",0,s,"RoleId",0,a,"RoleLabel",0,i,"RoleName",0,e,"getRoleLabel",0,(t,e)=>{if(e){let t=e.map(t=>t.type);if(t.includes(s.verifiedNationalOfficial))return i.nationalOfficial;if(t.includes(s.verifiedLocalOfficial))return i.localOfficial}let a=y[t];return a?.label||a?.name||""},"isBrand",0,P,"isEditor",0,b,"isInternalStaff",0,C,"isNeighbor",0,g,"isPatchDealsAccount",0,function(t){return("number"==typeof t?t:parseInt(t,10))===n.PatchDeals},"isStaff",0,O,"isUGC",0,T,"isVerified",0,t=>[a.BrandPartner,a.Business,a.Contributor,a.NewsPartner,a.NonProfit,a.NonProfitOrg,a.PatchContributingWriter,a.PatchContributor,a.PatchMayor,a.PatchNationalStaff,a.PatchPoster,a.PatchStaff,a.PatchUser,a.PatchData].includes(t)])},358255,742951,t=>{"use strict";var e=t.i(840733),a=t.i(874692),r=t.i(651894),i=t.i(878524),n=t.i(952782);let o=async(t,e,a,r)=>{let{data:i}=await n.default.frontEndApi.get(`/author-content/${t}/${e}.json`,{params:{page:a,perPage:r}});return i},s=e.z.object({id:e.z.number(),name:e.z.string(),summary:e.z.string().nullable()}).nullable(),c=async t=>{let{data:e}=await n.default.frontEndApi.get(`/author/${(t=>{let[,,e]=t.split("/");return e})(t.alias)}.json`,{}),a=s.safeParse(e);return a.success?a.data:(console.error("Failed to parse author"),null)},u=async(t,e,a=1,r,s)=>{switch(e){case i.ContentType.event:let{data:c}=await n.default.patchCalendarQueryApi.get("/events",{params:{pageNumber:a,authorId:t,pageLimit:r,sortPromotedFirst:s?.sortPromotedFirst}});return{content:c.results,doesMoreContentExist:c.remainingCount>0};case i.ContentType.article:case i.ContentType.classified:return await o(t,e,a,r);default:throw Error(`Invalid content type ${e}`)}},l=async()=>{try{let{data:t}=await n.default.myPatchApi.get("/followed-communities");return e.z.array(e.z.unknown()).transform(t=>(0,r.parseItems)(t,a.PatchMetadataSchema,"PatchMetadataSchema")).parse(t)}catch(t){return console.warn(t),[]}},f=async t=>{let{data:e}=await n.default.myPatchApi.post("/followed-communities",t);return e},d=async t=>{let{data:e}=await n.default.myPatchApi.put(`/followed-communities/${t}`);return e},p=async t=>{let{data:e}=await n.default.myPatchApi.delete(`/followed-communities/${t}`);return e};t.s(["fetchAuthor",0,c,"fetchAuthorContent",0,u,"fetchUsersFollowedCommunities",0,l,"followCommunity",0,d,"setUsersFollowedCommunities",0,f,"unfollowCommunity",0,p],358255);var h=t.i(982725);let m="PATCH_SESSION";function E(){return void 0!==h.default.get(m)}t.s(["default",0,function(){if(!E()){var t;t=function(){let t=localStorage.getItem(m);if(t){let e=parseInt(t,10);if(e)return e}return 0}()+1,localStorage.setItem(m,t.toString()),h.default.set(m,"true")}},"hasVisitedSiteThisBrowserSession",0,E,"removeVisitedSiteThisBrowserSession",0,function(){return h.default.remove(m)}],742951)},320211,t=>{"use strict";var e,a=((e=a||{}).complete="complete",e.disabled="disabled",e.error="error",e.idle="idle",e.pen
1ding="pending",e);t.s(["default",0,a])},490877,t=>{"use strict";var e=t.i(982725),a=t.i(480906);t.s(["deleteAuth0JWTCookie",0,t=>{e.default.remove(a.default.auth0Cookie,{domain:t})},"deleteJWTCookie",0,t=>{e.default.remove(a.default.jwtCookie,{domain:t})}])},451314,t=>{"use strict";function e(t){this.message=t}e.prototype=Error(),e.prototype.name="InvalidCharacterError";var a="u">typeof window&&window.atob&&window.atob.bind(window)||function(t){var a=String(t).replace(/=+$/,"");if(a.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,n=0,o=0,s="";i=a.charAt(o++);~i&&(r=n%4?64*r+i:i,n++%4)&&(s+=String.fromCharCode(255&r>>(-2*n&6))))i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};function r(t){this.message=t}r.prototype=Error(),r.prototype.name="InvalidTokenError",t.s(["default",0,function(t,e){if("string"!=typeof t)throw new r("Invalid token specified");var i=+(!0!==(e=e||{}).header);try{return JSON.parse(function(t){var e,r=t.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw"Illegal base64url string!"}try{return e=r,decodeURIComponent(a(e).replace(/(.)/g,function(t,e){var a=e.charCodeAt(0).toString(16).toUpperCase();return a.length<2&&(a="0"+a),"%"+a}))}catch(t){return a(r)}}(t.split(".")[i]))}catch(t){throw new r("Invalid token specified: "+t.message)}}])},418718,t=>{"use strict";var e=t.i(451314);t.s(["default",0,function(t){if(!t)return null;let a=(0,e.default)(t);if(1e3*a.exp<Number(new Date)||!a.patch)return null;let{alias:r,badges:i,email:n,id:o,name:s,patch:c,profilePicture:u,rid:l}=a;return{alias:r,badges:i,email:n,followedCommunities:[],id:o,name:s,patch:c,profilePicture:u,rid:l}}])},512527,t=>{"use strict";var e=t.i(799306),a=t.i(623886),r=t.i(699213);t.s(["default",0,function(t,i){(0,r.default)(2,arguments);var n=(0,a.default)(t),o=(0,e.default)(i);return isNaN(o)?new Date(NaN):(o&&n.setDate(n.getDate()+o),n)}])},751874,t=>{"use strict";var e=t.i(512527);t.s(["addDays",()=>e.default])},615198,486066,t=>{"use strict";var e=t.i(799306),a=t.i(623886),r=t.i(699213);function i(t,i){(0,r.default)(2,arguments);var n=(0,a.default)(t),o=(0,e.default)(i);if(isNaN(o))return new Date(NaN);if(!o)return n;var s=n.getDate(),c=new Date(n.getTime());return(c.setMonth(n.getMonth()+o+1,0),s>=c.getDate())?c:(n.setFullYear(c.getFullYear(),c.getMonth(),s),n)}t.s(["default",0,i],486066),t.s(["addMonths",0,i],615198)},913270,704702,709250,354043,929928,220002,t=>{"use strict";var e,a,r=t.i(191788);t.i(350461);var i=t.i(710705),n=t.i(952782),o=t.i(645507),s=t.i(358255),c=t.i(742951),u=t.i(320211),l=t.i(418682),f=t.i(490877),d=t.i(242766),p=t.i(418718),h=t.i(982725),m=t.i(480906),E=t.i(751874),y=t.i(615198);let A=(t,e)=>{let a=(0,y.addMonths)(new Date,2);h.default.set(m.default.jwtCookie,e,{domain:t,expires:a})},g=(t,e)=>{let a=(0,E.addDays)(new Date,1);e&&h.default.set(m.default.auth0Cookie,e,{domain:t,expires:a})};t.s(["setAuth0JWTCookie",0,g,"setJWTCookie",0,A],704702);var P=t.i(413120),b=t.i(486066),T=t.i(73230);let O=(t,e)=>{let a=(0,p.default)(e),r=a?.patch?.alias,i=a?.rid===T.RoleId.PatchStaff||a?.rid===T.RoleId.PatchNationalStaff;if(!r||i)return;let n=(0,b.default)(new Date,2);h.default.set(m.default.userHomePatch,r,{domain:t,expires:n})},C=t=>{h.default.remove(m.default.userHomePatch,{domain:t})};t.s(["deleteUserHomePatch",0,C,"setUserHomePatch",0,O],709250);var _=((e={}).google="google",e.googleOneTap="google_onetap",e.apple="apple",e);t.s(["SocialNetwork",()=>_],354043);let v=async t=>{let{data:e}=await n.default.authNApi.post("/token",t);return e},w=async t=>{let{data:e}=await n.default.authNApi.post("/token/google",t);return e},N=async t=>{let{data:e}=await n.default.authNApi.post("/token/apple",t);return e},I=async()=>{let{data:t}=await n.default.authNApi.get("/token");return t},S=async t=>{let{data:e}=await n.default.authNApi.post("/token/refresh",{refresh_token:t});return e},R=async(t,e)=>{switch(e){case _.google:case _.googleOneTap:return w(t);case _.apple:return N(t);default:throw Error(`Unknown social network type ${e}`)}};t.s(["getRecentToken",0,I,"getToken",0,v,"refreshToken",0,S,"socialSignIn",0,R],929928);let U={followedCommunities:{status:u.default.idle,items:[]},hasAttemptedAuthenticationOnMount:!1,jwt:null,auth0Jwt:null};var D=((a=D||{}).authenticate="authenticate",a.logout="logout",a.attemptAuthenticationOnMount="attemptAuthenticationOnMount",a.addFollowedCommunity="addFollowedCommunity",a.getFollowedCommunities="getFollowedCommunities",a.getFollowedCommunitiesFailed="getFollowedCommunitiesFailed",a.getFollowedCommunitiesComplete="getFollowedCommunitiesComplete",a.removeFollowedCommunity="removeFollowedCommunity",a);let L=(0,i.produce)((t,e)=>{t.jwt=e.patchJwt,t.auth0Jwt=e.auth0Jwt}),j=(0,i.produce)(t=>{t.jwt=null,t.auth0Jwt=null,t.followedCommunities={status:u.default.idle,items:[]}}),F=(0,i.produce)(t=>{t.hasAttemptedAuthenticationOnMount=!0}),M=(0,i.produce)((t,e)=>{t.followedCommunities.items.push(e)}),z=(0,i.produce)(t=>{t.followedCommunities.status=u.default.pending}),k=(0,i.produce)(t=>{t.followedCommunities.status=u.default.error}),B=(0,i.produce)((t,e)=>{t.followedCommunities={status:u.default.complete,items:e}}),x=(0,i.produce)((t,e)=>{let a=t.followedCommunities.items.findIndex(t=>t.id===e);-1!==a&&t.followedCommunities.items.splice(a,1)});function W(t,e){switch(e.type){case"addFollowedCommunity":return M(t,e.payload);case"attemptAuthenticationOnMount":return F(t);case"authenticate":return L(t,e.payload);case"getFollowedCommunities":return z(t);case"getFollowedCommunitiesComplete":return B(t,e.payload);case"getFollowedCommunitiesFailed":return k(t);case"logout":return j(t);case"removeFollowedCommunity":return x(t,e.payload);default:throw Error(`Invalid action sent in useAuthentication reducer: ${e.type}.`)}}t.s(["default",0,function(){let t=(0,o.toString)(".patch.com"),[e,a]=(0,l.default)(W,U),{jwt:i,auth0Jwt:h,hasAttemptedAuthenticationOnMount:m}=e,E=(0,r.useMemo)(()=>({addFollowedCommunity(t){a({type:"addFollowedCommunity",payload:t})},authenticate(t,e){a({type:"authenticate",payload:{patchJwt:t,auth0Jwt:e}})},getFollowedCommunities(){a({type:"getFollowedCommunities"})},logout(){a({type:"logout"})},removeFollowedCommunity(t){a({type:"removeFollowedCommunity",payload:t})},setFollowedCommunities(t){a({type:"getFollowedCommunitiesComplete",payload:t})},setHasAttemptedAuthenticationOnMount(){a({type:"attemptAuthenticationOnMount"})}}),[]),y=async()=>{try{let t=await (0,s.fetchUsersFollowedCommunities)();E.setFollowedCommunities(t)}catch(t){console.error(t),a({type:"getFollowedCommunitiesFailed"})}},b=async t=>{try{let{data:e}=await S(t||i),{access_token:a}=e;return a}catch(t){return console.error(t),null}},T=async t=>{try{if(!t)return null;return(await I()).data}catch(t){return console.error(t),null}},_=async t=>t?(0,p.default)(t)?(0,c.hasVisitedSiteThisBrowserSession)()?t:T(t):b(t):null,v=async(t,e)=>{let a=await _(t);a?E.authenticate(a,e):E.logout(),E.setHasAttemptedAuthenticationOnMount()};return(0,r.useEffect)(()=>{let t=()=>
1v((0,d.getJWTCookie)(),(0,d.getAuth0JWTCookie)());return T((0,d.getJWTCookie)()).then(t=>v(t,(0,d.getAuth0JWTCookie)())).then(()=>{window.addEventListener("focus",t)}),()=>window.removeEventListener("focus",t)},[]),(0,r.useEffect)(()=>{i?(A(t,i),g(t,h),O(t,i),(0,P.setUserLoggedIn)(),n.default.addAuthorizationHeader(i),E.getFollowedCommunities()):m&&((0,f.deleteJWTCookie)(t),(0,f.deleteAuth0JWTCookie)(t),C(t),n.default.removeAuthorizationHeader())},[i,h,m]),(0,r.useEffect)(()=>{e.followedCommunities.status===u.default.pending&&y()},[e.followedCommunities.status]),[e,E]},"initialState",0,U],220002);let G=(0,r.createContext)(null);G.displayName="AuthDispatchContext";let H=(0,r.createContext)(U);H.displayName="AuthContext",t.s(["AuthDispatchContext",0,G,"default",0,H],913270)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.