@spscommerce/utils 7.0.0 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Q(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Y(e){return Array.isArray(e)?e.reduce((t,n)=>t.concat(Y(n)),[]):e}function ze(e,t){const n=new Set(t);for(const r of e)if(!n.has(r))return!1;return!0}function We(){return this.pending=!1,typeof this.id<"u"?(clearTimeout(this.id),delete this.id,!0):!1}function Z(e,t,n){const r=function(...i){return new Promise((c,m)=>{r.reset(),r.pending=!0;function h(){(async()=>{try{let u=e.apply(n||this,i);u instanceof Promise&&(u=await u),c(u)}catch(u){m(u)}finally{r.reset()}})()}r.id=window.setTimeout(h,t)})};return r.reset=We.bind(r),r}function He(){return this.pending=!1,typeof this.id=="number"?(window.cancelAnimationFrame(this.id),delete this.id,!0):!1}function ee(e,t){const n=function(...a){n.pending&&n.reset(),n.id=window.requestAnimationFrame(()=>{e&&e.apply(t||this,a),n.reset()}),n.pending=!0};return n.pending=!1,n.reset=He.bind(n),n}function Ke(e,t){const n=t?e.bind(t):e;setTimeout(n,0)}const F={add:(e,t)=>e+t,and:(e,t)=>e&&t,band:(e,t)=>e&t,bor:(e,t)=>e|t,bxor:(e,t)=>e^t,bnot:e=>~e,decr:e=>e-1,div:(e,t)=>e/t,eq:(e,t)=>e===t,exp:(e,t)=>e**t,gt:(e,t)=>e>t,gte:(e,t)=>e>=t,incr:e=>e+1,lshift:(e,t)=>e<<t,lt:(e,t)=>e<t,lte:(e,t)=>e<=t,mul:(e,t)=>e*t,neg:e=>-e,neq:(e,t)=>e!==t,not:e=>!e,or:(e,t)=>e||t,rem:(e,t)=>e%t,rshift:(e,t)=>e>>t,rshift_zf:(e,t)=>e>>>t,sub:(e,t)=>e-t,xor:(e,t)=>(e||t)&&!(e&&t)};function Xe(e,t){if(!Number.isInteger(e))throw new Error("start must be an integer");if(!Number.isInteger(t))throw new Error("end must be an integer");return new Array(Math.abs(t-e)+1).fill(e).map(e>t?F.sub:F.add)}class Je{constructor(t,n={}){let r;if(typeof Event=="function")r=new Event(t,n);else{r=document.createEvent("Event"),r.initEvent(t,n.bubbles,n.cancelable);for(const i of Object.keys(n))i!=="bubbles"&&i!=="cancelable"&&(r[i]=n[i])}Object.setPrototypeOf(this,r);const a=Object.getOwnPropertyDescriptors(Event.prototype);for(const i of Object.keys(a)){const c=a[i];for(const m of Object.keys(c))typeof c[m]=="function"&&(c[m]=c[m].bind(r))}Object.defineProperties(this,a)}}const Qe=Object.freeze({100:{name:"Insurance Plan Description"},101:{name:"Name and Address Lists"},104:{name:"Air Shipment Information"},106:{name:"Motor Carrier Rate Proposal"},107:{name:"Request for Motor Carrier Rate Proposal"},108:{name:"Response to a Motor Carrier Rate Proposal"},109:{name:"Vessel Content Details"},110:{name:"Air Freight Details and Invoice"},112:{name:"Property Damage Report"},120:{name:"Vehicle Shipping Order"},121:{name:"Vehicle Service"},124:{name:"Vehicle Damage"},125:{name:"Multilevel Railcar Load Details"},126:{name:"Vehicle Application Advice"},127:{name:"Vehicle Baying Order"},128:{name:"Dealer Information"},129:{name:"Vehicle Carrier Rate Update"},130:{name:"Student Educational Record (Transcript)"},131:{name:"Student Educational Record (Transcript) Acknowledgment"},135:{name:"Student Loan Application"},138:{name:"Testing Results Request and Report"},139:{name:"Student Loan Guarantee Result"},140:{name:"Product Registration"},141:{name:"Product Service Claim Response"},142:{name:"Product Service Claim"},143:{name:"Product Service Notification"},144:{name:"Student Loan Transfer and Status Verification"},146:{name:"Request for Student Educational Record (Transcript)"},147:{name:"Response to Request for Student Educational Record (Transcript)"},148:{name:"Report of Injury, Illness or Incident"},149:{name:"Notice of Tax Adjustment or Assessment"},150:{name:"Tax Rate Notification"},151:{name:"Electronic Filing of Tax Return Data Acknowledgment"},152:{name:"Statistical Government Information"},153:{name:"Unemployment Insurance Tax Claim or Charge Information"},154:{name:"Uniform Commercial Code Filing"},155:{name:"Business Credit Report"},157:{name:"Notice of Power of Attorney"},159:{name:"Motion Picture Booking Confirmation"},160:{name:"Transportation Automatic Equipment Identification"},161:{name:"Train Sheet"},169:{name:"Transportation Appointment Schedule Information"},170:{name:"Revenue Receipts Statement"},175:{name:"Court and Law Enforcement Notice"},176:{name:"Court Submission TYPE"},180:{name:"Return Merchandise Authorization and Notification"},185:{name:"Royalty Regulatory Report"},186:{name:"Insurance Underwriting Requirements Reporting"},188:{name:"Educational Course Inventory"},189:{name:"Application for Admission to Educational Institutions"},190:{name:"Student Enrollment Verification"},191:{name:"Student Loan Pre-Claims and Claims"},194:{name:"Grant or Assistance Application"},195:{name:"Federal Communications Commission (FCC) License Application"},196:{name:"Contractor Cost Data Reporting"},197:{name:"Real Estate Title Evidence"},198:{name:"Loan Verification Information"},199:{name:"Real Estate Settlement Information"},200:{name:"Mortgage Credit Report"},201:{name:"Residential Loan Application"},202:{name:"Secondary Mortgage Market Loan Delivery"},203:{name:"Secondary Mortgage Market Investor Report"},204:{name:"Motor Carrier Load Tender"},205:{name:"Mortgage Note"},206:{name:"Real Estate Inspection"},210:{name:"Motor Carrier Freight Details and Invoice"},211:{name:"Motor Carrier Bill of Lading",edifactId:"IFTMCE"},212:{name:"Motor Carrier Delivery Trailer Manifest"},213:{name:"Motor Carrier Shipment Status Inquiry"},214:{name:"Transportation Carrier Shipment Status Message"},215:{name:"Motor Carrier Pick-up Manifest"},216:{name:"Motor Carrier Shipment Pick-up Notification"},217:{name:"Motor Carrier Loading and Route Guide"},218:{name:"Motor Carrier Tariff Information"},219:{name:"Logistics Service Request"},220:{name:"Logistics Service Response"},222:{name:"Cartage Work Assignment"},223:{name:"Consolidators Freight Bill and Invoice"},224:{name:"Motor Carrier Summary Freight Bill Manifest"},225:{name:"Response to a Cartage Work Assignment"},240:{name:"Motor Carrier Package Status"},242:{name:"Data Status Tracking"},244:{name:"Product Source Information"},248:{name:"Account Assignment/Inquiry and Service/Status"},249:{name:"Animal Toxicological Data"},250:{name:"Purchase Order Shipment Management Document"},251:{name:"Pricing Support"},252:{name:"Insurance Producer Administration"},255:{name:"Underwriting Information Services"},256:{name:"Periodic Compensation"},260:{name:"Application for Mortgage Insurance Benefits"},261:{name:"Real Estate Information Request"},262:{name:"Real Estate Information Report"},263:{name:"Residential Mortgage Insurance Application Response"},264:{name:"Mortgage Loan Default Status"},265:{name:"Real Estate Title Insurance Services Order"},266:{name:"Mortgage or Property Record Change Notification"},267:{name:"Individual Life, Annuity and Disability Application"},268:{name:"Annuity Activity"},270:{name:"Eligibility, Coverage or Benefit Inquiry"},271:{name:"Eligibility, Coverage or Benefit Information"},272:{name:"Property and Casualty Loss Notification"},273:{name:"Insurance/Annuity Application Status"},274:{name:"Health Care Provider Information"},275:{name:"Patient Information"},276:{name:"Health Care Claim Status Request"},277:{name:"Health Care Claim Status Notification"},278:{name:"Health Care Services Insurance/Benefit Review Information"},280:{name:"Voter Registration Information"},285:{name:"Commercial Vehicle Safety and Credentials Information Exchange"},286:{name:"Commercial Vehicle Credentials"},288:{name:"Wage Determination"},290:{name:"Cooperative Advertising Agreements"},300:{name:"Reservation (Booking Request) (Ocean)"},301:{name:"Confirmation (Ocean)",edifactId:"IFTMBC"},303:{name:"Booking Cancellation (Ocean)"},304:{name:"Shipping Instructions"},309:{name:"U.S. Customs Manifest"},310:{name:"Freight Receipt and Invoice (Ocean)"},311:{name:"Canadian Customs Information"},312:{name:"Arrival Notice (Ocean)"},313:{name:"Shipment Status Inquiry (Ocean)"},315:{name:"Status Details (Ocean)"},317:{name:"Delivery/Pickup Order"},319:{name:"Terminal Information"},322:{name:"Terminal Operations and Intermodal Ramp Activity"},323:{name:"Vessel Schedule and Itinerary (Ocean)"},324:{name:"Vessel Stow Plan (Ocean)"},325:{name:"Consolidation of Goods In Container"},326:{name:"Consignment Summary List"},350:{name:"U.S. Customs Status Information"},352:{name:"U.S. Customs Carrier General Order Status"},353:{name:"U.S. Customs Events Advisory Details"},354:{name:"U.S. Customs Automated Manifest Archive Status"},355:{name:"U.S. Customs Acceptance/Rejection"},356:{name:"U.S. Customs Permit to Transfer Request"},357:{name:"U.S. Customs In-Bond Information"},358:{name:"U.S. Customs Consist Information"},361:{name:"Carrier Interchange Agreement (Ocean)"},362:{name:"Cargo Insurance Advice of Shipment"},404:{name:"Rail Carrier Shipment Information"},410:{name:"Rail Carrier Freight Details and Invoice"},411:{name:"Rail Carrier Freight Details and Invoice Summary"},412:{name:"Trailer or Container Repair Billing"},414:{name:"Rail Carhire Settlements"},417:{name:"Rail Carrier Waybill Interchange"},418:{name:"Rail Advance Interchange Consist"},419:{name:"Advance Car Disposition"},420:{name:"Car Handling Information"},421:{name:"Estimated Time of Arrival and Car Scheduling"},422:{name:"Shipper's Car Order"},423:{name:"Rail Industrial Switch List"},424:{name:"Rail Carrier Services Settlement"},425:{name:"Rail Waybill Request"},426:{name:"Rail Revenue Waybill"},427:{name:"Rail Waybill Response"},429:{name:"Railroad Retirement Activity"},431:{name:"Railroad Station Master File"},432:{name:"Rail Deprescription"},433:{name:"Railroad Reciprocal Switch File"},434:{name:"Railroad Mark Register Update Activity"},435:{name:"Standard Transportation Commodity Code (STCC) Master"},436:{name:"Locomotive Information"},437:{name:"Railroad Junctions and Interchanges Activity"},440:{name:"Shipment Weights"},451:{name:"Railroad Event Report"},452:{name:"Railroad Problem Log Inquiry or Advice"},453:{name:"Railroad Service Commitment Advice"},455:{name:"Railroad Parameter Trace Registration"},456:{name:"Railroad Equipment Inquiry or Advice"},460:{name:"Railroad Price Distribution Request or Response"},463:{name:"Rail Rate Reply"},466:{name:"Rate Request"},468:{name:"Rate Docket Journal Log"},470:{name:"Railroad Clearance"},475:{name:"Rail Route File Maintenance"},485:{name:"Ratemaking Action"},486:{name:"Rate Docket Expiration"},490:{name:"Rate Group Definition"},492:{name:"Miscellaneous Rates"},494:{name:"Rail Scale Rates"},500:{name:"Medical Event Reporting"},501:{name:"Vendor Performance Review"},503:{name:"Pricing History"},504:{name:"Clauses and Provisions"},511:{name:"Requisition"},517:{name:"Material Obligation Validation"},521:{name:"Income or Asset Offset"},527:{name:"Material Due-In and Receipt"},536:{name:"Logistics Reassignment"},540:{name:"Notice of Employment Status"},561:{name:"Contract Abstract"},567:{name:"Contract Completion Status"},568:{name:"Contract Payment Management Report"},601:{name:"U.S. Customs Export Shipment Information"},602:{name:"Transportation Services Tender"},620:{name:"Excavation Communication"},625:{name:"Well Information"},650:{name:"Maintenance Service Order"},715:{name:"Intermodal Group Loading Plan"},805:{name:"Contract Pricing Proposal"},806:{name:"Project Schedule Reporting"},810:{name:"Invoice",edifactId:"INVOIC"},811:{name:"Consolidated Service Invoice/Statement"},812:{name:"Credit/Debit Adjustment"},813:{name:"Electronic Filing of Tax Return Data"},814:{name:"General Request, Response or Confirmation"},815:{name:"Cryptographic Service Message"},816:{name:"Organizational Relationships"},818:{name:"Commission Sales Report"},819:{name:"Operating Expense Statement"},820:{name:"Payment Order/Remittance Advice",edifactId:"REMADV"},821:{name:"Financial Information Reporting"},822:{name:"Account Analysis"},823:{name:"Lockbox"},824:{name:"Application Advice",edifactId:"APERAK"},826:{name:"Tax Information Exchange"},827:{name:"Financial Return Notice"},828:{name:"Debit Authorization"},829:{name:"Payment Cancellation Request"},830:{name:"Planning Schedule with Release Capability",edifactId:"DELFOR"},831:{name:"Application Control Totals"},832:{name:"Price/Sales Catalog",edifactId:"PRICAT"},833:{name:"Mortgage Credit Report Order"},834:{name:"Benefit Enrollment and Maintenance"},835:{name:"Health Care Claim Payment/Advice"},836:{name:"Procurement Notices"},837:{name:"Health Care Claim"},838:{name:"Trading Partner Profile"},839:{name:"Project Cost Reporting"},840:{name:"Request for Quotation",edifactId:"REQUOTE"},841:{name:"Specifications/Technical Information"},842:{name:"Nonconformance Report"},843:{name:"Response to Request for Quotation",edifactId:"QUOTES"},844:{name:"Product Transfer Account Adjustment",edifactId:"SSDCLM"},845:{name:"Price Authorization Acknowledgment/Status",edifactId:"ATHSTS"},846:{name:"Inventory Inquiry/Advice",edifactId:"INVRPT"},847:{name:"Material Claim"},848:{name:"Material Safety Data Sheet"},849:{name:"Response to Product Transfer Account Adjustment"},850:{name:"Purchase Order",edifactId:"ORDERS"},851:{name:"Asset Schedule"},852:{name:"Product Activity Data",edifactId:"SLSRPT"},853:{name:"Routing and Carrier Instruction"},854:{name:"Shipment Delivery Discrepancy Information"},855:{name:"Purchase Order Acknowledgment",edifactId:"ORDRSP"},856:{name:"Advance Ship Notice/Manifest",edifactId:"DESADV"},857:{name:"Shipment and Billing Notice"},858:{name:"Shipment Information"},859:{name:"Freight Invoice"},860:{name:"Purchase Order Change",edifactId:"ORDCHG"},861:{name:"Receiving Advice/Acceptance Certificate",edifactId:"RECADV"},862:{name:"Shipping Schedule",edifactId:"DELJIT"},863:{name:"Report of Test Results"},864:{name:"Text Message"},865:{name:"Purchase Order Change",edifactId:"ORDRSP"},866:{name:"Production Sequence"},867:{name:"Product Transfer and Resale Report",edifactId:"SLSRPT"},868:{name:"Electronic Form Structure"},869:{name:"Order Status Inquiry",edifactId:"ORSSTA"},870:{name:"Order Status Report",edifactId:"ORDREP"},871:{name:"Component Parts Content"},872:{name:"Residential Mortgage Insurance Application"},875:{name:"Grocery Products Purchase Order"},876:{name:"Grocery Products Purchase Order Change"},877:{name:"Manufacturer Coupon Family Code Structure"},878:{name:"Product Authorization/De-authorization"},879:{name:"Price Information"},880:{name:"Grocery Products Invoice"},881:{name:"Manufacturer Coupon Redemption Detail"},882:{name:"Direct Store Delivery Summary Information"},883:{name:"Market Development Fund Allocation"},884:{name:"Market Development Fund Settlement"},885:{name:"Retail Account Characteristics"},886:{name:"Customer Call Reporting"},887:{name:"Coupon Notification"},888:{name:"Item Maintenance"},889:{name:"Promotion Announcement"},891:{name:"Deduction Research Report"},893:{name:"Item Information Request"},894:{name:"Delivery/Return Base Record"},895:{name:"Delivery/Return Acknowledgment or Adjustment"},896:{name:"Product Dimension Maintenance"},920:{name:"Loss or Damage Claim - General Commodities"},924:{name:"Loss or Damage Claim - Motor Vehicle"},925:{name:"Claim Tracer"},926:{name:"Claim Status Report and Tracer Reply"},928:{name:"Automotive Inspection Detail"},940:{name:"Warehouse Shipping Order"},943:{name:"Warehouse Stock Transfer Shipment Advice"},944:{name:"Warehouse Stock Transfer Receipt Advice"},945:{name:"Warehouse Shipping Advice"},947:{name:"Warehouse Inventory Adjustment Advice"},980:{name:"Functional Group Totals"},990:{name:"Response to a Load Tender"},996:{name:"File Transfer"},997:{name:"Functional Acknowledgment",edifactId:"CONTROL"},998:{name:"Set Cancellation"},999:{name:"Implementation Acknowledgment"}});function Ye(){return(e,t)=>{const n=`_${String(t)}`;Object.defineProperties(e,{[n]:{enumerable:!1,configurable:!0,writable:!0,value:void 0},[t]:{enumerable:!0,configurable:!0,get(){return this[n]},set(r){this[n]=Number(r)}}})}}function Ze(e){return(t,n,r)=>{const a={...r};return a.get=function(){const c={...a};return c.value=Z(a.value,e,this),Object.defineProperty(this,n,c),c.value},a.configurable=!0,delete a.writable,delete a.value,a}}function et(e,t,n){const r={...n};return n.get=function(){const i={...r};return i.value=ee(r.value,this),Object.defineProperty(this,t,i),i.value},n.configurable=!0,delete n.writable,delete n.value,n}function tt(e,t,n,r,a){const i=a||Object.getOwnPropertyDescriptor(n,r),c=i.get,{value:m}=i;return i.get=function(){const u=this,d=(m||c.call(this)).bind(this),R={...t,...e};for(const p of Object.keys(t))typeof e[p]=="function"?Object.defineProperty(d,p,{get(){return R[p](u)}}):d[p]=R[p];return Object.defineProperty(this,r,{writable:!0,configurable:!0,enumerable:i.enumerable,value:d}),d},delete i.value,delete i.writable,i}function nt(e,t,n){const r={...n};return r.get=function(){const i={...r},c=r.value.bind(this);return i.value=()=>setTimeout(c,0),Object.defineProperty(this,t,i),i.value},r.configurable=!0,delete r.writable,delete r.value,r}function rt(e,t){return!e||e<t[0]?t[0]:e>t[1]?t[1]:e}function te(e,t=0){const n=String(e).split("."),r=n.length>1?n[1].length:0;let a=e;for(let i=r-1;i>=t;i-=1)a=+`${Math.round(+`${a}e${i}`)}e-${i}`;return a}function at(e,t=2){if(e>Number.MAX_SAFE_INTEGER)throw new Error("Number is greater than MAX_SAFE_INTEGER; toFileSizeString does not support orders of magnitude higher than petabytes for this reason until BigInt achieves broad browser support.");const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),5),r=["B","KB","MB","GB","TB","PB"][n],a=n?t:0;return te(e/1024**n,a).toFixed(a)+r}function O(e){return typeof e=="string"?e.match(/[^.[\]]+/g)||[]:[].concat(e)}function ne(e,t,n){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}var I=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ot="[object Object]";function it(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function ct(e,t){return function(n){return e(t(n))}}var st=Function.prototype,re=Object.prototype,ae=st.toString,mt=re.hasOwnProperty,ut=ae.call(Object),lt=re.toString,ft=ct(Object.getPrototypeOf,Object);function dt(e){return!!e&&typeof e=="object"}function pt(e){if(!dt(e)||lt.call(e)!=ot||it(e))return!1;var t=ft(e);if(t===null)return!0;var n=mt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ae.call(n)==ut}var gt=pt;const f=_(gt);function oe(e){Object.freeze(e);for(const t of Object.keys(e)){const n=e[t];(f(n)||Array.isArray(n))&&oe(n)}}var ie=(e=>(e[e.ADDITION=0]="ADDITION",e[e.DELETION=1]="DELETION",e[e.ALTERATION=2]="ALTERATION",e))(ie||{});function ce(e,t,n=[]){let r=[];for(const a of new Set([...Object.keys(e),...Object.keys(t)])){const i=Object.prototype.hasOwnProperty.call(e,a),c=Object.prototype.hasOwnProperty.call(t,a);i&&!c?r.push({type:1,key:a,parentPath:n,objects:[e,t]}):!i&&c?r.push({type:0,key:a,parentPath:n,objects:[e,t]}):f(e[a])&&f(t[a])||Array.isArray(e[a])&&Array.isArray(t[a])?r=r.concat(ce(e[a],t[a],[...n,a])):e[a]!==t[a]&&r.push({type:2,key:a,parentPath:n,objects:[e,t]})}return r}function se(e,t){for(const n of Object.keys(e)){const r=e[n];f(r)||Array.isArray(r)?se(r,t):t(n,r,e)}}function me(e,t,n=[]){t(n,e);for(const r of Object.keys(e)){const a=e[r];if(f(a)||Array.isArray(a)){const i=n.concat(r);me(a,t,i)}}}function yt(e){return e==null}var ue=yt;const le=_(ue),bt=Q({__proto__:null,default:le},[ue]);var A={exports:{}};A.exports;(function(e,t){var n=9007199254740991,r="[object Arguments]",a="[object Function]",i="[object GeneratorFunction]",c="[object Map]",m="[object Object]",h="[object Promise]",u="[object Set]",P="[object WeakMap]",d="[object DataView]",R=/[\\^$.*+?()[\]{}|]/g,p=/^\[object .+?Constructor\]$/,be=typeof I=="object"&&I&&I.Object===Object&&I,he=typeof self=="object"&&self&&self.Object===Object&&self,g=be||he||Function("return this")(),x=t&&!t.nodeType&&t,V=x&&!0&&e&&!e.nodeType&&e,Se=V&&V.exports===x;function Re(o,s){return o==null?void 0:o[s]}function Ce(o){var s=!1;if(o!=null&&typeof o.toString!="function")try{s=!!(o+"")}catch{}return s}function ve(o,s){return function(l){return o(s(l))}}var Ie=Function.prototype,C=Object.prototype,T=g["__core-js_shared__"],G=function(){var o=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),$=Ie.toString,E=C.hasOwnProperty,v=C.toString,Ae=RegExp("^"+$.call(E).replace(R,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=Se?g.Buffer:void 0,z=C.propertyIsEnumerable,Oe=U?U.isBuffer:void 0,Pe=ve(Object.keys,Object),M=S(g,"DataView"),j=S(g,"Map"),w=S(g,"Promise"),D=S(g,"Set"),k=S(g,"WeakMap"),Te=!z.call({valueOf:1},"valueOf"),Ee=b(M),Me=b(j),je=b(w),we=b(D),De=b(k);function ke(o){return v.call(o)}function Fe(o){if(!K(o)||Ne(o))return!1;var s=H(o)||Ce(o)?Ae:p;return s.test(b(o))}function S(o,s){var l=Re(o,s);return Fe(l)?l:void 0}var y=ke;(M&&y(new M(new ArrayBuffer(1)))!=d||j&&y(new j)!=c||w&&y(w.resolve())!=h||D&&y(new D)!=u||k&&y(new k)!=P)&&(y=function(o){var s=v.call(o),l=s==m?o.constructor:void 0,X=l?b(l):void 0;if(X)switch(X){case Ee:return d;case Me:return c;case je:return h;case we:return u;case De:return P}return s});function Ne(o){return!!G&&G in o}function Le(o){var s=o&&o.constructor,l=typeof s=="function"&&s.prototype||C;return o===l}function b(o){if(o!=null){try{return $.call(o)}catch{}try{return o+""}catch{}}return""}function Be(o){return qe(o)&&E.call(o,"callee")&&(!z.call(o,"callee")||v.call(o)==r)}var _e=Array.isArray;function W(o){return o!=null&&Ge(o.length)&&!H(o)}function qe(o){return $e(o)&&W(o)}var xe=Oe||Ue;function Ve(o){if(W(o)&&(_e(o)||typeof o=="string"||typeof o.splice=="function"||xe(o)||Be(o)))return!o.length;var s=y(o);if(s==c||s==u)return!o.size;if(Te||Le(o))return!Pe(o).length;for(var l in o)if(E.call(o,l))return!1;return!0}function H(o){var s=K(o)?v.call(o):"";return s==a||s==i}function Ge(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=n}function K(o){var s=typeof o;return!!o&&(s=="object"||s=="function")}function $e(o){return!!o&&typeof o=="object"}function Ue(){return!1}e.exports=Ve})(A,A.exports);var fe=A.exports;const q=_(fe),de=Q({__proto__:null,default:q},[fe]),J=le||bt,ht=q||de;function N(e,t,n,r=!1){if(ht(t))return e;let a=e;for(const i of O(t)){let c=i,m;if(typeof i=="string"&&([,c,m]=/^([^?]+)(\?)?$/.exec(i)),a=a[c],J(a)&&(m||r))return n}return J(a)?n:a}function St(e,...t){const n=new Set(t),r={};for(const a of Object.keys(e))n.has(a)||(r[a]=e[a]);return r}const Rt=q||de;function Ct(e,t,n){if(typeof e!="object")throw new Error("object is required");if(Rt(t))throw new Error("path is required");const r=O(t),a=r.splice(r.length-1,1)[0];let i=e;for(const c of r)if(i=i[c],typeof i!="object")throw new Error(`Cannot set value at given path: Path deadends at ${String(c)}`);i[a]=n}function*vt(e,t){yield e;let n=e;for(const r of O(t))n=n[r],yield n}function L(...e){const t={};for(const n of e)for(const r of Object.keys(n))Object.prototype.hasOwnProperty.call(t,r)&&Object.getOwnPropertyDescriptor(t,r).writable&&f(t[r])?t[r]=L(t[r],n[r]):f(n[r])?t[r]=L({},n[r]):t[r]=n[r];return t}function B(...e){const t={};for(const n of e)for(const r of Object.keys(n))Object.prototype.hasOwnProperty.call(t,r)&&Object.getOwnPropertyDescriptor(t,r).writable&&f(t[r])?t[r]=B(t[r],n[r]):f(n[r])?t[r]=B({},n[r]):ne(r,n,t);return t}function It(e){const t=[];for(const n of Object.keys(e))t.push(e[n]);return t}function At(e,...t){const n=e.reduce((a,i,c)=>`${a}${c<=t.length?String(t[c-1]):""}${i}`),r=Math.min(...n.split(/[\r\n]/).filter(a=>a.trim()).map(a=>/^ */.exec(a)[0].length));return n.replace(new RegExp(`^ {${r}}`,"gm"),"").trim()}function Ot(e){const t=/[A-Z]?B$/.exec(e);if(!t)throw new Error(`Input to parseFileSize ("${e}") doesn't seem like a file size; cannot identify a unit (e.g. KB, GB)`);const[n]=t,r=Number(e.replace(n,""));if(Number.isNaN(r))throw new Error(`Could not parse a number out of input to parseFileSize ("${e}")`);const a=["B","KB","MB","GB","TB","PB"].indexOf(n);if(a===-1)throw new Error("parseFileSize does not support units above PB");return Math.ceil(r*1024**a)}const pe=/(<%=|{{)(.+?)(%>|}})/g,ge=/<%\?(.+?)%>(.+?)<\/%>/g,ye=Symbol("sps.utils.templateSrc");function Pt(e){const t=n=>e.replace(ge,(r,a,i)=>N(n,a.trim())?i:"").replace(pe,(r,a,i)=>N(n,i.trim(),""));return t[ye]=e,t}function Tt(e){return typeof e=="string"&&(pe.test(e)||ge.test(e))}function Et(e){return typeof e=="function"&&Object.prototype.hasOwnProperty.call(e,ye)}exports.CustomEvent=Je;exports.DiffChange=ie;exports.EDI_DOCUMENT_TYPE=Qe;exports.Op=F;exports.castToNumber=Ye;exports.code=At;exports.constrain=rt;exports.copyProperty=ne;exports.crumblePath=O;exports.debounce=Z;exports.debounced=Ze;exports.decimalRound=te;exports.deepFreeze=oe;exports.diff=ce;exports.flatten=Y;exports.forEachEntryDeep=se;exports.forEachNestedObject=me;exports.getPath=N;exports.isSubset=ze;exports.isTemplate=Tt;exports.isTemplateFn=Et;exports.lockToAnimationFrames=ee;exports.lockedToAnimationFrames=et;exports.mergeDeep=L;exports.mergePropertiesDeep=B;exports.omit=St;exports.onNextTick=Ke;exports.parseFileSize=Ot;exports.range=Xe;exports.setPath=Ct;exports.simpleMetadataDecoratorApplicator=tt;exports.template=Pt;exports.tickDelay=nt;exports.toFileSizeString=at;exports.traversePath=vt;exports.values=It;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function J(e){return Array.isArray(e)?e.reduce((t,n)=>t.concat(J(n)),[]):e}function _e(e,t){const n=new Set(t);for(const r of e)if(!n.has(r))return!1;return!0}function Ve(){return this.pending=!1,typeof this.id<"u"?(clearTimeout(this.id),delete this.id,!0):!1}function Q(e,t,n){const r=function(...i){return new Promise((c,m)=>{r.reset(),r.pending=!0;function R(){(async()=>{try{let u=e.apply(n||this,i);u instanceof Promise&&(u=await u),c(u)}catch(u){m(u)}finally{r.reset()}})()}r.id=window.setTimeout(R,t)})};return r.reset=Ve.bind(r),r}function Ge(){return this.pending=!1,typeof this.id=="number"?(window.cancelAnimationFrame(this.id),delete this.id,!0):!1}function Y(e,t){const n=function(...o){n.pending&&n.reset(),n.id=window.requestAnimationFrame(()=>{e&&e.apply(t||this,o),n.reset()}),n.pending=!0};return n.pending=!1,n.reset=Ge.bind(n),n}function $e(e,t){const n=t?e.bind(t):e;setTimeout(n,0)}const F={add:(e,t)=>e+t,and:(e,t)=>e&&t,band:(e,t)=>e&t,bor:(e,t)=>e|t,bxor:(e,t)=>e^t,bnot:e=>~e,decr:e=>e-1,div:(e,t)=>e/t,eq:(e,t)=>e===t,exp:(e,t)=>e**t,gt:(e,t)=>e>t,gte:(e,t)=>e>=t,incr:e=>e+1,lshift:(e,t)=>e<<t,lt:(e,t)=>e<t,lte:(e,t)=>e<=t,mul:(e,t)=>e*t,neg:e=>-e,neq:(e,t)=>e!==t,not:e=>!e,or:(e,t)=>e||t,rem:(e,t)=>e%t,rshift:(e,t)=>e>>t,rshift_zf:(e,t)=>e>>>t,sub:(e,t)=>e-t,xor:(e,t)=>(e||t)&&!(e&&t)};function Ue(e,t){if(!Number.isInteger(e))throw new Error("start must be an integer");if(!Number.isInteger(t))throw new Error("end must be an integer");return new Array(Math.abs(t-e)+1).fill(e).map(e>t?F.sub:F.add)}class We{constructor(t,n={}){let r;if(typeof Event=="function")r=new Event(t,n);else{r=document.createEvent("Event"),r.initEvent(t,n.bubbles,n.cancelable);for(const i of Object.keys(n))i!=="bubbles"&&i!=="cancelable"&&(r[i]=n[i])}Object.setPrototypeOf(this,r);const o=Object.getOwnPropertyDescriptors(Event.prototype);for(const i of Object.keys(o)){const c=o[i];for(const m of Object.keys(c))typeof c[m]=="function"&&(c[m]=c[m].bind(r))}Object.defineProperties(this,o)}}const ze=Object.freeze({100:{name:"Insurance Plan Description"},101:{name:"Name and Address Lists"},104:{name:"Air Shipment Information"},106:{name:"Motor Carrier Rate Proposal"},107:{name:"Request for Motor Carrier Rate Proposal"},108:{name:"Response to a Motor Carrier Rate Proposal"},109:{name:"Vessel Content Details"},110:{name:"Air Freight Details and Invoice"},112:{name:"Property Damage Report"},120:{name:"Vehicle Shipping Order"},121:{name:"Vehicle Service"},124:{name:"Vehicle Damage"},125:{name:"Multilevel Railcar Load Details"},126:{name:"Vehicle Application Advice"},127:{name:"Vehicle Baying Order"},128:{name:"Dealer Information"},129:{name:"Vehicle Carrier Rate Update"},130:{name:"Student Educational Record (Transcript)"},131:{name:"Student Educational Record (Transcript) Acknowledgment"},135:{name:"Student Loan Application"},138:{name:"Testing Results Request and Report"},139:{name:"Student Loan Guarantee Result"},140:{name:"Product Registration"},141:{name:"Product Service Claim Response"},142:{name:"Product Service Claim"},143:{name:"Product Service Notification"},144:{name:"Student Loan Transfer and Status Verification"},146:{name:"Request for Student Educational Record (Transcript)"},147:{name:"Response to Request for Student Educational Record (Transcript)"},148:{name:"Report of Injury, Illness or Incident"},149:{name:"Notice of Tax Adjustment or Assessment"},150:{name:"Tax Rate Notification"},151:{name:"Electronic Filing of Tax Return Data Acknowledgment"},152:{name:"Statistical Government Information"},153:{name:"Unemployment Insurance Tax Claim or Charge Information"},154:{name:"Uniform Commercial Code Filing"},155:{name:"Business Credit Report"},157:{name:"Notice of Power of Attorney"},159:{name:"Motion Picture Booking Confirmation"},160:{name:"Transportation Automatic Equipment Identification"},161:{name:"Train Sheet"},169:{name:"Transportation Appointment Schedule Information"},170:{name:"Revenue Receipts Statement"},175:{name:"Court and Law Enforcement Notice"},176:{name:"Court Submission TYPE"},180:{name:"Return Merchandise Authorization and Notification"},185:{name:"Royalty Regulatory Report"},186:{name:"Insurance Underwriting Requirements Reporting"},188:{name:"Educational Course Inventory"},189:{name:"Application for Admission to Educational Institutions"},190:{name:"Student Enrollment Verification"},191:{name:"Student Loan Pre-Claims and Claims"},194:{name:"Grant or Assistance Application"},195:{name:"Federal Communications Commission (FCC) License Application"},196:{name:"Contractor Cost Data Reporting"},197:{name:"Real Estate Title Evidence"},198:{name:"Loan Verification Information"},199:{name:"Real Estate Settlement Information"},200:{name:"Mortgage Credit Report"},201:{name:"Residential Loan Application"},202:{name:"Secondary Mortgage Market Loan Delivery"},203:{name:"Secondary Mortgage Market Investor Report"},204:{name:"Motor Carrier Load Tender"},205:{name:"Mortgage Note"},206:{name:"Real Estate Inspection"},210:{name:"Motor Carrier Freight Details and Invoice"},211:{name:"Motor Carrier Bill of Lading",edifactId:"IFTMCE"},212:{name:"Motor Carrier Delivery Trailer Manifest"},213:{name:"Motor Carrier Shipment Status Inquiry"},214:{name:"Transportation Carrier Shipment Status Message"},215:{name:"Motor Carrier Pick-up Manifest"},216:{name:"Motor Carrier Shipment Pick-up Notification"},217:{name:"Motor Carrier Loading and Route Guide"},218:{name:"Motor Carrier Tariff Information"},219:{name:"Logistics Service Request"},220:{name:"Logistics Service Response"},222:{name:"Cartage Work Assignment"},223:{name:"Consolidators Freight Bill and Invoice"},224:{name:"Motor Carrier Summary Freight Bill Manifest"},225:{name:"Response to a Cartage Work Assignment"},240:{name:"Motor Carrier Package Status"},242:{name:"Data Status Tracking"},244:{name:"Product Source Information"},248:{name:"Account Assignment/Inquiry and Service/Status"},249:{name:"Animal Toxicological Data"},250:{name:"Purchase Order Shipment Management Document"},251:{name:"Pricing Support"},252:{name:"Insurance Producer Administration"},255:{name:"Underwriting Information Services"},256:{name:"Periodic Compensation"},260:{name:"Application for Mortgage Insurance Benefits"},261:{name:"Real Estate Information Request"},262:{name:"Real Estate Information Report"},263:{name:"Residential Mortgage Insurance Application Response"},264:{name:"Mortgage Loan Default Status"},265:{name:"Real Estate Title Insurance Services Order"},266:{name:"Mortgage or Property Record Change Notification"},267:{name:"Individual Life, Annuity and Disability Application"},268:{name:"Annuity Activity"},270:{name:"Eligibility, Coverage or Benefit Inquiry"},271:{name:"Eligibility, Coverage or Benefit Information"},272:{name:"Property and Casualty Loss Notification"},273:{name:"Insurance/Annuity Application Status"},274:{name:"Health Care Provider Information"},275:{name:"Patient Information"},276:{name:"Health Care Claim Status Request"},277:{name:"Health Care Claim Status Notification"},278:{name:"Health Care Services Insurance/Benefit Review Information"},280:{name:"Voter Registration Information"},285:{name:"Commercial Vehicle Safety and Credentials Information Exchange"},286:{name:"Commercial Vehicle Credentials"},288:{name:"Wage Determination"},290:{name:"Cooperative Advertising Agreements"},300:{name:"Reservation (Booking Request) (Ocean)"},301:{name:"Confirmation (Ocean)",edifactId:"IFTMBC"},303:{name:"Booking Cancellation (Ocean)"},304:{name:"Shipping Instructions"},309:{name:"U.S. Customs Manifest"},310:{name:"Freight Receipt and Invoice (Ocean)"},311:{name:"Canadian Customs Information"},312:{name:"Arrival Notice (Ocean)"},313:{name:"Shipment Status Inquiry (Ocean)"},315:{name:"Status Details (Ocean)"},317:{name:"Delivery/Pickup Order"},319:{name:"Terminal Information"},322:{name:"Terminal Operations and Intermodal Ramp Activity"},323:{name:"Vessel Schedule and Itinerary (Ocean)"},324:{name:"Vessel Stow Plan (Ocean)"},325:{name:"Consolidation of Goods In Container"},326:{name:"Consignment Summary List"},350:{name:"U.S. Customs Status Information"},352:{name:"U.S. Customs Carrier General Order Status"},353:{name:"U.S. Customs Events Advisory Details"},354:{name:"U.S. Customs Automated Manifest Archive Status"},355:{name:"U.S. Customs Acceptance/Rejection"},356:{name:"U.S. Customs Permit to Transfer Request"},357:{name:"U.S. Customs In-Bond Information"},358:{name:"U.S. Customs Consist Information"},361:{name:"Carrier Interchange Agreement (Ocean)"},362:{name:"Cargo Insurance Advice of Shipment"},404:{name:"Rail Carrier Shipment Information"},410:{name:"Rail Carrier Freight Details and Invoice"},411:{name:"Rail Carrier Freight Details and Invoice Summary"},412:{name:"Trailer or Container Repair Billing"},414:{name:"Rail Carhire Settlements"},417:{name:"Rail Carrier Waybill Interchange"},418:{name:"Rail Advance Interchange Consist"},419:{name:"Advance Car Disposition"},420:{name:"Car Handling Information"},421:{name:"Estimated Time of Arrival and Car Scheduling"},422:{name:"Shipper's Car Order"},423:{name:"Rail Industrial Switch List"},424:{name:"Rail Carrier Services Settlement"},425:{name:"Rail Waybill Request"},426:{name:"Rail Revenue Waybill"},427:{name:"Rail Waybill Response"},429:{name:"Railroad Retirement Activity"},431:{name:"Railroad Station Master File"},432:{name:"Rail Deprescription"},433:{name:"Railroad Reciprocal Switch File"},434:{name:"Railroad Mark Register Update Activity"},435:{name:"Standard Transportation Commodity Code (STCC) Master"},436:{name:"Locomotive Information"},437:{name:"Railroad Junctions and Interchanges Activity"},440:{name:"Shipment Weights"},451:{name:"Railroad Event Report"},452:{name:"Railroad Problem Log Inquiry or Advice"},453:{name:"Railroad Service Commitment Advice"},455:{name:"Railroad Parameter Trace Registration"},456:{name:"Railroad Equipment Inquiry or Advice"},460:{name:"Railroad Price Distribution Request or Response"},463:{name:"Rail Rate Reply"},466:{name:"Rate Request"},468:{name:"Rate Docket Journal Log"},470:{name:"Railroad Clearance"},475:{name:"Rail Route File Maintenance"},485:{name:"Ratemaking Action"},486:{name:"Rate Docket Expiration"},490:{name:"Rate Group Definition"},492:{name:"Miscellaneous Rates"},494:{name:"Rail Scale Rates"},500:{name:"Medical Event Reporting"},501:{name:"Vendor Performance Review"},503:{name:"Pricing History"},504:{name:"Clauses and Provisions"},511:{name:"Requisition"},517:{name:"Material Obligation Validation"},521:{name:"Income or Asset Offset"},527:{name:"Material Due-In and Receipt"},536:{name:"Logistics Reassignment"},540:{name:"Notice of Employment Status"},561:{name:"Contract Abstract"},567:{name:"Contract Completion Status"},568:{name:"Contract Payment Management Report"},601:{name:"U.S. Customs Export Shipment Information"},602:{name:"Transportation Services Tender"},620:{name:"Excavation Communication"},625:{name:"Well Information"},650:{name:"Maintenance Service Order"},715:{name:"Intermodal Group Loading Plan"},805:{name:"Contract Pricing Proposal"},806:{name:"Project Schedule Reporting"},810:{name:"Invoice",edifactId:"INVOIC"},811:{name:"Consolidated Service Invoice/Statement"},812:{name:"Credit/Debit Adjustment"},813:{name:"Electronic Filing of Tax Return Data"},814:{name:"General Request, Response or Confirmation"},815:{name:"Cryptographic Service Message"},816:{name:"Organizational Relationships"},818:{name:"Commission Sales Report"},819:{name:"Operating Expense Statement"},820:{name:"Payment Order/Remittance Advice",edifactId:"REMADV"},821:{name:"Financial Information Reporting"},822:{name:"Account Analysis"},823:{name:"Lockbox"},824:{name:"Application Advice",edifactId:"APERAK"},826:{name:"Tax Information Exchange"},827:{name:"Financial Return Notice"},828:{name:"Debit Authorization"},829:{name:"Payment Cancellation Request"},830:{name:"Planning Schedule with Release Capability",edifactId:"DELFOR"},831:{name:"Application Control Totals"},832:{name:"Price/Sales Catalog",edifactId:"PRICAT"},833:{name:"Mortgage Credit Report Order"},834:{name:"Benefit Enrollment and Maintenance"},835:{name:"Health Care Claim Payment/Advice"},836:{name:"Procurement Notices"},837:{name:"Health Care Claim"},838:{name:"Trading Partner Profile"},839:{name:"Project Cost Reporting"},840:{name:"Request for Quotation",edifactId:"REQUOTE"},841:{name:"Specifications/Technical Information"},842:{name:"Nonconformance Report"},843:{name:"Response to Request for Quotation",edifactId:"QUOTES"},844:{name:"Product Transfer Account Adjustment",edifactId:"SSDCLM"},845:{name:"Price Authorization Acknowledgment/Status",edifactId:"ATHSTS"},846:{name:"Inventory Inquiry/Advice",edifactId:"INVRPT"},847:{name:"Material Claim"},848:{name:"Material Safety Data Sheet"},849:{name:"Response to Product Transfer Account Adjustment"},850:{name:"Purchase Order",edifactId:"ORDERS"},851:{name:"Asset Schedule"},852:{name:"Product Activity Data",edifactId:"SLSRPT"},853:{name:"Routing and Carrier Instruction"},854:{name:"Shipment Delivery Discrepancy Information"},855:{name:"Purchase Order Acknowledgment",edifactId:"ORDRSP"},856:{name:"Advance Ship Notice/Manifest",edifactId:"DESADV"},857:{name:"Shipment and Billing Notice"},858:{name:"Shipment Information"},859:{name:"Freight Invoice"},860:{name:"Purchase Order Change",edifactId:"ORDCHG"},861:{name:"Receiving Advice/Acceptance Certificate",edifactId:"RECADV"},862:{name:"Shipping Schedule",edifactId:"DELJIT"},863:{name:"Report of Test Results"},864:{name:"Text Message"},865:{name:"Purchase Order Change",edifactId:"ORDRSP"},866:{name:"Production Sequence"},867:{name:"Product Transfer and Resale Report",edifactId:"SLSRPT"},868:{name:"Electronic Form Structure"},869:{name:"Order Status Inquiry",edifactId:"ORSSTA"},870:{name:"Order Status Report",edifactId:"ORDREP"},871:{name:"Component Parts Content"},872:{name:"Residential Mortgage Insurance Application"},875:{name:"Grocery Products Purchase Order"},876:{name:"Grocery Products Purchase Order Change"},877:{name:"Manufacturer Coupon Family Code Structure"},878:{name:"Product Authorization/De-authorization"},879:{name:"Price Information"},880:{name:"Grocery Products Invoice"},881:{name:"Manufacturer Coupon Redemption Detail"},882:{name:"Direct Store Delivery Summary Information"},883:{name:"Market Development Fund Allocation"},884:{name:"Market Development Fund Settlement"},885:{name:"Retail Account Characteristics"},886:{name:"Customer Call Reporting"},887:{name:"Coupon Notification"},888:{name:"Item Maintenance"},889:{name:"Promotion Announcement"},891:{name:"Deduction Research Report"},893:{name:"Item Information Request"},894:{name:"Delivery/Return Base Record"},895:{name:"Delivery/Return Acknowledgment or Adjustment"},896:{name:"Product Dimension Maintenance"},920:{name:"Loss or Damage Claim - General Commodities"},924:{name:"Loss or Damage Claim - Motor Vehicle"},925:{name:"Claim Tracer"},926:{name:"Claim Status Report and Tracer Reply"},928:{name:"Automotive Inspection Detail"},940:{name:"Warehouse Shipping Order"},943:{name:"Warehouse Stock Transfer Shipment Advice"},944:{name:"Warehouse Stock Transfer Receipt Advice"},945:{name:"Warehouse Shipping Advice"},947:{name:"Warehouse Inventory Adjustment Advice"},980:{name:"Functional Group Totals"},990:{name:"Response to a Load Tender"},996:{name:"File Transfer"},997:{name:"Functional Acknowledgment",edifactId:"CONTROL"},998:{name:"Set Cancellation"},999:{name:"Implementation Acknowledgment"}});function He(){return(e,t)=>{const n=`_${String(t)}`;Object.defineProperties(e,{[n]:{enumerable:!1,configurable:!0,writable:!0,value:void 0},[t]:{enumerable:!0,configurable:!0,get(){return this[n]},set(r){this[n]=Number(r)}}})}}function Ke(e){return(t,n,r)=>{const o={...r};return o.get=function(){const c={...o};return c.value=Q(o.value,e,this),Object.defineProperty(this,n,c),c.value},o.configurable=!0,delete o.writable,delete o.value,o}}function Xe(e,t,n){const r={...n};return n.get=function(){const i={...r};return i.value=Y(r.value,this),Object.defineProperty(this,t,i),i.value},n.configurable=!0,delete n.writable,delete n.value,n}function Je(e,t,n,r,o){const i=o||Object.getOwnPropertyDescriptor(n,r),c=i.get,{value:m}=i;return i.get=function(){const u=this,d=(m||c.call(this)).bind(this),b={...t,...e};for(const p of Object.keys(t))typeof e[p]=="function"?Object.defineProperty(d,p,{get(){return b[p](u)}}):d[p]=b[p];return Object.defineProperty(this,r,{writable:!0,configurable:!0,enumerable:i.enumerable,value:d}),d},delete i.value,delete i.writable,i}function Qe(e,t,n){const r={...n};return r.get=function(){const i={...r},c=r.value.bind(this);return i.value=()=>setTimeout(c,0),Object.defineProperty(this,t,i),i.value},r.configurable=!0,delete r.writable,delete r.value,r}function Ye(e,t){return!e||e<t[0]?t[0]:e>t[1]?t[1]:e}function Z(e,t=0){const n=String(e).split("."),r=n.length>1?n[1].length:0;let o=e;for(let i=r-1;i>=t;i-=1)o=+`${Math.round(+`${o}e${i}`)}e-${i}`;return o}function Ze(e,t=2){if(e>Number.MAX_SAFE_INTEGER)throw new Error("Number is greater than MAX_SAFE_INTEGER; toFileSizeString does not support orders of magnitude higher than petabytes for this reason until BigInt achieves broad browser support.");const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),5),r=["B","KB","MB","GB","TB","PB"][n],o=n?t:0;return Z(e/1024**n,o).toFixed(o)+r}function O(e){return typeof e=="string"?e.match(/[^.[\]]+/g)||[]:[].concat(e)}function ee(e,t,n){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}var I=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var et="[object Object]";function tt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function nt(e,t){return function(n){return e(t(n))}}var rt=Function.prototype,te=Object.prototype,ne=rt.toString,at=te.hasOwnProperty,ot=ne.call(Object),it=te.toString,ct=nt(Object.getPrototypeOf,Object);function st(e){return!!e&&typeof e=="object"}function mt(e){if(!st(e)||it.call(e)!=et||tt(e))return!1;var t=ct(e);if(t===null)return!0;var n=at.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ne.call(n)==ot}var ut=mt;const f=q(ut);function re(e){Object.freeze(e);for(const t of Object.keys(e)){const n=e[t];(f(n)||Array.isArray(n))&&re(n)}}var ae=(e=>(e[e.ADDITION=0]="ADDITION",e[e.DELETION=1]="DELETION",e[e.ALTERATION=2]="ALTERATION",e))(ae||{});function oe(e,t,n=[]){let r=[];for(const o of new Set([...Object.keys(e),...Object.keys(t)])){const i=Object.prototype.hasOwnProperty.call(e,o),c=Object.prototype.hasOwnProperty.call(t,o);i&&!c?r.push({type:1,key:o,parentPath:n,objects:[e,t]}):!i&&c?r.push({type:0,key:o,parentPath:n,objects:[e,t]}):f(e[o])&&f(t[o])||Array.isArray(e[o])&&Array.isArray(t[o])?r=r.concat(oe(e[o],t[o],[...n,o])):e[o]!==t[o]&&r.push({type:2,key:o,parentPath:n,objects:[e,t]})}return r}function ie(e,t){for(const n of Object.keys(e)){const r=e[n];f(r)||Array.isArray(r)?ie(r,t):t(n,r,e)}}function ce(e,t,n=[]){t(n,e);for(const r of Object.keys(e)){const o=e[r];if(f(o)||Array.isArray(o)){const i=n.concat(r);ce(o,t,i)}}}function lt(e){return e==null}var ft=lt;const X=q(ft);var A={exports:{}};A.exports;(function(e,t){var n=9007199254740991,r="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",c="[object Map]",m="[object Object]",R="[object Promise]",u="[object Set]",P="[object WeakMap]",d="[object DataView]",b=/[\\^$.*+?()[\]{}|]/g,p=/^\[object .+?Constructor\]$/,fe=typeof I=="object"&&I&&I.Object===Object&&I,de=typeof self=="object"&&self&&self.Object===Object&&self,g=fe||de||Function("return this")(),x=t&&!t.nodeType&&t,_=x&&!0&&e&&!e.nodeType&&e,pe=_&&_.exports===x;function ge(a,s){return a==null?void 0:a[s]}function ye(a){var s=!1;if(a!=null&&typeof a.toString!="function")try{s=!!(a+"")}catch{}return s}function he(a,s){return function(l){return a(s(l))}}var Re=Function.prototype,C=Object.prototype,T=g["__core-js_shared__"],V=function(){var a=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),G=Re.toString,E=C.hasOwnProperty,v=C.toString,Se=RegExp("^"+G.call(E).replace(b,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$=pe?g.Buffer:void 0,U=C.propertyIsEnumerable,be=$?$.isBuffer:void 0,Ce=he(Object.keys,Object),M=S(g,"DataView"),w=S(g,"Map"),D=S(g,"Promise"),j=S(g,"Set"),k=S(g,"WeakMap"),ve=!U.call({valueOf:1},"valueOf"),Ie=h(M),Ae=h(w),Oe=h(D),Pe=h(j),Te=h(k);function Ee(a){return v.call(a)}function Me(a){if(!H(a)||we(a))return!1;var s=z(a)||ye(a)?Se:p;return s.test(h(a))}function S(a,s){var l=ge(a,s);return Me(l)?l:void 0}var y=Ee;(M&&y(new M(new ArrayBuffer(1)))!=d||w&&y(new w)!=c||D&&y(D.resolve())!=R||j&&y(new j)!=u||k&&y(new k)!=P)&&(y=function(a){var s=v.call(a),l=s==m?a.constructor:void 0,K=l?h(l):void 0;if(K)switch(K){case Ie:return d;case Ae:return c;case Oe:return R;case Pe:return u;case Te:return P}return s});function we(a){return!!V&&V in a}function De(a){var s=a&&a.constructor,l=typeof s=="function"&&s.prototype||C;return a===l}function h(a){if(a!=null){try{return G.call(a)}catch{}try{return a+""}catch{}}return""}function je(a){return Fe(a)&&E.call(a,"callee")&&(!U.call(a,"callee")||v.call(a)==r)}var ke=Array.isArray;function W(a){return a!=null&&Be(a.length)&&!z(a)}function Fe(a){return qe(a)&&W(a)}var Ne=be||xe;function Le(a){if(W(a)&&(ke(a)||typeof a=="string"||typeof a.splice=="function"||Ne(a)||je(a)))return!a.length;var s=y(a);if(s==c||s==u)return!a.size;if(ve||De(a))return!Ce(a).length;for(var l in a)if(E.call(a,l))return!1;return!0}function z(a){var s=H(a)?v.call(a):"";return s==o||s==i}function Be(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=n}function H(a){var s=typeof a;return!!a&&(s=="object"||s=="function")}function qe(a){return!!a&&typeof a=="object"}function xe(){return!1}e.exports=Le})(A,A.exports);var dt=A.exports;const se=q(dt);function N(e,t,n,r=!1){if(se(t))return e;let o=e;for(const i of O(t)){let c=i,m;if(typeof i=="string"&&([,c,m]=/^([^?]+)(\?)?$/.exec(i)),o=o[c],X(o)&&(m||r))return n}return X(o)?n:o}function pt(e,...t){const n=new Set(t),r={};for(const o of Object.keys(e))n.has(o)||(r[o]=e[o]);return r}function gt(e,t,n){if(typeof e!="object")throw new Error("object is required");if(se(t))throw new Error("path is required");const r=O(t),o=r.splice(r.length-1,1)[0];let i=e;for(const c of r)if(i=i[c],typeof i!="object")throw new Error(`Cannot set value at given path: Path deadends at ${String(c)}`);i[o]=n}function*yt(e,t){yield e;let n=e;for(const r of O(t))n=n[r],yield n}function L(...e){const t={};for(const n of e)for(const r of Object.keys(n))Object.prototype.hasOwnProperty.call(t,r)&&Object.getOwnPropertyDescriptor(t,r).writable&&f(t[r])?t[r]=L(t[r],n[r]):f(n[r])?t[r]=L({},n[r]):t[r]=n[r];return t}function B(...e){const t={};for(const n of e)for(const r of Object.keys(n))Object.prototype.hasOwnProperty.call(t,r)&&Object.getOwnPropertyDescriptor(t,r).writable&&f(t[r])?t[r]=B(t[r],n[r]):f(n[r])?t[r]=B({},n[r]):ee(r,n,t);return t}function ht(e){const t=[];for(const n of Object.keys(e))t.push(e[n]);return t}function Rt(e,...t){const n=e.reduce((o,i,c)=>`${o}${c<=t.length?String(t[c-1]):""}${i}`),r=Math.min(...n.split(/[\r\n]/).filter(o=>o.trim()).map(o=>/^ */.exec(o)[0].length));return n.replace(new RegExp(`^ {${r}}`,"gm"),"").trim()}function St(e){const t=/[A-Z]?B$/.exec(e);if(!t)throw new Error(`Input to parseFileSize ("${e}") doesn't seem like a file size; cannot identify a unit (e.g. KB, GB)`);const[n]=t,r=Number(e.replace(n,""));if(Number.isNaN(r))throw new Error(`Could not parse a number out of input to parseFileSize ("${e}")`);const o=["B","KB","MB","GB","TB","PB"].indexOf(n);if(o===-1)throw new Error("parseFileSize does not support units above PB");return Math.ceil(r*1024**o)}const me=/(<%=|{{)(.+?)(%>|}})/g,ue=/<%\?(.+?)%>(.+?)<\/%>/g,le=Symbol("sps.utils.templateSrc");function bt(e){const t=n=>e.replace(ue,(r,o,i)=>N(n,o.trim())?i:"").replace(me,(r,o,i)=>N(n,i.trim(),""));return t[le]=e,t}function Ct(e){return typeof e=="string"&&(me.test(e)||ue.test(e))}function vt(e){return typeof e=="function"&&Object.prototype.hasOwnProperty.call(e,le)}exports.CustomEvent=We;exports.DiffChange=ae;exports.EDI_DOCUMENT_TYPE=ze;exports.Op=F;exports.castToNumber=He;exports.code=Rt;exports.constrain=Ye;exports.copyProperty=ee;exports.crumblePath=O;exports.debounce=Q;exports.debounced=Ke;exports.decimalRound=Z;exports.deepFreeze=re;exports.diff=oe;exports.flatten=J;exports.forEachEntryDeep=ie;exports.forEachNestedObject=ce;exports.getPath=N;exports.isSubset=_e;exports.isTemplate=Ct;exports.isTemplateFn=vt;exports.lockToAnimationFrames=Y;exports.lockedToAnimationFrames=Xe;exports.mergeDeep=L;exports.mergePropertiesDeep=B;exports.omit=pt;exports.onNextTick=$e;exports.parseFileSize=St;exports.range=Ue;exports.setPath=gt;exports.simpleMetadataDecoratorApplicator=Je;exports.template=bt;exports.tickDelay=Qe;exports.toFileSizeString=Ze;exports.traversePath=yt;exports.values=ht;
package/lib/index.es.js CHANGED
@@ -1,33 +1,17 @@
1
- function Q(e, t) {
2
- for (var n = 0; n < t.length; n++) {
3
- const r = t[n];
4
- if (typeof r != "string" && !Array.isArray(r)) {
5
- for (const a in r)
6
- if (a !== "default" && !(a in e)) {
7
- const i = Object.getOwnPropertyDescriptor(r, a);
8
- i && Object.defineProperty(e, a, i.get ? i : {
9
- enumerable: !0,
10
- get: () => r[a]
11
- });
12
- }
13
- }
14
- }
15
- return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
1
+ function Me(e) {
2
+ return Array.isArray(e) ? e.reduce((t, n) => t.concat(Me(n)), []) : e;
16
3
  }
17
- function Ne(e) {
18
- return Array.isArray(e) ? e.reduce((t, n) => t.concat(Ne(n)), []) : e;
19
- }
20
- function st(e, t) {
4
+ function nt(e, t) {
21
5
  const n = new Set(t);
22
6
  for (const r of e)
23
7
  if (!n.has(r))
24
8
  return !1;
25
9
  return !0;
26
10
  }
27
- function Le() {
11
+ function je() {
28
12
  return this.pending = !1, typeof this.id < "u" ? (clearTimeout(this.id), delete this.id, !0) : !1;
29
13
  }
30
- function Be(e, t, n) {
14
+ function De(e, t, n) {
31
15
  const r = function(...i) {
32
16
  return new Promise((c, m) => {
33
17
  r.reset(), r.pending = !0;
@@ -46,24 +30,24 @@ function Be(e, t, n) {
46
30
  r.id = window.setTimeout(h, t);
47
31
  });
48
32
  };
49
- return r.reset = Le.bind(r), r;
33
+ return r.reset = je.bind(r), r;
50
34
  }
51
- function _e() {
35
+ function ke() {
52
36
  return this.pending = !1, typeof this.id == "number" ? (window.cancelAnimationFrame(this.id), delete this.id, !0) : !1;
53
37
  }
54
- function qe(e, t) {
55
- const n = function(...a) {
38
+ function Fe(e, t) {
39
+ const n = function(...o) {
56
40
  n.pending && n.reset(), n.id = window.requestAnimationFrame(() => {
57
- e && e.apply(t || this, a), n.reset();
41
+ e && e.apply(t || this, o), n.reset();
58
42
  }), n.pending = !0;
59
43
  };
60
- return n.pending = !1, n.reset = _e.bind(n), n;
44
+ return n.pending = !1, n.reset = ke.bind(n), n;
61
45
  }
62
- function mt(e, t) {
46
+ function rt(e, t) {
63
47
  const n = t ? e.bind(t) : e;
64
48
  setTimeout(n, 0);
65
49
  }
66
- const z = {
50
+ const W = {
67
51
  // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
68
52
  add: (e, t) => e + t,
69
53
  and: (e, t) => e && t,
@@ -92,14 +76,14 @@ const z = {
92
76
  sub: (e, t) => e - t,
93
77
  xor: (e, t) => (e || t) && !(e && t)
94
78
  };
95
- function ut(e, t) {
79
+ function at(e, t) {
96
80
  if (!Number.isInteger(e))
97
81
  throw new Error("start must be an integer");
98
82
  if (!Number.isInteger(t))
99
83
  throw new Error("end must be an integer");
100
- return new Array(Math.abs(t - e) + 1).fill(e).map(e > t ? z.sub : z.add);
84
+ return new Array(Math.abs(t - e) + 1).fill(e).map(e > t ? W.sub : W.add);
101
85
  }
102
- class lt {
86
+ class ot {
103
87
  constructor(t, n = {}) {
104
88
  let r;
105
89
  if (typeof Event == "function")
@@ -110,16 +94,16 @@ class lt {
110
94
  i !== "bubbles" && i !== "cancelable" && (r[i] = n[i]);
111
95
  }
112
96
  Object.setPrototypeOf(this, r);
113
- const a = Object.getOwnPropertyDescriptors(Event.prototype);
114
- for (const i of Object.keys(a)) {
115
- const c = a[i];
97
+ const o = Object.getOwnPropertyDescriptors(Event.prototype);
98
+ for (const i of Object.keys(o)) {
99
+ const c = o[i];
116
100
  for (const m of Object.keys(c))
117
101
  typeof c[m] == "function" && (c[m] = c[m].bind(r));
118
102
  }
119
- Object.defineProperties(this, a);
103
+ Object.defineProperties(this, o);
120
104
  }
121
105
  }
122
- const ft = Object.freeze({
106
+ const it = Object.freeze({
123
107
  100: { name: "Insurance Plan Description" },
124
108
  101: { name: "Name and Address Lists" },
125
109
  104: { name: "Air Shipment Information" },
@@ -420,7 +404,7 @@ const ft = Object.freeze({
420
404
  998: { name: "Set Cancellation" },
421
405
  999: { name: "Implementation Acknowledgment" }
422
406
  });
423
- function dt() {
407
+ function ct() {
424
408
  return (e, t) => {
425
409
  const n = `_${String(t)}`;
426
410
  Object.defineProperties(e, {
@@ -443,32 +427,32 @@ function dt() {
443
427
  });
444
428
  };
445
429
  }
446
- function pt(e) {
430
+ function st(e) {
447
431
  return (t, n, r) => {
448
- const a = { ...r };
449
- return a.get = function() {
450
- const c = { ...a };
451
- return c.value = Be(a.value, e, this), Object.defineProperty(this, n, c), c.value;
452
- }, a.configurable = !0, delete a.writable, delete a.value, a;
432
+ const o = { ...r };
433
+ return o.get = function() {
434
+ const c = { ...o };
435
+ return c.value = De(o.value, e, this), Object.defineProperty(this, n, c), c.value;
436
+ }, o.configurable = !0, delete o.writable, delete o.value, o;
453
437
  };
454
438
  }
455
- function gt(e, t, n) {
439
+ function mt(e, t, n) {
456
440
  const r = { ...n };
457
441
  return n.get = function() {
458
442
  const i = { ...r };
459
- return i.value = qe(r.value, this), Object.defineProperty(this, t, i), i.value;
443
+ return i.value = Fe(r.value, this), Object.defineProperty(this, t, i), i.value;
460
444
  }, n.configurable = !0, delete n.writable, delete n.value, n;
461
445
  }
462
- function yt(e, t, n, r, a) {
463
- const i = a || Object.getOwnPropertyDescriptor(n, r), c = i.get, { value: m } = i;
446
+ function ut(e, t, n, r, o) {
447
+ const i = o || Object.getOwnPropertyDescriptor(n, r), c = i.get, { value: m } = i;
464
448
  return i.get = function() {
465
- const u = this, d = (m || c.call(this)).bind(this), S = { ...t, ...e };
449
+ const u = this, d = (m || c.call(this)).bind(this), b = { ...t, ...e };
466
450
  for (const p of Object.keys(t))
467
451
  typeof e[p] == "function" ? Object.defineProperty(d, p, {
468
452
  get() {
469
- return S[p](u);
453
+ return b[p](u);
470
454
  }
471
- }) : d[p] = S[p];
455
+ }) : d[p] = b[p];
472
456
  return Object.defineProperty(this, r, {
473
457
  writable: !0,
474
458
  configurable: !0,
@@ -477,24 +461,24 @@ function yt(e, t, n, r, a) {
477
461
  }), d;
478
462
  }, delete i.value, delete i.writable, i;
479
463
  }
480
- function Rt(e, t, n) {
464
+ function lt(e, t, n) {
481
465
  const r = { ...n };
482
466
  return r.get = function() {
483
467
  const i = { ...r }, c = r.value.bind(this);
484
468
  return i.value = () => setTimeout(c, 0), Object.defineProperty(this, t, i), i.value;
485
469
  }, r.configurable = !0, delete r.writable, delete r.value, r;
486
470
  }
487
- function ht(e, t) {
471
+ function ft(e, t) {
488
472
  return !e || e < t[0] ? t[0] : e > t[1] ? t[1] : e;
489
473
  }
490
- function xe(e, t = 0) {
474
+ function Ne(e, t = 0) {
491
475
  const n = String(e).split("."), r = n.length > 1 ? n[1].length : 0;
492
- let a = e;
476
+ let o = e;
493
477
  for (let i = r - 1; i >= t; i -= 1)
494
- a = +`${Math.round(+`${a}e${i}`)}e-${i}`;
495
- return a;
478
+ o = +`${Math.round(+`${o}e${i}`)}e-${i}`;
479
+ return o;
496
480
  }
497
- function bt(e, t = 2) {
481
+ function dt(e, t = 2) {
498
482
  if (e > Number.MAX_SAFE_INTEGER)
499
483
  throw new Error(
500
484
  "Number is greater than MAX_SAFE_INTEGER; toFileSizeString does not support orders of magnitude higher than petabytes for this reason until BigInt achieves broad browser support."
@@ -506,13 +490,13 @@ function bt(e, t = 2) {
506
490
  "GB",
507
491
  "TB",
508
492
  "PB"
509
- ][n], a = n ? t : 0;
510
- return xe(e / 1024 ** n, a).toFixed(a) + r;
493
+ ][n], o = n ? t : 0;
494
+ return Ne(e / 1024 ** n, o).toFixed(o) + r;
511
495
  }
512
496
  function k(e) {
513
497
  return typeof e == "string" ? e.match(/[^.[\]]+/g) || [] : [].concat(e);
514
498
  }
515
- function Ve(e, t, n) {
499
+ function Le(e, t, n) {
516
500
  Object.defineProperty(
517
501
  n,
518
502
  e,
@@ -523,8 +507,8 @@ var I = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : ty
523
507
  function F(e) {
524
508
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
525
509
  }
526
- var Ge = "[object Object]";
527
- function $e(e) {
510
+ var Be = "[object Object]";
511
+ function qe(e) {
528
512
  var t = !1;
529
513
  if (e != null && typeof e.toString != "function")
530
514
  try {
@@ -533,280 +517,273 @@ function $e(e) {
533
517
  }
534
518
  return t;
535
519
  }
536
- function Ue(e, t) {
520
+ function xe(e, t) {
537
521
  return function(n) {
538
522
  return e(t(n));
539
523
  };
540
524
  }
541
- var We = Function.prototype, Y = Object.prototype, Z = We.toString, ze = Y.hasOwnProperty, He = Z.call(Object), Ke = Y.toString, Xe = Ue(Object.getPrototypeOf, Object);
542
- function Je(e) {
525
+ var Ve = Function.prototype, J = Object.prototype, Q = Ve.toString, _e = J.hasOwnProperty, Ge = Q.call(Object), $e = J.toString, Ue = xe(Object.getPrototypeOf, Object);
526
+ function We(e) {
543
527
  return !!e && typeof e == "object";
544
528
  }
545
- function Qe(e) {
546
- if (!Je(e) || Ke.call(e) != Ge || $e(e))
529
+ function ze(e) {
530
+ if (!We(e) || $e.call(e) != Be || qe(e))
547
531
  return !1;
548
- var t = Xe(e);
532
+ var t = Ue(e);
549
533
  if (t === null)
550
534
  return !0;
551
- var n = ze.call(t, "constructor") && t.constructor;
552
- return typeof n == "function" && n instanceof n && Z.call(n) == He;
535
+ var n = _e.call(t, "constructor") && t.constructor;
536
+ return typeof n == "function" && n instanceof n && Q.call(n) == Ge;
553
537
  }
554
- var Ye = Qe;
555
- const f = /* @__PURE__ */ F(Ye);
556
- function Ze(e) {
538
+ var He = ze;
539
+ const f = /* @__PURE__ */ F(He);
540
+ function Ke(e) {
557
541
  Object.freeze(e);
558
542
  for (const t of Object.keys(e)) {
559
543
  const n = e[t];
560
- (f(n) || Array.isArray(n)) && Ze(n);
544
+ (f(n) || Array.isArray(n)) && Ke(n);
561
545
  }
562
546
  }
563
- var et = /* @__PURE__ */ ((e) => (e[e.ADDITION = 0] = "ADDITION", e[e.DELETION = 1] = "DELETION", e[e.ALTERATION = 2] = "ALTERATION", e))(et || {});
564
- function tt(e, t, n = []) {
547
+ var Xe = /* @__PURE__ */ ((e) => (e[e.ADDITION = 0] = "ADDITION", e[e.DELETION = 1] = "DELETION", e[e.ALTERATION = 2] = "ALTERATION", e))(Xe || {});
548
+ function Je(e, t, n = []) {
565
549
  let r = [];
566
- for (const a of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) {
567
- const i = Object.prototype.hasOwnProperty.call(e, a), c = Object.prototype.hasOwnProperty.call(t, a);
550
+ for (const o of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) {
551
+ const i = Object.prototype.hasOwnProperty.call(e, o), c = Object.prototype.hasOwnProperty.call(t, o);
568
552
  i && !c ? r.push({
569
553
  type: 1,
570
- key: a,
554
+ key: o,
571
555
  parentPath: n,
572
556
  objects: [e, t]
573
557
  }) : !i && c ? r.push({
574
558
  type: 0,
575
- key: a,
559
+ key: o,
576
560
  parentPath: n,
577
561
  objects: [e, t]
578
- }) : f(e[a]) && f(t[a]) || Array.isArray(e[a]) && Array.isArray(t[a]) ? r = r.concat(
579
- tt(
580
- e[a],
581
- t[a],
582
- [...n, a]
562
+ }) : f(e[o]) && f(t[o]) || Array.isArray(e[o]) && Array.isArray(t[o]) ? r = r.concat(
563
+ Je(
564
+ e[o],
565
+ t[o],
566
+ [...n, o]
583
567
  )
584
- ) : e[a] !== t[a] && r.push({
568
+ ) : e[o] !== t[o] && r.push({
585
569
  type: 2,
586
- key: a,
570
+ key: o,
587
571
  parentPath: n,
588
572
  objects: [e, t]
589
573
  });
590
574
  }
591
575
  return r;
592
576
  }
593
- function nt(e, t) {
577
+ function Qe(e, t) {
594
578
  for (const n of Object.keys(e)) {
595
579
  const r = e[n];
596
- f(r) || Array.isArray(r) ? nt(r, t) : t(n, r, e);
580
+ f(r) || Array.isArray(r) ? Qe(r, t) : t(n, r, e);
597
581
  }
598
582
  }
599
- function rt(e, t, n = []) {
583
+ function Ye(e, t, n = []) {
600
584
  t(n, e);
601
585
  for (const r of Object.keys(e)) {
602
- const a = e[r];
603
- if (f(a) || Array.isArray(a)) {
586
+ const o = e[r];
587
+ if (f(o) || Array.isArray(o)) {
604
588
  const i = n.concat(r);
605
- rt(a, t, i);
589
+ Ye(o, t, i);
606
590
  }
607
591
  }
608
592
  }
609
- function at(e) {
593
+ function Ze(e) {
610
594
  return e == null;
611
595
  }
612
- var ee = at;
613
- const te = /* @__PURE__ */ F(ee), ot = /* @__PURE__ */ Q({
614
- __proto__: null,
615
- default: te
616
- }, [ee]);
596
+ var et = Ze;
597
+ const z = /* @__PURE__ */ F(et);
617
598
  var A = { exports: {} };
618
599
  A.exports;
619
600
  (function(e, t) {
620
- var n = 9007199254740991, r = "[object Arguments]", a = "[object Function]", i = "[object GeneratorFunction]", c = "[object Map]", m = "[object Object]", h = "[object Promise]", u = "[object Set]", O = "[object WeakMap]", d = "[object DataView]", S = /[\\^$.*+?()[\]{}|]/g, p = /^\[object .+?Constructor\]$/, ce = typeof I == "object" && I && I.Object === Object && I, se = typeof self == "object" && self && self.Object === Object && self, g = ce || se || Function("return this")(), L = t && !t.nodeType && t, B = L && !0 && e && !e.nodeType && e, me = B && B.exports === L;
621
- function ue(o, s) {
622
- return o == null ? void 0 : o[s];
601
+ var n = 9007199254740991, r = "[object Arguments]", o = "[object Function]", i = "[object GeneratorFunction]", c = "[object Map]", m = "[object Object]", h = "[object Promise]", u = "[object Set]", O = "[object WeakMap]", d = "[object DataView]", b = /[\\^$.*+?()[\]{}|]/g, p = /^\[object .+?Constructor\]$/, ne = typeof I == "object" && I && I.Object === Object && I, re = typeof self == "object" && self && self.Object === Object && self, g = ne || re || Function("return this")(), N = t && !t.nodeType && t, L = N && !0 && e && !e.nodeType && e, ae = L && L.exports === N;
602
+ function oe(a, s) {
603
+ return a == null ? void 0 : a[s];
623
604
  }
624
- function le(o) {
605
+ function ie(a) {
625
606
  var s = !1;
626
- if (o != null && typeof o.toString != "function")
607
+ if (a != null && typeof a.toString != "function")
627
608
  try {
628
- s = !!(o + "");
609
+ s = !!(a + "");
629
610
  } catch {
630
611
  }
631
612
  return s;
632
613
  }
633
- function fe(o, s) {
614
+ function ce(a, s) {
634
615
  return function(l) {
635
- return o(s(l));
616
+ return a(s(l));
636
617
  };
637
618
  }
638
- var de = Function.prototype, C = Object.prototype, P = g["__core-js_shared__"], _ = function() {
639
- var o = /[^.]+$/.exec(P && P.keys && P.keys.IE_PROTO || "");
640
- return o ? "Symbol(src)_1." + o : "";
641
- }(), q = de.toString, T = C.hasOwnProperty, v = C.toString, pe = RegExp(
642
- "^" + q.call(T).replace(S, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
643
- ), x = me ? g.Buffer : void 0, V = C.propertyIsEnumerable, ge = x ? x.isBuffer : void 0, ye = fe(Object.keys, Object), E = b(g, "DataView"), w = b(g, "Map"), j = b(g, "Promise"), M = b(g, "Set"), D = b(g, "WeakMap"), Re = !V.call({ valueOf: 1 }, "valueOf"), he = R(E), be = R(w), Se = R(j), Ce = R(M), ve = R(D);
644
- function Ie(o) {
645
- return v.call(o);
619
+ var se = Function.prototype, C = Object.prototype, P = g["__core-js_shared__"], B = function() {
620
+ var a = /[^.]+$/.exec(P && P.keys && P.keys.IE_PROTO || "");
621
+ return a ? "Symbol(src)_1." + a : "";
622
+ }(), q = se.toString, T = C.hasOwnProperty, v = C.toString, me = RegExp(
623
+ "^" + q.call(T).replace(b, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
624
+ ), x = ae ? g.Buffer : void 0, V = C.propertyIsEnumerable, ue = x ? x.isBuffer : void 0, le = ce(Object.keys, Object), E = S(g, "DataView"), w = S(g, "Map"), M = S(g, "Promise"), j = S(g, "Set"), D = S(g, "WeakMap"), fe = !V.call({ valueOf: 1 }, "valueOf"), de = R(E), pe = R(w), ge = R(M), ye = R(j), Re = R(D);
625
+ function he(a) {
626
+ return v.call(a);
646
627
  }
647
- function Ae(o) {
648
- if (!U(o) || Oe(o))
628
+ function Se(a) {
629
+ if (!$(a) || be(a))
649
630
  return !1;
650
- var s = $(o) || le(o) ? pe : p;
651
- return s.test(R(o));
631
+ var s = G(a) || ie(a) ? me : p;
632
+ return s.test(R(a));
652
633
  }
653
- function b(o, s) {
654
- var l = ue(o, s);
655
- return Ae(l) ? l : void 0;
634
+ function S(a, s) {
635
+ var l = oe(a, s);
636
+ return Se(l) ? l : void 0;
656
637
  }
657
- var y = Ie;
658
- (E && y(new E(new ArrayBuffer(1))) != d || w && y(new w()) != c || j && y(j.resolve()) != h || M && y(new M()) != u || D && y(new D()) != O) && (y = function(o) {
659
- var s = v.call(o), l = s == m ? o.constructor : void 0, W = l ? R(l) : void 0;
660
- if (W)
661
- switch (W) {
662
- case he:
638
+ var y = he;
639
+ (E && y(new E(new ArrayBuffer(1))) != d || w && y(new w()) != c || M && y(M.resolve()) != h || j && y(new j()) != u || D && y(new D()) != O) && (y = function(a) {
640
+ var s = v.call(a), l = s == m ? a.constructor : void 0, U = l ? R(l) : void 0;
641
+ if (U)
642
+ switch (U) {
643
+ case de:
663
644
  return d;
664
- case be:
645
+ case pe:
665
646
  return c;
666
- case Se:
647
+ case ge:
667
648
  return h;
668
- case Ce:
649
+ case ye:
669
650
  return u;
670
- case ve:
651
+ case Re:
671
652
  return O;
672
653
  }
673
654
  return s;
674
655
  });
675
- function Oe(o) {
676
- return !!_ && _ in o;
656
+ function be(a) {
657
+ return !!B && B in a;
677
658
  }
678
- function Pe(o) {
679
- var s = o && o.constructor, l = typeof s == "function" && s.prototype || C;
680
- return o === l;
659
+ function Ce(a) {
660
+ var s = a && a.constructor, l = typeof s == "function" && s.prototype || C;
661
+ return a === l;
681
662
  }
682
- function R(o) {
683
- if (o != null) {
663
+ function R(a) {
664
+ if (a != null) {
684
665
  try {
685
- return q.call(o);
666
+ return q.call(a);
686
667
  } catch {
687
668
  }
688
669
  try {
689
- return o + "";
670
+ return a + "";
690
671
  } catch {
691
672
  }
692
673
  }
693
674
  return "";
694
675
  }
695
- function Te(o) {
696
- return we(o) && T.call(o, "callee") && (!V.call(o, "callee") || v.call(o) == r);
676
+ function ve(a) {
677
+ return Ae(a) && T.call(a, "callee") && (!V.call(a, "callee") || v.call(a) == r);
697
678
  }
698
- var Ee = Array.isArray;
699
- function G(o) {
700
- return o != null && De(o.length) && !$(o);
679
+ var Ie = Array.isArray;
680
+ function _(a) {
681
+ return a != null && Te(a.length) && !G(a);
701
682
  }
702
- function we(o) {
703
- return ke(o) && G(o);
683
+ function Ae(a) {
684
+ return Ee(a) && _(a);
704
685
  }
705
- var je = ge || Fe;
706
- function Me(o) {
707
- if (G(o) && (Ee(o) || typeof o == "string" || typeof o.splice == "function" || je(o) || Te(o)))
708
- return !o.length;
709
- var s = y(o);
686
+ var Oe = ue || we;
687
+ function Pe(a) {
688
+ if (_(a) && (Ie(a) || typeof a == "string" || typeof a.splice == "function" || Oe(a) || ve(a)))
689
+ return !a.length;
690
+ var s = y(a);
710
691
  if (s == c || s == u)
711
- return !o.size;
712
- if (Re || Pe(o))
713
- return !ye(o).length;
714
- for (var l in o)
715
- if (T.call(o, l))
692
+ return !a.size;
693
+ if (fe || Ce(a))
694
+ return !le(a).length;
695
+ for (var l in a)
696
+ if (T.call(a, l))
716
697
  return !1;
717
698
  return !0;
718
699
  }
719
- function $(o) {
720
- var s = U(o) ? v.call(o) : "";
721
- return s == a || s == i;
700
+ function G(a) {
701
+ var s = $(a) ? v.call(a) : "";
702
+ return s == o || s == i;
722
703
  }
723
- function De(o) {
724
- return typeof o == "number" && o > -1 && o % 1 == 0 && o <= n;
704
+ function Te(a) {
705
+ return typeof a == "number" && a > -1 && a % 1 == 0 && a <= n;
725
706
  }
726
- function U(o) {
727
- var s = typeof o;
728
- return !!o && (s == "object" || s == "function");
707
+ function $(a) {
708
+ var s = typeof a;
709
+ return !!a && (s == "object" || s == "function");
729
710
  }
730
- function ke(o) {
731
- return !!o && typeof o == "object";
711
+ function Ee(a) {
712
+ return !!a && typeof a == "object";
732
713
  }
733
- function Fe() {
714
+ function we() {
734
715
  return !1;
735
716
  }
736
- e.exports = Me;
717
+ e.exports = Pe;
737
718
  })(A, A.exports);
738
- var ne = A.exports;
739
- const N = /* @__PURE__ */ F(ne), re = /* @__PURE__ */ Q({
740
- __proto__: null,
741
- default: N
742
- }, [ne]), H = te || ot, it = N || re;
743
- function K(e, t, n, r = !1) {
744
- if (it(t))
719
+ var tt = A.exports;
720
+ const Y = /* @__PURE__ */ F(tt);
721
+ function H(e, t, n, r = !1) {
722
+ if (Y(t))
745
723
  return e;
746
- let a = e;
724
+ let o = e;
747
725
  for (const i of k(t)) {
748
726
  let c = i, m;
749
727
  if (typeof i == "string" && ([
750
728
  ,
751
729
  c,
752
730
  m
753
- ] = /^([^?]+)(\?)?$/.exec(i)), a = a[c], H(a) && (m || r))
731
+ ] = /^([^?]+)(\?)?$/.exec(i)), o = o[c], z(o) && (m || r))
754
732
  return n;
755
733
  }
756
- return H(a) ? n : a;
734
+ return z(o) ? n : o;
757
735
  }
758
- function St(e, ...t) {
736
+ function pt(e, ...t) {
759
737
  const n = new Set(t), r = {};
760
- for (const a of Object.keys(e))
761
- n.has(a) || (r[a] = e[a]);
738
+ for (const o of Object.keys(e))
739
+ n.has(o) || (r[o] = e[o]);
762
740
  return r;
763
741
  }
764
- const ct = N || re;
765
- function Ct(e, t, n) {
742
+ function gt(e, t, n) {
766
743
  if (typeof e != "object")
767
744
  throw new Error("object is required");
768
- if (ct(t))
745
+ if (Y(t))
769
746
  throw new Error("path is required");
770
- const r = k(t), a = r.splice(r.length - 1, 1)[0];
747
+ const r = k(t), o = r.splice(r.length - 1, 1)[0];
771
748
  let i = e;
772
749
  for (const c of r)
773
750
  if (i = i[c], typeof i != "object")
774
751
  throw new Error(`Cannot set value at given path: Path deadends at ${String(c)}`);
775
- i[a] = n;
752
+ i[o] = n;
776
753
  }
777
- function* vt(e, t) {
754
+ function* yt(e, t) {
778
755
  yield e;
779
756
  let n = e;
780
757
  for (const r of k(t))
781
758
  n = n[r], yield n;
782
759
  }
783
- function X(...e) {
760
+ function K(...e) {
784
761
  const t = {};
785
762
  for (const n of e)
786
763
  for (const r of Object.keys(n))
787
- Object.prototype.hasOwnProperty.call(t, r) && Object.getOwnPropertyDescriptor(t, r).writable && f(t[r]) ? t[r] = X(t[r], n[r]) : f(n[r]) ? t[r] = X({}, n[r]) : t[r] = n[r];
764
+ Object.prototype.hasOwnProperty.call(t, r) && Object.getOwnPropertyDescriptor(t, r).writable && f(t[r]) ? t[r] = K(t[r], n[r]) : f(n[r]) ? t[r] = K({}, n[r]) : t[r] = n[r];
788
765
  return t;
789
766
  }
790
- function J(...e) {
767
+ function X(...e) {
791
768
  const t = {};
792
769
  for (const n of e)
793
770
  for (const r of Object.keys(n))
794
- Object.prototype.hasOwnProperty.call(t, r) && Object.getOwnPropertyDescriptor(t, r).writable && f(t[r]) ? t[r] = J(t[r], n[r]) : f(n[r]) ? t[r] = J({}, n[r]) : Ve(r, n, t);
771
+ Object.prototype.hasOwnProperty.call(t, r) && Object.getOwnPropertyDescriptor(t, r).writable && f(t[r]) ? t[r] = X(t[r], n[r]) : f(n[r]) ? t[r] = X({}, n[r]) : Le(r, n, t);
795
772
  return t;
796
773
  }
797
- function It(e) {
774
+ function Rt(e) {
798
775
  const t = [];
799
776
  for (const n of Object.keys(e))
800
777
  t.push(e[n]);
801
778
  return t;
802
779
  }
803
- function At(e, ...t) {
804
- const n = e.reduce((a, i, c) => `${a}${c <= t.length ? String(t[c - 1]) : ""}${i}`), r = Math.min(
805
- ...n.split(/[\r\n]/).filter((a) => a.trim()).map((a) => /^ */.exec(a)[0].length)
780
+ function ht(e, ...t) {
781
+ const n = e.reduce((o, i, c) => `${o}${c <= t.length ? String(t[c - 1]) : ""}${i}`), r = Math.min(
782
+ ...n.split(/[\r\n]/).filter((o) => o.trim()).map((o) => /^ */.exec(o)[0].length)
806
783
  );
807
784
  return n.replace(new RegExp(`^ {${r}}`, "gm"), "").trim();
808
785
  }
809
- function Ot(e) {
786
+ function St(e) {
810
787
  const t = /[A-Z]?B$/.exec(e);
811
788
  if (!t)
812
789
  throw new Error(
@@ -815,7 +792,7 @@ function Ot(e) {
815
792
  const [n] = t, r = Number(e.replace(n, ""));
816
793
  if (Number.isNaN(r))
817
794
  throw new Error(`Could not parse a number out of input to parseFileSize ("${e}")`);
818
- const a = [
795
+ const o = [
819
796
  "B",
820
797
  "KB",
821
798
  "MB",
@@ -823,56 +800,56 @@ function Ot(e) {
823
800
  "TB",
824
801
  "PB"
825
802
  ].indexOf(n);
826
- if (a === -1)
803
+ if (o === -1)
827
804
  throw new Error("parseFileSize does not support units above PB");
828
- return Math.ceil(r * 1024 ** a);
805
+ return Math.ceil(r * 1024 ** o);
829
806
  }
830
- const ae = /(<%=|{{)(.+?)(%>|}})/g, oe = /<%\?(.+?)%>(.+?)<\/%>/g, ie = Symbol("sps.utils.templateSrc");
831
- function Pt(e) {
832
- const t = (n) => e.replace(oe, (r, a, i) => K(n, a.trim()) ? i : "").replace(ae, (r, a, i) => K(n, i.trim(), ""));
833
- return t[ie] = e, t;
807
+ const Z = /(<%=|{{)(.+?)(%>|}})/g, ee = /<%\?(.+?)%>(.+?)<\/%>/g, te = Symbol("sps.utils.templateSrc");
808
+ function bt(e) {
809
+ const t = (n) => e.replace(ee, (r, o, i) => H(n, o.trim()) ? i : "").replace(Z, (r, o, i) => H(n, i.trim(), ""));
810
+ return t[te] = e, t;
834
811
  }
835
- function Tt(e) {
836
- return typeof e == "string" && (ae.test(e) || oe.test(e));
812
+ function Ct(e) {
813
+ return typeof e == "string" && (Z.test(e) || ee.test(e));
837
814
  }
838
- function Et(e) {
839
- return typeof e == "function" && Object.prototype.hasOwnProperty.call(e, ie);
815
+ function vt(e) {
816
+ return typeof e == "function" && Object.prototype.hasOwnProperty.call(e, te);
840
817
  }
841
818
  export {
842
- lt as CustomEvent,
843
- et as DiffChange,
844
- ft as EDI_DOCUMENT_TYPE,
845
- z as Op,
846
- dt as castToNumber,
847
- At as code,
848
- ht as constrain,
849
- Ve as copyProperty,
819
+ ot as CustomEvent,
820
+ Xe as DiffChange,
821
+ it as EDI_DOCUMENT_TYPE,
822
+ W as Op,
823
+ ct as castToNumber,
824
+ ht as code,
825
+ ft as constrain,
826
+ Le as copyProperty,
850
827
  k as crumblePath,
851
- Be as debounce,
852
- pt as debounced,
853
- xe as decimalRound,
854
- Ze as deepFreeze,
855
- tt as diff,
856
- Ne as flatten,
857
- nt as forEachEntryDeep,
858
- rt as forEachNestedObject,
859
- K as getPath,
860
- st as isSubset,
861
- Tt as isTemplate,
862
- Et as isTemplateFn,
863
- qe as lockToAnimationFrames,
864
- gt as lockedToAnimationFrames,
865
- X as mergeDeep,
866
- J as mergePropertiesDeep,
867
- St as omit,
868
- mt as onNextTick,
869
- Ot as parseFileSize,
870
- ut as range,
871
- Ct as setPath,
872
- yt as simpleMetadataDecoratorApplicator,
873
- Pt as template,
874
- Rt as tickDelay,
875
- bt as toFileSizeString,
876
- vt as traversePath,
877
- It as values
828
+ De as debounce,
829
+ st as debounced,
830
+ Ne as decimalRound,
831
+ Ke as deepFreeze,
832
+ Je as diff,
833
+ Me as flatten,
834
+ Qe as forEachEntryDeep,
835
+ Ye as forEachNestedObject,
836
+ H as getPath,
837
+ nt as isSubset,
838
+ Ct as isTemplate,
839
+ vt as isTemplateFn,
840
+ Fe as lockToAnimationFrames,
841
+ mt as lockedToAnimationFrames,
842
+ K as mergeDeep,
843
+ X as mergePropertiesDeep,
844
+ pt as omit,
845
+ rt as onNextTick,
846
+ St as parseFileSize,
847
+ at as range,
848
+ gt as setPath,
849
+ ut as simpleMetadataDecoratorApplicator,
850
+ bt as template,
851
+ lt as tickDelay,
852
+ dt as toFileSizeString,
853
+ yt as traversePath,
854
+ Rt as values
878
855
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spscommerce/utils",
3
3
  "description": "Utility items for frontend projects.",
4
- "version": "7.0.0",
4
+ "version": "7.0.1",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/utils",
Binary file