From e57393c7929bd5d7aee9bd10f6414351073dece2 Mon Sep 17 00:00:00 2001 From: nobody Date: Sat, 19 Nov 2022 07:40:55 +0100 Subject: [PATCH 1/2] v2.6.41 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 79aa46fd..6bffe53a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "LocalCDN", - "version": "2.6.40", + "version": "2.6.41", "browser_specific_settings": { "gecko": { "id": "{b86e4813-687a-43e6-ab65-0bde4ab75758}", From f33ad5e39b3a930c55ae2298167777248aa9d17b Mon Sep 17 00:00:00 2001 From: nobody Date: Wed, 23 Nov 2022 06:14:29 +0100 Subject: [PATCH 2/2] Added: knockout.mapping v2.4.1 (#1210) --- THIRD_PARTY.txt | 1 + core/mappings.js | 1 + core/resources.js | 4 ++++ modules/internal/targets.js | 2 ++ resources/knockout.mapping/2.4.1/knockout.mapping.min.jsm | 1 + 5 files changed, 9 insertions(+) create mode 100644 resources/knockout.mapping/2.4.1/knockout.mapping.min.jsm diff --git a/THIRD_PARTY.txt b/THIRD_PARTY.txt index 6e092d80..a48dc64d 100644 --- a/THIRD_PARTY.txt +++ b/THIRD_PARTY.txt @@ -1252,6 +1252,7 @@ https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.1/js.cookie.min.js https://cdnjs.cloudflare.com/ajax/libs/jScrollPane/2.2.2/script/jquery.jscrollpane.min.js https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.2/knockout-min.js https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.1/knockout-latest.min.js +https://cdnjs.cloudflare.com/ajax/libs/knockout.mapping/2.4.1/knockout.mapping.min.js https://cdnjs.cloudflare.com/ajax/libs/lazysizes/4.1.8/lazysizes.min.js https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.3.2/lazysizes.min.js https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css diff --git a/core/mappings.js b/core/mappings.js index 47828913..577a95d5 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -377,6 +377,7 @@ mappings.cdn = { 'jScrollPane/{version}/script/jquery.jscrollpane.': resources.jScrollPane, 'js-cookie/{version}/js.cookie.min.js': resources.jscookie, 'knockout/{version}/knockout': resources.knockout, + 'knockout.mapping/{version}/knockout.mapping.': resources.knockoutMapping, 'lazysizes/{version}/lazysizes.min.js': resources.lazysizes, 'leaflet/{version}/leaflet.js': resources.leafletJS, 'leaflet/{version}/leaflet.css': resources.leafletCSS, diff --git a/core/resources.js b/core/resources.js index 39f293c8..6c1b4433 100644 --- a/core/resources.js +++ b/core/resources.js @@ -676,6 +676,10 @@ var resources = { 'knockout': { 'path': 'resources/knockout/{version}/knockout-min.jsm' }, + // knockout.mapping + 'knockoutMapping': { + 'path': 'resources/knockout.mapping/{version}/knockout.mapping.min.jsm' + }, // lazysizes 'lazysizes': { 'path': 'resources/lazysizes/{version}/lazysizes.min.jsm' diff --git a/modules/internal/targets.js b/modules/internal/targets.js index f2f2789c..8bf720f2 100644 --- a/modules/internal/targets.js +++ b/modules/internal/targets.js @@ -307,6 +307,7 @@ targets.setLastVersion = function (type, version) { if (helpers.compareVersion('3.4.2', version)) return '3.4.2'; // <= v3.4.2 return '3.5.1'; } + if (type.startsWith('/knockout.mapping/2.')) return '2.4.1'; if (type.startsWith('/lazysizes/4.')) return '4.1.8'; if (type.startsWith('/lazysizes/5.')) return '5.3.2'; if (type.startsWith('/leaflet/0.')) return '0.7.7'; @@ -494,6 +495,7 @@ targets.determineResourceName = function (filename) { }; const ListOfFiles = { + 'knockout.mapping.min.jsm': 'knockout.mapping', 'jquery.colorbox-min.jsm': 'Colorbox', 'rangeslider.min.css': 'rangeslider.js (CSS)', 'rangeslider.min.jsm': 'rangeslider.js (JS)', diff --git a/resources/knockout.mapping/2.4.1/knockout.mapping.min.jsm b/resources/knockout.mapping/2.4.1/knockout.mapping.min.jsm new file mode 100644 index 00000000..51a40499 --- /dev/null +++ b/resources/knockout.mapping/2.4.1/knockout.mapping.min.jsm @@ -0,0 +1 @@ +(function(a){if(typeof require==="function"&&typeof exports==="object"&&typeof module==="object"){a(require("knockout"),exports)}else{if(typeof define==="function"&&define.amd){define(["knockout","exports"],a)}else{a(ko,ko.mapping={})}}}(function(b,B){var d=true;var n="__ko_mapping__";var i=b.dependentObservable;var q=0;var m;var v;var a=["create","update","key","arrayChanged"];var r={};var h={include:["_destroy"],ignore:[],copy:[],observe:[]};var w=h;function o(C,H){var G={};for(var F=C.length-1;F>=0;--F){G[C[F]]=C[F]}for(var F=H.length-1;F>=0;--F){G[H[F]]=H[F]}var E=[];for(var D in G){E.push(G[D])}return E}function p(C,F){var G;for(var D in F){if(F.hasOwnProperty(D)&&F[D]){G=B.getType(C[D]);if(D&&C[D]&&G!=="array"&&G!=="string"){p(C[D],F[D])}else{var E=B.getType(C[D])==="array"&&B.getType(F[D])==="array";if(E){C[D]=o(C[D],F[D])}else{C[D]=F[D]}}}}}function g(E,D){var C={};p(C,E);p(C,D);return C}B.isMapped=function(D){var C=b.utils.unwrapObservable(D);return C&&C[n]};B.fromJS=function(D){if(arguments.length==0){throw new Error("When calling ko.fromJS, pass the object you want to convert.")}try{if(!q++){m=[];v=new c()}var F;var H;if(arguments.length==2){if(arguments[1][n]){H=arguments[1]}else{F=arguments[1]}}if(arguments.length==3){F=arguments[1];H=arguments[2]}if(H){F=g(F,H[n])}F=s(F);var C=x(H,D,F);if(H){C=H}if(!--q){while(m.length){var E=m.pop();if(E){E();E.__DO.throttleEvaluation=E.throttleEvaluation}}}C[n]=g(C[n],F);return C}catch(G){q=0;throw G}};B.fromJSON=function(D){var C=b.utils.parseJson(D);arguments[0]=C;return B.fromJS.apply(this,arguments)};B.updateFromJS=function(C){throw new Error("ko.mapping.updateFromJS, use ko.mapping.fromJS instead. Please note that the order of parameters is different!")};B.updateFromJSON=function(C){throw new Error("ko.mapping.updateFromJSON, use ko.mapping.fromJSON instead. Please note that the order of parameters is different!")};B.toJS=function(D,C){if(!w){B.resetDefaultOptions()}if(arguments.length==0){throw new Error("When calling ko.mapping.toJS, pass the object you want to convert.")}if(B.getType(w.ignore)!=="array"){throw new Error("ko.mapping.defaultOptions().ignore should be an array.")}if(B.getType(w.include)!=="array"){throw new Error("ko.mapping.defaultOptions().include should be an array.")}if(B.getType(w.copy)!=="array"){throw new Error("ko.mapping.defaultOptions().copy should be an array.")}C=s(C,D[n]);return B.visitModel(D,function(E){return b.utils.unwrapObservable(E)},C)};B.toJSON=function(E,C){var D=B.toJS(E,C);return b.utils.stringifyJson(D)};B.defaultOptions=function(){if(arguments.length>0){w=arguments[0]}else{return w}};B.resetDefaultOptions=function(){w={include:h.include.slice(0),ignore:h.ignore.slice(0),copy:h.copy.slice(0)}};B.getType=function(C){if((C)&&(typeof(C)==="object")){if(C.constructor===Date){return"date"}if(C.constructor===Array){return"array"}}return typeof C};function s(F,C){var D=g({},F);for(var E=a.length-1;E>=0;E--){var G=a[E];if(!D[G]){continue}if(!(D[""] instanceof Object)){D[""]={}}D[""][G]=D[G];delete D[G]}if(C){D.ignore=k(C.ignore,D.ignore);D.include=k(C.include,D.include);D.copy=k(C.copy,D.copy);D.observe=k(C.observe,D.observe)}D.ignore=k(D.ignore,w.ignore);D.include=k(D.include,w.include);D.copy=k(D.copy,w.copy);D.observe=k(D.observe,w.observe);D.mappedProperties=D.mappedProperties||{};D.copiedProperties=D.copiedProperties||{};return D}function k(D,C){if(B.getType(D)!=="array"){if(B.getType(D)==="undefined"){D=[]}else{D=[D]}}if(B.getType(C)!=="array"){if(B.getType(C)==="undefined"){C=[]}else{C=[C]}}return b.utils.arrayGetDistinctValues(D.concat(C))}function f(D,F){var E=b.dependentObservable;b.dependentObservable=function(M,G,J){J=J||{};if(M&&typeof M=="object"){J=M}var I=J.deferEvaluation;var H=false;var L=function(N){var P=b.dependentObservable;b.dependentObservable=i;var Q=b.isWriteableObservable(N);b.dependentObservable=P;var O=i({read:function(){if(!H){b.utils.arrayRemoveItem(D,N);H=true}return N.apply(N,arguments)},write:Q&&function(R){return N(R)},deferEvaluation:true});if(d){O._wrapper=true}O.__DO=N;return O};J.deferEvaluation=true;var K=new i(M,G,J);if(!I){K=L(K);D.push(K)}return K};b.dependentObservable.fn=i.fn;b.computed=b.dependentObservable;var C=F();b.dependentObservable=E;b.computed=b.dependentObservable;return C}function x(ai,E,T,aj,H,C,al){var S=B.getType(b.utils.unwrapObservable(E))==="array";C=C||"";if(B.isMapped(ai)){var G=b.utils.unwrapObservable(ai)[n];T=g(G,T)}var ae={data:E,parent:al||H};var R=function(){return T[aj]&&T[aj].create instanceof Function};var J=function(an){return f(m,function(){if(b.utils.unwrapObservable(H) instanceof Array){return T[aj].create({data:an||ae.data,parent:ae.parent,skip:r})}else{return T[aj].create({data:an||ae.data,parent:ae.parent})}})};var aa=function(){return T[aj]&&T[aj].update instanceof Function};var P=function(ao,an){var ap={data:an||ae.data,parent:ae.parent,target:b.utils.unwrapObservable(ao)};if(b.isWriteableObservable(ao)){ap.observable=ao}return T[aj].update(ap)};var Y=v.get(E);if(Y){return Y}aj=aj||"";if(!S){if(!t(E)){switch(B.getType(E)){case"function":if(aa()){if(b.isWriteableObservable(E)){E(P(E));ai=E}else{ai=P(E)}}else{ai=E}break;default:if(b.isWriteableObservable(ai)){if(aa()){var V=P(ai);ai(V);return V}else{var V=b.utils.unwrapObservable(E);ai(V);return V}}else{var ab=R()||aa();if(R()){ai=J()}else{ai=b.observable(b.utils.unwrapObservable(E))}if(aa()){ai(P(ai))}if(ab){return ai}}}}else{ai=b.utils.unwrapObservable(ai);if(!ai){if(R()){var N=J();if(aa()){N=P(N)}return N}else{if(aa()){return P(N)}ai={}}}if(aa()){ai=P(ai)}v.save(E,ai);if(aa()){return ai}z(E,function(ao){var ar=C.length?C+"."+ao:ao;if(b.utils.arrayIndexOf(T.ignore,ar)!=-1){return}if(b.utils.arrayIndexOf(T.copy,ar)!=-1){ai[ao]=E[ao];return}if(typeof E[ao]!="object"&&typeof E[ao]!="array"&&T.observe.length>0&&b.utils.arrayIndexOf(T.observe,ar)==-1){ai[ao]=E[ao];T.copiedProperties[ar]=true;return}var aq=v.get(E[ao]);var an=x(ai[ao],E[ao],T,ao,ai,ar,ai);var ap=aq||an;if(T.observe.length>0&&b.utils.arrayIndexOf(T.observe,ar)==-1){ai[ao]=ap();T.copiedProperties[ar]=true;return}if(b.isWriteableObservable(ai[ao])){ap=b.utils.unwrapObservable(ap);if(ai[ao]()!==ap){ai[ao](ap)}}else{ap=ai[ao]===undefined?ap:b.utils.unwrapObservable(ap);ai[ao]=ap}T.mappedProperties[ar]=true})}}else{var O=[];var L=false;var U=function(an){return an};if(T[aj]&&T[aj].key){U=T[aj].key;L=true}if(!b.isObservable(ai)){ai=b.observableArray([]);ai.mappedRemove=function(ao){var an=typeof ao=="function"?ao:function(ap){return ap===U(ao)};return ai.remove(function(ap){return an(U(ap))})};ai.mappedRemoveAll=function(ao){var an=u(ao,U);return ai.remove(function(ap){return b.utils.arrayIndexOf(an,U(ap))!=-1})};ai.mappedDestroy=function(ao){var an=typeof ao=="function"?ao:function(ap){return ap===U(ao)};return ai.destroy(function(ap){return an(U(ap))})};ai.mappedDestroyAll=function(ao){var an=u(ao,U);return ai.destroy(function(ap){return b.utils.arrayIndexOf(an,U(ap))!=-1})};ai.mappedIndexOf=function(ap){var ao=u(ai(),U);var an=U(ap);return b.utils.arrayIndexOf(ao,an)};ai.mappedGet=function(an){return ai()[ai.mappedIndexOf(an)]};ai.mappedCreate=function(ao){if(ai.mappedIndexOf(ao)!==-1){throw new Error("There already is an object with the key that you specified.")}var an=R()?J(ao):ao;if(aa()){var ap=P(an,ao);if(b.isWriteableObservable(an)){an(ap)}else{an=ap}}ai.push(an);return an}}var W=u(b.utils.unwrapObservable(ai),U).sort();var K=u(E,U);if(L){K.sort()}var ac=b.utils.compareArrays(W,K);var am={};var ah,ag;var F=b.utils.unwrapObservable(E);var Q={};var ad=true;for(ah=0,ag=F.length;ah=0){C[E]=G}else{D.push(F);C.push(G)}};this.get=function(F){var E=b.utils.arrayIndexOf(D,F);var G=(E>=0)?C[E]:undefined;return G}}function c(){var C={};var D=function(F){var E;try{E=F}catch(G){E="$$$"}var H=C[E];if(H===undefined){H=new A();C[E]=H}return H};this.save=function(E,F){D(E).save(E,F)};this.get=function(E){return D(E).get(E)}}})); \ No newline at end of file