You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mercury-parser/dist/mercury.esm.js

6 lines
446 KiB
JavaScript

feat: update all fixtures and custom parsers to match (#713) * feat: Refactor and update fixtures This patch changes how fixtures are stored. Previously, a fixture's folder identified its domain and its filename identified when it was fetched. This has been changed so that the filename indicates the domain and the modified time of the file indicates how recently it was fetched. A fixture's filename can optionally include a modifier to distinguish between two different page types on the same domain, for example. Also included here are changes to the update-fixture script, both to accomodate the new filename scheme as well as to actually update all fixtures. The functionality for running automatically and opening PRs has been removed but will likely be reintroduced. Finally, all fixtures have been updated. * Remove reference to deleted extractor * feat: first batch of test and parser updates due to new fixtures * feat: update more custom parsers and unit tests * feat: update more custom parsers and unit tests and remove unnecessary parser * feat: update more custom parsers and unit tests * feat: update more parsers and add correct bloomberg html files * fix: remove console statement * feat: all parsers updated and tests passing * fix: update date_published tests to account for test server time difference * fix: cleanup remaining fixtures in folders * feat: move fixtures for newest custom parsers * feat: remove script changes * fix: update dist files to account for reverting script changes * adding .DS_Store to .gitignore * adding .DS_Store to .gitignore -- 2 * adding .DS_Store to .gitignore -- 3 lol * cleaning up some tests * fix: ran build:generator command to update generate-custom-parser dist file * fix: update rollup configs to generate source maps and update source maps * fix: use underscore in place of unused error variable * fix: remove unused fixture Co-authored-by: Postlight Bot <adam.pash+postlight-bot@postlight.com> Co-authored-by: flbn <overasc@gmail.com>
1 year ago
function e(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=t((function(e){!function(t){var r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag",c=t.regeneratorRuntime;if(c)e.exports=c;else{(c=t.regeneratorRuntime=e.exports).wrap=p;var u={},l={};l[i]=function(){return this};var f=Object.getPrototypeOf,d=f&&f(f(E([])));d&&d!==r&&n.call(d,i)&&(l=d);var h=y.prototype=g.prototype=Object.create(l);v.prototype=h.constructor=y,y.constructor=v,y[s]=v.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(h),e},c.awrap=function(e){return{__await:e}},_(b.prototype),b.prototype[o]=function(){return this},c.AsyncIterator=b,c.async=function(e,t,r,n){var a=new b(p(e,t,r,n));return c.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(h),h[s]="Generator",h[i]=function(){return this},h.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},c.values=E,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;x(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:E(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}}}function p(e,t,r,n){var a=t&&t.prototype instanceof g?t:g,i=Object.create(a.prototype),o=new k(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return M()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=A(o,r);if(s){if(s===u)continu
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
feat: update all fixtures and custom parsers to match (#713) * feat: Refactor and update fixtures This patch changes how fixtures are stored. Previously, a fixture's folder identified its domain and its filename identified when it was fetched. This has been changed so that the filename indicates the domain and the modified time of the file indicates how recently it was fetched. A fixture's filename can optionally include a modifier to distinguish between two different page types on the same domain, for example. Also included here are changes to the update-fixture script, both to accomodate the new filename scheme as well as to actually update all fixtures. The functionality for running automatically and opening PRs has been removed but will likely be reintroduced. Finally, all fixtures have been updated. * Remove reference to deleted extractor * feat: first batch of test and parser updates due to new fixtures * feat: update more custom parsers and unit tests * feat: update more custom parsers and unit tests and remove unnecessary parser * feat: update more custom parsers and unit tests * feat: update more parsers and add correct bloomberg html files * fix: remove console statement * feat: all parsers updated and tests passing * fix: update date_published tests to account for test server time difference * fix: cleanup remaining fixtures in folders * feat: move fixtures for newest custom parsers * feat: remove script changes * fix: update dist files to account for reverting script changes * adding .DS_Store to .gitignore * adding .DS_Store to .gitignore -- 2 * adding .DS_Store to .gitignore -- 3 lol * cleaning up some tests * fix: ran build:generator command to update generate-custom-parser dist file * fix: update rollup configs to generate source maps and update source maps * fix: use underscore in place of unused error variable * fix: remove unused fixture Co-authored-by: Postlight Bot <adam.pash+postlight-bot@postlight.com> Co-authored-by: flbn <overasc@gmail.com>
1 year ago
!function(t,r){e.exports=t.document?r(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return r(e)}}("undefined"!=typeof window?window:this,(function(e,t){var r=[],n=Object.getPrototypeOf,a=r.slice,i=r.flat?function(e){return r.flat.call(e)}:function(e){return r.concat.apply([],e)},o=r.push,s=r.indexOf,c={},u=c.toString,l=c.hasOwnProperty,f=l.toString,d=f.call(Object),h={},p=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},g=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,r){var n,a,i=(r=r||g).createElement("script");if(i.text=e,t)for(n in v)(a=t[n]||t.getAttribute&&t.getAttribute(n))&&i.setAttribute(n,a);r.head.appendChild(i).parentNode.removeChild(i)}function _(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[u.call(e)]||"object":typeof e}var b="3.6.0",A=function(e,t){return new A.fn.init(e,t)};function w(e){var t=!!e&&"length"in e&&e.length,r=_(e);return!p(e)&&!m(e)&&("array"===r||0===t||"number"==typeof t&&0<t&&t-1 in e)}A.fn=A.prototype={jquery:b,constructor:A,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=A.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return A.each(this,e)},map:function(e){return this.pushStack(A.map(this,(function(t,r){return e.call(t,r,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(A.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,r=+e+(e<0?t:0);return this.pushStack(0<=r&&r<t?[this[r]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:r.sort,splice:r.splice},A.extend=A.fn.extend=function(){var e,t,r,n,a,i,o=arguments[0]||{},s=1,c=arguments.length,u=!1;for("boolean"==typeof o&&(u=o,o=arguments[s]||{},s++),"object"==typeof o||p(o)||(o={}),s===c&&(o=this,s--);s<c;s++)if(null!=(e=arguments[s]))for(t in e)n=e[t],"__proto__"!==t&&o!==n&&(u&&n&&(A.isPlainObject(n)||(a=Array.isArray(n)))?(r=o[t],i=a&&!Array.isArray(r)?[]:a||A.isPlainObject(r)?r:{},a=!1,o[t]=A.extend(u,i,n)):void 0!==n&&(o[t]=n));return o},A.extend({expando:"jQuery"+(b+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,r;return!(!e||"[object Object]"!==u.call(e)||(t=n(e))&&("function"!=typeof(r=l.call(t,"constructor")&&t.constructor)||f.call(r)!==d))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,r){y(e,{nonce:t&&t.nonce},r)},each:function(e,t){var r,n=0;if(w(e))for(r=e.length;n<r&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},makeArray:function(e,t){var r=t||[];return null!=e&&(w(Object(e))?A.merge(r,"string"==typeof e?[e]:e):o.call(r,e)),r},inArray:function(e,t,r){return null==t?-1:s.call(t,e,r)},merge:function(e,t){for(var r=+t.length,n=0,a=e.length;n<r;n++)e[a++]=t[n];return e.length=a,e},grep:function(e,t,r){for(var n=[],a=0,i=e.length,o=!r;a<i;a++)!t(e[a],a)!==o&&n.push(e[a]);return n},map:function(e,t,r){var n,a,o=0,s=[];if(w(e))for(n=e.length;o<n;o++)null!=(a=t(e[o],o,r))&&s.push(a);else for(o in e)null!=(a=t(e[o],o,r))&&s.push(a);return i(s)},guid:1,support:h}),"function"==typeof Symbol&&(A.fn[Symbol.iterator]=r[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){c["[object "+t+"]"]=t.toLowerCase()}));var x=function(e){var t,r,n,a,i,o,s,c,u,l,f,d,h,p,m,g,v,y,_,b="sizzle"+1*new Date,A=e.document,w=0,x=0,k=ce(),E=ce(),M=ce(),S=ce(),T=function(e,t){return e===t&&(f=!0),0},C={}.hasOwnProperty,D=[],O=D.pop,N=D.push,P=D.push,j=D.slice,R=function(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},z="checked|selected|async|a
a.version="2.29.4",r=Mt,a.fn=gr,a.min=function(){var e=[].slice.call(arguments,0);return Ct("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return Ct("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=p,a.unix=function(e){return Mt(1e3*e)},a.months=function(e,t){return br(e,t,"months")},a.isDate=f,a.locale=ot,a.invalid=v,a.duration=qt,a.isMoment=w,a.weekdays=function(e,t,r){return Ar(e,t,r,"weekdays")},a.parseZone=function(){return Mt.apply(null,arguments).parseZone()},a.localeData=ct,a.isDuration=Nt,a.monthsShort=function(e,t){return br(e,t,"monthsShort")},a.weekdaysMin=function(e,t,r){return Ar(e,t,r,"weekdaysMin")},a.defineLocale=st,a.updateLocale=function(e,t){if(null!=t){var r,n,a=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(C(tt[e]._config,t)):(null!=(n=it(e))&&(a=n._config),t=C(a,t),null==n&&(t.abbr=e),(r=new D(t)).parentLocale=tt[e],tt[e]=r),ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===ot()&&ot(e)):null!=tt[e]&&delete tt[e]);return tt[e]},a.locales=function(){return E(tt)},a.weekdaysShort=function(e,t,r){return Ar(e,t,r,"weekdaysShort")},a.normalizeUnits=B,a.relativeTimeRounding=function(e){return void 0===e?Gr:"function"==typeof e&&(Gr=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Ur[e]&&(void 0===t?Ur[e]:(Ur[e]=t,"s"===e&&(Ur.ss=t-1),!0))},a.calendarFormat=function(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},a.prototype=gr,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a}()})),Os=t((function(e){!function(t,r){e.exports?e.exports=r(Ds):r(t.moment)}(this,(function(e){void 0===e.version&&e.default&&(e=e.default);var t,r={},n={},a={},i={},o={};e&&"string"==typeof e.version||T("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var s=e.version.split("."),c=+s[0],u=+s[1];function l(e){return 96<e?e-87:64<e?e-29:e-48}function f(e){var t=0,r=e.split("."),n=r[0],a=r[1]||"",i=1,o=0,s=1;for(45===e.charCodeAt(0)&&(s=-(t=1));t<n.length;t++)o=60*o+l(n.charCodeAt(t));for(t=0;t<a.length;t++)i/=60,o+=l(a.charCodeAt(t))*i;return o*s}function d(e){for(var t=0;t<e.length;t++)e[t]=f(e[t])}function h(e,t){var r,n=[];for(r=0;r<t.length;r++)n[r]=e[t[r]];return n}function p(e){var t=e.split("|"),r=t[2].split(" "),n=t[3].split(""),a=t[4].split(" ");return d(r),d(n),d(a),function(e,t){for(var r=0;r<t;r++)e[r]=Math.round((e[r-1]||0)+6e4*e[r]);e[t-1]=1/0}(a,n.length),{name:t[0],abbrs:h(t[1].split(" "),n),offsets:h(r,n),untils:a,population:0|t[5]}}function m(e){e&&this._set(p(e))}function g(e,t){this.name=e,this.zones=t}function v(e){var t=e.toTimeString(),r=t.match(/\([a-z ]+\)/i);"GMT"===(r=r&&r[0]?(r=r[0].match(/[A-Z]/g))?r.join(""):void 0:(r=t.match(/[A-Z]{3,5}/g))?r[0]:void 0)&&(r=void 0),this.at=+e,this.abbr=r,this.offset=e.getTimezoneOffset()}function y(e){this.zone=e,this.offsetScore=0,this.abbrScore=0}function _(e,t){for(var r,n;n=6e4*((t.at-e.at)/12e4|0);)(r=new v(new Date(e.at+n))).offset===e.offset?e=r:t=r;return e}function b(e,t){return e.offsetScore!==t.offsetScore?e.offsetScore-t.offsetScore:e.abbrScore!==t.abbrScore?e.abbrScore-t.abbrScore:e.zone.population!==t.zone.population?t.zone.population-e.zone.population:t.zone.name.localeCompare(e.zone.name)}function A(e,t){var r,n;for(d(t),r=0;r<t.length;r++)n=t[r],o[n]=o[n]||{},o[n][e]=!0}function w(e){return(e||"").toLowerCase().replace(/\//g,"_")}function x(e){var t,n,a,o;for("string"==typeof e&&(e=[e]),t=0;t<e.length;t++)o=w(n=(a=e[t].split("|"))[0]),r[o]=e[t],i[o]=n,A(o,a[2].split(" "))}function k(e,t){e=w(e);var a,o=r[e];return o instanceof m?o:"string"==typeof o?(o=new m(o),r[e]=o):n[e]&&t!==k&&(a=k(n[e],k))?((o=r[e]=new m)._set(a),o.name=i[e],o):null}function E(e){var t,r,a,o;for("string"==typeof e&&(e=[e]),t=0;t<e.length;t++)a=w((r=e[t].split
//# sourceMappingURL=mercury.esm.js.map