conflict_resolution
stringlengths
27
16k
<<<<<<< import HeatmapLayer from './heatmapLayer'; ======= import HeatMapLayer from './heatmap'; >>>>>>> import HeatmapLayer from './heatmapLayer'; import HeatMapLayer from './heatmap'; <<<<<<< registerLayer('HeatmapLayer', HeatmapLayer); ======= registerLayer('HeatMapLayer', HeatMapLayer); >>>>>>> registerLayer('HeatMapLayer', HeatMapLayer); registerLayer('HeatmapLayer', HeatmapLayer); <<<<<<< export { default as PolygonLayer } from './polygonLayer'; export { default as PointLayer } from './pointLayer'; export { default as LineLayer } from './lineLayer'; export { default as ImageLayer } from './imageLayer'; export { default as RasterLayer } from './rasterLayer'; export { default as HeatmapLayer } from './heatmapLayer'; ======= >>>>>>>
<<<<<<< /* * @Author: ThinkGIS * @Date: 2018-06-08 11:19:06 * @Last Modified by: mikey.zhaopeng * @Last Modified time: 2019-02-25 20:58:08 */ ======= >>>>>>> <<<<<<< import { aProjectFlat } from '../geo/project'; import { getTransform, getParser } from '../source'; ======= import { getMap } from '../map/index'; >>>>>>> import { getTransform, getParser } from '../source'; import { getMap } from '../map/index';
<<<<<<< import HeatmapLayer from './heatmapLayer'; ======= import HeatMapLayer from './heatmap'; >>>>>>> import HeatmapLayer from './heatmapLayer'; import HeatMapLayer from './heatmap'; <<<<<<< registerLayer('HeatmapLayer', HeatmapLayer); ======= registerLayer('HeatMapLayer', HeatMapLayer); >>>>>>> registerLayer('HeatMapLayer', HeatMapLayer); registerLayer('HeatmapLayer', HeatmapLayer); <<<<<<< export { default as PolygonLayer } from './polygonLayer'; export { default as PointLayer } from './pointLayer'; export { default as LineLayer } from './lineLayer'; export { default as ImageLayer } from './imageLayer'; export { default as RasterLayer } from './rasterLayer'; export { default as HeatmapLayer } from './heatmapLayer'; ======= >>>>>>>
<<<<<<< StreamingPlugin.prototype.watch = function(mountpointId, watchOptions, answerOptions) { var plugin = this; var body = Helpers.extend({ request: 'watch', id: mountpointId }, watchOptions); return this.sendWithTransaction({body: body}) .then(function(response) { var jsep = response['jsep']; if (!jsep || 'offer' != jsep['type']) { throw new Error('Expect offer response on watch request') } plugin._currentMountpointId = mountpointId; return plugin._startMediaStreaming(jsep, answerOptions).return(response); }); ======= StreamingPlugin.prototype.watch = function(id, watchOptions, answerOptions) { return this._watch(id, watchOptions, answerOptions); >>>>>>> StreamingPlugin.prototype.watch = function(id, watchOptions, answerOptions) { return this._watch(id, watchOptions, answerOptions); <<<<<<< return this.sendWithTransaction({body: {request: 'stop'}}) .then(function(response) { this._currentMountpointId = null; return response; }.bind(this)); ======= return this._stop(); >>>>>>> return this._stop(); <<<<<<< var body = Helpers.extend({ request: 'switch', id: mountpointId }, options); return this.sendWithTransaction({body: body}) .then(function(response) { this._currentMountpointId = mountpointId; return response; }.bind(this)); }; /** * @param {number} mountpointId * @param {Object} [watchOptions] {@link watch} * @param {Object} [answerOptions] {@link createAnswer} * @promise {Object} response */ StreamingPlugin.prototype.connect = function(mountpointId, watchOptions, answerOptions) { if (mountpointId == this._currentMountpointId) { return Promise.resolve(); } if (this._currentMountpointId) { return this.switch(mountpointId, watchOptions); } return this.watch(mountpointId, watchOptions, answerOptions); ======= return this._switch(mountpointId, options); >>>>>>> return this._switch(mountpointId, options); <<<<<<< /** * @param {RTCSessionDescription} jsep * @param {RTCAnswerOptions} [answerOptions] * @promise when start message is sent */ StreamingPlugin.prototype._startMediaStreaming = function(jsep, answerOptions) { var self = this; return Promise .try(function() { self.createPeerConnection(); }) .then(function() { return self.createAnswer(jsep, answerOptions); }) .then(function(jsep) { return self.send({janus: 'message', body: {request: 'start'}, jsep: jsep}); }); }; ======= >>>>>>>
<<<<<<< }, json2Properties: function(properties, jsonObj, initStr) { var newKey; for (var key in jsonObj) { newKey = initStr ? initStr + "." + key : key; if (typeof jsonObj[key] === "object") { properties = transformationUtil.json2Properties(properties, jsonObj[key], newKey); } else { properties[newKey] = jsonObj[key]; } } return properties; ======= }, json2Properties: function(properties, obj, keyChain){ var key, newChain, value; if (!obj) { return false; } for (key in obj) { newChain = keyChain.concat(key); value = obj[key]; if (typeof value === "object") { this.json2Properties(properties, value, newChain); } else { properties.push(newChain.join(".") + "=" + value); } } return properties; >>>>>>> }, json2Properties: function(properties, jsonObj, initStr) { var key, newKey; for (key in jsonObj) { newKey = initStr ? initStr + "." + key : key; if (typeof jsonObj[key] === "object") { properties = transformationUtil.json2Properties(properties, jsonObj[key], newKey); } else { properties[newKey] = jsonObj[key]; } } return properties;
<<<<<<< var data = [{ ======= var initialWeightHalfAverageArea = d3VoronoiMapInitialWeightHalfAverageArea(), voronoiMap = d3VoronoiMap.voronoiMap(), data = [{ >>>>>>> var initialWeightHalfAverageArea = d3VoronoiMapInitialWeightHalfAverageArea(), data = [{ <<<<<<< test.equal(halfAverageAreaInitialWeight(data[0], 0, data, voronoiMapSimulation), 1.5); ======= test.equal(initialWeightHalfAverageArea(data[0], 0, data, voronoiMap), 0.25); >>>>>>> test.equal(initialWeightHalfAverageArea(data[0], 0, data, voronoiMapSimulation), 1.5);
<<<<<<< (function($) { $.fn.lifestream.feeds.tumblr = function( config, callback ) { var template = $.extend({}, { posted: 'posted a ${type} <a href="${url}">${title}</a>' }, config.template), getImage = function( post ) { switch(post.type) { case 'photo': var images = post['photo-url']; return $('<img width="75" height="75"/>') .attr({ src: images[images.length - 1].content, title: getTitle(post), alt: getTitle(post) }).wrap('<div/>').parent().html(); // generate an HTML string case 'video': var videos = post['video-player']; var video = videos[videos.length - 1].content; // Videos hosted on Tumblr use JavaScript to render the // video, but the JavaScript doesn't work when we call it // from a lifestream - so don't try to embed these. if (video.match(/<\s*script/)) { return null; } return video; case 'audio': // Unlike photo and video, audio gives you no visual indication // of what it contains, so we append the "title" text. return post['audio-player'] + ' ' + // HTML-escape the text. $('<div/>').text(getTitle(post)).html(); default: return null; } }, getFirstElementOfBody = function( post, bodyAttribute ) { return $(post[bodyAttribute]).filter(':not(:empty):first').text(); }, getTitleForPostType = function( post ) { var title; switch(post.type) { case 'regular': return post['regular-title'] || getFirstElementOfBody(post, 'regular-body'); case 'link': title = post['link-text'] || getFirstElementOfBody(post, 'link-description'); if (title === '') { title = post['link-url']; } return title; case 'video': return getFirstElementOfBody(post, 'video-caption'); case 'audio': return getFirstElementOfBody(post, 'audio-caption'); case 'photo': return getFirstElementOfBody(post, 'photo-caption'); case 'quote': return '"' + post['quote-text'] + '"'; case 'conversation': title = post['conversation-title']; if (!title) { title = post['conversation'].line; if (typeof(title) !== 'string') { title = line[0].label + ' ' + line[0].content + ' ....'; } } return title; case 'answer': return post['question']; default: return post.type; } }, /** * get title text */ getTitle = function( post ) { var title = getTitleForPostType(post) || ''; // remove tags return title.replace( /<.+?>/gi, " "); }, createTumblrOutput = function( config, post ) { return { date: new Date(post.date), config: config, html: $.tmpl( template.posted, { type: post.type, url: post.url, image: getImage(post), title: getTitle(post) } ) }; }, parseTumblr = function( input ) { var output = [], i = 0, j, post; if(input.query && input.query.count && input.query.count > 0) { // If a user only has one post, post is a plain object, otherwise it // is an array if ( $.isArray(input.query.results.posts.post) ) { j = input.query.results.posts.post.length; for( ; i < j; i++) { post = input.query.results.posts.post[i]; output.push(createTumblrOutput(config, post)); } } else if ( $.isPlainObject(input.query.results.posts.post) ) { output.push(createTumblrOutput(config,input.query.results.posts.post)); } } return output; }; $.ajax({ url: $.fn.lifestream.createYqlUrl('select *' + ' from tumblr.posts where username="'+ config.user +'"'), dataType: 'jsonp', success: function( data ) { callback(parseTumblr(data)); } }); // Expose the template. // We use this to check which templates are available return { "template" : template }; }; ======= (function($) { $.fn.lifestream.feeds.tumblr = function( config, callback ) { var template = $.extend({}, { posted: 'posted a ${type} <a href="${url}">${title}</a>' }, config.template), /** * get title text */ getTitle = function( post ) { var title = post["regular-title"] || post["quote-text"] || post["conversation-title"] || post["photo-caption"] || post["video-caption"] || post["audio-caption"] || post["regular-body"] || post["link-text"] || post.type || ""; // remove tags return title.replace( /<.+?>/gi, " "); }, createTumblrOutput = function( config, post ) { return { date: new Date(post.date), config: config, html: $.tmpl( template.posted, { type: post.type.replace('regular', 'blog entry'), url: post.url, title: getTitle(post) } ) }; }, parseTumblr = function( input ) { var output = [], i = 0, j, post; if(input.query && input.query.count && input.query.count > 0) { // If a user only has one post, post is a plain object, otherwise it // is an array if ( $.isArray(input.query.results.posts.post) ) { j = input.query.results.posts.post.length; for( ; i < j; i++) { post = input.query.results.posts.post[i]; output.push(createTumblrOutput(config, post)); } } else if ( $.isPlainObject(input.query.results.posts.post) ) { output.push(createTumblrOutput(config,input.query.results.posts.post)); } } return output; }; $.ajax({ url: $.fn.lifestream.createYqlUrl('select *' + ' from tumblr.posts where username="'+ config.user +'"'), dataType: 'jsonp', success: function( data ) { callback(parseTumblr(data)); } }); // Expose the template. // We use this to check which templates are available return { "template" : template }; }; >>>>>>> (function($) { $.fn.lifestream.feeds.tumblr = function( config, callback ) { var template = $.extend({}, { posted: 'posted a ${type} <a href="${url}">${title}</a>' }, config.template), getImage = function( post ) { switch(post.type) { case 'photo': var images = post['photo-url']; return $('<img width="75" height="75"/>') .attr({ src: images[images.length - 1].content, title: getTitle(post), alt: getTitle(post) }).wrap('<div/>').parent().html(); // generate an HTML string case 'video': var videos = post['video-player']; var video = videos[videos.length - 1].content; // Videos hosted on Tumblr use JavaScript to render the // video, but the JavaScript doesn't work when we call it // from a lifestream - so don't try to embed these. if (video.match(/<\s*script/)) { return null; } return video; case 'audio': // Unlike photo and video, audio gives you no visual indication // of what it contains, so we append the "title" text. return post['audio-player'] + ' ' + // HTML-escape the text. $('<div/>').text(getTitle(post)).html(); default: return null; } }, getFirstElementOfBody = function( post, bodyAttribute ) { return $(post[bodyAttribute]).filter(':not(:empty):first').text(); }, getTitleForPostType = function( post ) { var title; switch(post.type) { case 'regular': return post['regular-title'] || getFirstElementOfBody(post, 'regular-body'); case 'link': title = post['link-text'] || getFirstElementOfBody(post, 'link-description'); if (title === '') { title = post['link-url']; } return title; case 'video': return getFirstElementOfBody(post, 'video-caption'); case 'audio': return getFirstElementOfBody(post, 'audio-caption'); case 'photo': return getFirstElementOfBody(post, 'photo-caption'); case 'quote': return '"' + post['quote-text'] + '"'; case 'conversation': title = post['conversation-title']; if (!title) { title = post['conversation'].line; if (typeof(title) !== 'string') { title = line[0].label + ' ' + line[0].content + ' ....'; } } return title; case 'answer': return post['question']; default: return post.type; } }, /** * get title text */ getTitle = function( post ) { var title = getTitleForPostType(post) || ''; // remove tags return title.replace( /<.+?>/gi, " "); }, createTumblrOutput = function( config, post ) { return { date: new Date(post.date), config: config, html: $.tmpl( template.posted, { type: post.type.replace('regular', 'blog entry'), url: post.url, image: getImage(post), title: getTitle(post) } ) }; }, parseTumblr = function( input ) { var output = [], i = 0, j, post; if(input.query && input.query.count && input.query.count > 0) { // If a user only has one post, post is a plain object, otherwise it // is an array if ( $.isArray(input.query.results.posts.post) ) { j = input.query.results.posts.post.length; for( ; i < j; i++) { post = input.query.results.posts.post[i]; output.push(createTumblrOutput(config, post)); } } else if ( $.isPlainObject(input.query.results.posts.post) ) { output.push(createTumblrOutput(config,input.query.results.posts.post)); } } return output; }; $.ajax({ url: $.fn.lifestream.createYqlUrl('select *' + ' from tumblr.posts where username="'+ config.user +'"'), dataType: 'jsonp', success: function( data ) { callback(parseTumblr(data)); } }); // Expose the template. // We use this to check which templates are available return { "template" : template }; };
<<<<<<< }); test('auto text Date', function(t){ t.plan(1); var fastn = createFastn(); var date = new Date(), parent = fastn('span', date); parent.render(); document.body.appendChild(parent.element); t.equal(document.body.textContent, date.toString()); parent.element.remove(); parent.destroy(); ======= }); test('undefined text', function(t){ t.plan(1); var fastn = createFastn(); var text = fastn('text', {text: undefined}); text.render(); document.body.appendChild(text.element); t.equal(document.body.textContent, ''); text.element.remove(); text.destroy(); >>>>>>> }); test('undefined text', function(t){ t.plan(1); var fastn = createFastn(); var text = fastn('text', {text: undefined}); text.render(); document.body.appendChild(text.element); t.equal(document.body.textContent, ''); text.element.remove(); text.destroy(); }); test('auto text Date', function(t){ t.plan(1); var fastn = createFastn(); var date = new Date(), parent = fastn('span', date); parent.render(); document.body.appendChild(parent.element); t.equal(document.body.textContent, date.toString()); parent.element.remove(); parent.destroy();
<<<<<<< invoked: { callbacks: [], feature: 'blackberry.invoked' }, ======= swipedown: { callbacks: [], feature: 'blackberry.app' }, >>>>>>> invoked: { callbacks: [], feature: 'blackberry.invoked' }, swipedown: { callbacks: [], feature: 'blackberry.app' }, <<<<<<< event.on("AppInvoke", function (invokeInfo) { var invokeTargets = app.getInfo().invokeTargets; if (!invokeTargets) { cons.log("The application cannot be invoked, please add a rim:invoke-target node in config.xml"); return; } if (invokeTargets.some(function (target) { return target.filter.some(function (filter) { return ( ((filter.property && filter.property[0]["@attributes"].var === "exts" && filter.property[0]["@attributes"].value.split(",").some(function (value) { return invokeInfo.extension.match(value); })) || (filter.property && filter.property[0]["@attributes"].var === "uris" && filter.property[0]["@attributes"].value.split(",").some(function (value) { return invokeInfo.source.match(value); }))) && filter.action.some(function (action) { return invokeInfo.action.match(action["#text"][0].replace("*", "")); }) && filter["mime-type"].some(function (type) { return invokeInfo.mimeType.match(type["#text"][0].replace("*", "")); }) ); }); })) { _apply('invoked', [invokeInfo]); } else { cons.log("Cannot invoke application, values enter to not match values in rim:invoke-target in config.xml"); } }); event.on('AppResume', function () { ======= event.on('appSwipeDown', function () { _apply('swipedown'); }); event.on('appResume', function () { >>>>>>> event.on("AppInvoke", function (invokeInfo) { var invokeTargets = app.getInfo().invokeTargets; if (!invokeTargets) { cons.log("The application cannot be invoked, please add a rim:invoke-target node in config.xml"); return; } if (invokeTargets.some(function (target) { return target.filter.some(function (filter) { return ( ((filter.property && filter.property[0]["@attributes"].var === "exts" && filter.property[0]["@attributes"].value.split(",").some(function (value) { return invokeInfo.extension.match(value); })) || (filter.property && filter.property[0]["@attributes"].var === "uris" && filter.property[0]["@attributes"].value.split(",").some(function (value) { return invokeInfo.source.match(value); }))) && filter.action.some(function (action) { return invokeInfo.action.match(action["#text"][0].replace("*", "")); }) && filter["mime-type"].some(function (type) { return invokeInfo.mimeType.match(type["#text"][0].replace("*", "")); }) ); }); })) { _apply('invoked', [invokeInfo]); } else { cons.log("Cannot invoke application, values enter to not match values in rim:invoke-target in config.xml"); } }); event.on('AppSwipeDown', function () { _apply('swipedown'); }); event.on('AppResume', function () {
<<<<<<< function _resolveLocalFileSystemURL(path, success, error) { return (window.webkitResolveLocalFileSystemURL || window.resolveLocalFileSystemURL)(path, success, error); } ======= >>>>>>>
<<<<<<< return session; ======= var session = this; connection.on('close', function() { session._destroy(); }); >>>>>>> connection.on('close', function() { session._destroy(); }); return session;
<<<<<<< var connection = Connection.create(id, this._options); return connection.open().return(connection); ======= var connection = Connection.create(id, this._address, this._options); return connection.open(); >>>>>>> var connection = Connection.create(id, this._address, this._options); return connection.open().return(connection);
<<<<<<< // var leq = new c.LinearInequality(a, c.LEQ, b, c.Strength.strong); // print(a.value()); // print(b.value()); // t.is(a.value( }, function equation_variable_number(t) { var v = new c.Variable('v', 22); var eq = new c.LinearEquation(v, 5); t.is(eq.expression, '5 + -1*[v:22]'); }, function equation_expression_variable(t) { var e = new c.LinearExpression(10); var v = new c.Variable('v', 22); var eq = new c.LinearEquation(e, v); t.is(eq.expression, '10 + -1*[v:22]'); }, function equation_expression_x2(t) { var e1 = new c.LinearExpression(10); var e2 = new c.LinearExpression(new c.Variable('z', 10), 2, 4); var eq = new c.LinearEquation(e1, e2); t.is(eq.expression, '6 + -2*[z:10]'); }, function inequality_expression(t) { var e = new c.LinearExpression(10); var ieq = new c.LinearInequality(e); t.is(ieq.expression, '10'); }, function inequality_var_op_var(t) { var v1 = new c.Variable('v1', 10); var v2 = new c.Variable('v2', 5); var ieq = new c.LinearInequality(v1, c.GEQ, v2); t.is(ieq.expression, '-1*[v2:5] + 1*[v1:10]'); ieq = new c.LinearInequality(v1, c.LEQ, v2); t.is(ieq.expression, '1*[v2:5] + -1*[v1:10]'); }, function inequality_var_op_num(t) { var v = new c.Variable('v', 10); var ieq = new c.LinearInequality(v, c.GEQ, 5); t.is(ieq.expression, '-5 + 1*[v:10]'); ieq = new c.LinearInequality(v, c.LEQ, 5); t.is(ieq.expression, '5 + -1*[v:10]'); }, function inequality_expression_x2(t) { var e1 = new c.LinearExpression(10); var e2 = new c.LinearExpression(new c.Variable('c', 10), 2, 4); var ieq = new c.LinearInequality(e1, c.GEQ, e2); t.is(ieq.expression, '6 + -2*[c:10]'); ieq = new c.LinearInequality(e1, c.LEQ, e2); t.is(ieq.expression, '-6 + 2*[c:10]'); }, function inequality_var_op_exp(t) { var v = new c.Variable('v', 10); var e = new c.LinearExpression(new c.Variable('x', 5), 2, 4); var ieq = new c.LinearInequality(v, c.GEQ, e); t.is(ieq.expression, '-4 + -2*[x:5] + 1*[v:10]'); ieq = new c.LinearInequality(v, c.LEQ, e); t.is(ieq.expression, '4 + 2*[x:5] + -1*[v:10]'); }, function inequality_exp_op_var(t) { var v = new c.Variable('v', 10); var e = new c.LinearExpression(new c.Variable('x', 5), 2, 4); var ieq = new c.LinearInequality(e, c.GEQ, v); t.is(ieq.expression, '4 + 2*[x:5] + -1*[v:10]'); ieq = new c.LinearInequality(e, c.LEQ, v); t.is(ieq.expression, '-4 + -2*[x:5] + 1*[v:10]'); ======= // Strong. var e2 = new c.LinearEquation(z, w, c.Strength.strong); solver.addStay(w); solver.addConstraint(e2); t.is(w.value(), 1); t.is(z.value(), 1); >>>>>>> // Strong. var e2 = new c.LinearEquation(z, w, c.Strength.strong); solver.addStay(w); solver.addConstraint(e2); t.is(w.value(), 1); t.is(z.value(), 1); }, function equation_variable_number(t) { var v = new c.Variable('v', 22); var eq = new c.LinearEquation(v, 5); t.is(eq.expression, '5 + -1*[v:22]'); }, function equation_expression_variable(t) { var e = new c.LinearExpression(10); var v = new c.Variable('v', 22); var eq = new c.LinearEquation(e, v); t.is(eq.expression, '10 + -1*[v:22]'); }, function equation_expression_x2(t) { var e1 = new c.LinearExpression(10); var e2 = new c.LinearExpression(new c.Variable('z', 10), 2, 4); var eq = new c.LinearEquation(e1, e2); t.is(eq.expression, '6 + -2*[z:10]'); }, function inequality_expression(t) { var e = new c.LinearExpression(10); var ieq = new c.LinearInequality(e); t.is(ieq.expression, '10'); }, function inequality_var_op_var(t) { var v1 = new c.Variable('v1', 10); var v2 = new c.Variable('v2', 5); var ieq = new c.LinearInequality(v1, c.GEQ, v2); t.is(ieq.expression, '-1*[v2:5] + 1*[v1:10]'); ieq = new c.LinearInequality(v1, c.LEQ, v2); t.is(ieq.expression, '1*[v2:5] + -1*[v1:10]'); }, function inequality_var_op_num(t) { var v = new c.Variable('v', 10); var ieq = new c.LinearInequality(v, c.GEQ, 5); t.is(ieq.expression, '-5 + 1*[v:10]'); ieq = new c.LinearInequality(v, c.LEQ, 5); t.is(ieq.expression, '5 + -1*[v:10]'); }, function inequality_expression_x2(t) { var e1 = new c.LinearExpression(10); var e2 = new c.LinearExpression(new c.Variable('c', 10), 2, 4); var ieq = new c.LinearInequality(e1, c.GEQ, e2); t.is(ieq.expression, '6 + -2*[c:10]'); ieq = new c.LinearInequality(e1, c.LEQ, e2); t.is(ieq.expression, '-6 + 2*[c:10]'); }, function inequality_var_op_exp(t) { var v = new c.Variable('v', 10); var e = new c.LinearExpression(new c.Variable('x', 5), 2, 4); var ieq = new c.LinearInequality(v, c.GEQ, e); t.is(ieq.expression, '-4 + -2*[x:5] + 1*[v:10]'); ieq = new c.LinearInequality(v, c.LEQ, e); t.is(ieq.expression, '4 + 2*[x:5] + -1*[v:10]'); }, function inequality_exp_op_var(t) { var v = new c.Variable('v', 10); var e = new c.LinearExpression(new c.Variable('x', 5), 2, 4); var ieq = new c.LinearInequality(e, c.GEQ, v); t.is(ieq.expression, '4 + 2*[x:5] + -1*[v:10]'); ieq = new c.LinearInequality(e, c.LEQ, v); t.is(ieq.expression, '-4 + -2*[x:5] + 1*[v:10]');
<<<<<<< this._terms.put(clv, typeof value == 'number' ? value : 1); } else if (typeof clv == 'number') { this.constant = clv; ======= this.terms.set(clv, value || 1); } else if (typeof clv == "number") { // FIXME(slighltyoff): // This isNaN() check slows us down by ~75% on V8 in our synthetic // perf test! if (!isNaN(clv)) { this.constant = clv; } >>>>>>> this.terms.set(clv, typeof value == 'number' ? value : 1); } else if (typeof clv == "number") { // FIXME(slighltyoff): // This isNaN() check slows us down by ~75% on V8 in our synthetic // perf test! if (!isNaN(clv)) { this.constant = clv; } <<<<<<< this.constant += (n * expr.constant); expr.terms().each(function(clv, coeff) { ======= expr.terms.each(function(clv, coeff) { >>>>>>> this.constant += (n * expr.constant); expr.terms.each(function(clv, coeff) { <<<<<<< var rv = this._terms.escapingEach(function(clv, c) { if (clv.isPivotable) return { retval: clv }; ======= this.terms.each(function(clv, c) { if (clv.isPivotable) return clv; >>>>>>> var rv = this.terms.escapingEach(function(clv, c) { if (clv.isPivotable) return { retval: clv }; <<<<<<< this._terms.put(clv, multiplier * coeff); if (solver) solver.noteAddedVariable(clv, subject); ======= this.terms.set(clv, multiplier * coeff); solver.noteAddedVariable(clv, subject); >>>>>>> this.terms.set(clv, multiplier * coeff); if (solver) solver.noteAddedVariable(clv, subject);
<<<<<<< setUninstallURL: browser.runtime.setUninstallURL, onMessage: onMessage, ======= onMessage, >>>>>>> setUninstallURL: browser.runtime.setUninstallURL, onMessage,
<<<<<<< var S4, dualsync, getUrl, guid, localsync, methodMap, onlineSync, parseRemoteResponse, urlError; S4 = function() { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); ======= var S4, dualsync, localsync, onlineSync, result; Backbone.Collection.prototype.syncDirty = function() { var id, ids, model, store, _i, _len, _results; store = localStorage.getItem("" + this.url + "_dirty"); ids = (store && store.split(',')) || []; _results = []; for (_i = 0, _len = ids.length; _i < _len; _i++) { id = ids[_i]; model = id.length === 36 ? this.where({ id: id })[0] : this.get(parseInt(id)); _results.push(model.save()); } return _results; }; Backbone.Collection.prototype.syncDestroyed = function() { var id, ids, model, store, _i, _len, _results; store = localStorage.getItem("" + this.url + "_destroyed"); ids = (store && store.split(',')) || []; _results = []; for (_i = 0, _len = ids.length; _i < _len; _i++) { id = ids[_i]; model = new this.model({ id: id }); model.collection = this; _results.push(model.destroy()); } return _results; >>>>>>> var S4, dualsync, localsync, onlineSync, parseRemoteResponse, result; Backbone.Collection.prototype.syncDirty = function() { var id, ids, model, store, _i, _len, _results; store = localStorage.getItem("" + this.url + "_dirty"); ids = (store && store.split(',')) || []; _results = []; for (_i = 0, _len = ids.length; _i < _len; _i++) { id = ids[_i]; model = id.length === 36 ? this.where({ id: id })[0] : this.get(parseInt(id)); _results.push(model.save()); } return _results; }; Backbone.Collection.prototype.syncDestroyed = function() { var id, ids, model, store, _i, _len, _results; store = localStorage.getItem("" + this.url + "_destroyed"); ids = (store && store.split(',')) || []; _results = []; for (_i = 0, _len = ids.length; _i < _len; _i++) { id = ids[_i]; model = new this.model({ id: id }); model.collection = this; _results.push(model.destroy()); } return _results; <<<<<<< parseRemoteResponse = function(object, response) { if (!(object && object.parseBeforeLocalSave)) return response; if (_.isFunction(object.parseBeforeLocalSave)) { return object.parseBeforeLocalSave(response); } }; urlError = function() { throw new Error('A "url" property or function must be specified'); }; methodMap = { 'create': 'POST', 'update': 'PUT', 'delete': 'DELETE', 'read': 'GET' }; ======= >>>>>>> parseRemoteResponse = function(object, response) { if (!(object && object.parseBeforeLocalSave)) { return response; } if (_.isFunction(object.parseBeforeLocalSave)) { return object.parseBeforeLocalSave(response); } }; <<<<<<< console.log('got remote', resp, 'putting into', store); resp = parseRemoteResponse(model, resp); ======= console.log('got remote', resp, 'putting into', options.storeName); localsync('clear', model, options); >>>>>>> console.log('got remote', resp, 'putting into', options.storeName); resp = parseRemoteResponse(model, resp); localsync('clear', model, options);
<<<<<<< var getCookieRules = function (requestUrl, referrer, requestType) { return getRequestFilter().findCookieRules(requestUrl, referrer, requestType); }; ======= var getReplaceRules = function (requestUrl, referrer, requestType) { return getRequestFilter().findReplaceRules(requestUrl, referrer, requestType); }; >>>>>>> var getCookieRules = function (requestUrl, referrer, requestType) { return getRequestFilter().findCookieRules(requestUrl, referrer, requestType); }; var getReplaceRules = function (requestUrl, referrer, requestType) { return getRequestFilter().findReplaceRules(requestUrl, referrer, requestType); }; <<<<<<< getCookieRules: getCookieRules, ======= getReplaceRules: getReplaceRules, >>>>>>> getCookieRules: getCookieRules, getReplaceRules: getReplaceRules,
<<<<<<< }); QUnit.test('redirect rules are removed with $badfilter modifier', (assert) => { const ruleText = '||example.org/favicon.ico$domain=example.org,empty,important'; const badfilterRuleText = '||example.org/favicon.ico$domain=example.org,empty,important,badfilter'; const rawYaml = ` - title: nooptext aliases: - blank-text contentType: text/plain content: ''`; adguard.rules.RedirectFilterService.setRedirectSources(rawYaml); const requestFilter = new adguard.RequestFilter(); const rule = adguard.rules.builder.createRule(ruleText, 1); requestFilter.addRule(rule); let result = requestFilter.findRuleForRequest( 'https://example.org/favicon.ico', 'https://example.org', adguard.RequestTypes.IMAGE ); assert.ok(result, 'rule should be found'); const badfilterRule = adguard.rules.builder.createRule(badfilterRuleText, 1); requestFilter.addRule(badfilterRule); result = requestFilter.findRuleForRequest( 'https://example.org/favicon.ico', 'https://example.org', adguard.RequestTypes.IMAGE ); assert.notOk(result, 'rule should be blocked by badfilter rule'); ======= }); QUnit.test('$document modifier', (assert) => { const rule = new adguard.rules.UrlFilterRule('||example.org^$document'); const requestFilter = new adguard.RequestFilter(); requestFilter.addRule(rule); assert.ok(requestFilter.findRuleForRequest( 'https://example.org', 'https://example.org', adguard.RequestTypes.DOCUMENT )); >>>>>>> }); QUnit.test('$document modifier', (assert) => { const rule = new adguard.rules.UrlFilterRule('||example.org^$document'); const requestFilter = new adguard.RequestFilter(); requestFilter.addRule(rule); assert.ok(requestFilter.findRuleForRequest( 'https://example.org', 'https://example.org', adguard.RequestTypes.DOCUMENT )); }); QUnit.test('redirect rules are removed with $badfilter modifier', (assert) => { const ruleText = '||example.org/favicon.ico$domain=example.org,empty,important'; const badfilterRuleText = '||example.org/favicon.ico$domain=example.org,empty,important,badfilter'; const rawYaml = ` - title: nooptext aliases: - blank-text contentType: text/plain content: ''`; adguard.rules.RedirectFilterService.setRedirectSources(rawYaml); const requestFilter = new adguard.RequestFilter(); const rule = adguard.rules.builder.createRule(ruleText, 1); requestFilter.addRule(rule); let result = requestFilter.findRuleForRequest( 'https://example.org/favicon.ico', 'https://example.org', adguard.RequestTypes.IMAGE ); assert.ok(result, 'rule should be found'); const badfilterRule = adguard.rules.builder.createRule(badfilterRuleText, 1); requestFilter.addRule(badfilterRule); result = requestFilter.findRuleForRequest( 'https://example.org/favicon.ico', 'https://example.org', adguard.RequestTypes.IMAGE ); assert.notOk(result, 'rule should be blocked by badfilter rule');
<<<<<<< * @param filterId Filter identifier * @param options ======= * @param filterIds Filter identifier >>>>>>> * @param filterIds Filter identifier * @param options <<<<<<< * @param filterId Filter identifier * @param options ======= * @param filterIds Filter identifier >>>>>>> * @param filterIds Filter identifier * @param options <<<<<<< var removeFilter = function (filterId, options) { ======= var removeFilters = function (filterIds) { >>>>>>> var removeFilters = function (filterIds, options) { <<<<<<< filter.enabled = false; filter.installed = false; adguard.listeners.notifyListeners(adguard.listeners.FILTER_ENABLE_DISABLE, filter); adguard.listeners.notifyListeners(adguard.listeners.FILTER_ADD_REMOVE, filter); adguard.listeners.notifyListeners(adguard.listeners.SYNC_REQUIRED, options); return true; ======= filter.enabled = false; filter.installed = false; adguard.listeners.notifyListeners(adguard.listeners.FILTER_ENABLE_DISABLE, filter); adguard.listeners.notifyListeners(adguard.listeners.FILTER_ADD_REMOVE, filter); } >>>>>>> filter.enabled = false; filter.installed = false; adguard.listeners.notifyListeners(adguard.listeners.FILTER_ENABLE_DISABLE, filter); adguard.listeners.notifyListeners(adguard.listeners.FILTER_ADD_REMOVE, filter); } adguard.listeners.notifyListeners(adguard.listeners.SYNC_REQUIRED, options);
<<<<<<< ======= var shouldLoadAllSelectors = function (collapseAllElements) { var safariContentBlockerEnabled = adguard.utils.browser.isContentBlockerEnabled(); if (safariContentBlockerEnabled && collapseAllElements) { // For Safari 9+ we will load all selectors when browser is just started // as at that moment content blocker may not been initialized return true; } // In other cases we should load all selectors every time return !safariContentBlockerEnabled; }; var isCollectingCosmeticRulesHits = function () { /** * Edge browser doesn't support css content attribute for node elements except :before and :after * Due to this we can't use cssHitsCounter for edge browser */ return !adguard.utils.browser.isEdgeBrowser() && adguard.prefs.collectHitsCountEnabled && (adguard.settings.collectHitsCount() || adguard.filteringLog.isOpen()); }; >>>>>>> var isCollectingCosmeticRulesHits = function () { /** * Edge browser doesn't support css content attribute for node elements except :before and :after * Due to this we can't use cssHitsCounter for edge browser */ return !adguard.utils.browser.isEdgeBrowser() && adguard.prefs.collectHitsCountEnabled && (adguard.settings.collectHitsCount() || adguard.filteringLog.isOpen()); };
<<<<<<< var EventNotifier = require('utils/notifier').EventNotifier; var EventNotifierTypes = require('utils/common').EventNotifierTypes; ======= var Utils = require('utils/browser-utils').Utils; >>>>>>> var EventNotifier = require('utils/notifier').EventNotifier; var EventNotifierTypes = require('utils/common').EventNotifierTypes; var Utils = require('utils/browser-utils').Utils;
<<<<<<< canBlockWebRTC: canBlockWebRTC, ======= STEALTH_ACTIONS, >>>>>>> canBlockWebRTC: canBlockWebRTC, STEALTH_ACTIONS,
<<<<<<< }); QUnit.test("Test UrlFilterRule Matching Everything", function(assert) { var rule = new UrlFilterRule("*$domain=example.org"); assert.ok(rule.isFiltered("http://test.com", true, RequestTypes.SUBDOCUMENT)); rule = new UrlFilterRule("$domain=example.org"); assert.ok(rule.isFiltered("http://test.com", true, RequestTypes.SUBDOCUMENT)); rule = new UrlFilterRule("*$websocket"); // Rule is too wide, it will be considered invalid assert.notOk(rule.isFiltered("http://test.com", true, RequestTypes.SUBDOCUMENT)); }); QUnit.test("Important modifier rules", function(assert) { var rule = new UrlFilterRule("||example.com^$important"); assert.ok(rule.isImportant); rule = new UrlFilterRule("||example.com^$\~important"); assert.notOk(rule.isImportant); rule = new UrlFilterRule("||example.com^"); assert.notOk(rule.isImportant); }); QUnit.test("Important modifier rules priority", function(assert) { var importantRule = new UrlFilterRule("http://$important,domain=test.com"); var basicRule = new UrlFilterRule("||example.com^"); assert.ok(importantRule.isFiltered("http://example.com", true, RequestTypes.IMAGE)); assert.ok(importantRule.isPermitted("test.com")); assert.ok(basicRule.isFiltered("http://example.com", true, RequestTypes.IMAGE)); assert.ok(basicRule.isPermitted("http://example.com")); var urlFilter = new UrlFilter(); urlFilter.addRule(basicRule); urlFilter.addRule(importantRule); var result = urlFilter.isFiltered("http://example.com", "test.com", RequestTypes.SUBDOCUMENT, true); assert.ok(result != null); assert.equal(result.ruleText, importantRule.ruleText); }); QUnit.test("Rule content types", function(assert) { var basicRule = new UrlFilterRule("||example.com^"); assert.notOk(basicRule.checkContentType("DOCUMENT")); assert.notOk(basicRule.checkContentTypeIncluded("DOCUMENT")); assert.ok(basicRule.checkContentType("IMAGE")); assert.ok(basicRule.checkContentTypeIncluded("IMAGE")); var documentRule = new UrlFilterRule("||example.com^$document"); assert.ok(documentRule.checkContentType("DOCUMENT")); assert.ok(documentRule.checkContentTypeIncluded("DOCUMENT")); assert.ok(documentRule.checkContentType("ELEMHIDE")); assert.ok(documentRule.checkContentTypeIncluded("ELEMHIDE")); assert.notOk(documentRule.checkContentType("IMAGE")); assert.notOk(documentRule.checkContentTypeIncluded("IMAGE")); var elemhideRule = new UrlFilterRule("||example.com^$elemhide"); assert.ok(elemhideRule.checkContentType("DOCUMENT")); assert.notOk(elemhideRule.checkContentTypeIncluded("DOCUMENT")); assert.ok(elemhideRule.checkContentType("ELEMHIDE")); assert.ok(elemhideRule.checkContentTypeIncluded("ELEMHIDE")); assert.notOk(elemhideRule.checkContentType("IMAGE")); assert.notOk(elemhideRule.checkContentTypeIncluded("IMAGE")); ======= }); QUnit.test("Regexp rules shortcuts", function(assert) { assert.equal(new UrlFilterRule('/quang%20cao/').shortcut, 'quang%20cao'); assert.equal(new UrlFilterRule('/YanAds/').shortcut, 'YanAds'); assert.equal(new UrlFilterRule('/^http://m\.autohome\.com\.cn\/[a-z0-9]{32}\//$domain=m.autohome.com.cn').shortcut, 'autohome'); assert.equal(new UrlFilterRule('/cdsbData_gal/bannerFile/$image,domain=mybogo.net|zipbogo.net ').shortcut, 'cdsbData_gal/bannerFile'); assert.equal(new UrlFilterRule('/http:\/\/rustorka.com\/[a-z]+\.js/$domain=rustorka.com').shortcut, 'http://rustorka'); assert.equal(new UrlFilterRule('/^http://www\.iqiyi\.com\/common\/flashplayer\/[0-9]{8}/[0-9a-z]{32}.swf/$domain=iqiyi.com').shortcut, 'com/common/flashplayer'); assert.equal(new UrlFilterRule('/ulightbox/$domain=hdkinomax.com|tvfru.net').shortcut, 'ulightbox'); assert.equal(new UrlFilterRule('/\.sharesix\.com/.*[a-zA-Z0-9]{4}/$script').shortcut, 'sharesix'); assert.equal(new UrlFilterRule('/serial_adv_files/$image,domain=xn--80aacbuczbw9a6a.xn--p1ai|куражбамбей.рф').shortcut, 'serial_adv_files'); >>>>>>> }); QUnit.test("Test UrlFilterRule Matching Everything", function(assert) { var rule = new UrlFilterRule("*$domain=example.org"); assert.ok(rule.isFiltered("http://test.com", true, RequestTypes.SUBDOCUMENT)); rule = new UrlFilterRule("$domain=example.org"); assert.ok(rule.isFiltered("http://test.com", true, RequestTypes.SUBDOCUMENT)); rule = new UrlFilterRule("*$websocket"); // Rule is too wide, it will be considered invalid assert.notOk(rule.isFiltered("http://test.com", true, RequestTypes.SUBDOCUMENT)); }); QUnit.test("Important modifier rules", function(assert) { var rule = new UrlFilterRule("||example.com^$important"); assert.ok(rule.isImportant); rule = new UrlFilterRule("||example.com^$\~important"); assert.notOk(rule.isImportant); rule = new UrlFilterRule("||example.com^"); assert.notOk(rule.isImportant); }); QUnit.test("Important modifier rules priority", function(assert) { var importantRule = new UrlFilterRule("http://$important,domain=test.com"); var basicRule = new UrlFilterRule("||example.com^"); assert.ok(importantRule.isFiltered("http://example.com", true, RequestTypes.IMAGE)); assert.ok(importantRule.isPermitted("test.com")); assert.ok(basicRule.isFiltered("http://example.com", true, RequestTypes.IMAGE)); assert.ok(basicRule.isPermitted("http://example.com")); var urlFilter = new UrlFilter(); urlFilter.addRule(basicRule); urlFilter.addRule(importantRule); var result = urlFilter.isFiltered("http://example.com", "test.com", RequestTypes.SUBDOCUMENT, true); assert.ok(result != null); assert.equal(result.ruleText, importantRule.ruleText); }); QUnit.test("Rule content types", function(assert) { var basicRule = new UrlFilterRule("||example.com^"); assert.notOk(basicRule.checkContentType("DOCUMENT")); assert.notOk(basicRule.checkContentTypeIncluded("DOCUMENT")); assert.ok(basicRule.checkContentType("IMAGE")); assert.ok(basicRule.checkContentTypeIncluded("IMAGE")); var documentRule = new UrlFilterRule("||example.com^$document"); assert.ok(documentRule.checkContentType("DOCUMENT")); assert.ok(documentRule.checkContentTypeIncluded("DOCUMENT")); assert.ok(documentRule.checkContentType("ELEMHIDE")); assert.ok(documentRule.checkContentTypeIncluded("ELEMHIDE")); assert.notOk(documentRule.checkContentType("IMAGE")); assert.notOk(documentRule.checkContentTypeIncluded("IMAGE")); var elemhideRule = new UrlFilterRule("||example.com^$elemhide"); assert.ok(elemhideRule.checkContentType("DOCUMENT")); assert.notOk(elemhideRule.checkContentTypeIncluded("DOCUMENT")); assert.ok(elemhideRule.checkContentType("ELEMHIDE")); assert.ok(elemhideRule.checkContentTypeIncluded("ELEMHIDE")); assert.notOk(elemhideRule.checkContentType("IMAGE")); assert.notOk(elemhideRule.checkContentTypeIncluded("IMAGE")); }); QUnit.test("Regexp rules shortcuts", function(assert) { assert.equal(new UrlFilterRule('/quang%20cao/').shortcut, 'quang%20cao'); assert.equal(new UrlFilterRule('/YanAds/').shortcut, 'YanAds'); assert.equal(new UrlFilterRule('/^http://m\.autohome\.com\.cn\/[a-z0-9]{32}\//$domain=m.autohome.com.cn').shortcut, 'autohome'); assert.equal(new UrlFilterRule('/cdsbData_gal/bannerFile/$image,domain=mybogo.net|zipbogo.net ').shortcut, 'cdsbData_gal/bannerFile'); assert.equal(new UrlFilterRule('/http:\/\/rustorka.com\/[a-z]+\.js/$domain=rustorka.com').shortcut, 'http://rustorka'); assert.equal(new UrlFilterRule('/^http://www\.iqiyi\.com\/common\/flashplayer\/[0-9]{8}/[0-9a-z]{32}.swf/$domain=iqiyi.com').shortcut, 'com/common/flashplayer'); assert.equal(new UrlFilterRule('/ulightbox/$domain=hdkinomax.com|tvfru.net').shortcut, 'ulightbox'); assert.equal(new UrlFilterRule('/\.sharesix\.com/.*[a-zA-Z0-9]{4}/$script').shortcut, 'sharesix'); assert.equal(new UrlFilterRule('/serial_adv_files/$image,domain=xn--80aacbuczbw9a6a.xn--p1ai|куражбамбей.рф').shortcut, 'serial_adv_files');
<<<<<<< COOKIE_OPTION: 'cookie', ======= REPLACE_OPTION: 'replace', >>>>>>> COOKIE_OPTION: 'cookie', REPLACE_OPTION: 'replace', <<<<<<< if (event.eventId) { metadata.id = 'request-' + event.eventId; ======= if (event.requestId) { metadata.id = 'request-' + event.requestId; >>>>>>> if (event.eventId) { metadata.id = 'request-' + event.eventId;
<<<<<<< ======= * Writes to filtering event some useful properties from the replace rules * @param filteringEvent * @param replaceRules */ const addReplaceRulesToFilteringEvent = (filteringEvent, replaceRules) => { // only replace rules can be applied together filteringEvent.requestRule = {}; filteringEvent.requestRule.replaceRule = true; filteringEvent.replaceRules = []; replaceRules.forEach(replaceRule => { const tempRule = {}; appendProperties(tempRule, replaceRule); filteringEvent.replaceRules.push(tempRule); }); }; /** * Serialize HTML element * @param element */ function elementToString(element) { var s = []; s.push('<'); s.push(element.localName); var attributes = element.attributes; for (var i = 0; i < attributes.length; i++) { var attr = attributes[i]; s.push(' '); s.push(attr.name); s.push('="'); var value = attr.value === null ? '' : attr.value.replace(/"/g, '\\"'); s.push(value); s.push('"'); } s.push('>'); return s.join(''); } /** >>>>>>> * Writes to filtering event some useful properties from the replace rules * @param filteringEvent * @param replaceRules */ const addReplaceRulesToFilteringEvent = (filteringEvent, replaceRules) => { // only replace rules can be applied together filteringEvent.requestRule = {}; filteringEvent.requestRule.replaceRule = true; filteringEvent.replaceRules = []; replaceRules.forEach(replaceRule => { const tempRule = {}; appendProperties(tempRule, replaceRule); filteringEvent.replaceRules.push(tempRule); }); }; /** <<<<<<< var addHttpRequestEvent = function (tab, requestUrl, frameUrl, requestType, requestRule, eventId) { ======= var addHttpRequestEvent = function (tab, requestUrl, frameUrl, requestType, requestRule, requestId) { >>>>>>> var addHttpRequestEvent = function (tab, requestUrl, frameUrl, requestType, requestRule, eventId) { <<<<<<< if (event.eventId === eventId) { addRuleToFilteringEvent(event, requestRule); ======= if (event.requestId === requestId && event.requestUrl === requestUrl) { addReplaceRulesToFilteringEvent(event, replaceRules); >>>>>>> if (event.eventId === eventId) { addReplaceRulesToFilteringEvent(event, replaceRules);
<<<<<<< /** * Handles redirect separately: * If a request is redirected to a data:// URL, onBeforeRedirect is the last reported event. * https://developer.chrome.com/extensions/webRequest#life_cycle */ adguard.webRequest.onBeforeRedirect.addListener(({ requestId, redirectUrl }) => { if (redirectUrl && redirectUrl.indexOf('data:') === 0) { adguard.requestContextStorage.onRequestCompleted(requestId); } }, ['<all_urls>']); ======= adguard.webRequest.onCompleted.addListener((details) => { const { tab, requestType } = details; if ((requestType !== adguard.RequestTypes.DOCUMENT && requestType !== adguard.RequestTypes.SUBDOCUMENT) || adguard.frames.isTabAdguardDetected(tab) || tab.tabId === adguard.BACKGROUND_TAB_ID) { return; } // load subscribe script on dom content load if integration mode is turned off adguard.tabs.executeScriptFile(tab.tabId, '/lib/content-script/subscribe.js'); }, ['*://*.github.io/*', '*://*.abpchina.org/*', '*://*.abpindo.blogspot.com/*', '*://*.abpvn.com/*', '*://*.adblock-listefr.com/*', '*://*.adblock.gardar.net/*', '*://*.adblockplus.org/*', '*://*.adblockplus.me/*', '*://*.adguard.com/*', '*://*.certyficate.it/*', '*://*.code.google.com/*', '*://*.dajbych.net/*', '*://*.fanboy.co.nz/*', '*://*.fredfiber.no/*', '*://*.filterlists.com/*', '*://*.gardar.net/*', '*://*.github.com/*', '*://*.henrik.schack.dk/*', '*://*.latvian-list.site11.com/*', '*://*.liamja.co.uk/*', '*://*.malwaredomains.com/*', '*://*.margevicius.lt/*', '*://*.nauscopio.nireblog.com/*', '*://*.nireblog.com/*', '*://*.noads.it/*', '*://*.schack.dk/*', '*://*.spam404.com/*', '*://*.stanev.org/*', '*://*.void.gr/*', '*://*.yoyo.org/*', '*://*.zoso.ro/*']); >>>>>>> /** * Handles redirect separately: * If a request is redirected to a data:// URL, onBeforeRedirect is the last reported event. * https://developer.chrome.com/extensions/webRequest#life_cycle */ adguard.webRequest.onBeforeRedirect.addListener(({ requestId, redirectUrl }) => { if (redirectUrl && redirectUrl.indexOf('data:') === 0) { adguard.requestContextStorage.onRequestCompleted(requestId); } }, ['<all_urls>']); adguard.webRequest.onCompleted.addListener((details) => { const { tab, requestType } = details; if ((requestType !== adguard.RequestTypes.DOCUMENT && requestType !== adguard.RequestTypes.SUBDOCUMENT) || adguard.frames.isTabAdguardDetected(tab) || tab.tabId === adguard.BACKGROUND_TAB_ID) { return; } // load subscribe script on dom content load if integration mode is turned off adguard.tabs.executeScriptFile(tab.tabId, '/lib/content-script/subscribe.js'); }, ['*://*.github.io/*', '*://*.abpchina.org/*', '*://*.abpindo.blogspot.com/*', '*://*.abpvn.com/*', '*://*.adblock-listefr.com/*', '*://*.adblock.gardar.net/*', '*://*.adblockplus.org/*', '*://*.adblockplus.me/*', '*://*.adguard.com/*', '*://*.certyficate.it/*', '*://*.code.google.com/*', '*://*.dajbych.net/*', '*://*.fanboy.co.nz/*', '*://*.fredfiber.no/*', '*://*.filterlists.com/*', '*://*.gardar.net/*', '*://*.github.com/*', '*://*.henrik.schack.dk/*', '*://*.latvian-list.site11.com/*', '*://*.liamja.co.uk/*', '*://*.malwaredomains.com/*', '*://*.margevicius.lt/*', '*://*.nauscopio.nireblog.com/*', '*://*.nireblog.com/*', '*://*.noads.it/*', '*://*.schack.dk/*', '*://*.spam404.com/*', '*://*.stanev.org/*', '*://*.void.gr/*', '*://*.yoyo.org/*', '*://*.zoso.ro/*']);
<<<<<<< dispAsset = '<img alt="" src="assets/' + asset + '.png" />&nbsp;'; var website = asset == 'XCP' ? "http://www.counterparty.co" : "http://www.bitcoin.org"; dispAsset += '<a href="' + website + '" target="_blank">' + asset + '</a>'; ======= dispAsset = '<img src="assets/' + asset + '.png" />&nbsp;'; var website = asset == 'XCP' ? 'https://counterparty.io' : 'https://bitcoin.org'; dispAsset += '<a href="' + website + '" target="_blank" rel="noopener noreferrer">' + asset + '</a>'; >>>>>>> dispAsset = '<img alt="" src="assets/' + asset + '.png" />&nbsp;'; var website = asset == 'XCP' ? 'https://counterparty.io' : 'https://bitcoin.org'; dispAsset += '<a href="' + website + '" target="_blank" rel="noopener noreferrer">' + asset + '</a>'; <<<<<<< dispAsset = '<img alt="" src="' + (USE_TESTNET ? '/_t_asset_img/' : '/_asset_img/') + asset + '.png" />&nbsp;'; //dispAsset += website ? ('<a href="' + website + '" target="_blank">' + asset + '</a>') : asset; ======= dispAsset = '<img src="' + (USE_TESTNET ? '/_t_asset_img/' : '/_asset_img/') + asset + '.png" />&nbsp;'; //dispAsset += website ? ('<a href="' + website + '" target="_blank" rel="noopener noreferrer">' + asset + '</a>') : asset; >>>>>>> dispAsset = '<img alt="" src="' + (USE_TESTNET ? '/_t_asset_img/' : '/_asset_img/') + asset + '.png" />&nbsp;'; //dispAsset += website ? ('<a href="' + website + '" target="_blank" rel="noopener noreferrer">' + asset + '</a>') : asset;
<<<<<<< if (asset === KEY_ASSET.XCP || asset === KEY_ASSET.BTC) { dispAsset = '<img src="assets/' + asset + '.png" />&nbsp;'; var website = asset === KEY_ASSET.XCP ? KEY_ASSET_WEBSITE.XCP : KEY_ASSET_WEBSITE.BTC; dispAsset += '<a href="' + website + '" target="_blank">' + asset + '</a>'; ======= if (asset == 'XCP' || asset == 'BTC') { dispAsset = '<img alt="" src="assets/' + asset + '.png" />&nbsp;'; var website = asset == 'XCP' ? 'https://counterparty.io' : 'https://bitcoin.org'; dispAsset += '<a href="' + website + '" target="_blank" rel="noopener noreferrer">' + asset + '</a>'; >>>>>>> if (asset === KEY_ASSET.XCP || asset === KEY_ASSET.BTC) { dispAsset = '<img alt="" src="assets/' + asset + '.png" />&nbsp;'; var website = asset === KEY_ASSET.XCP ? KEY_ASSET_WEBSITE.XCP : KEY_ASSET_WEBSITE.BTC; dispAsset += '<a href="' + website + '" target="_blank" rel="noopener noreferrer">' + asset + '</a>';
<<<<<<< } else if (item.type === 'WMS') { return item.url + '?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image/png&layer=' + item.layers; } ======= } else if (item.type() === 'WMS') { return item.base_url() + '?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image/png&layer=' + item.Name(); } else if (defined(item.layer.baseDataSource)) { return item.layer.baseDataSource.getLegendGraphic(); } else if (defined(item.layer.dataSource) && defined(item.layer.dataSource.getLegendGraphic)) { return item.layer.dataSource.getLegendGraphic(); } >>>>>>> } else if (item.type === 'WMS') { return item.url + '?service=WMS&version=1.3.0&request=GetLegendGraphic&format=image/png&layer=' + item.layers; } else if (defined(item.layer.baseDataSource)) { return item.layer.baseDataSource.getLegendGraphic(); } else if (defined(item.layer.dataSource) && defined(item.layer.dataSource.getLegendGraphic)) { return item.layer.dataSource.getLegendGraphic(); }
<<<<<<< /** * Gets or sets a value indicating whether the map will automatically zoom to this catalog item when it is enabled. * @type {Boolean} * @default false */ this.zoomOnEnable = false; ======= /** * Options for formatting current time and timeline tic labels. Options are: * currentTime // Current time in time slider will be shown in this format. For example "mmmm yyyy" for Jan 2016. * timelineTic // Timeline tics will have this label. For example "yyyy" will cause each tic to be labelled with the year. * @type {Object} */ >>>>>>> /** * Gets or sets a value indicating whether the map will automatically zoom to this catalog item when it is enabled. * @type {Boolean} * @default false */ this.zoomOnEnable = false; /** * Options for formatting current time and timeline tic labels. Options are: * currentTime // Current time in time slider will be shown in this format. For example "mmmm yyyy" for Jan 2016. * timelineTic // Timeline tics will have this label. For example "yyyy" will cause each tic to be labelled with the year. * @type {Object} */
<<<<<<< addLayersRecursively(catalogGroup, serviceJson, layersJson, legendJson, -1, layersJson.layers, catalogGroup.items, dataCustodian); ======= addLayersRecursively(catalogGroup, serviceJson, layersJson, -1, layersJson.layers, catalogGroup, dataCustodian); >>>>>>> addLayersRecursively(catalogGroup, serviceJson, layersJson, legendJson, -1, layersJson.layers, catalogGroup, dataCustodian); <<<<<<< function addLayersRecursively(mapServiceGroup, topLevelJson, topLevelLayersJson, topLevelLegendJson, parentID, layers, items, dataCustodian) { ======= function addLayersRecursively(mapServiceGroup, topLevelJson, topLevelLayersJson, parentID, layers, thisGroup, dataCustodian) { >>>>>>> function addLayersRecursively(mapServiceGroup, topLevelJson, topLevelLayersJson, topLevelLegendJson, parentID, layers, thisGroup, dataCustodian) { <<<<<<< items.push(subGroup); addLayersRecursively(mapServiceGroup, topLevelJson, topLevelLayersJson, topLevelLegendJson, layer.id, layers, subGroup.items, dataCustodian); ======= thisGroup.add(subGroup); addLayersRecursively(mapServiceGroup, topLevelJson, topLevelLayersJson, layer.id, layers, subGroup, dataCustodian); >>>>>>> thisGroup.add(subGroup); addLayersRecursively(mapServiceGroup, topLevelJson, topLevelLayersJson, topLevelLegendJson, layer.id, layers, subGroup, dataCustodian); <<<<<<< items.push(createDataSource(mapServiceGroup, topLevelJson, topLevelLayersJson, topLevelLegendJson, layer, dataCustodian)); ======= thisGroup.add(createDataSource(mapServiceGroup, topLevelJson, topLevelLayersJson, layer, dataCustodian)); >>>>>>> thisGroup.add(createDataSource(mapServiceGroup, topLevelJson, topLevelLayersJson, topLevelLegendJson, layer, dataCustodian));
<<<<<<< ======= map.attributionControl = L.control.attribution({ position: 'bottomleft' }); map.addControl(map.attributionControl); this.map = map; map.clock = this.terria.clock; map.dataSources = this.terria.dataSources; >>>>>>> map.attributionControl = L.control.attribution({ position: 'bottomleft' }); map.addControl(map.attributionControl); <<<<<<< ======= this.createLeafletTimeline(map.clock); var d = this._getDisclaimer(); if (d) { this.map.attributionControl.setPrefix('<span class="leaflet-disclaimer">' + (d.link ? '<a target="_blank" href="' + d.link + '">' : '') + d.text + (d.link ? '</a>' : '') + '</span>' + (this._developerAttribution && this._developerAttribution.link ? '<a target="_blank" href="' + this._developerAttribution.link + '">' : '') + (this._developerAttribution ? this._developerAttribution.text : '') + (this._developerAttribution && this._developerAttribution.link ? '</a>' : '') + (this._developerAttribution ? ' | ' : '') + '<a target="_blank" href="http://leafletjs.com/">Leaflet</a>' // partially to avoid a dangling leading comma issue ); } Clock.clone(previousClock, map.clock); map.timeline.zoomTo(map.clock.startTime, map.clock.stopTime); >>>>>>> var d = this._getDisclaimer(); if (d) { this.map.attributionControl.setPrefix('<span class="leaflet-disclaimer">' + (d.link ? '<a target="_blank" href="' + d.link + '">' : '') + d.text + (d.link ? '</a>' : '') + '</span>' + (this._developerAttribution && this._developerAttribution.link ? '<a target="_blank" href="' + this._developerAttribution.link + '">' : '') + (this._developerAttribution ? this._developerAttribution.text : '') + (this._developerAttribution && this._developerAttribution.link ? '</a>' : '') + (this._developerAttribution ? ' | ' : '') + '<a target="_blank" href="http://leafletjs.com/">Leaflet</a>' // partially to avoid a dangling leading comma issue ); } <<<<<<< ======= AusGlobeViewer.prototype._getDisclaimer = function() { var d = this.terria.configParameters.disclaimer; if (d) { return new Credit(d.text ? d.text : '', undefined, d.url ? d.url : ''); } else { return null; } }; //------------------------------------ // Timeline display on selection //------------------------------------ AusGlobeViewer.prototype.createLeafletTimeline = function(clock) { var viewerContainer = document.getElementById('cesiumContainer'); var clockViewModel = new ClockViewModel(clock); var animationContainer = document.createElement('div'); animationContainer.className = 'cesium-viewer-animationContainer'; animationContainer.style.bottom = '15px'; viewerContainer.appendChild(animationContainer); this.map.animation = new Animation(animationContainer, new AnimationViewModel(clockViewModel)); var timelineContainer = document.createElement('div'); timelineContainer.className = 'cesium-viewer-timelineContainer'; timelineContainer.style.right = '0px'; timelineContainer.style.bottom = '15px'; viewerContainer.appendChild(timelineContainer); var timeline = new Timeline(timelineContainer, clock); timeline.zoomTo(clock.startTime, clock.stopTime); this.map.timeline = timeline; var that = this; timeline.scrubFunction = function(e) { if (that.map.dragging.enabled()) { that.map.dragging.disable(); that.map.on('mouseup', function(e) { that.map.dragging.enable(); }); } var clock = e.clock; clock.currentTime = e.timeJulian; clock.shouldAnimate = false; }; timeline.addEventListener('settime', timeline.scrubFunction, false); }; AusGlobeViewer.prototype.removeLeafletTimeline = function() { var viewerContainer = document.getElementById('cesiumContainer'); if (defined(this.map.animation)) { viewerContainer.removeChild(this.map.animation.container); this.map.animation = this.map.animation.destroy(); } if (defined(this.map.timeline)) { this.map.timeline.removeEventListener('settime', this.map.timeline.scrubFunction, false); viewerContainer.removeChild(this.map.timeline.container); this.map.timeline = this.map.timeline.destroy(); } }; function showTimeline(viewer) { viewer.animation._container.style.visibility = 'visible'; viewer.timeline.container.style.visibility = 'visible'; if (defined(viewer.forceResize)) { viewer.forceResize(); } } function hideTimeline(viewer) { viewer.animation._container.style.visibility = 'hidden'; viewer.timeline.container.style.visibility = 'hidden'; if (defined(viewer.forceResize)) { viewer.forceResize(); } } //update the timeline AusGlobeViewer.prototype.updateTimeline = function(start, finish, cur, run) { var viewer = this.viewer; var clock = defined(viewer) ? this.viewer.clock : this.map.clock; var timeline = defined(viewer) ? this.viewer.timeline : this.map.timeline; if (start === undefined || finish === undefined) { hideTimeline(viewer); clock.clockRange = ClockRange.UNBOUNDED; clock.shouldAnimate = false; } else { showTimeline(viewer); clock.startTime = start; clock.currentTime = (defined(cur)) ? cur : start; clock.stopTime = finish; clock.multiplier = JulianDate.secondsDifference(finish, start) / 60.0; clock.clockRange = ClockRange.LOOP_STOP; clock.shouldAnimate = defined(run) ? run : false; timeline.zoomTo(clock.startTime, clock.stopTime); } }; AusGlobeViewer.prototype.getTimelineSettings = function() { var viewer = this.viewer || this.map; if (!defined(viewer) || viewer.animation._container.style.visibility === 'hidden') { return {}; } var clock = viewer.clock; return {start: clock.startTime, stop: clock.stopTime, cur: clock.currentTime}; }; >>>>>>> AusGlobeViewer.prototype._getDisclaimer = function() { var d = this.terria.configParameters.disclaimer; if (d) { return new Credit(d.text ? d.text : '', undefined, d.url ? d.url : ''); } else { return null; } };
<<<<<<< var url = 'http://spatialreference.org/ref/epsg/'+code.substring(5)+'/proj4/'; loadText(url).then(function (proj4Text) { ======= var url = 'http://geospace.research.nicta.com.au/proj4def/' + code; Cesium.loadText(url).then(function (proj4Text) { >>>>>>> var url = 'http://geospace.research.nicta.com.au/proj4def/' + code; loadText(url).then(function (proj4Text) {
<<<<<<< /** * Gets or sets a value indicating whether the map will automatically zoom to this catalog item when it is enabled. * @type {Boolean} * @default false */ this.zoomOnEnable = false; ======= this.dateFormat = {}; >>>>>>> /** * Gets or sets a value indicating whether the map will automatically zoom to this catalog item when it is enabled. * @type {Boolean} * @default false */ this.zoomOnEnable = false; this.dateFormat = {};
<<<<<<< /** * Gets or sets whether this WMS has been identified as being provided by a GeoServer. * @type {Boolean} */ this.isGeoServer = undefined; /** * Gets or sets whether this WMS has been identified as being provided by an Esri ArcGIS MapServer. No assumption is made about where an ArcGIS MapServer endpoint also exists. * @type {Boolean} */ this.isEsri = undefined; ======= this.displayDuration = undefined; >>>>>>> /** * Gets or sets whether this WMS has been identified as being provided by a GeoServer. * @type {Boolean} */ this.isGeoServer = undefined; /** * Gets or sets whether this WMS has been identified as being provided by an Esri ArcGIS MapServer. No assumption is made about where an ArcGIS MapServer endpoint also exists. * @type {Boolean} */ this.isEsri = undefined; this.displayDuration = undefined;
<<<<<<< } // Given an interval index, set up an imagery provider and layer. function nextLayerFromIndex(index) { const imageryProvider = catalogItem.createImageryProvider(catalogItem.intervals.get(index).data); imageryProvider.enablePickFeatures = false; catalogItem._nextLayer = ImageryLayerCatalogItem.enableLayer(catalogItem, imageryProvider, 0.0); updateSplitDirection(catalogItem); ImageryLayerCatalogItem.showLayer(catalogItem, catalogItem._nextLayer); } const intervals = catalogItem.intervals; if (!defined(currentTime) || !defined(intervals) || !catalogItem.isEnabled || !catalogItem.isShown) { return; } const oldIndex = catalogItem._currentIntervalIndex; if (oldIndex >= 0 && oldIndex < intervals.length && TimeInterval.contains(intervals.get(oldIndex), currentTime)) { // the currently shown imagery's interval contains the requested time, so nothing to do. return; } // Find the interval containing the current time. const currentTimeIndex = intervals.indexOf(currentTime); if (currentTimeIndex < 0) { // No interval contains this time, so do not show imagery at this time. ImageryLayerCatalogItem.disableLayer(catalogItem, catalogItem._imageryLayer); clearCurrent(); return; } else if (currentTimeIndex !== catalogItem._nextIntervalIndex) { // We have a "next" layer, but it's not the right one, so discard it. ImageryLayerCatalogItem.disableLayer(catalogItem, catalogItem._nextLayer); // Create the new "next" layer, which we will immediately use nextLayerFromIndex(currentTimeIndex); } // At this point we can assume that _nextLayer is applicable to this time. replaceCurrentWithNext(); clearNext(); catalogItem._currentIntervalIndex = currentTimeIndex; if (preloadNext) { // Prefetch the (predicted) next layer. // Here we use the terria clock because we want to optimise for the case where the item is playing on the // timeline (which is linked to the terria clock) and preload the layer at the next time that the timeslider // will move to. let nextIndex = currentTimeIndex + (catalogItem.terria.clock.multiplier >= 0.0 ? 1 : -1); if ((nextIndex === intervals.length) && (catalogItem.terria.clock.clockRange === ClockRange.LOOP_STOP)) { nextIndex = 0; } if (nextIndex >= 0 && nextIndex < intervals.length && nextIndex !== catalogItem._nextIntervalIndex) { // Yes, we have found a non-cached, valid time index. nextLayerFromIndex(nextIndex); catalogItem._nextIntervalIndex = nextIndex; ======= clearNext(); } // Given an interval index, set up an imagery provider and layer. function nextLayerFromIndex(index) { const imageryProvider = catalogItem.createImageryProvider(catalogItem.intervals.get(index).data); imageryProvider.enablePickFeatures = false; catalogItem._nextLayer = ImageryLayerCatalogItem.enableLayer(catalogItem, imageryProvider, 0.0); updateSplitDirection(catalogItem); ImageryLayerCatalogItem.showLayer(catalogItem, catalogItem._nextLayer); } const intervals = catalogItem.intervals; if (!defined(currentTime) || !defined(intervals) || !catalogItem.isEnabled || !catalogItem.isShown) { return; } const oldIndex = catalogItem._currentIntervalIndex; if (oldIndex >= 0 && oldIndex < intervals.length && TimeInterval.contains(intervals.get(oldIndex), currentTime)) { // the currently shown imagery's interval contains the requested time, so nothing to do. return; } // Find the interval containing the current time. const currentTimeIndex = intervals.indexOf(currentTime); if (currentTimeIndex < 0) { // No interval contains this time, so do not show imagery at this time. ImageryLayerCatalogItem.disableLayer(catalogItem, catalogItem._imageryLayer); clearCurrent(); return; } else if (currentTimeIndex !== catalogItem._nextIntervalIndex) { // We have a "next" layer, but it's not the right one, so discard it. ImageryLayerCatalogItem.disableLayer(catalogItem, catalogItem._nextLayer); // clearNext(); // seems redundant // Create the new "next" layer, which we will immediately use nextLayerFromIndex(currentTimeIndex); } // At this point we can assume that _nextLayer is applicable to this time. replaceCurrentWithNext(); catalogItem._currentIntervalIndex = currentTimeIndex; if (preloadNext) { // Prefetch the (predicted) next layer. // Here we use the terria clock because we want to optimise for the case where the item is playing on the // timeline (which is linked to the terria clock) and preload the layer at the next time that the timeslider // will move to. let nextIndex = currentTimeIndex + (catalogItem.terria.clock.multiplier >= 0.0 ? 1 : -1); if ((nextIndex === intervals.length) && (catalogItem.terria.clock.clockRange === ClockRange.LOOP_STOP)) { nextIndex = 0; } if (nextIndex >= 0 && nextIndex < intervals.length && nextIndex !== catalogItem._nextIntervalIndex) { // Yes, we have found a non-cached, valid time index. nextLayerFromIndex(nextIndex); catalogItem._nextIntervalIndex = nextIndex; >>>>>>> clearNext(); } // Given an interval index, set up an imagery provider and layer. function nextLayerFromIndex(index) { const imageryProvider = catalogItem.createImageryProvider(catalogItem.intervals.get(index).data); imageryProvider.enablePickFeatures = false; catalogItem._nextLayer = ImageryLayerCatalogItem.enableLayer(catalogItem, imageryProvider, 0.0); updateSplitDirection(catalogItem); ImageryLayerCatalogItem.showLayer(catalogItem, catalogItem._nextLayer); } const intervals = catalogItem.intervals; if (!defined(currentTime) || !defined(intervals) || !catalogItem.isEnabled || !catalogItem.isShown) { return; } const oldIndex = catalogItem._currentIntervalIndex; if (oldIndex >= 0 && oldIndex < intervals.length && TimeInterval.contains(intervals.get(oldIndex), currentTime)) { // the currently shown imagery's interval contains the requested time, so nothing to do. return; } // Find the interval containing the current time. const currentTimeIndex = intervals.indexOf(currentTime); if (currentTimeIndex < 0) { // No interval contains this time, so do not show imagery at this time. ImageryLayerCatalogItem.disableLayer(catalogItem, catalogItem._imageryLayer); clearCurrent(); return; } else if (currentTimeIndex !== catalogItem._nextIntervalIndex) { // We have a "next" layer, but it's not the right one, so discard it. ImageryLayerCatalogItem.disableLayer(catalogItem, catalogItem._nextLayer); // Create the new "next" layer, which we will immediately use nextLayerFromIndex(currentTimeIndex); } // At this point we can assume that _nextLayer is applicable to this time. replaceCurrentWithNext(); catalogItem._currentIntervalIndex = currentTimeIndex; if (preloadNext) { // Prefetch the (predicted) next layer. // Here we use the terria clock because we want to optimise for the case where the item is playing on the // timeline (which is linked to the terria clock) and preload the layer at the next time that the timeslider // will move to. let nextIndex = currentTimeIndex + (catalogItem.terria.clock.multiplier >= 0.0 ? 1 : -1); if ((nextIndex === intervals.length) && (catalogItem.terria.clock.clockRange === ClockRange.LOOP_STOP)) { nextIndex = 0; } if (nextIndex >= 0 && nextIndex < intervals.length && nextIndex !== catalogItem._nextIntervalIndex) { // Yes, we have found a non-cached, valid time index. nextLayerFromIndex(nextIndex); catalogItem._nextIntervalIndex = nextIndex;
<<<<<<< return s.length; } export default wordCount; ======= return s.split(' ').length; } >>>>>>> return s.length; }
<<<<<<< var PopupMessageViewModel = require('./PopupMessageViewModel'); var PopupMessageConfirmationViewModel = require('./PopupMessageConfirmationViewModel'); var knockout = require('terriajs-cesium/Source/ThirdParty/knockout'); ======= >>>>>>> var knockout = require('terriajs-cesium/Source/ThirdParty/knockout');
<<<<<<< var CustomComponents = require('../Models/CustomComponents'); ======= var propertyGetTimeValues = require('../Core/propertyGetTimeValues'); >>>>>>> var CustomComponents = require('../Models/CustomComponents'); var propertyGetTimeValues = require('../Core/propertyGetTimeValues');
<<<<<<< var defaultReplaceWithNullValues = ['-', 'na', 'NA']; ======= var defaultReplaceWithNullValues = ['na', 'NA']; var defaultReplaceWithZeroValues = [null, '-']; >>>>>>> var defaultReplaceWithNullValues = ['na', 'NA']; var defaultReplaceWithZeroValues = [null, '-']; <<<<<<< * @param {VarType[]} [options.displayVariableTypes] If present, only make this variable visible if its type is in this list. * @param {String[]} [options.replaceWithNullValues] If present, and this is a SCALAR type with at least one numerical value, then replace these values with null. * Defaults to ['-', 'na']. ======= * @param {VarType[]} [options.displayVariableTypes] If present, only make this variable visible if its type is in this list. * @param {String[]} [options.replaceWithNullValues] If present, and this is a SCALAR type with at least one numerical value, then replace these values with null. * Defaults to ['na', 'NA']. * @param {String[]} [options.replaceWithZeroValues] If present, and this is a SCALAR type with at least one numerical value, then replace these values with 0. * Defaults to [null, '-']. (Blank values like '' are converted to null before they reach here, so use null instead of '' to catch missing values.) >>>>>>> * @param {VarType[]} [options.displayVariableTypes] If present, only make this variable visible if its type is in this list. * @param {String[]} [options.replaceWithNullValues] If present, and this is a SCALAR type with at least one numerical value, then replace these values with null. * Defaults to ['na', 'NA']. * @param {String[]} [options.replaceWithZeroValues] If present, and this is a SCALAR type with at least one numerical value, then replace these values with 0. * Defaults to [null, '-']. (Blank values like '' are converted to null before they reach here, so use null instead of '' to catch missing values.) <<<<<<< this._numericalValues = values && values.filter(function(value) { return typeof value === 'number'; }); if ((this._type === VarType.SCALAR) && (this._numericalValues.length > 0)) { // Before setting this._values, replace '-' and 'NA' etc with null. Min/max values ignore nulls. this._values = replaceValues(values, defaultValue(this.options.replaceWithNullValues, defaultReplaceWithNullValues)); } else { this._values = values; } this._minimumValue = Math.min.apply(null, this._values); // Note: a single NaN value makes this NaN (hence replaceValues above). this._maximumValue = Math.max.apply(null, this._values); ======= this._numericalValues = values && values.filter(function(value) { return typeof value === 'number'; }); if ((this._type === VarType.SCALAR) && (this._numericalValues.length > 0)) { // Before setting this._values, replace '-' and 'NA' etc with zero/null. Min/max values ignore nulls. this._values = replaceValues(values, defaultValue(this.options.replaceWithZeroValues, defaultReplaceWithZeroValues), defaultValue(this.options.replaceWithNullValues, defaultReplaceWithNullValues) ); } else { this._values = values; } this._minimumValue = Math.min.apply(null, this._values); // Note: a single NaN value makes this NaN (hence replaceValues above). this._maximumValue = Math.max.apply(null, this._values); >>>>>>> this._numericalValues = values && values.filter(function(value) { return typeof value === 'number'; }); if ((this._type === VarType.SCALAR) && (this._numericalValues.length > 0)) { // Before setting this._values, replace '-' and 'NA' etc with zero/null. Min/max values ignore nulls. this._values = replaceValues(values, defaultValue(this.options.replaceWithZeroValues, defaultReplaceWithZeroValues), defaultValue(this.options.replaceWithNullValues, defaultReplaceWithNullValues) ); } else { this._values = values; } this._minimumValue = Math.min.apply(null, this._values); // Note: a single NaN value makes this NaN (hence replaceValues above). this._maximumValue = Math.max.apply(null, this._values); <<<<<<< function replaceValues(values, replaceWithNullValues) { // Replace "bad" values like "-" or "na" with null. // Note this does not go back and update TableStructure._rows, so the row descriptions will still show the original values. return values.map(function(value) { if (replaceWithNullValues.indexOf(value) >= 0) { return null; } return value; }); } ======= function replaceValues(values, replaceWithZeroValues, replaceWithNullValues) { // Replace "bad" values like "-" with zero, and "na" with null. var replaced = values.map(function(value) { return (replaceWithZeroValues.indexOf(value) >= 0) ? 0 : value; }); return replaced.map(function(value) { return (replaceWithNullValues.indexOf(value) >= 0) ? null : value; }); } >>>>>>> function replaceValues(values, replaceWithZeroValues, replaceWithNullValues) { // Replace "bad" values like "-" with zero, and "na" with null. // Note this does not go back and update TableStructure._rows, so the row descriptions will still show the original values. var replaced = values.map(function(value) { return (replaceWithZeroValues.indexOf(value) >= 0) ? 0 : value; }); return replaced.map(function(value) { return (replaceWithNullValues.indexOf(value) >= 0) ? null : value; }); }
<<<<<<< /** * An indicator that is incremented if the current data item needs a menu. If it is 0 the current data item * shows no timeline. * @type {Integer} * @default 0 */ this.showTimeline = 0; knockout.track(this, ['viewerMode', 'baseMap', '_initialView', 'homeView', 'pickedFeatures', 'selectedFeature', 'configParameters', 'showTimeline']); ======= knockout.track(this, ['viewerMode', 'baseMap', 'baseMapName', '_initialView', 'homeView', 'pickedFeatures', 'selectedFeature', 'configParameters']); >>>>>>> /** * An indicator that is incremented if the current data item needs a menu. If it is 0 the current data item * shows no timeline. * @type {Integer} * @default 0 */ this.showTimeline = 0; knockout.track(this, ['viewerMode', 'baseMap', 'baseMapName', '_initialView', 'homeView', 'pickedFeatures', 'selectedFeature', 'configParameters', 'showTimeline']);
<<<<<<< const linesWithoutData = g.selectAll('.line'); const lines = linesWithoutData.data(data, d => d.id).attr('class', 'line'); const definedLines = linesWithoutData[0].filter(l => defined(l)); // Some axis animations need to be a little different if this is the first time we are showing the graph. // Assume it's the first time if we have no lines yet, OR if we have one line and it's the same id. // (Added the second part because often we update the chart straight after creating it, with unchanged data.) // This could probably be simplified. const isFirstLine = (definedLines.length === 0) || (definedLines.length === 1 && data.length === 1 && definedLines[0].__data__.id === data[0].id); ======= const lines = g.selectAll('.line').data(data, d => d.id).attr('class', 'line'); const isFirstLine = (!defined(lines.nodes()[0])); >>>>>>> // Some axis animations need to be a little different if this is the first time we are showing the graph. // Assume it's the first time if we have no lines yet. const lines = g.selectAll('.line').data(data, d => d.id).attr('class', 'line'); const isFirstLine = (!defined(lines.nodes()[0])); <<<<<<< ======= .transition(t) >>>>>>> .transition(t)
<<<<<<< panel.showFeatures(pickedFeatures).then(function() { expect(panel.sections[0].infoHtml).toBe('<div>test bar</div>'); }).otherwise(done.fail).then(done); ======= }); it('uses and completes a string-form featureInfoTemplate if present', function(done) { item.featureInfoTemplate = 'A {{type}} made of {{material}} with {{funding_ba}} funding.'; item.load().then(function() { expect(item.dataSource.entities.values.length).toBeGreaterThan(0); panel.terria.nowViewing.add(item); var feature = item.dataSource.entities.values[0]; var pickedFeatures = new PickedFeatures(); pickedFeatures.features.push(feature); pickedFeatures.allFeaturesAvailablePromise = runLater(function() {}); panel.showFeatures(pickedFeatures).then(function() { expect(panel.sections[0].info).toBe('A Hoop_Big made of Stainless Steel with Capex funding.'); }).otherwise(done.fail).then(done); }).otherwise(done.fail); >>>>>>> }); it('uses and completes a string-form featureInfoTemplate if present', function(done) { item.featureInfoTemplate = 'A {{type}} made of {{material}} with {{funding_ba}} funding.'; item.load().then(function() { expect(item.dataSource.entities.values.length).toBeGreaterThan(0); panel.terria.nowViewing.add(item); var feature = item.dataSource.entities.values[0]; var pickedFeatures = new PickedFeatures(); pickedFeatures.features.push(feature); pickedFeatures.allFeaturesAvailablePromise = runLater(function() {}); panel.showFeatures(pickedFeatures).then(function() { expect(panel.sections[0].infoHtml).toBe('A Hoop_Big made of Stainless Steel with Capex funding.'); }).otherwise(done.fail).then(done); }).otherwise(done.fail); <<<<<<< panel.showFeatures(pickedFeatures).then(function() { expect(panel.sections[0].infoHtml).toBe('<div><h1>bar</h1> Hello Jay&lt;br&gt;</div>'); }).otherwise(done.fail).then(done); ======= >>>>>>> }); it('uses and completes a string-form featureInfoTemplate if present', function(done) { item.featureInfoTemplate = 'A {{type}} made of {{material}} with {{funding_ba}} funding.'; item.load().then(function() { expect(item.dataSource.entities.values.length).toBeGreaterThan(0); panel.terria.nowViewing.add(item); var feature = item.dataSource.entities.values[0]; var pickedFeatures = new PickedFeatures(); pickedFeatures.features.push(feature); pickedFeatures.allFeaturesAvailablePromise = runLater(function() {}); panel.showFeatures(pickedFeatures).then(function() { expect(panel.sections[0].infoHtml).toBe('A Hoop_Big made of Stainless Steel with Capex funding.'); }).otherwise(done.fail).then(done); }).otherwise(done.fail); }); it('must use triple braces to embed html in template', function(done) { item.featureInfoTemplate = '<div>Hello {{name}} - {{{name}}}</div>'; item.load().then(function() { expect(item.dataSource.entities.values.length).toBeGreaterThan(0); panel.terria.nowViewing.add(item); var feature = item.dataSource.entities.values[0]; feature.properties['name'] = 'Jay<br>'; var pickedFeatures = new PickedFeatures(); pickedFeatures.features.push(feature); pickedFeatures.allFeaturesAvailablePromise = runLater(function() {}); panel.showFeatures(pickedFeatures).then(function() { expect(panel.sections[0].infoHtml).toBe('<div>Hello Jay&lt;br&gt; - Jay<br></div>'); }).otherwise(done.fail).then(done); }).otherwise(done.fail); <<<<<<< panel.showFeatures(pickedFeatures).then(function() { expect(terria.clock.onTick.numberOfListeners).toEqual(2); }).otherwise(done.fail).then(function() { // now, when no features are chosen, they should go away pickedFeatures = new PickedFeatures(); pickedFeatures.allFeaturesAvailablePromise = runLater(function() {}); ======= >>>>>>>
<<<<<<< var TableStyle = require('../../lib/Models/TableStyle'); ======= var sinon = require('sinon'); var TableStyle = require('../../lib/Map/TableStyle'); >>>>>>> var sinon = require('sinon'); var TableStyle = require('../../lib/Models/TableStyle');
<<<<<<< ======= function pickObject(cesium, e) { var pickRay = cesium.scene.camera.getPickRay(e.position); var pickPosition = cesium.scene.globe.pick(pickRay, cesium.scene); var pickPositionCartographic = Ellipsoid.WGS84.cartesianToCartographic(pickPosition); var result = new PickedFeatures(); result.pickPosition = pickPosition; // Pick vector features var picked = cesium.scene.drillPick(e.position); for (var i = 0; i < picked.length; ++i) { var id = picked[i].id; if (id && id.entityCollection && id.entityCollection.owner && id.entityCollection.owner.name === GlobeOrMap._featureHighlightName) { continue; } if (!defined(id) && defined(picked[i].primitive)) { id = picked[i].primitive.id; } if (id instanceof Entity && result.features.indexOf(id) === -1) { result.features.push(id); } } // Pick raster features var promise = cesium.scene.imageryLayers.pickImageryLayerFeatures(pickRay, cesium.scene); result.allFeaturesAvailablePromise = when(promise, function(features) { result.isLoading = false; if (!defined(features)) { return; } for (var i = 0; i < features.length; ++i) { var feature = features[i]; // If the picked feature does not have a height, use the height of the picked location. // This at least avoids major parallax effects on the selection indicator. if (!defined(feature.position.height) || feature.position.height === 0.0) { feature.position.height = pickPositionCartographic.height; } result.features.push(cesium._createEntityFromImageryLayerFeature(feature)); } }).otherwise(function(e) { result.isLoading = false; result.error = 'An unknown error occurred while picking features.'; }); cesium.terria.pickedFeatures = result; } >>>>>>>
<<<<<<< pickedFeatures.features.push(leaflet._createFeatureFromImageryLayerFeature(feature)); ======= // For features without a position, use the picked location. if (!defined(feature.position)) { feature.position = pickedLocation; >>>>>>> // For features without a position, use the picked location. if (!defined(feature.position)) { feature.position = pickedLocation; <<<<<<< var mapInteractionModeStack = leaflet.terria.mapInteractionModeStack; if (defined(mapInteractionModeStack) && mapInteractionModeStack.length > 0) { mapInteractionModeStack[mapInteractionModeStack.length - 1].pickedFeatures = leaflet._pickedFeatures; } else { leaflet.terria.pickedFeatures = leaflet._pickedFeatures; } leaflet._pickedFeatures = undefined; ======= leaflet.terria.pickedFeatures = leaflet._pickedFeatures; >>>>>>> var mapInteractionModeStack = leaflet.terria.mapInteractionModeStack; if (defined(mapInteractionModeStack) && mapInteractionModeStack.length > 0) { mapInteractionModeStack[mapInteractionModeStack.length - 1].pickedFeatures = leaflet._pickedFeatures; } else { leaflet.terria.pickedFeatures = leaflet._pickedFeatures; }
<<<<<<< var TableDataSource = require('../Map/TableDataSource'); var TileLayerFilter = require('../ThirdParty/TileLayer.Filter'); var RegionProviderList = require('../Map/RegionProviderList'); var ImageryProviderHooks = require('../Map/ImageryProviderHooks'); var TableStyle = require('../Map/TableStyle'); var MapboxVectorTileImageryProvider = require('../MapboxVectorTileImageryProvider'); TileLayerFilter.initialize(L); ======= var TableDataSource = require('../Models/TableDataSource'); var TableStyle = require('../Models/TableStyle'); >>>>>>> var TableDataSource = require('../Models/TableDataSource'); var TableStyle = require('../Models/TableStyle'); var MapboxVectorTileImageryProvider = require('../MapboxVectorTileImageryProvider'); <<<<<<< /** * For region-mapped files, enable the WMS imagery layer, with recoloring and feature picking. */ CsvCatalogItem.prototype._createImageryProvider = function(time) { var imageryProvider = new MapboxVectorTileImageryProvider({ url: 'http://127.0.0.1:8000/SA4/{z}/{x}/{y}.pbf', layerName: 'FID_SA4_2011_AUST', csvItem: this, colorFunc: this._colorFunc, subdomains: ['a', 'b', 'c'], rectangle: new Rectangle(1.6897743921618487, -0.7634159159906613, 2.7769797418274336, -0.15956107199088243), // Rectangle from http://www.censusdata.abs.gov.au/arcgis/rest/services/2011_SA4/MapServer (Full Extent) converted using Cesium's // WebMercatorProjection.unproject() }); // new WebMapServiceImageryProvider({ // url: proxyCatalogItemUrl( this, this._regionProvider.server), // layers: this._regionProvider.layerName, // parameters: WebMapServiceCatalogItem.defaultParameters, // getFeatureInfoParameters: WebMapServiceCatalogItem.defaultParameters, // tilingScheme: new WebMercatorTilingScheme() // }); // var that = this; // ImageryProviderHooks.addRecolorFunc(imageryProvider, this._colorFunc); // ImageryProviderHooks.addPickFeaturesHook(imageryProvider, function(results) { // if (!defined(results) || results.length === 0) { // return; // } // // for (var i = 0; i < results.length; ++i) { // var uniqueId = results[i].data.properties[that._regionProvider.uniqueIdProp]; // var properties = that.rowProperties(uniqueId); // results[i].description = that._tableDataSource.describe(properties); // } // // return results; // }); return imageryProvider; }; /** * Get a row, given a region code. */ CsvCatalogItem.prototype.rowProperties = function(uniqueId) { var rv = this.tableStyle.regionVariable; var row = this._tableDataSource.dataset.variables[rv].getRowByRegionUniqueId(uniqueId); if (!defined(row)) { return undefined; } return this._tableDataSource.dataset.getDataRow(row); }; CsvCatalogItem.prototype.rowPropertiesByCode = function(code) { var rv = this.tableStyle.regionVariable; var row = this._tableDataSource.dataset.variables[rv].getRowByRegionCode(code); if (!defined(row)) { return undefined; } return this._tableDataSource.dataset.getDataRow(row); }; function updateOpacity(csvItem) { if (defined(csvItem._imageryLayer)) { if (defined(csvItem._imageryLayer.alpha)) { csvItem._imageryLayer.alpha = csvItem.opacity; } if (defined(csvItem._imageryLayer.setOpacity)) { csvItem._imageryLayer.setOpacity(csvItem.opacity); } csvItem.terria.currentViewer.notifyRepaintRequired(); } } CsvCatalogItem.prototype._redisplay = function() { if (defined(this._imageryLayer)) { var layerIndex = this._imageryLayer._layerIndex; this._hide(); this._disable(); this._enable(layerIndex); this._show(); } }; CsvCatalogItem.prototype.dynamicUpdate = function(text) { this.data = text; var that = this; return when(this.load()).then(function () { that._redisplay(); }); }; function updateClockSubscription(csvItem) { if (csvItem.isShown && defined(csvItem.clock) && csvItem._regionMapped) { // Subscribe if (!defined(csvItem._clockTickSubscription)) { csvItem._clockTickSubscription = csvItem.terria.clock.onTick.addEventListener(onClockTick.bind(undefined, csvItem)); } } else { // Unsubscribe if (defined(csvItem._clockTickSubscription)) { csvItem._clockTickSubscription(); csvItem._clockTickSubscription = undefined; } } } /* Check if we need to display a new set of points/regions due to the time changing. */ function onClockTick(csvItem, clock) { if (!csvItem._tableDataSource.dataset.hasTimeData()) { return; } if (!csvItem.isEnabled || !csvItem.isShown) { return; } //check if time has changed if (defined(csvItem.lastTime) && JulianDate.equals(clock.currentTime, csvItem.lastTime)) { return; } csvItem.lastTime = clock.currentTime; //check if record data has changed var activeRows = csvItem._tableDataSource.getDataPointList(clock.currentTime); var activeRowsText = JSON.stringify(activeRows); if (defined(csvItem.activeRowsText) && activeRowsText === csvItem.activeRowsText) { return; } csvItem.activeRowsText = activeRowsText; //redisplay if we have new data csvItem.activeRows = activeRows; updateRegionMapping(csvItem, csvItem._tableStyle, false); csvItem._redisplay(); } /* Creates a new clock from a region-mapped datasource. */ function initClockFromDataSource(csvItem) { var source = csvItem._tableDataSource; if (!csvItem._regionMapped) { return source.clock; } if (defined(csvItem.clock)) { return csvItem.clock; } if (defined(source) && defined(source.dataset) && source.dataset.hasTimeData()) { var newClock = new DataSourceClock(); newClock.startTime = source.dataset.getTimeMinValue(); newClock.stopTime = source.dataset.getTimeMaxValue(); newClock.currentTime = newClock.startTime; newClock.multiplier = JulianDate.secondsDifference(newClock.stopTime, newClock.startTime) / 60; return newClock; } return undefined; } function finishTableLoad(csvItem) { csvItem.clock = initClockFromDataSource(csvItem); //prepare visuals and repaint if (!defined(csvItem.rectangle)) { csvItem.rectangle = csvItem._tableDataSource.dataset.getExtent(); } csvItem.legendUrl = csvItem._tableDataSource.getLegendGraphic(); csvItem.terria.currentViewer.notifyRepaintRequired(); } function loadTable(csvItem, text) { var p = when(); if (defined(csvItem._tableStyle)) { // also sets regionVariable if provided. // may return a promise if colour maps need to be fetched. p = when(csvItem._tableDataSource.setDisplayStyle(csvItem._tableStyle)); // also set the dataVariable if provided. if (defined(csvItem._tableStyle.dataVariable)) { csvItem._tableDataSource.setDataVariable(csvItem._tableStyle.dataVariable); } } var dataset; return p.then(function() { csvItem._tableDataSource.loadText(text); dataset = csvItem._tableDataSource.dataset; // If there is specifically a 'lat' and 'lon' column. if (dataset.hasLocationData()) { if (!defined(csvItem._tableStyle.dataVariable)) { csvItem._tableStyle.dataVariable = dataset.setDefaultDataVariable(); // chooseDataVariable(csvItem); } return; } console.log('No lat&lon columns found in csv file - trying to match based on region'); return RegionProviderList.fromUrl(csvItem.terria.regionMappingDefinitionsUrl) .then(function(rm) { if (dataset.checkForRegionVariable(rm)) { return updateTableStyle(csvItem, initRegionMapStyle(csvItem, rm)); } }) .then(function() { if (!csvItem._regionMapped) { throw new ModelError({ sender: csvItem, title: 'Unable to load CSV file', message: 'CSV files must contain either: ' + '<ul><li>&nbsp;• "lat" and "lon" fields; or</li>' + '<li>&nbsp;• a region column like "postcode" or "sa4".</li></ul><br/><br/>' + 'See <a href="https://github.com/NICTA/nationalmap/wiki/csv-geo-au">the csv-geo-au</a> specification for more.' }); } }); }).then(function() { finishTableLoad(csvItem); }); } /* Initialise region map properties. */ function initRegionMapStyle(csvItem, regionProviderList) { csvItem._colorFunc = function(id) { return [0,0,0,0]; }; var dataSource = csvItem._tableDataSource; var dataset = dataSource.dataset; if (dataset.getRowCount() === 0) { return; } //fill in missing tableStyle settings var tableStyle = csvItem._tableStyle || new TableStyle({}); if (defined(tableStyle.regionType) && defined(tableStyle.regionVariable)) { // we have a text description of the provider we want, so go and get it. csvItem._regionProvider = regionProviderList.getRegionProvider(tableStyle.regionType); // #TODO Support explicit disambig columns. } else { // we don't know that region to match, so take an educated guess. dataset.checkForRegionVariable(regionProviderList); tableStyle.regionVariable = dataset.getRegionVariable(); csvItem._regionProvider = dataset.getRegionProvider(); tableStyle.disambigVariable = dataset.getDisambigVariable(); } if (!defined(csvItem._regionProvider)) { return; } if (!defined(tableStyle.dataVariable)) { tableStyle.dataVariable = dataSource.dataset.setDefaultDataVariable(); } // if no color map is provided through an init file, use this default colour scheme if (!defined(tableStyle.colorMap) && !defined(tableStyle.colorPalette)) { tableStyle.chooseColorMap(dataset, dataset.variables[dataset.getDataVariable()]); } return tableStyle; } /* Set tableStyle property and redraw */ function updateTableStyle(csvItem, tableStyle) { csvItem._tableStyle = (tableStyle instanceof TableStyle ? tableStyle : new TableStyle(tableStyle)); if (!(csvItem._tableDataSource instanceof TableDataSource)) { return; } csvItem._tableDataSource.setDisplayStyle(csvItem._tableStyle); if (!defined(csvItem._regionProvider) || !defined(csvItem._tableStyle.regionVariable)) { return; } var regionProvider = csvItem._regionProvider; return regionProvider.loadRegionIDs() .then(function(requiredReload) { updateRegionMapping(csvItem, tableStyle, requiredReload !== false); csvItem._redisplay(); }); } function updateRegionMapping(csvItem, tableStyle, showFeedback) { function displayFeedback (results, regionVariable, itemName, terria) { var msg = ""; if (Object.keys(results.failedMatches).length > 0) { msg += 'These region names were <span class="warning-text">not recognised</span>: <br><br/>' + '<samp>' + Object.keys(results.failedMatches).join('</samp>, <samp>') + '</samp>' + '<br/><br/>'; } if (Object.keys(results.ambiguousMatches).length > 0) { msg += 'These regions had <span class="warning-text">more than one value</span>: <br/><br/>' + '<samp>' + Object.keys(results.ambiguousMatches).join("</samp>, <samp>") + '</samp>' + '<br/><br/>'; } if (!msg) { console.log(results.successes + ' out of ' + results.totalRows + ' "' + regionVariable + '" regions matched successfully in ' + itemName); return; } msg = "" + results.successes + " out of " + results.totalRows + " '<samp>" + regionVariable + "</samp>' regions matched.<br/><br/>" + msg; msg += 'Consult the <a href="https://github.com/NICTA/nationalmap/wiki/csv-geo-au">CSV-geo-au specification</a> to see how to format the CSV file.'; var error = new ModelError({ title: "Issues loading CSV file: " + itemName.slice(0,20), // Long titles mess up the message body message: '<div>'+ msg +'</div>' }); if (results.successes === 0) { // No rows matched, so abort - don't add it to catalogue at all. throw error; } else { // Just warn the user. Ideally we'd avoid showing the warning when switching between columns. terria.error.raiseEvent(error); } } var results = csvItem._regionProvider.getRegionValues(csvItem._tableDataSource.dataset, tableStyle.regionVariable, tableStyle.disambigVariable, csvItem.activeRows); // ok if activeRows is undefined if (showFeedback && csvItem.showWarnings) { displayFeedback(results, tableStyle.regionVariable, csvItem.name, csvItem.terria); } csvItem._colorFunc = csvItem._regionProvider.getColorLookupFunc(results.regionValues, csvItem._tableDataSource._mapValue2Color.bind(csvItem._tableDataSource)); csvItem._regionMapped = true; } ======= >>>>>>> /* CsvCatalogItem.prototype._createImageryProvider = function(time) { var imageryProvider = new MapboxVectorTileImageryProvider({ url: 'http://127.0.0.1:8000/SA4/{z}/{x}/{y}.pbf', layerName: 'FID_SA4_2011_AUST', csvItem: this, colorFunc: this._colorFunc, subdomains: ['a', 'b', 'c'], rectangle: new Rectangle(1.6897743921618487, -0.7634159159906613, 2.7769797418274336, -0.15956107199088243), // Rectangle from http://www.censusdata.abs.gov.au/arcgis/rest/services/2011_SA4/MapServer (Full Extent) converted using Cesium's // WebMercatorProjection.unproject() }); */
<<<<<<< var when = require('terriajs-cesium/Source/ThirdParty/when'); ======= var runLater = require('../Core/runLater'); var arraysAreEqual = require('../Core/arraysAreEqual'); >>>>>>> var when = require('terriajs-cesium/Source/ThirdParty/when'); var runLater = require('../Core/runLater'); var arraysAreEqual = require('../Core/arraysAreEqual'); <<<<<<< /** * A short report to show on the now viewing tab. This property is observable. * @type {String} */ this.shortReport = undefined; /** * The list of collapsible sections of the short report. Each element of the array is an object literal * with a `name` and `content` property. * @type {ShortReportSection[]} */ this.shortReportSections = []; knockout.track(this, ['name', 'info', 'infoSectionOrder', 'description', 'isUserSupplied', 'isPromoted', 'initialMessage', 'isHidden', 'cacheDuration', 'customProperties', 'shortReport', 'shortReportSections']); ======= /** * Gets or sets a value indicating whether this data source is currently loading. This property is observable. * @type {Boolean} */ this.isLoading = false; /** * Whether this catalog member is waiting for a disclaimer to be accepted before showing itself. * * @type {boolean} */ this.isWaitingForDisclaimer = false; knockout.track(this, ['name', 'info', 'infoSectionOrder', 'description', 'isUserSupplied', 'isPromoted', 'initialMessage', 'isHidden', 'cacheDuration', 'customProperties', 'isLoading', 'isWaitingForDisclaimer']); >>>>>>> /** * A short report to show on the now viewing tab. This property is observable. * @type {String} */ this.shortReport = undefined; /** * The list of collapsible sections of the short report. Each element of the array is an object literal * with a `name` and `content` property. * @type {ShortReportSection[]} */ this.shortReportSections = []; /* * Gets or sets a value indicating whether this data source is currently loading. This property is observable. * @type {Boolean} */ this.isLoading = false; /** * Whether this catalog member is waiting for a disclaimer to be accepted before showing itself. * * @type {boolean} */ this.isWaitingForDisclaimer = false; knockout.track(this, ['name', 'info', 'infoSectionOrder', 'description', 'isUserSupplied', 'isPromoted', 'initialMessage', 'isHidden', 'cacheDuration', 'customProperties', 'shortReport', 'shortReportSections', 'isLoading', 'isWaitingForDisclaimer']);
<<<<<<< var ImageryLayerCatalogItem = require('../Models/ImageryLayerCatalogItem'); var ImageryProviderHooks = require('../Map/ImageryProviderHooks'); var proxyCatalogItemUrl = require('../Models/proxyCatalogItemUrl'); var TileLayerFilter = require('../ThirdParty/TileLayer.Filter'); var WebMapServiceCatalogItem = require('../Models/WebMapServiceCatalogItem'); var MapboxVectorTileImageryProvider = require('../Map/MapboxVectorTileImageryProvider'); var Rectangle = require('terriajs-cesium/Source/Core/Rectangle'); ======= var when = require('terriajs-cesium/Source/ThirdParty/when'); >>>>>>> var when = require('terriajs-cesium/Source/ThirdParty/when'); var ImageryLayerCatalogItem = require('../Models/ImageryLayerCatalogItem'); var ImageryProviderHooks = require('../Map/ImageryProviderHooks'); var proxyCatalogItemUrl = require('../Models/proxyCatalogItemUrl'); var TileLayerFilter = require('../ThirdParty/TileLayer.Filter'); var WebMapServiceCatalogItem = require('../Models/WebMapServiceCatalogItem'); var MapboxVectorTileImageryProvider = require('../Map/MapboxVectorTileImageryProvider'); var Rectangle = require('terriajs-cesium/Source/Core/Rectangle');
<<<<<<< var columnNames = item._dataSource.tableStructure.getColumnNames(); expect(columnNames.slice(0, 3)).toEqual(["aus", "Year", "0-1 years"]); expect(item._concepts[0].activeItems.length).toEqual(1); ======= var columnNames = item.tableStructure.getColumnNames(); expect(columnNames.slice(0, 3)).toEqual(["aus", "Year", "0-2 years"]); expect(item.concepts[0].activeItems.length).toEqual(1); >>>>>>> var columnNames = item.tableStructure.getColumnNames(); expect(columnNames.slice(0, 3)).toEqual(["aus", "Year", "0-1 years"]); expect(item.concepts[0].activeItems.length).toEqual(1); <<<<<<< var columnNames = item._dataSource.tableStructure.getColumnNames(); expect(columnNames.slice(0, 3)).toEqual(["sa4_code_2011", "Year", "0-1 years"]); var percentage = item._dataSource.tableStructure.activeItems[0].values[0]; ======= var columnNames = item.tableStructure.getColumnNames(); expect(columnNames.slice(0, 3)).toEqual(["sa4_code_2011", "Year", "0-2 years"]); var percentage = item.tableStructure.activeItems[0].values[0]; >>>>>>> var columnNames = item.tableStructure.getColumnNames(); expect(columnNames.slice(0, 3)).toEqual(["sa4_code_2011", "Year", "0-1 years"]); var percentage = item.tableStructure.activeItems[0].values[0];
<<<<<<< createCatalogMemberFromType.register('abs-itt', AbsIttCatalogItem); createCatalogMemberFromType.register('abs-itt-dataset-list', AbsIttCatalogGroup); ======= createCatalogMemberFromType.register(matchesExtension('openstreet'), OpenStreetMapCatalogItem); >>>>>>> createCatalogMemberFromType.register('abs-itt', AbsIttCatalogItem); createCatalogMemberFromType.register('abs-itt-dataset-list', AbsIttCatalogGroup); createCatalogMemberFromType.register(matchesExtension('openstreet'), OpenStreetMapCatalogItem);
<<<<<<< it('works with nulls in a range not including zero', function(done) { csvItem.url = 'test/csv/lat_lon_nullvalue.csv'; csvItem.load().then(function() { expect(featureColor(csvItem, 1)).toEqual(featureColor(csvItem, 0)); // colors null (row 2) the same as the lowest-value point (row 1). }).otherwise(fail).then(done); }); // Removed: not clear that this is correct behaviour, and it's failing. // xit('renders a point with no value in transparent black', function(done) { // csvItem.url = 'test/missingNumberFormatting.csv'; // return csvItem.load().then(function() { // var entities = csvItem.dataSource.entities.values; // expect(entities.length).toBe(2); // expect(entities[0].point.color.getValue()).not.toEqual(new Color(0.0, 0.0, 0.0, 0.0)); // expect(entities[1].point.color.getValue()).toEqual(new Color(0.0, 0.0, 0.0, 0.0)); // done(); // }); // }); describe('and per-column tableStyle', function() { it('scales by value', function(done) { csvItem.url = 'test/csv/lat_lon_val.csv'; csvItem._tableStyle = new TableStyle({ columns: { value: { // only scale the 'value' column scale: 5, scaleByValue: true } } }); return csvItem.load().then(function() { var pixelSizes = csvItem.dataSource.entities.values.map(function(e) { return e.point._pixelSize._value; }); csvItem._minPix = Math.min.apply(null, pixelSizes); csvItem._maxPix = Math.max.apply(null, pixelSizes); // we don't want to be too prescriptive, but by default the largest object should be 150% normal, smallest is 50%, so 3x difference. expect(csvItem._maxPix).toEqual(csvItem._minPix * 3); }).then(function() { var csvItem2 = new CsvCatalogItem(terria); csvItem2._tableStyle = new TableStyle({scale: 10, scaleByValue: true }); // this time, apply it to all columns csvItem2.url = 'test/csv/lat_lon_val.csv'; return csvItem2.load().yield(csvItem2); }).then(function(csvItem2) { var pixelSizes = csvItem2.dataSource.entities.values.map(function(e) { return e.point._pixelSize._value; }); var minPix = Math.min.apply(null, pixelSizes); var maxPix = Math.max.apply(null, pixelSizes); // again, we don't specify the base size, but x10 things should be twice as big as x5 things. expect(maxPix).toEqual(csvItem._maxPix * 2); expect(minPix).toEqual(csvItem._minPix * 2); }).otherwise(fail).then(done); }); it('uses correct defaults', function(done) { // nullColor is passed through to the columns as well, if not overridden explicitly. csvItem.url = 'test/csv/lat_lon_badvalue.csv'; csvItem._tableStyle = new TableStyle({ nullColor: '#A0B0C0', columns: { value: { replaceWithNullValues: ['bad'] } } }); var nullColor = new Color(160/255, 176/255, 192/255, 1); csvItem.load().then(function() { expect(featureColor(csvItem, 1)).toEqual(nullColor); }).otherwise(fail).then(done); }); it('supports name and nullColor with column ref by name', function(done) { csvItem.url = 'test/csv/lat_lon_badvalue.csv'; csvItem._tableStyle = new TableStyle({ nullColor: '#123456', columns: { value: { replaceWithNullValues: ['bad'], nullColor: '#A0B0C0', name: 'Temperature' } } }); var nullColor = new Color(160/255, 176/255, 192/255, 1); csvItem.load().then(function() { expect(csvItem.tableStructure.columns[2].name).toEqual('Temperature'); expect(featureColor(csvItem, 1)).toEqual(nullColor); }).otherwise(fail).then(done); }); it('supports nullColor with column ref by number', function(done) { csvItem.url = 'test/csv/lat_lon_badvalue.csv'; csvItem._tableStyle = new TableStyle({ columns: { 2: { replaceWithNullValues: ['bad'], nullColor: '#A0B0C0' } } }); var nullColor = new Color(160/255, 176/255, 192/255, 1); csvItem.load().then(function() { expect(featureColor(csvItem, 1)).toEqual(nullColor); }).otherwise(fail).then(done); }); it('supports type', function(done) { csvItem.url = 'test/csv/lat_lon_badvalue.csv'; csvItem._tableStyle = new TableStyle({ columns: { value: { replaceWithNullValues: ['bad'], type: 'enum' } } }); csvItem.load().then(function() { expect(csvItem.tableStructure.columns[2].type).toEqual(VarType.ENUM); }).otherwise(fail).then(done); }); }); ======= >>>>>>> describe('and per-column tableStyle', function() { it('scales by value', function(done) { csvItem.url = 'test/csv/lat_lon_val.csv'; csvItem._tableStyle = new TableStyle({ columns: { value: { // only scale the 'value' column scale: 5, scaleByValue: true } } }); return csvItem.load().then(function() { var pixelSizes = csvItem.dataSource.entities.values.map(function(e) { return e.point._pixelSize._value; }); csvItem._minPix = Math.min.apply(null, pixelSizes); csvItem._maxPix = Math.max.apply(null, pixelSizes); // we don't want to be too prescriptive, but by default the largest object should be 150% normal, smallest is 50%, so 3x difference. expect(csvItem._maxPix).toEqual(csvItem._minPix * 3); }).then(function() { var csvItem2 = new CsvCatalogItem(terria); csvItem2._tableStyle = new TableStyle({scale: 10, scaleByValue: true }); // this time, apply it to all columns csvItem2.url = 'test/csv/lat_lon_val.csv'; return csvItem2.load().yield(csvItem2); }).then(function(csvItem2) { var pixelSizes = csvItem2.dataSource.entities.values.map(function(e) { return e.point._pixelSize._value; }); var minPix = Math.min.apply(null, pixelSizes); var maxPix = Math.max.apply(null, pixelSizes); // again, we don't specify the base size, but x10 things should be twice as big as x5 things. expect(maxPix).toEqual(csvItem._maxPix * 2); expect(minPix).toEqual(csvItem._minPix * 2); }).otherwise(fail).then(done); }); it('uses correct defaults', function(done) { // nullColor is passed through to the columns as well, if not overridden explicitly. csvItem.url = 'test/csv/lat_lon_badvalue.csv'; csvItem._tableStyle = new TableStyle({ nullColor: '#A0B0C0', columns: { value: { replaceWithNullValues: ['bad'] } } }); var nullColor = new Color(160/255, 176/255, 192/255, 1); csvItem.load().then(function() { expect(featureColor(csvItem, 1)).toEqual(nullColor); }).otherwise(fail).then(done); }); it('supports name and nullColor with column ref by name', function(done) { csvItem.url = 'test/csv/lat_lon_badvalue.csv'; csvItem._tableStyle = new TableStyle({ nullColor: '#123456', columns: { value: { replaceWithNullValues: ['bad'], nullColor: '#A0B0C0', name: 'Temperature' } } }); var nullColor = new Color(160/255, 176/255, 192/255, 1); csvItem.load().then(function() { expect(csvItem.tableStructure.columns[2].name).toEqual('Temperature'); expect(featureColor(csvItem, 1)).toEqual(nullColor); }).otherwise(fail).then(done); }); it('supports nullColor with column ref by number', function(done) { csvItem.url = 'test/csv/lat_lon_badvalue.csv'; csvItem._tableStyle = new TableStyle({ columns: { 2: { replaceWithNullValues: ['bad'], nullColor: '#A0B0C0' } } }); var nullColor = new Color(160/255, 176/255, 192/255, 1); csvItem.load().then(function() { expect(featureColor(csvItem, 1)).toEqual(nullColor); }).otherwise(fail).then(done); }); it('supports type', function(done) { csvItem.url = 'test/csv/lat_lon_badvalue.csv'; csvItem._tableStyle = new TableStyle({ columns: { value: { replaceWithNullValues: ['bad'], type: 'enum' } } }); csvItem.load().then(function() { expect(csvItem.tableStructure.columns[2].type).toEqual(VarType.ENUM); }).otherwise(fail).then(done); }); });
<<<<<<< export const DATA_CATALOG_NAME = "data-catalog"; export const USER_DATA_NAME = "my-data"; ======= function checkColumn(item) { return item.tableStructure.columns.some(column => column.isActive); } >>>>>>> export const DATA_CATALOG_NAME = "data-catalog"; export const USER_DATA_NAME = "my-data"; function checkColumn(item) { return item.tableStructure.columns.some(column => column.isActive); }
<<<<<<< describe('time series data: ', function() { beforeEach(function () { spyOn(terria.timeSeriesStack, 'addLayerToTop'); spyOn(terria.timeSeriesStack, 'removeLayer'); }); describe('when item has clock', function() { beforeEach(function() { item.clock = { getValue: jasmine.createSpy('getValue') }; }); it('item should be added to top of timeSeriesStack when enabled', function(done) { item.isEnabled = true; item._loadForEnablePromise.then(function() { expect(terria.timeSeriesStack.addLayerToTop).toHaveBeenCalledWith(item); done(); }); }); it('should be removed from timeSeriesStack when disabled', function(done) { item.isEnabled = true; item._loadForEnablePromise.then(function() { item.isEnabled = false; expect(terria.timeSeriesStack.removeLayer).toHaveBeenCalledWith(item); done(); }); }); }); describe('when item has no clock', function() { it('should not call timeSeriesStack', function(done) { item.isEnabled = true; item._loadForEnablePromise.then(function() { expect(terria.timeSeriesStack.addLayerToTop).not.toHaveBeenCalled(); done(); }); }); }); }); ======= describe('ids', function () { var catalog; beforeEach(function (done) { catalog = new Catalog(terria); catalog.updateFromJson([ { name: 'Group', type: 'group', items: [ { name: 'A', type: 'item' }, { name: 'B', id: 'thisIsAnId', type: 'item' }, { name: 'C', type: 'item', shareKeys: ['Another/Path'] }, { name: 'D', id: 'thisIsAnotherId', shareKeys: ['This/Is/A/Path', 'aPreviousId'], type: 'item' } ] } ]).then(done); }); describe('uniqueId', function () { it('should return path if no id is specified', function () { expect(catalog.group.items[0].items[0].uniqueId).toBe('Root Group/Group/A'); }); it('should return id field if one is specified', function () { expect(catalog.group.items[0].items[1].uniqueId).toBe('thisIsAnId'); }); }); describe('allShareKeys', function () { it('should return just the path if no id or shareKeys are specified', function() { expect(catalog.group.items[0].items[0].allShareKeys).toEqual(['Root Group/Group/A']); }); it('should return just the id if id but no shareKeys are specified', function() { expect(catalog.group.items[0].items[1].allShareKeys).toEqual(['thisIsAnId']); }); it('should return the path and shareKeys if no id specified', function() { expect(catalog.group.items[0].items[2].allShareKeys).toEqual(['Root Group/Group/C', 'Another/Path']); }); it('should return the id and shareKeys if id specified', function() { expect(catalog.group.items[0].items[3].allShareKeys).toEqual(['thisIsAnotherId', 'This/Is/A/Path', 'aPreviousId']); }); }); }); >>>>>>> describe('time series data: ', function() { beforeEach(function () { spyOn(terria.timeSeriesStack, 'addLayerToTop'); spyOn(terria.timeSeriesStack, 'removeLayer'); }); describe('when item has clock', function() { beforeEach(function() { item.clock = { getValue: jasmine.createSpy('getValue') }; }); it('item should be added to top of timeSeriesStack when enabled', function(done) { item.isEnabled = true; item._loadForEnablePromise.then(function() { expect(terria.timeSeriesStack.addLayerToTop).toHaveBeenCalledWith(item); done(); }); }); it('should be removed from timeSeriesStack when disabled', function(done) { item.isEnabled = true; item._loadForEnablePromise.then(function() { item.isEnabled = false; expect(terria.timeSeriesStack.removeLayer).toHaveBeenCalledWith(item); done(); }); }); }); describe('when item has no clock', function() { it('should not call timeSeriesStack', function(done) { item.isEnabled = true; item._loadForEnablePromise.then(function() { expect(terria.timeSeriesStack.addLayerToTop).not.toHaveBeenCalled(); done(); }); }); }); }); describe('ids', function () { var catalog; beforeEach(function (done) { catalog = new Catalog(terria); catalog.updateFromJson([ { name: 'Group', type: 'group', items: [ { name: 'A', type: 'item' }, { name: 'B', id: 'thisIsAnId', type: 'item' }, { name: 'C', type: 'item', shareKeys: ['Another/Path'] }, { name: 'D', id: 'thisIsAnotherId', shareKeys: ['This/Is/A/Path', 'aPreviousId'], type: 'item' } ] } ]).then(done); }); describe('uniqueId', function () { it('should return path if no id is specified', function () { expect(catalog.group.items[0].items[0].uniqueId).toBe('Root Group/Group/A'); }); it('should return id field if one is specified', function () { expect(catalog.group.items[0].items[1].uniqueId).toBe('thisIsAnId'); }); }); describe('allShareKeys', function () { it('should return just the path if no id or shareKeys are specified', function() { expect(catalog.group.items[0].items[0].allShareKeys).toEqual(['Root Group/Group/A']); }); it('should return just the id if id but no shareKeys are specified', function() { expect(catalog.group.items[0].items[1].allShareKeys).toEqual(['thisIsAnId']); }); it('should return the path and shareKeys if no id specified', function() { expect(catalog.group.items[0].items[2].allShareKeys).toEqual(['Root Group/Group/C', 'Another/Path']); }); it('should return the id and shareKeys if id specified', function() { expect(catalog.group.items[0].items[3].allShareKeys).toEqual(['thisIsAnotherId', 'This/Is/A/Path', 'aPreviousId']); }); }); });
<<<<<<< export function buildShareLink(terria, includeStories=true) { const uri = new URI(window.location) .fragment('') .search({ 'start': JSON.stringify(getShareData(terria, includeStories)) }); userPropWhiteList.forEach(key => uri.addSearch({ key: terria.userProperties[key] })); return uri.fragment(uri.query()).query('').toString(); // replace ? with # ======= export function buildShareLink(terria) { const uri = new URI(window.location) .fragment("") .search({ start: JSON.stringify(getShareData(terria)) }); userPropWhiteList.forEach(key => uri.addSearch({ key: terria.userProperties[key] }) ); return uri .fragment(uri.query()) .query("") .toString(); // replace ? with # >>>>>>> export function buildShareLink(terria, includeStories = true) { const uri = new URI(window.location) .fragment("") .search({ start: JSON.stringify(getShareData(terria, includeStories)) }); userPropWhiteList.forEach(key => uri.addSearch({ key: terria.userProperties[key] }) ); return uri .fragment(uri.query()) .query("") .toString(); // replace ? with # <<<<<<< export function getShareData(terria, includeStories = true) { const initSources = includeStories ? terria.initSources.slice() : []; addUserAddedCatalog(terria, initSources); addSharedMembers(terria, initSources); addViewSettings(terria, initSources); addFeaturePicking(terria, initSources); addLocationMarker(terria, initSources); addTimeline(terria, initSources); if (includeStories) { // info that are not needed in scene share data addStories(terria, initSources); } return { version: '0.0.05', initSources: initSources }; ======= function getShareData(terria) { const initSources = terria.initSources.slice(); addUserAddedCatalog(terria, initSources); addSharedMembers(terria, initSources); addViewSettings(terria, initSources); addFeaturePicking(terria, initSources); addLocationMarker(terria, initSources); return { version: "0.0.05", initSources: initSources }; >>>>>>> export function getShareData(terria, includeStories = true) { const initSources = includeStories ? terria.initSources.slice() : []; addUserAddedCatalog(terria, initSources); addSharedMembers(terria, initSources); addViewSettings(terria, initSources); addFeaturePicking(terria, initSources); addLocationMarker(terria, initSources); addTimeline(terria, initSources); if (includeStories) { // info that are not needed in scene share data addStories(terria, initSources); } return { version: "0.0.05", initSources: initSources }; <<<<<<< export function buildShortShareLink(terria, includeStories=true) { const urlFromToken = token => new URI(window.location).fragment('share=' + token).toString(); if (defined(terria.shareDataService)) { return terria.shareDataService.getShareToken(getShareData(terria, includeStories)).then(urlFromToken); } else { return terria.urlShortener.shorten(buildShareLink(terria, includeStories)).then(urlFromToken); } // we assume that URL shortener is defined. ======= export function buildShortShareLink(terria) { const urlFromToken = token => new URI(window.location).fragment("share=" + token).toString(); if (defined(terria.shareDataService)) { return terria.shareDataService .getShareToken(getShareData(terria)) .then(urlFromToken); } else { return terria.urlShortener .shorten(buildShareLink(terria)) .then(urlFromToken); } // we assume that URL shortener is defined. >>>>>>> export function buildShortShareLink(terria, includeStories = true) { const urlFromToken = token => new URI(window.location).fragment("share=" + token).toString(); if (defined(terria.shareDataService)) { return terria.shareDataService .getShareToken(getShareData(terria, includeStories)) .then(urlFromToken); } else { return terria.urlShortener .shorten(buildShareLink(terria, includeStories)) .then(urlFromToken); } // we assume that URL shortener is defined.
<<<<<<< var name = makeActive ? varName : undefined; ======= //TODO: this should be consolidated/rationalised with behaviour in loadTable so switching variables //is basically like loading a new table, but you already know whether it's lat/lon or region-mapped. >>>>>>> var name = makeActive ? varName : undefined; //TODO: this should be consolidated/rationalised with behaviour in loadTable so switching variables //is basically like loading a new table, but you already know whether it's lat/lon or region-mapped.
<<<<<<< var VarType = require('../Map/VarType'); var CsvDataset = require('./CsvDataset'); var CsvVariable = require('./CsvVariable'); ======= var overrideProperty = require('../Core/overrideProperty'); >>>>>>> var VarType = require('../Map/VarType'); var CsvDataset = require('./CsvDataset'); var CsvVariable = require('./CsvVariable'); <<<<<<< this._csvDataset = undefined; this._clockTickUnsubscribe = undefined; ======= this._tableStyle = {} >>>>>>> this._csvDataset = undefined; this._clockTickUnsubscribe = undefined; this._tableStyle = {} <<<<<<< /** * Gets or sets the tableStyle object * @type {Object} */ this.tableStyle = {}; ======= >>>>>>> <<<<<<< else { if (!defined(csvItem.clock)) { var newClock; var dataSource = source; if (defined(dataSource) && defined(dataSource.dataset) && dataSource.dataset.hasTimeData()) { var startTime = dataSource.dataset.getTimeMinValue(); var stopTime = dataSource.dataset.getTimeMaxValue(); var totalDuration = JulianDate.secondsDifference(stopTime, startTime); newClock = new DataSourceClock(); newClock.startTime = startTime; newClock.stopTime = stopTime; newClock.currentTime = startTime; newClock.multiplier = totalDuration / 60; } csvItem.clock = newClock; } } //create ko dataset for now viewing ui var csvDataset = new CsvDataset(); var varNames = source.dataset.getVariableNamesByType([VarType.SCALAR,VarType.ENUM]); for (var i = 0; i < varNames.length; i++) { csvDataset.items.push(new CsvVariable(varNames[i], csvDataset)); } csvDataset.setSelected(source.dataset.getDataVariable()); csvDataset.updateFunction = function (varName) { if (!csvItem._regionMapped) { source.setDataVariable(varName); } else { setRegionDataVariable(csvItem, varName); } csvItem.tableStyle.dataVariable = source.dataset.getDataVariable(); csvItem.legendUrl = source.getLegendGraphic(); csvItem.terria.currentViewer.notifyRepaintRequired(); }; csvItem.csvDataset = csvDataset; //prepare visuals and repain csvItem.rectangle = source.dataset.getExtent(); csvItem.legendUrl = source.getLegendGraphic(); csvItem.terria.currentViewer.notifyRepaintRequired(); ======= else { if (!defined(csvItem.clock)) { var newClock; var dataSource = source; if (defined(dataSource) && defined(dataSource.dataset) && dataSource.dataset.hasTimeData()) { var startTime = dataSource.dataset.getTimeMinValue(); var stopTime = dataSource.dataset.getTimeMaxValue(); var totalDuration = JulianDate.secondsDifference(stopTime, startTime); newClock = new DataSourceClock(); newClock.startTime = startTime; newClock.stopTime = stopTime; newClock.currentTime = startTime; newClock.multiplier = totalDuration / 60; } csvItem.clock = newClock; } } //prepare visuals and repain csvItem.rectangle = source.dataset.getExtent(); csvItem.legendUrl = source.getLegendGraphic(); csvItem.terria.currentViewer.notifyRepaintRequired(); >>>>>>> else { if (!defined(csvItem.clock)) { var newClock; var dataSource = source; if (defined(dataSource) && defined(dataSource.dataset) && dataSource.dataset.hasTimeData()) { var startTime = dataSource.dataset.getTimeMinValue(); var stopTime = dataSource.dataset.getTimeMaxValue(); var totalDuration = JulianDate.secondsDifference(stopTime, startTime); newClock = new DataSourceClock(); newClock.startTime = startTime; newClock.stopTime = stopTime; newClock.currentTime = startTime; newClock.multiplier = totalDuration / 60; } csvItem.clock = newClock; } } //create ko dataset for now viewing ui var csvDataset = new CsvDataset(); var varNames = source.dataset.getVariableNamesByType([VarType.SCALAR,VarType.ENUM]); for (var i = 0; i < varNames.length; i++) { csvDataset.items.push(new CsvVariable(varNames[i], csvDataset)); } csvDataset.setSelected(source.dataset.getDataVariable()); csvDataset.updateFunction = function (varName) { if (!csvItem._regionMapped) { source.setDataVariable(varName); } else { setRegionDataVariable(csvItem, varName); } csvItem.tableStyle.dataVariable = source.dataset.getDataVariable(); csvItem.legendUrl = source.getLegendGraphic(); csvItem.terria.currentViewer.notifyRepaintRequired(); }; csvItem.csvDataset = csvDataset; //prepare visuals and repain csvItem.rectangle = source.dataset.getExtent(); csvItem.legendUrl = source.getLegendGraphic(); csvItem.terria.currentViewer.notifyRepaintRequired(); <<<<<<< return when(addRegionMap(csvItem), function() { if (csvItem._regionMapped !== true) { throw new ModelError({ sender: csvItem, title: 'Could not load CSV file', message: '\ Could not find any location parameters for latitude and longitude and was not able to determine \ a region mapping column.' }); } else { finishTableLoad(csvItem); } ======= return loadJson(csvItem.terria.regionMappingDefinitionsUrl).then(function(obj) { csvItem._regionWmsMap = obj.regionWmsMap; return when(addRegionMap(csvItem), function() { if (csvItem._regionMapped) { finishTableLoad(csvItem); } else { throw new ModelError({ sender: csvItem, title: 'Unable to load CSV file', message: 'We were unable to find any location parameters for latitude and \ longitude or to determine a column to use for region mapping.' }); } }); >>>>>>> return loadJson(csvItem.terria.regionMappingDefinitionsUrl).then(function(obj) { csvItem._regionWmsMap = obj.regionWmsMap; return when(addRegionMap(csvItem), function() { if (csvItem._regionMapped) { finishTableLoad(csvItem); } else { throw new ModelError({ sender: csvItem, title: 'Unable to load CSV file', message: 'We were unable to find any location parameters for latitude and \ longitude or to determine a column to use for region mapping.' }); } });
<<<<<<< $(document).mouseup(function(event) { sidebarResizing = false; sidebarFrame = $("#sideBar").width(); commandResizing = false; commandFrame = $('#commandLineOutput').height(); $('body').removeClass('select-disabled'); ======= $(document).mouseup(function (event) { sidebarResizing = false; sidebarFrame = $("#sideBar").width(); $('body').removeClass('select-disabled'); >>>>>>> $(document).mouseup(function (event) { sidebarResizing = false; sidebarFrame = $("#sideBar").width(); commandResizing = false; commandFrame = $('#commandLineOutput').height(); $('body').removeClass('select-disabled'); <<<<<<< $("#commandLineBorder").mousedown(function(event) { commandResizing = event.pageY; $('body').addClass('select-disabled'); }); $(document).mousemove(function(event) { if (sidebarResizing) { $("#sideBar").width(sidebarFrame - (sidebarResizing - event.pageX)); }else if(commandResizing && $('#commandLineOutput').is(':visible')){ $("#commandLineOutput").height(commandFrame + (commandResizing - event.pageY)); resizeApp(); ======= $(document).mousemove(function (event) { if (sidebarResizing) { $("#sideBar").width(sidebarFrame - (sidebarResizing - event.pageX)); >>>>>>> $("#commandLineBorder").mousedown(function (event) { commandResizing = event.pageY; $('body').addClass('select-disabled'); }); $(document).mousemove(function (event) { if (sidebarResizing) { $("#sideBar").width(sidebarFrame - (sidebarResizing - event.pageX)); }else if(commandResizing && $('#commandLineOutput').is(':visible')){ $("#commandLineOutput").height(commandFrame + (commandResizing - event.pageY)); resizeApp();
<<<<<<< function renameKey (connectionId, key) { if (typeof(connectionId) === 'object') { // context menu click var node = getKeyTree().get_node(connectionId.reference[0]); key = getFullKeyPath(node); connectionId = getRootConnection(node); } $('#currentKeyName').val(key); $('#currentKeyNameDisplay').text(key); $('#renamedKeyName').val(key); $('renameKeyConnectionId').val(connectionId); $('#forceRenameKey').prop('checked', false); $('#renameKeyModal').modal('show'); } ======= function exportKey (connectionId, key) { var node = null; if (typeof (connectionId) === 'object') { // context menu click node = getKeyTree().get_node(connectionId.reference[0]); key = getFullKeyPath(node); connectionId = getRootConnection(node); } $.ajax({ method: 'GET', url: 'tools/forms/export', success: function (res) { var body = $('#body') body.html(res); body.find('#connectionExportField option[value="' + connectionId + '"]').attr('selected', true); body.find('#exportKeyPrefix').val(key); } }); } >>>>>>> function renameKey (connectionId, key) { if (typeof(connectionId) === 'object') { // context menu click var node = getKeyTree().get_node(connectionId.reference[0]); key = getFullKeyPath(node); connectionId = getRootConnection(node); } $('#currentKeyName').val(key); $('#currentKeyNameDisplay').text(key); $('#renamedKeyName').val(key); $('renameKeyConnectionId').val(connectionId); $('#forceRenameKey').prop('checked', false); $('#renameKeyModal').modal('show'); } function exportKey (connectionId, key) { var node = null; if (typeof (connectionId) === 'object') { // context menu click node = getKeyTree().get_node(connectionId.reference[0]); key = getFullKeyPath(node); connectionId = getRootConnection(node); } $.ajax({ method: 'GET', url: 'tools/forms/export', success: function (res) { var body = $('#body') body.html(res); body.find('#connectionExportField option[value="' + connectionId + '"]').attr('selected', true); body.find('#exportKeyPrefix').val(key); } }); }
<<<<<<< // Initializes the config variable. This will be set with the defaults correctly. ======= //Initializes the config variable. //This will be set with the defaults correctly. >>>>>>> // Initializes the config variable. This will be set with the defaults correctly. <<<<<<< // Work out whether decimal separator is . or , for localised numbers ======= // Work out whether decimal separator is . or , for // localised numbers >>>>>>> // Work out whether decimal separator is . or , for localised numbers <<<<<<< // Only popup if we need to... if (! config[shr.network].popup ) { ======= // Only popup if we need to... if (!(shr.network in config.popup)) { >>>>>>> // Only popup if we need to... if (! config[shr.network].popup ) { <<<<<<< // Set variables for the popup var size = config[shr.network].popup; ======= // Set variables for the popup var size = config.popup[shr.network]; >>>>>>> // Set variables for the popup var size = config[shr.network].popup; <<<<<<< // Get the url that is being shared based on the network switch ( shr.network ) { ======= // Get the url based on the network switch (shr.network) { >>>>>>> // Get the url that is being shared based on the network switch ( shr.network ) { <<<<<<< // If there's an endpoint. For some social networks, you can't // get the share count (like Twitter) so we won't have any data. The link // will be to share it, but you won't get a count of how many people have. ======= // If there's an endpoint >>>>>>> // If there's an endpoint. For some social networks, you can't // get the share count (like Twitter) so we won't have any data. The link // will be to share it, but you won't get a count of how many people have. // If there's an endpoint <<<<<<< ======= // Get from storage if it exists if (key in storage.data && shr.network in storage.data[key] && storage.ttl > Date.now()) { callback.call(null, storage.data[key][shr.network]); >>>>>>> <<<<<<< // When we get here, this means the cached counts are not valid, // or don't exist. We will call the API if the URL is available // at this point. ======= // Make the request >>>>>>> // When we get here, this means the cached counts are not valid, // or don't exist. We will call the API if the URL is available // at this point. // Make the request <<<<<<< // Create the initial object, if it's null if ( !( key in storage.data ) ) { ======= // Create the initial object, if it's null if (!(key in storage.data)) { >>>>>>> // Create the initial object, if it's null if (!(key in storage.data)) { <<<<<<< ======= // Prefix data // eg. GitHub uses data.data.forks, vs facebooks data.shares data = prefixData(shr.network, data); >>>>>>> // Prefix data // eg. GitHub uses data.data.forks, vs facebooks data.shares data = prefixData(shr.network, data); <<<<<<< // Get value based on config ======= // Facebook changed the schema of their data switch (shr.network) { case 'facebook': data = data.share; break; } // Get value based on config >>>>>>> // Facebook changed the schema of their data switch (shr.network) { case 'facebook': data = data.share; break; } // Get value based on config <<<<<<< // Get the type (this is super important) shr.network = link.getAttribute( config.selector ); ======= // Get the type (this is super important) shr.network = link.getAttribute('data-shr-network'); >>>>>>> // Get the type (this is super important) shr.network = link.getAttribute( config.selector ); <<<<<<< // Get the share count getCount( shr, function( data ) { ======= // Get the share count getCount( shr, function(data) { >>>>>>> // Get the share count getCount( shr, function(data) { <<<<<<< // Create an Shr link instance for each element ======= // Create a link instance for each element >>>>>>> // Create a link instance for each element <<<<<<< // Create new instance var instance = new Shr( link ); // Set link to false if setup failed link.shr = Object.keys( instance ).length ? instance : false; ======= // Create new instance var instance = new Shr(link); // Set link to false if setup failed link.shr = Object.keys(instance).length ? instance : false; >>>>>>> // Create new instance var instance = new Shr(link); // Set link to false if setup failed link.shr = Object.keys(instance).length ? instance : false;
<<<<<<< var sampleKey = 83; // s var loadKey = 76; // l var panKey = 32; // var rootKey = 82; // r var groupKey = 71; // g var functionKey = 70; //f var deleteKey = 67; // c var paramKey = 80;// p var upArrow = 38; // up arrow var downArrow = 40; // down arrow var rightArrow = 39; // right arrow var leftArrow = 37; // left arrow var pan, alt, cmd, shift = false; ======= var saveKey = 83; // s var loadKey = 76; // l var panKey = 32; // var rootKey = 82; // r var groupKey = 71; // g var deleteKey = 67; // c var ctrlKey = 17; // ctrl var upArrow = 38; // up arrow var downArrow = 40; // down arrow var rightArrow = 39; // right arrow var leftArrow = 37; // left arrow var pan, alt, cmd, shift = false; >>>>>>> var loadKey = 76; // l var panKey = 32; // var rootKey = 82; // r var groupKey = 71; // g var functionKey = 70; //f var deleteKey = 67; // c var paramKey = 80;// p var upArrow = 38; // up arrow var downArrow = 40; // down arrow var rightArrow = 39; // right arrow var leftArrow = 37; // left arrow var pan, alt, cmd, shift = false;
<<<<<<< 'utils/PaperUI', ], function($, _, paper, Backbone, UndoManager, GeometryNode, PathNode, PolygonNode, RectNode, EllipseNode, ListNode, Instance, PathSampler, ToolCollection, PolyToolModel, SelectToolModel, FollowPathToolModel, ConstraintToolModel, FileSaver, Visitor, PPoint, ColorUtils, PaperUI) { ======= 'utils/Utils', 'utils/PaperUIHelper', ], function($, _, paper, Backbone, UndoManager, GeometryNode, PathNode, PolygonNode, RectNode, EllipseNode, ListNode, Instance, Sampler, ToolCollection, PolyToolModel, SelectToolModel, FollowPathToolModel, ConstraintToolModel, FileSaver, Visitor, PPoint, ColorUtils, Utils, PaperUIHelper) { >>>>>>> 'utils/Utils', 'utils/PaperUIHelper', ], function($, _, paper, Backbone, UndoManager, GeometryNode, PathNode, PolygonNode, RectNode, EllipseNode, ListNode, Instance, PathSampler, ToolCollection, PolyToolModel, SelectToolModel, FollowPathToolModel, ConstraintToolModel, FileSaver, Visitor, PPoint, ColorUtils, Utils, PaperUIHelper) { <<<<<<< }, ======= } >>>>>>> }
<<<<<<< ======= //loop through defaults to export and call toJSON >>>>>>> //loop through defaults to export and call toJSON <<<<<<< } else { ======= } else { >>>>>>> } else { <<<<<<< ======= >>>>>>>
<<<<<<< this.centerUI = new paper.Path.Circle(new paper.Point(0, 0), 10); this.centerUI.fillColor = 'red'; var targetLayer = paper.project.layers.filter(function(layer) { return layer.name === 'ui_layer'; })[0]; targetLayer.addChild(this.centerUI); ======= this.centroidUI = new paper.Path.Circle(new paper.Point(0, 0), 10); this.centroidUI.fillColor = 'blue'; this.originUI = new paper.Path.Circle(new paper.Point(0, 0), 5); this.originUI.fillColor = 'yellow'; this.rotationUI = new paper.Path(new paper.Point(0,0),new paper.Point(100,0)); this.rotationUI.strokeColor='red'; this.rotationUI.strokeWidth = 2; >>>>>>> this.centroidUI = new paper.Path.Circle(new paper.Point(0, 0), 10); this.centroidUI.fillColor = 'blue'; this.originUI = new paper.Path.Circle(new paper.Point(0, 0), 5); this.originUI.fillColor = 'yellow'; this.rotationUI = new paper.Path(new paper.Point(0, 0), new paper.Point(100, 0)); this.rotationUI.strokeColor = 'red'; this.rotationUI.strokeWidth = 2; <<<<<<< ======= >>>>>>> <<<<<<< reset: function() { if (this.get('rendered')) { //console.log('resetting', this.get('name'), this.get('id')); var geom = this.get('geom'); var bbox = this.get('bbox'); var selection_clone = this.get('selection_clone'); var inverted = this._matrix.inverted(); geom.transform(inverted); bbox.transform(inverted); this.centerUI.transform(inverted); selection_clone.transform(inverted); this.set('rendered', false); } }, ======= >>>>>>> <<<<<<< } else { data.stateStored = false; data.previousStates = []; data.futureStates = []; data.previousProperties = {}; ======= data.open = false; } else { data.stateStored = false; data.previousStates = []; data.futureStates = []; data.previousProperties = {}; >>>>>>> } else { data.stateStored = false; data.previousStates = []; data.futureStates = []; data.previousProperties = {}; <<<<<<< //console.log('modified',this.get('name')); /*if(this.nodeParent){ this.nodeParent.transformRelativeCoordinates(); }*/ ======= >>>>>>> <<<<<<< //console.log(child.get('name'), 'of',this.get('name'),'modified'); ======= >>>>>>> <<<<<<< ======= renderChildren: function() { for (var i = 0; i < this.renderQueue.length; i++) { if (this.renderQueue[i] && !this.renderQueue[i].deleted) { this.renderQueue[i].render(); } } this.centroidUI.position = this.get('geom').position; this.renderQueue = []; }, >>>>>>> renderChildren: function() { for (var i = 0; i < this.renderQueue.length; i++) { if (this.renderQueue[i] && !this.renderQueue[i].deleted) { this.renderQueue[i].render(); } } this.centroidUI.position = this.get('geom').position; this.renderQueue = []; }, <<<<<<< geom.transform(this._matrix); this.centerUI.transform(this._matrix); selection_clone.transform(this._matrix); bbox.transform(this._matrix); this.updateScreenBounds(geom); ======= //this.updateScreenBounds(geom); >>>>>>> //this.updateScreenBounds(geom);
<<<<<<< console.log('svg position', position); ======= >>>>>>> <<<<<<< svgNode.get('translationDelta').setValue({ x: position.x, y: position.y }); svgNode.get('scalingDelta').setValue({ x: 1, y: 1 }); item.position = new paper.Point(0,0); svgNode.changeGeomInheritance(item); this.addShape(svgNode, true); ======= svgNode.get('translationDelta').setValue({x:position.x,y:position.y}); svgNode.get('scalingDelta').setValue({x:1,y:1}); item.position.x=item.position.y=0; svgNode.changeGeomInheritance(item,data); this.addShape(svgNode,true); >>>>>>> svgNode.get('translationDelta').setValue({x:position.x,y:position.y}); svgNode.get('scalingDelta').setValue({x:1,y:1}); item.position.x=item.position.y=0; svgNode.changeGeomInheritance(item,data); this.addShape(svgNode,true); <<<<<<< console.log('instance', instance); ======= >>>>>>>
<<<<<<< /*returns a clone of the paper js shape*/ getShapeClone: function(relative) { var toggleClosed = false; if (this.nodeParent && this.nodeParent.get('name') === 'group' && !this.nodeParent.get('open')) { this.nodeParent.toggleOpen(this.nodeParent); toggleClosed = true; } var clone = this.get('geom').clone(); if (toggleClosed) { this.nodeParent.toggleClosed(this.nodeParent); } return clone; }, ======= >>>>>>> <<<<<<< inheritors[j].modifyPointsByIndex({x:delta.x,y:delta.y}, indicies, exclude); ======= inheritors[j].modifyPointsByIndex({x:delta.x, y:delta.y}, indicies, exclude); >>>>>>> inheritors[j].modifyPointsByIndex({x:delta.x, y:delta.y}, indicies, exclude); <<<<<<< proto_node.modifyPointsByIndex({x:delta.x,y:delta.y}, indicies, this); ======= proto_node.modifyPointsByIndex({x:delta.x, y:delta.y}, indicies, this); >>>>>>> proto_node.modifyPointsByIndex({x:delta.x, y:delta.y}, indicies, this); <<<<<<< console.log('initial_delta before',initial_delta); ======= delta = this.transformPoint({x:initial_delta.x,y:initial_delta.y}); >>>>>>> delta = this.transformPoint({x:initial_delta.x,y:initial_delta.y});
<<<<<<< var server = require('http').Server(app); var io = require('socket.io')(server); var tesseract = require('node-tesseract'); ======= var ocrs = require('./ocrs.js'); var nexmo = require('easynexmo'); nexmo.initialize('0b3f7f9c','6ea51cfd','http','true'); app.set('view engine', 'ejs'); >>>>>>> var server = require('http').Server(app); var io = require('socket.io')(server); var tesseract = require('node-tesseract'); var nexmo = require('easynexmo'); nexmo.initialize('0b3f7f9c','6ea51cfd','http','true'); app.set('view engine', 'ejs'); <<<<<<< ======= >>>>>>>
<<<<<<< signUpVerifyEmail: Match.Optional(String), ======= pwdReset: Match.Optional(String), pwdSet: Match.Optional(String), singUpVerifyEmail: Match.Optional(String), >>>>>>> pwdReset: Match.Optional(String), pwdSet: Match.Optional(String), signUpVerifyEmail: Match.Optional(String),
<<<<<<< AccountsTemplates.setPrevPath(Router.current().route._path); AccountsTemplates.setState("signIn", function(){ var err = T9n.get("error.accounts.Must be logged in"); ======= AccountsTemplates.setPrevPath(this.path); AccountsTemplates.setState(AccountsTemplates.options.defaultState, function(){ var err = T9n.get(AccountsTemplates.texts.errors.mustBeLoggedIn, markIfMissing=false); >>>>>>> AccountsTemplates.setPrevPath(Router.current().route._path); AccountsTemplates.setState(AccountsTemplates.options.defaultState, function(){ var err = T9n.get(AccountsTemplates.texts.errors.mustBeLoggedIn, markIfMissing=false);
<<<<<<< const filteredSpans = spans.filter(span => !findTag(span.tags, 'X-HAYSTACK-AUTOGEN')); const shadows = _.flatMap(filteredSpans, span => [{time: span.startTime, value: 1}, {time: span.startTime + span.duration, value: -1}]); ======= const shadows = _.flatMap(spans, span => [{time: span.startTime, value: 1}, {time: span.startTime + span.duration, value: -1}]); >>>>>>> const filteredSpans = spans.filter(span => !findTag(span.tags, 'X-HAYSTACK-AUTOGEN')); const shadows = _.flatMap(filteredSpans, span => [{time: span.startTime, value: 1}, {time: span.startTime + span.duration, value: -1}]); <<<<<<< ======= function findTag(tags, tagName) { const foundTag = tags.find(tag => tag.key && tag.key.toLowerCase() === tagName); return foundTag && foundTag.value; } >>>>>>>
<<<<<<< ======= /** * Prepares params for request * @private */ Http.prototype.__buildParams = function (param1, param2) { var params; params = { opts: {}, callback: undefined }; params.callback = param2; if (_.isString(param1)) { params.opts.url = param1; } else { params.opts = param1; } return params; }; /** * Does an http request * @return {promise} a promise that resolves with the request's response */ >>>>>>> /** * Prepares params for request * @private */ Http.prototype.__buildParams = function (param1, param2) { var params; params = { opts: {}, callback: undefined }; params.callback = param2; if (_.isString(param1)) { params.opts.url = param1; } else { params.opts = param1; } return params; }; /** * Does an http request * @return {promise} a promise that resolves with the request's response */ <<<<<<< _this._interceptResponse(err, res, body, url, data, makeRequest, callback); ======= _this.__interceptResponse(err, res, body, opts.url, data, makeRequest, callback); >>>>>>> _this.__interceptResponse(err, res, body, opts.url, data, makeRequest, callback); <<<<<<< Http.prototype.del = function (opts, callback) { ======= Http.prototype.del = function (param1, param2) { var opts, params, callback; params = this.__buildParams(param1, param2); opts = params.opts; callback = params.callback; >>>>>>> Http.prototype.del = function (opts, callback) { <<<<<<< Http.prototype.get = function (opts, callback) { ======= Http.prototype.get = function (param1, param2) { var opts, params, callback; params = this.__buildParams(param1, param2); opts = params.opts; callback = params.callback; >>>>>>> Http.prototype.get = function (opts, callback) { <<<<<<< Http.prototype.head = function (opts, callback) { ======= Http.prototype.head = function (param1, param2) { var opts, params, callback; params = this.__buildParams(param1, param2); opts = params.opts; callback = params.callback; >>>>>>> Http.prototype.head = function (opts, callback) { <<<<<<< Http.prototype.patch = function (opts, callback) { ======= Http.prototype.patch = function (param1, param2) { var opts, params, callback; params = this.__buildParams(param1, param2); opts = params.opts; callback = params.callback; >>>>>>> Http.prototype.patch = function (opts, callback) { <<<<<<< Http.prototype.post = function (opts, callback) { ======= Http.prototype.post = function (param1, param2) { var opts, params, callback; params = this.__buildParams(param1, param2); opts = params.opts; callback = params.callback; >>>>>>> Http.prototype.post = function (opts, callback) { <<<<<<< Http.prototype.put = function (opts, callback) { ======= Http.prototype.put = function (param1, param2) { var opts, params, callback; params = this.__buildParams(param1, param2); opts = params.opts; callback = params.callback; >>>>>>> Http.prototype.put = function (opts, callback) {
<<<<<<< import uNet from './UNET'; ======= import CVAE from './CVAE'; >>>>>>> import uNet from './UNET'; import CVAE from './CVAE';
<<<<<<< /* jshint evil: true, newcap: false */ /* global console, mongo, CodeMirror */ ======= /* Copyright 2013 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* jshint evil: true */ /* global console, mongo */ >>>>>>> /* Copyright 2013 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* jshint evil: true, newcap: false */ /* global console, mongo, CodeMirror */ <<<<<<< mongo.Shell.prototype.insertResponseLine = function (data, prepend, noRefresh) { var lastLine = this.responseBlock.lineCount() - 1; var lastChar = this.responseBlock.getLine(lastLine).length; var lastPos = {line: lastLine, ch: lastChar}; var isString = typeof(data) === 'string'; var separator = this.hasShownResponse ? '\n' : ''; data = mongo.util.toString(data); if (prepend) { data = prepend + data; var padding = Array(prepend.length + 1).join(' '); data = data.replace(/\n/g, '\n' + padding); } this.responseBlock.replaceRange(separator + data, lastPos); if (isString && !prepend) { var newLines = data.match(/\n/g); var insertedLines = newLines ? newLines.length + 1 : 1; var totalLines = this.responseBlock.lineCount(); var startInsertedResponse = totalLines - insertedLines; for (var i = startInsertedResponse; i < totalLines; i++) { this.responseBlock.addLineClass(i, 'text', 'mws-cm-plain-text'); } } if (!noRefresh) { this.responseBlock.refresh(); } this.hasShownResponse = true; this.$responseWrapper.css({display: ''}); this.$inputWrapper.css({marginTop: '-8px'}); ======= mongo.Shell.prototype.insertResponseLine = function (data) { var li = document.createElement('li'); $(li).addClass('mws-response').html(mongo.util.toString(data)); this.$inputLI.before(li); >>>>>>> mongo.Shell.prototype.insertResponseLine = function (data, prepend, noRefresh) { var lastLine = this.responseBlock.lineCount() - 1; var lastChar = this.responseBlock.getLine(lastLine).length; var lastPos = {line: lastLine, ch: lastChar}; var isString = typeof(data) === 'string'; var separator = this.hasShownResponse ? '\n' : ''; data = mongo.util.toString(data); if (prepend) { data = prepend + data; var padding = Array(prepend.length + 1).join(' '); data = data.replace(/\n/g, '\n' + padding); } this.responseBlock.replaceRange(separator + data, lastPos); if (isString && !prepend) { var newLines = data.match(/\n/g); var insertedLines = newLines ? newLines.length + 1 : 1; var totalLines = this.responseBlock.lineCount(); var startInsertedResponse = totalLines - insertedLines; for (var i = startInsertedResponse; i < totalLines; i++) { this.responseBlock.addLineClass(i, 'text', 'mws-cm-plain-text'); } } if (!noRefresh) { this.responseBlock.refresh(); } this.hasShownResponse = true; this.$responseWrapper.css({display: ''}); this.$inputWrapper.css({marginTop: '-8px'});
<<<<<<< mongo.request.makeRequest(url, query, 'GET', 'dbCollectionAggregate', this.shell, onSuccess); ======= mongo.events.functionTrigger(this.shell, 'db.collection.aggregate', arguments, {collection: this.name}); mongo.request.makeRequest(url, query, 'GET', 'dbCollectionAggregate', this.shell, onSuccess, false); // Sync request, blocking return results; >>>>>>> mongo.events.functionTrigger(this.shell, 'db.collection.aggregate', arguments, {collection: this.name}); mongo.request.makeRequest(url, query, 'GET', 'dbCollectionAggregate', this.shell, onSuccess);
<<<<<<< /* jshint node: true, camelcase: false */ ======= /* Copyright 2013 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* jshint node: true */ >>>>>>> /* Copyright 2013 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* jshint node: true, camelcase: false */
<<<<<<< /** * Makes a drop request to the mongod instance on the backing server. On * success, the collection is dropped from the database, otherwise a failure * message is printed and an error is thrown. * */ function dbCollectionDrop(query) { var url = mongo.util.getDBCollectionResURL(query.shell.mwsResourceID, query.collection) + 'drop'; makeRequest(url, null, 'DELETE', 'dbCollectionUpdate', query.shell); } function makeRequest(url, params, type, name, shell, onSuccess, async) { console.debug(name + ' request:', url, params); $.ajax({ async: !!async, type: type, url: url, data: JSON.stringify(params), dataType: 'json', contentType: 'application/json', success: function (data, textStatus, jqXHR) { console.info(name + ' success'); if (onSuccess) { onSuccess(data); } }, error: function (jqXHR, textStatus, errorThrown) { response = $.parseJSON(jqXHR.responseText); shell.insertResponseLine('ERROR: ' + response.reason + '\n' + response.detail); console.error(name + ' fail:', textStatus, errorThrown); throw {}; ======= function makeRequest(url, params, type, name, shell, onSuccess, async) { if (async === undefined) { // Default async to true async = true; >>>>>>> /** * Makes a drop request to the mongod instance on the backing server. On * success, the collection is dropped from the database, otherwise a failure * message is printed and an error is thrown. * */ function dbCollectionDrop(query) { var url = mongo.util.getDBCollectionResURL(query.shell.mwsResourceID, query.collection) + 'drop'; makeRequest(url, null, 'DELETE', 'dbCollectionUpdate', query.shell); } function makeRequest(url, params, type, name, shell, onSuccess, async) { if (async === undefined) { // Default async to true async = true; <<<<<<< dbCollectionDrop: dbCollectionDrop, keepAlive: keepAlive ======= keepAlive: keepAlive, __makeRequest: makeRequest >>>>>>> dbCollectionDrop: dbCollectionDrop, keepAlive: keepAlive, __makeRequest: makeRequest
<<<<<<< const ethVault = await SpyEthVault.new(this.framework.address); const erc20Vault = await SpyErc20Vault.new(this.framework.address); this.spendingConditionRegistry = await PaymentSpendingConditionRegistry.new(); await registerSpendingConditionTrue(this.spendingConditionRegistry); ======= this.spendingConditionRegistry = await SpendingConditionRegistry.new(); const { condition1, condition2 } = registerSpendingConditionTrue(this.spendingConditionRegistry); this.condition1 = condition1; this.condition2 = condition2; >>>>>>> const ethVault = await SpyEthVault.new(this.framework.address); const erc20Vault = await SpyErc20Vault.new(this.framework.address); this.spendingConditionRegistry = await SpendingConditionRegistry.new(); const { condition1, condition2 } = registerSpendingConditionTrue(this.spendingConditionRegistry); this.condition1 = condition1; this.condition2 = condition2; <<<<<<< const ethVault = await SpyEthVault.new(this.framework.address); const erc20Vault = await SpyErc20Vault.new(this.framework.address); this.spendingConditionRegistry = await PaymentSpendingConditionRegistry.new(); await registerSpendingConditionTrue(this.spendingConditionRegistry); ======= this.spendingConditionRegistry = await SpendingConditionRegistry.new(); const { condition1, condition2 } = registerSpendingConditionTrue(this.spendingConditionRegistry); this.condition1 = condition1; this.condition2 = condition2; >>>>>>> const ethVault = await SpyEthVault.new(this.framework.address); const erc20Vault = await SpyErc20Vault.new(this.framework.address); this.spendingConditionRegistry = await SpendingConditionRegistry.new(); const { condition1, condition2 } = registerSpendingConditionTrue(this.spendingConditionRegistry); this.condition1 = condition1; this.condition2 = condition2; <<<<<<< this.ethVault = await SpyEthVault.new(this.framework.address); this.erc20Vault = await SpyErc20Vault.new(this.framework.address); this.spendingConditionRegistry = await PaymentSpendingConditionRegistry.new(); ======= this.spendingConditionRegistry = await SpendingConditionRegistry.new(); >>>>>>> this.ethVault = await SpyEthVault.new(this.framework.address); this.erc20Vault = await SpyErc20Vault.new(this.framework.address); this.spendingConditionRegistry = await SpendingConditionRegistry.new();
<<<<<<< ======= const { BN } = require('openzeppelin-test-helpers'); const EMPTY_BYTES32 = `0x${Array(64).fill(0).join('')}`; >>>>>>> <<<<<<< return [this.outputType, this.outputGuard, this.token, this.amount]; ======= if (this.amount instanceof BN) { return [this.outputGuard, this.token, web3.utils.numberToHex(this.amount)]; } return [this.outputGuard, this.token, this.amount]; >>>>>>> if (this.amount instanceof BN) { return [this.outputType, this.outputGuard, this.token, web3.utils.numberToHex(this.amount)]; } return [this.outputType, this.outputGuard, this.token, this.amount];
<<<<<<< const PaymentChallengeIFEInputSpent = artifacts.require('PaymentChallengeIFEInputSpent'); ======= const PaymentChallengeIFEOutputSpent = artifacts.require('PaymentChallengeIFEOutputSpent'); >>>>>>> const PaymentChallengeIFEInputSpent = artifacts.require('PaymentChallengeIFEInputSpent'); const PaymentChallengeIFEOutputSpent = artifacts.require('PaymentChallengeIFEOutputSpent'); <<<<<<< const challengeIFEInputSpent = await PaymentChallengeIFEInputSpent.new(); ======= const challengeIFEOutput = await PaymentChallengeIFEOutputSpent.new(); >>>>>>> const challengeIFEInputSpent = await PaymentChallengeIFEInputSpent.new(); const challengeIFEOutputSpent = await PaymentChallengeIFEOutputSpent.new(); <<<<<<< await PaymentInFlightExitRouter.link('PaymentChallengeIFEInputSpent', challengeIFEInputSpent.address); ======= await PaymentInFlightExitRouter.link('PaymentChallengeIFEOutputSpent', challengeIFEOutput.address); >>>>>>> await PaymentInFlightExitRouter.link('PaymentChallengeIFEInputSpent', challengeIFEInputSpent.address); await PaymentInFlightExitRouter.link('PaymentChallengeIFEOutputSpent', challengeIFEOutputSpent.address);
<<<<<<< const challengeIFEInputSpent = await PaymentChallengeIFEInputSpent.new(); const challengeIFEOutputSpent = await PaymentChallengeIFEOutputSpent.new(); ======= const challengeIFEOutput = await PaymentChallengeIFEOutputSpent.new(); const processInFlightExit = await PaymentProcessInFlightExit.new(); >>>>>>> const challengeIFEInputSpent = await PaymentChallengeIFEInputSpent.new(); const challengeIFEOutputSpent = await PaymentChallengeIFEOutputSpent.new(); const processInFlightExit = await PaymentProcessInFlightExit.new(); <<<<<<< await PaymentInFlightExitRouter.link('PaymentChallengeIFEInputSpent', challengeIFEInputSpent.address); await PaymentInFlightExitRouter.link('PaymentChallengeIFEOutputSpent', challengeIFEOutputSpent.address); ======= await PaymentInFlightExitRouter.link('PaymentChallengeIFEOutputSpent', challengeIFEOutput.address); await PaymentInFlightExitRouter.link('PaymentProcessInFlightExit', processInFlightExit.address); >>>>>>> await PaymentInFlightExitRouter.link('PaymentChallengeIFEInputSpent', challengeIFEInputSpent.address); await PaymentInFlightExitRouter.link('PaymentChallengeIFEOutputSpent', challengeIFEOutputSpent.address); await PaymentInFlightExitRouter.link('PaymentProcessInFlightExit', processInFlightExit.address);
<<<<<<< OUTPUT_TYPE, PROTOCOL, TX_TYPE, VAULT_ID, DUMMY_INPUT_1, ======= OUTPUT_TYPE, PROTOCOL, TX_TYPE, VAULT_ID, SAFE_GAS_STIPEND, >>>>>>> OUTPUT_TYPE, PROTOCOL, TX_TYPE, VAULT_ID, DUMMY_INPUT_1, SAFE_GAS_STIPEND, <<<<<<< const txObj = new PaymentTransaction(1, [DUMMY_INPUT_1], [output]); ======= const txObj = new PaymentTransaction(txType, [0], [output]); >>>>>>> const txObj = new PaymentTransaction(txType, [DUMMY_INPUT_1], [output]);
<<<<<<< const processInFlightExit = await PaymentProcessInFlightExit.new(); ======= const challengeIFEOutput = await PaymentChallengeIFEOutputSpent.new(); >>>>>>> const processInFlightExit = await PaymentProcessInFlightExit.new(); const challengeIFEOutput = await PaymentChallengeIFEOutputSpent.new(); <<<<<<< await PaymentInFlightExitRouter.link('PaymentProcessInFlightExit', processInFlightExit.address); ======= await PaymentInFlightExitRouter.link('PaymentChallengeIFEOutputSpent', challengeIFEOutput.address); >>>>>>> await PaymentInFlightExitRouter.link('PaymentProcessInFlightExit', processInFlightExit.address); await PaymentInFlightExitRouter.link('PaymentChallengeIFEOutputSpent', challengeIFEOutput.address);
<<<<<<< const processInFlightExit = await PaymentProcessInFlightExit.new(); ======= const challengeIFEOutput = await PaymentChallengeIFEOutputSpent.new(); >>>>>>> const challengeIFEOutput = await PaymentChallengeIFEOutputSpent.new(); const processInFlightExit = await PaymentProcessInFlightExit.new(); <<<<<<< await PaymentInFlightExitRouter.link('PaymentProcessInFlightExit', processInFlightExit.address); ======= await PaymentInFlightExitRouter.link('PaymentChallengeIFEOutputSpent', challengeIFEOutput.address); >>>>>>> await PaymentInFlightExitRouter.link('PaymentChallengeIFEOutputSpent', challengeIFEOutput.address); await PaymentInFlightExitRouter.link('PaymentProcessInFlightExit', processInFlightExit.address); <<<<<<< piggybackBondSize: PIGGYBACK_BOND, ======= piggybackBondSize: 0, >>>>>>> piggybackBondSize: 0, <<<<<<< piggybackBondSize: PIGGYBACK_BOND, ======= piggybackBondSize: 0, >>>>>>> piggybackBondSize: 0, <<<<<<< piggybackBondSize: PIGGYBACK_BOND, ======= piggybackBondSize: 0, >>>>>>> piggybackBondSize: 0, <<<<<<< piggybackBondSize: PIGGYBACK_BOND, ======= piggybackBondSize: 0, >>>>>>> piggybackBondSize: 0,
<<<<<<< var seriesName = ($point.parentNode) ? $point.parentNode.getAttribute('ct:series-name') : ''; var meta = $point.getAttribute('ct:meta') || seriesName || ''; var hasMeta = !!meta; ======= var meta = $point.getAttribute('ct:meta') || $point.parentNode.getAttribute('ct:meta') || $point.parentNode.getAttribute('ct:series-name') || ''; >>>>>>> var seriesName = ($point.parentNode) ? $point.parentNode.getAttribute('ct:meta') || $point.parentNode.getAttribute('ct:series-name') : ''; var meta = $point.getAttribute('ct:meta') || seriesName || ''; var hasMeta = !!meta;
<<<<<<< var seriesName = ($point.parentNode) ? $point.parentNode.getAttribute('ct:series-name') : ''; var meta = $point.getAttribute('ct:meta') || seriesName || ''; var hasMeta = !!meta; ======= var meta = $point.getAttribute('ct:meta') || $point.parentNode.getAttribute('ct:meta') || $point.parentNode.getAttribute('ct:series-name') || ''; >>>>>>> var seriesName = ($point.parentNode) ? $point.parentNode.getAttribute('ct:meta') || $point.parentNode.getAttribute('ct:series-name') : ''; var meta = $point.getAttribute('ct:meta') || seriesName || ''; var hasMeta = !!meta;
<<<<<<< var projectDetailsController = function projectDetailsController($window, project, identity) { ======= var projectDetailsController = function projectDetailsController($routeParams, $window, $location, projectDetailsData, commentsData, identity, notifier, sweet) { >>>>>>> var projectDetailsController = function projectDetailsController($window, project, identity, sweet) { <<<<<<< .controller('ProjectDetailsController', ['$window', 'project', 'identity', projectDetailsController]); ======= .controller('ProjectDetailsController', ['$routeParams', '$window', '$location', 'projectDetailsData', 'commentsData', 'identity', 'notifier', 'sweet', projectDetailsController]); >>>>>>> .controller('ProjectDetailsController', ['$window', 'project', 'identity', 'sweet', projectDetailsController]);
<<<<<<< aria-label="Add a new to-do item" placeholder="Add a to-do..." ======= id="new-todo" >>>>>>> aria-label="Add a new to-do item" placeholder="Add a to-do..." id="new-todo"
<<<<<<< if ((event.metaKey || event.ctrlKey) && event.keyCode === 66) { // b command = findCommand('bold'); } else if ((event.metaKey || event.ctrlKey) && event.keyCode === 73) { // i command = findCommand('italic'); ======= if (event.metaKey && event.keyCode === 66) { // b command = scribe.getCommand('bold'); } else if (event.metaKey && event.keyCode === 73) { // i command = scribe.getCommand('italic'); >>>>>>> if ((event.metaKey || event.ctrlKey) && event.keyCode === 66) { // b command = scribe.getCommand('bold'); } else if ((event.metaKey || event.ctrlKey) && event.keyCode === 73) { // i command = scribe.getCommand('italic'); <<<<<<< command = findCommand('removeFormat'); } else if ((event.metaKey || event.ctrlKey) && ! event.shiftKey && event.keyCode === 75) { // k command = findCommand('linkPrompt'); } else if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.keyCode === 75) { // k command = findCommand('unlink'); ======= command = scribe.getCommand('removeFormat'); } else if (event.metaKey && ! event.shiftKey && event.keyCode === 75) { // k command = scribe.getCommand('linkPrompt'); } else if (event.metaKey && event.shiftKey && event.keyCode === 75) { // k command = scribe.getCommand('unlink'); >>>>>>> command = scribe.getCommand('removeFormat'); } else if ((event.metaKey || event.ctrlKey) && ! event.shiftKey && event.keyCode === 75) { // k command = scribe.getCommand('linkPrompt'); } else if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.keyCode === 75) { // k command = scribe.getCommand('unlink'); <<<<<<< command = findCommand('blockquote'); } else if ((event.metaKey || event.ctrlKey) && event.keyCode === 50) { // 2 command = findCommand('h2'); ======= command = scribe.getCommand('blockquote'); } else if (event.metaKey && event.keyCode === 50) { // 2 command = scribe.getCommand('h2'); >>>>>>> command = scribe.getCommand('blockquote'); } else if ((event.metaKey || event.ctrlKey) && event.keyCode === 50) { // 2 command = scribe.getCommand('h2');
<<<<<<< 'editor', 'api/selection', ======= 'scribe', >>>>>>> 'scribe', 'api/selection', <<<<<<< Editor, Selection, ======= Scribe, >>>>>>> Scribe, Selection, <<<<<<< ======= scribe.setHTML('<p>Hello, World!</p>'); >>>>>>> scribe.setHTML('<p>Hello, World!</p>');
<<<<<<< 'plugins/toolbar', 'plugins/smart-list' ======= 'plugins/toolbar', 'plugins/curly-quotes' >>>>>>> 'plugins/toolbar', 'plugins/smart-list', 'plugins/curly-quotes' <<<<<<< toolbar, smartList ======= toolbar, curlyQuotes >>>>>>> toolbar, smartList, curlyQuotes <<<<<<< editor.use(smartList()); ======= editor.use(curlyQuotes()); >>>>>>> editor.use(smartList()); editor.use(curlyQuotes());
<<<<<<< 'plugins/curly-quotes', 'api', ======= >>>>>>> 'plugins/curly-quotes', <<<<<<< curlyQuotes, api ======= Command >>>>>>> curlyQuotes, Command <<<<<<< editor.use(toolbar(document.querySelectorAll('.toolbar'))); editor.use(curlyQuotes()); ======= Array.prototype.forEach.call(document.querySelectorAll('.toolbar'), function (toolbarNode) { editor.use(toolbar(toolbarNode)); }); >>>>>>> Array.prototype.forEach.call(document.querySelectorAll('.toolbar'), function (toolbarNode) { editor.use(toolbar(toolbarNode)); }); editor.use(curlyQuotes());
<<<<<<< handleInput: function() {\n\ ======= handleChange: React.autoBind(function() {\n\ >>>>>>> handleChange: function() {\n\
<<<<<<< this.undoManager = new this.api.UndoManager(); this.transactionManager = new this.api.TransactionManager(); ======= this.undoManager = new UndoManager(); >>>>>>> this.undoManager = new UndoManager(); this.transactionManager = new this.api.TransactionManager();
<<<<<<< return (context, util) => util.merge({ ======= options = options || {} const setter = (context) => ({ >>>>>>> options = options || {} return (context, util) => util.merge({ <<<<<<< use: [ 'awesome-typescript-loader' ] ======= loaders: [ 'awesome-typescript-loader?' + JSON.stringify(options) ] >>>>>>> use: [ { loader: 'awesome-typescript-loader', options } ]
<<<<<<< function sass () { return (context) => ({ ======= function sass (options) { options = options || {} const hasOptions = Object.keys(options).length > 0 return (fileTypes) => ({ >>>>>>> function sass (options) { options = options || {} const hasOptions = Object.keys(options).length > 0 return (context) => ({ <<<<<<< test: context.fileTypes('text/x-sass'), loaders: [ 'style-loader', 'css-loader', 'sass-loader' ] ======= test: fileTypes('text/x-sass'), loaders: [ 'style-loader', options.sourceMap ? 'css-loader?sourceMap' : 'css-loader', hasOptions ? 'sass-loader?' + JSON.stringify(options) : 'sass-loader' ] >>>>>>> test: context.fileTypes('text/x-sass'), loaders: [ 'style-loader', options.sourceMap ? 'css-loader?sourceMap' : 'css-loader', hasOptions ? 'sass-loader?' + JSON.stringify(options) : 'sass-loader' ]
<<<<<<< return (context, util) => prevConfig => { const ruleDef = Object.assign( { test: context.fileType('text/css'), use: [ 'style-loader', 'css-loader', 'postcss-loader?' + JSON.stringify(postcssOptions) ] }, options.exclude ? { exclude: Array.isArray(options.exclude) ? options.exclude : [ options.exclude ] } : {} ) const _addLoader = util.addLoader(ruleDef) const _addPlugin = plugins ? addLoaderOptionsPlugin(context, util, plugins) : config => config return _addPlugin(_addLoader(prevConfig)) } ======= return (context) => Object.assign( { module: { loaders: [ Object.assign({ test: context.fileType('text/css'), loaders: [ 'style-loader', 'css-loader', 'postcss-loader?' + JSON.stringify(postcssOptions) ] }, options.exclude ? { exclude: Array.isArray(options.exclude) ? options.exclude : [ options.exclude ] } : {}) ] } }, plugins.length > 0 ? createPostcssPluginsConfig(context.webpack, plugins) : {} ) >>>>>>> return (context, util) => prevConfig => { const ruleDef = Object.assign( { test: context.fileType('text/css'), use: [ 'style-loader', 'css-loader', 'postcss-loader?' + JSON.stringify(postcssOptions) ] }, options.exclude ? { exclude: Array.isArray(options.exclude) ? options.exclude : [ options.exclude ] } : {} ) const _addLoader = util.addLoader(ruleDef) const _addPlugin = plugins.length > 0 ? addLoaderOptionsPlugin(context, util, plugins) : config => config return _addPlugin(_addLoader(prevConfig)) }
<<<<<<< .then(() => assert(result() === "[\"{1}\"]")) ) ======= .then(() => assert(result() === "[]")) ); >>>>>>> .then(() => assert(result() === "[]")) ) <<<<<<< .then(() => assert(result() === "[\"{1}\"]")) ) ======= .then(() => assert(result() === "[]")) ); >>>>>>> .then(() => assert(result() === "[]")) ) <<<<<<< .then(() => assert(result() === "[\"{1}\"]")) ) ======= .then(() => assert(result() === "[]")) ); >>>>>>> .then(() => assert(result() === "[]")) ) <<<<<<< .then(() => assert(result() === "[\"{1}\"]")) ) ======= .then(() => assert(result() === "[]")) ); >>>>>>> .then(() => assert(result() === "[]")) ) <<<<<<< .then(() => assert(result() === "[\"{1}\"]")) ) ======= .then(() => assert(result() === "[]")) ); >>>>>>> .then(() => assert(result() === "[]")) ) <<<<<<< .then(() => assert(result() === "[\"{1}\"]")) ) ======= .then(() => assert(result() === "[]")) ); >>>>>>> .then(() => assert(result() === "[]")) ) <<<<<<< .then(() => assert(result() === "[\"{1}\"]")) ) }) ======= .then(() => assert(result() === "[]")) ); }); >>>>>>> .then(() => assert(result() === "[]")) ) }) <<<<<<< .then(() => assert(result() === "[\"1st\",\"2nd\",\"{3}\",\"1st\",\"2nd\",\"1st 2nd\"]")) ) ======= .then(() => assert(result() === "[\"1st\",\"2nd\",\"1st\",\"2nd\",\"1st 2nd\"]")) ); >>>>>>> .then(() => assert(result() === "[\"1st\",\"2nd\",\"1st\",\"2nd\",\"1st 2nd\"]")) ) <<<<<<< .then(() => assert(result() === "[\"1st\",\"2nd\",\"{3}\",\"1st\",\"2nd\",\"1st 2nd\"]")) ) ======= .then(() => assert(result() === "[\"1st\",\"2nd\",\"1st\",\"2nd\",\"1st 2nd\"]")) ); >>>>>>> .then(() => assert(result() === "[\"1st\",\"2nd\",\"1st\",\"2nd\",\"1st 2nd\"]")) ) <<<<<<< .then(() => assert(result() === "[\"1st\",\"2nd\",\"{3}\",\"1st\",\"2nd\",\"1st 2nd\"]")) ) ======= .then(() => assert(result() === "[\"1st\",\"2nd\",\"1st\",\"2nd\",\"1st 2nd\"]")) ); >>>>>>> .then(() => assert(result() === "[\"1st\",\"2nd\",\"1st\",\"2nd\",\"1st 2nd\"]")) ) <<<<<<< .then(() => assert(result() === "[\"1st\",\"2nd\",\"{3}\",\"1st\",\"2nd\",\"1st 2nd\"]")) ) }) }) ======= .then(() => assert(result() === "[\"1st\",\"2nd\",\"1st\",\"2nd\",\"1st 2nd\"]")) ); }); }); >>>>>>> .then(() => assert(result() === "[\"1st\",\"2nd\",\"1st\",\"2nd\",\"1st 2nd\"]")) ) }) })
<<<<<<< modalMessage.textContent = "You've used all of your beta aliases."; modalMessage.classList = ["relay-modal-message relay-modal-headline"]; ======= modalMessage.textContent = "You have reached the maximum number of aliases allowed during the beta phase of Private Relay."; modalMessage.classList = ["fx-relay-modal-message"]; >>>>>>> modalMessage.textContent = "You've used all of your beta aliases."; modalMessage.classList = ["fx-relay-modal-message"]; <<<<<<< manageAliasesLink.textContent = "Manage All Addresses"; manageAliasesLink.classList = ["new-tab"]; manageAliasesLink.href = `${relaySiteOrigin}?utm_source=fx-relay-addon&utm_medium=context-menu-modal&utm_campaign=beta&utm_content=manage-relay-addresses`; ======= manageAliasesLink.textContent = "Manage Relay Addresses"; manageAliasesLink.classList = ["fx-relay-new-tab"]; manageAliasesLink["href"] = `${relaySiteOrigin}?utm_source=fx-relay-addon&utm_medium=context-menu-modal&utm_campaign=beta&utm_content=manage-relay-addresses`; >>>>>>> manageAliasesLink.textContent = "Manage All Addresses"; manageAliasesLink.classList = ["fx-relay-new-tab"]; manageAliasesLink.href = `${relaySiteOrigin}?utm_source=fx-relay-addon&utm_medium=context-menu-modal&utm_campaign=beta&utm_content=manage-relay-addresses`;
<<<<<<< const observer = new window.PerformanceObserver(list => { const entries = list.getEntries() ======= const { shouldLog, port, components, timeout = 2000 } = params let observer = new window.PerformanceObserver(list => { >>>>>>> const { shouldLog, timeout = 2000 } = params const observer = new window.PerformanceObserver(list => { const entries = list.getEntries() <<<<<<< length: entries.length, rawMeasures: entries ======= timeout, length: list.getEntries().length, rawMeasures: list.getEntries() >>>>>>> timeout, length: entries.length, rawMeasures: entries
<<<<<<< import PerformancePlugin from "./plugins/performance" ======= import JumpToPathPlugin from "./plugins/jump-to-path" >>>>>>> import PerformancePlugin from "./plugins/performance" import JumpToPathPlugin from "./plugins/jump-to-path" <<<<<<< PerformancePlugin, ======= JumpToPathPlugin, >>>>>>> PerformancePlugin, JumpToPathPlugin,