conflict_resolution
stringlengths
27
16k
<<<<<<< <SelectDevice t={t} devices={devices} /> <UnlockDevice devices={devices} t={t} /> ======= <SelectDevice t={t} devices={devices} /> <UnlockDevice isAppOpen={isAppOpen} t={t} /> >>>>>>> <SelectDevice t={t} devices={devices} /> <UnlockDevice t={t} devices={devices} />
<<<<<<< { isLoading ? ( <div className={styles.loadingOverlay}> <SpinnerV2 className={`${styles.loadingSpinner} ${this.state.spinnerClass}`} /> </div> ) : null } {filteredVotes.length > 0 ======= {isLoading ? ( <div className={styles.loadingOverlay}> <SpinnerV2 className={`${styles.loadingSpinner}`} /> </div> ) : null} {filteredVotes.length >>>>>>> { isLoading ? ( <div className={styles.loadingOverlay}> <SpinnerV2 className={`${styles.loadingSpinner} ${this.state.spinnerClass}`} /> </div> ) : null } {filteredVotes.length
<<<<<<< config.turnservers.forEach(function (server) { var hmac = crypto.createHmac('sha1', server.secret); // default to 86400 seconds timeout unless specified var username = Math.floor(new Date().getTime() / 1000) + (server.expiry || 86400) + ""; hmac.update(username); credentials.push({ username: username, credential: hmac.digest('base64'), urls: server.urls || [server.url] ======= // allow selectively vending turn credentials based on origin. var origin = client.handshake.headers.origin; if (!config.turnorigins || config.turnorigins.indexOf(origin) !== -1) { config.turnservers.forEach(function (server) { var hmac = crypto.createHmac('sha1', server.secret); // default to 86400 seconds timeout unless specified var username = Math.floor(new Date().getTime() / 1000) + (server.expiry || 86400) + ""; hmac.update(username); credentials.push({ username: username, credential: hmac.digest('base64'), url: server.url }); >>>>>>> // allow selectively vending turn credentials based on origin. var origin = client.handshake.headers.origin; if (!config.turnorigins || config.turnorigins.indexOf(origin) !== -1) { config.turnservers.forEach(function (server) { var hmac = crypto.createHmac('sha1', server.secret); // default to 86400 seconds timeout unless specified var username = Math.floor(new Date().getTime() / 1000) + (server.expiry || 86400) + ""; hmac.update(username); credentials.push({ username: username, credential: hmac.digest('base64'), urls: server.urls || server.url });
<<<<<<< function extractVersion(version) { if (version.startsWith('v')) { return version.slice(1); } return version; } ======= function handleError(err) { const { error } = err.response.data; const message = `Messenger API - ${error.code} ${error.type} ${error.message}`; throw new AxiosError(message, err); } >>>>>>> function extractVersion(version) { if (version.startsWith('v')) { return version.slice(1); } return version; } function handleError(err) { const { error } = err.response.data; const message = `Messenger API - ${error.code} ${error.type} ${error.message}`; throw new AxiosError(message, err); }
<<<<<<< const PlayByPlayClient = require('./clients/PlayByPlayClient.js'); import BoxScoreClient from './clients/BoxScoreClient'; ======= import PlayByPlayClient from './clients/PlayByPlayClient'; const BoxScoreClient = require('./clients/BoxScoreClient.js'); >>>>>>> import BoxScoreClient from './clients/BoxScoreClient'; import PlayByPlayClient from './clients/PlayByPlayClient'; <<<<<<< const boxScoreClient = new BoxScoreClient(); ======= const playByPlayClient = new PlayByPlayClient(); >>>>>>> const boxScoreClient = new BoxScoreClient(); const playByPlayClient = new PlayByPlayClient();
<<<<<<< const {ResourceModel} = require('../model/resource/resourceModel'); const {ResourceEntity} = require('../model/entity/resource/resourceEntity'); ======= const {ResourceTypeModel} = require('../model/resourceType/resourceTypeModel'); >>>>>>> const {ResourceModel} = require('../model/resource/resourceModel'); <<<<<<< const resourceEntity = new ResourceEntity(resourceDto); ======= >>>>>>>
<<<<<<< // Load the passbolt addon-on config app on config pages pageMod.PageMod({ include: data.url("config-debug.html"), contentScriptWhen: 'end', contentStyleFile: [ data.url("css/config_debug_ff.css"), ], contentScriptFile: [ data.url("js/lib/jquery-2.1.1.min.js"), data.url('js/lib/uuid.js'), data.url('js/inc/port.js'), data.url('js/inc/request.js'), data.url('js/inc/keyring.js'), data.url('js/inc/file.js'), data.url("js/config-debug.js") ], onAttach: listenConfigDebugEvents }); pageMod.PageMod({ ======= pageMods.iframeMasterPwd = pageMod.PageMod({ >>>>>>> // Load the passbolt addon-on config app on config pages pageMod.PageMod({ include: data.url("config-debug.html"), contentScriptWhen: 'end', contentStyleFile: [ data.url("css/config_debug_ff.css"), ], contentScriptFile: [ data.url("js/lib/jquery-2.1.1.min.js"), data.url('js/lib/uuid.js'), data.url('js/inc/port.js'), data.url('js/inc/request.js'), data.url('js/inc/keyring.js'), data.url('js/inc/file.js'), data.url("js/config-debug.js") ], onAttach: listenConfigDebugEvents }); pageMods.iframeMasterPwd = pageMod.PageMod({ <<<<<<< ======= pageMods.keysPreferences = pageMod.PageMod({ include: 'about:blank?passbolt=keysPreferences*', contentStyleFile: [ data.url("css/main_ff.css") ], contentScriptFile: [ data.url("js/lib/jquery-2.1.1.min.js"), data.url('js/lib/ejs_production.js'), data.url('js/lib/uuid.js'), data.url('js/template.js'), data.url('js/inc/port.js'), data.url('js/inc/request.js'), data.url('js/inc/keyring.js'), data.url("js/inc/event.js"), data.url('js/inc/preferences/keys.js') ], contentScriptWhen: 'ready', contentScriptOptions: { expose_messaging: false, addonDataPath: data.url(), templatePath: './tpl/preferences/keys.ejs' }, onAttach: listenPreferencesEvents }); >>>>>>> pageMods.keysPreferences = pageMod.PageMod({ include: 'about:blank?passbolt=keysPreferences*', contentStyleFile: [ data.url("css/main_ff.css") ], contentScriptFile: [ data.url("js/lib/jquery-2.1.1.min.js"), data.url('js/lib/ejs_production.js'), data.url('js/lib/uuid.js'), data.url('js/template.js'), data.url('js/inc/port.js'), data.url('js/inc/request.js'), data.url('js/inc/keyring.js'), data.url("js/inc/event.js"), data.url('js/inc/preferences/keys.js') ], contentScriptWhen: 'ready', contentScriptOptions: { expose_messaging: false, addonDataPath: data.url(), templatePath: './tpl/preferences/keys.ejs' }, onAttach: listenPreferencesEvents }); <<<<<<< var includeUserListeners = function(worker) { // Retrieve the current user. worker.port.on("passbolt.user.me", function(token) { UserController.findCurrentUser() .then( function(user) { worker.port.emit("passbolt.user.me.complete", token, 'SUCCESS', user) }, function(response) { worker.port.emit("passbolt.user.me.complete", token, 'ERROR', response) }); }); } var includeCipherListeners = function (worker) { // Listen on cipher decrypt request event. worker.port.on("passbolt.cipher.decrypt", function(token, txt) { ======= var includeSecretListeners = function (worker) { // Listen on secret decrypt request event. worker.port.on("passbolt.secret.decrypt", function(token, txt) { >>>>>>> var includeUserListeners = function(worker) { // Retrieve the current user. worker.port.on("passbolt.user.me", function(token) { UserController.findCurrentUser() .then( function(user) { worker.port.emit("passbolt.user.me.complete", token, 'SUCCESS', user) }, function(response) { worker.port.emit("passbolt.user.me.complete", token, 'ERROR', response) }); }); } var includeSecretListeners = function (worker) { // Listen on secret decrypt request event. worker.port.on("passbolt.secret.decrypt", function(token, txt) {
<<<<<<< ======= }; /** * Validate user fields individually * * @param field {string} The name of the field to validate * @param value {string} The value of the field to validate * @returns {boolean} * @throw Error if the field is not valid * @private */ User.prototype.__validate = function (field, value) { switch (field) { case 'firstname': if (typeof value === 'undefined' || value === '') { throw new Error(__('The first name cannot be empty')); } if (!Validator.isUtf8(value)) { throw new Error(__('The first name should be a valid UTF8 string')) } if (!Validator.isLength(value, 0, 255)) { throw new Error(__('The first name length should be maximum 255 characters.')) } break; case 'lastname' : if (typeof value === 'undefined' || value === '') { throw new Error(__('The last name cannot be empty')); } if (!Validator.isUtf8(value)) { throw new Error(__('The last name should be a valid UTF8 string')) } if (!Validator.isLength(value, 0, 255)) { throw new Error(__('The last name length should be maximum 255 characters.')) } break; case 'username' : if (typeof value === 'undefined' || value === '') { throw new Error(__('The username cannot be empty')); } if (!Validator.isEmail(value)) { throw new Error(__('The username should be a valid email address')) } if (!Validator.isLength(value, 0, 255)) { throw new Error(__('The username length should be maximum 255 characters.')) } break; case 'id' : if (typeof value === 'undefined' || value === '') { throw new Error(__('The user id cannot be empty')); } if (!Validator.isUUID(value)) { throw new Error(__('The user id should be a valid UUID')) } break; default : throw new Error(__('No validation defined for field: ' + field)); break; } return true; }; /** * Validate a user * * @param user {object} The user to validate * @param fields {array} The names of the fields to validate * @returns {object} The user in case of success * @throw Error if the user is not valid */ User.prototype.validate = function (user, fields) { if (fields == undefined) { fields = ['id', 'username', 'firstname', 'lastname']; } >>>>>>>
<<<<<<< ======= app.events.config.listen(worker); }, onDetach: function () { // onDetach is called twice, avoid it. if (Worker.exists('Setup')) { Worker.remove('Setup'); } >>>>>>> app.events.config.listen(worker);
<<<<<<< setI1(getI2().minus($$$cl15.Integer(16))); setI2(getI1().negativeValue().plus(getI2()).minus($$$cl15.Integer(1))); setI1($$$cl15.Integer(3).times($$$cl15.Integer(7))); setI2(getI1().times($$$cl15.Integer(2))); setI2($$$cl15.Integer(17).divided($$$cl15.Integer(4))); setI1(getI2().times($$$cl15.Integer(516)).divided(getI1().negativeValue())); ======= setI1(getI2().minus($$cl15.Integer(16))); setI2(getI1().negativeValue().plus(getI2()).minus($$cl15.Integer(1))); setI1($$cl15.Integer(3).times($$cl15.Integer(7))); setI2(getI1().times($$cl15.Integer(2))); setI2($$cl15.Integer(17).divided($$cl15.Integer(4))); setI1(getI2().times($$cl15.Integer(516)).divided(getI1().negativeValue())); setI1($$cl15.Integer(15).remainder($$cl15.Integer(4))); setI2($$cl15.Integer(312).remainder($$cl15.Integer(12))); setI1($$cl15.Integer(2).power($$cl15.Integer(10))); setI2($$cl15.Integer(100).power($$cl15.Integer(6))); >>>>>>> setI1(getI2().minus($$$cl15.Integer(16))); setI2(getI1().negativeValue().plus(getI2()).minus($$$cl15.Integer(1))); setI1($$$cl15.Integer(3).times($$$cl15.Integer(7))); setI2(getI1().times($$$cl15.Integer(2))); setI2($$$cl15.Integer(17).divided($$$cl15.Integer(4))); setI1(getI2().times($$$cl15.Integer(516)).divided(getI1().negativeValue())); setI1($$$cl15.Integer(15).remainder($$$cl15.Integer(4))); setI2($$$cl15.Integer(312).remainder($$$cl15.Integer(12))); setI1($$$cl15.Integer(2).power($$$cl15.Integer(10))); setI2($$$cl15.Integer(100).power($$$cl15.Integer(6))); <<<<<<< //AttributeDeclaration f1 at operators.ceylon (21:4-21:29) var $f1=$$$cl15.Float(4.2).negativeValue(); ======= //AttributeDeclaration f1 at operators.ceylon (27:4-27:29) var $f1=$$cl15.Float(4.2).negativeValue(); >>>>>>> //AttributeDeclaration f1 at operators.ceylon (27:4-27:29) var $f1=$$$cl15.Float(4.2).negativeValue(); <<<<<<< //AttributeDeclaration f2 at operators.ceylon (27:4-27:43) var $f2=$$$cl15.Float(3.14159265).plus($$$cl15.Float(456.0)); ======= //AttributeDeclaration f2 at operators.ceylon (33:4-33:43) var $f2=$$cl15.Float(3.14159265).plus($$cl15.Float(456.0)); >>>>>>> //AttributeDeclaration f2 at operators.ceylon (33:4-33:43) var $f2=$$$cl15.Float(3.14159265).plus($$$cl15.Float(456.0)); <<<<<<< setF1(getF2().minus($$$cl15.Float(0.0016))); setF2(getF1().negativeValue().plus(getF2()).minus($$$cl15.Float(1.2))); setF1($$$cl15.Float(3.0).times($$$cl15.Float(0.79))); setF2(getF1().times($$$cl15.Float(2.0e13))); setF2($$$cl15.Float(17.1).divided($$$cl15.Float(4.0E-18))); setF1(getF2().times($$$cl15.Float(51.6e2)).divided(getF1().negativeValue())); ======= setF1(getF2().minus($$cl15.Float(0.0016))); setF2(getF1().negativeValue().plus(getF2()).minus($$cl15.Float(1.2))); setF1($$cl15.Float(3.0).times($$cl15.Float(0.79))); setF2(getF1().times($$cl15.Float(2.0e13))); setF2($$cl15.Float(17.1).divided($$cl15.Float(4.0E-18))); setF1(getF2().times($$cl15.Float(51.6e2)).divided(getF1().negativeValue())); setF1($$cl15.Float(150.0).power($$cl15.Float(0.5))); >>>>>>> setF1(getF2().minus($$$cl15.Float(0.0016))); setF2(getF1().negativeValue().plus(getF2()).minus($$$cl15.Float(1.2))); setF1($$$cl15.Float(3.0).times($$$cl15.Float(0.79))); setF2(getF1().times($$$cl15.Float(2.0e13))); setF2($$$cl15.Float(17.1).divided($$$cl15.Float(4.0E-18))); setF1(getF2().times($$$cl15.Float(51.6e2)).divided(getF1().negativeValue())); setF1($$$cl15.Float(150.0).power($$$cl15.Float(0.5))); <<<<<<< //AttributeDeclaration c1 at operators.ceylon (53:4-53:37) var $c1=$$$cl15.String("str1").compare($$$cl15.String("str2")); ======= //AttributeDeclaration c1 at operators.ceylon (68:4-68:37) var $c1=$$cl15.String("str1").compare($$cl15.String("str2")); >>>>>>> //AttributeDeclaration c1 at operators.ceylon (68:4-68:37) var $c1=$$$cl15.String("str1").compare($$$cl15.String("str2")); <<<<<<< //AttributeDeclaration c2 at operators.ceylon (54:4-54:37) var $c2=$$$cl15.String("str2").compare($$$cl15.String("str1")); ======= //AttributeDeclaration c2 at operators.ceylon (69:4-69:37) var $c2=$$cl15.String("str2").compare($$cl15.String("str1")); >>>>>>> //AttributeDeclaration c2 at operators.ceylon (69:4-69:37) var $c2=$$$cl15.String("str2").compare($$$cl15.String("str1")); <<<<<<< //AttributeDeclaration c3 at operators.ceylon (55:4-55:37) var $c3=$$$cl15.String("str1").compare($$$cl15.String("str1")); ======= //AttributeDeclaration c3 at operators.ceylon (70:4-70:37) var $c3=$$cl15.String("str1").compare($$cl15.String("str1")); >>>>>>> //AttributeDeclaration c3 at operators.ceylon (70:4-70:37) var $c3=$$$cl15.String("str1").compare($$$cl15.String("str1")); <<<<<<< //AttributeDeclaration c4 at operators.ceylon (56:4-56:29) var $c4=$$$cl15.String("").compare($$$cl15.String("")); ======= //AttributeDeclaration c4 at operators.ceylon (71:4-71:29) var $c4=$$cl15.String("").compare($$cl15.String("")); >>>>>>> //AttributeDeclaration c4 at operators.ceylon (71:4-71:29) var $c4=$$$cl15.String("").compare($$$cl15.String("")); <<<<<<< //AttributeDeclaration c5 at operators.ceylon (57:4-57:33) var $c5=$$$cl15.String("str1").compare($$$cl15.String("")); ======= //AttributeDeclaration c5 at operators.ceylon (72:4-72:33) var $c5=$$cl15.String("str1").compare($$cl15.String("")); >>>>>>> //AttributeDeclaration c5 at operators.ceylon (72:4-72:33) var $c5=$$$cl15.String("str1").compare($$$cl15.String("")); <<<<<<< //AttributeDeclaration c6 at operators.ceylon (58:4-58:33) var $c6=$$$cl15.String("").compare($$$cl15.String("str2")); ======= //AttributeDeclaration c6 at operators.ceylon (73:4-73:33) var $c6=$$cl15.String("").compare($$cl15.String("str2")); >>>>>>> //AttributeDeclaration c6 at operators.ceylon (73:4-73:33) var $c6=$$$cl15.String("").compare($$$cl15.String("str2")); <<<<<<< //AttributeDeclaration b3 at operators.ceylon (62:4-62:43) var $b3=($$$cl15.String("str1").compare($$$cl15.String("str2"))!==$$$cl15.getLarger()?$$$cl15.getTrue():$$$cl15.getFalse()); ======= //AttributeDeclaration b3 at operators.ceylon (77:4-77:43) var $b3=($$cl15.String("str1").compare($$cl15.String("str2"))!==$$cl15.getLarger()?$$cl15.getTrue():$$cl15.getFalse()); >>>>>>> //AttributeDeclaration b3 at operators.ceylon (77:4-77:43) var $b3=($$$cl15.String("str1").compare($$$cl15.String("str2"))!==$$$cl15.getLarger()?$$$cl15.getTrue():$$$cl15.getFalse()); <<<<<<< //AttributeDeclaration b4 at operators.ceylon (63:4-63:43) var $b4=($$$cl15.String("str1").compare($$$cl15.String("str2"))!==$$$cl15.getSmaller()?$$$cl15.getTrue():$$$cl15.getFalse()); ======= //AttributeDeclaration b4 at operators.ceylon (78:4-78:43) var $b4=($$cl15.String("str1").compare($$cl15.String("str2"))!==$$cl15.getSmaller()?$$cl15.getTrue():$$cl15.getFalse()); >>>>>>> //AttributeDeclaration b4 at operators.ceylon (78:4-78:43) var $b4=($$$cl15.String("str1").compare($$$cl15.String("str2"))!==$$$cl15.getSmaller()?$$$cl15.getTrue():$$$cl15.getFalse());
<<<<<<< require('default/flow').test(); require('default/default').test(); ======= require('default/flow').test(); require('default/functions').test(); >>>>>>> require('default/flow').test(); require('default/default').test(); require('default/functions').test();
<<<<<<< self.renderDialog("add_email", options); // Only show the RP's TOS/PP if the user has not been to this site // before. if(!originEmail && options.siteTOSPP) { dialogHelpers.showRPTosPP.call(self); } ======= self.renderDialog("add_email", templateData); hideHint("addressInfo"); >>>>>>> self.renderDialog("add_email", options); hideHint("addressInfo");
<<<<<<< asyncTest("get with invalid requiredEmail - print error screen", function() { createController({ ready: function() { mediator.subscribe("start", function(msg, info) { ok(false, "start should not have been called"); }); var retval = controller.get(HTTP_TEST_DOMAIN, { requiredEmail: "bademail" }); equal(retval, "invalid requiredEmail: (bademail)", "expected error"); testErrorVisible(); start(); } }); }); asyncTest("get with script containing requiredEmail - print error screen", function() { createController({ ready: function() { mediator.subscribe("start", function(msg, info) { ok(false, "start should not have been called"); }); var retval = controller.get(HTTP_TEST_DOMAIN, { requiredEmail: "<script>window.scriptRun=true;</script>[email protected]" }); // If requiredEmail is not properly escaped, scriptRun will be true. equal(typeof window.scriptRun, "undefined", "script was not run"); equal(retval, "invalid requiredEmail: (<script>window.scriptRun=true;</script>[email protected])", "expected error"); testErrorVisible(); start(); } }); }); asyncTest("get with valid requiredEmail - go to start", function() { createController({ ready: function() { var startInfo; mediator.subscribe("start", function(msg, info) { startInfo = info; }); var retval = controller.get(HTTP_TEST_DOMAIN, { requiredEmail: TESTEMAIL }); testHelpers.testObjectValuesEqual(startInfo, { requiredEmail: TESTEMAIL }); equal(typeof retval, "undefined", "no error expected"); testErrorNotVisible(); start(); } }); }); asyncTest("get with relative termsOfService & valid privacyPolicy - print error screen", function() { ======= asyncTest("get with relative tosURL & valid privacyURL - print error screen", function() { >>>>>>> asyncTest("get with relative termsOfService & valid privacyPolicy - print error screen", function() {
<<<<<<< const template = ejs.compile( fs.readFileSync(path.join(__dirname, "static", "prove_template.ejs")).toString()); ======= const TEMPLATE_PATH = path.join(__dirname, "browserid", "email_templates"); // the underbar decorator to allow getext to extract strings function _(str) { return str; } // a map of all the different emails we send const templates = { "new": { landing: 'verify_email_address', subject: _("Confirm email address for Persona"), template: fs.readFileSync(path.join(TEMPLATE_PATH, 'new.ejs')), }, "reset": { landing: 'verify_email_address', subject: _("Reset Persona password"), template: fs.readFileSync(path.join(TEMPLATE_PATH, 'reset.ejs')), }, "add": { landing: 'add_email_address', subject: _("Confirm email address for Persona"), template: fs.readFileSync(path.join(TEMPLATE_PATH, 'add.ejs')), } }; // now turn file contents into compiled templates Object.keys(templates).forEach(function(type) { templates[type].template = ejs.compile(templates[type].template.toString()); }); >>>>>>> const TEMPLATE_PATH = path.join(__dirname, "static", "email_templates"); // the underbar decorator to allow getext to extract strings function _(str) { return str; } // a map of all the different emails we send const templates = { "new": { landing: 'verify_email_address', subject: _("Confirm email address for Persona"), template: fs.readFileSync(path.join(TEMPLATE_PATH, 'new.ejs')), }, "reset": { landing: 'verify_email_address', subject: _("Reset Persona password"), template: fs.readFileSync(path.join(TEMPLATE_PATH, 'reset.ejs')), }, "add": { landing: 'add_email_address', subject: _("Confirm email address for Persona"), template: fs.readFileSync(path.join(TEMPLATE_PATH, 'add.ejs')), } }; // now turn file contents into compiled templates Object.keys(templates).forEach(function(type) { templates[type].template = ejs.compile(templates[type].template.toString()); });
<<<<<<< // store inside the session the details of this pending verification req.session.pendingVerification = { email: stageParams.email, hash: stageParams.hash // we must store both email and password to handle the case where // a user re-creates an account - specifically, registration status // must ensure the new credentials work to properly verify that // the user has clicked throught the email link. note, this salted, bcrypted // representation of a user's password will get thrust into an encrypted cookie // served over an encrypted (SSL) session. guten, yah. }; httputils.jsonResponse(resp, true); ======= resp.json(true); email.sendVerificationEmail(stageParams.email, stageParams.site, secret); >>>>>>> // store inside the session the details of this pending verification req.session.pendingVerification = { email: stageParams.email, hash: stageParams.hash // we must store both email and password to handle the case where // a user re-creates an account - specifically, registration status // must ensure the new credentials work to properly verify that // the user has clicked throught the email link. note, this salted, bcrypted // representation of a user's password will get thrust into an encrypted cookie // served over an encrypted (SSL) session. guten, yah. }; resp.json(true); <<<<<<< httputils.jsonResponse(resp, true); ======= resp.json(true); >>>>>>> resp.json(true);
<<<<<<< var csrf_token, xhr = $; ======= var csrf_token; var server_time; var auth_status; >>>>>>> var csrf_token; var xhr = $; var server_time; var auth_status; <<<<<<< xhr.ajax({ url: "/wsapi/csrf", type: "GET", success: function(result) { csrf_token = result; _.defer(cb); }, dataType: "html" }); ======= $.get('/wsapi/session_context', {}, function(result) { csrf_token = result.csrf_token; server_time = { remote: result.server_time, local: (new Date()).getTime() }; auth_status = result.authenticated; cb(); }, 'json'); >>>>>>> xhr.ajax({ url: "/wsapi/session_context", type: "GET", success: function(result) { csrf_token = result.csrf_token; server_time = { remote: result.server_time, local: (new Date()).getTime() }; auth_status = result.authenticated; _.defer(cb); }, dataType: "json" }); <<<<<<< withCSRF(function() { xhr.ajax({ ======= withContext(function() { $.ajax({ >>>>>>> withContext(function() { xhr.ajax({ <<<<<<< var authenticated = JSON.parse(status); _.delay(onSuccess, 0, authenticated); ======= try { var authenticated = JSON.parse(status); if (typeof authenticated !== 'boolean') throw status; // at this point we know the authentication status of the // session, let's set it to perhaps save a network request // (to fetch session context). auth_status = authenticated; onSuccess(authenticated); } catch (e) { onFailure("unexpected server response: " + e); } >>>>>>> try { var authenticated = JSON.parse(status); if (typeof authenticated !== 'boolean') throw status; // at this point we know the authentication status of the // session, let's set it to perhaps save a network request // (to fetch session context). auth_status = authenticated; _.delay(onSuccess, 0, authenticated); } catch (e) { onFailure("unexpected server response: " + e); } <<<<<<< xhr.ajax({ url: "/wsapi/am_authed", success: function(status, textStatus, jqXHR) { var authenticated = JSON.parse(status); _.delay(onSuccess, 0, authenticated); }, error: onFailure }); ======= function returnAuthStatus() { try { if (typeof auth_status !== 'boolean') throw "can't get authentication status!"; onSuccess(auth_status); } catch(e) { onFailure(e.toString()); } } if (typeof auth_status !== 'boolean') withContext(returnAuthStatus); else setTimeout(returnAuthStatus, 0); >>>>>>> function returnAuthStatus() { try { if (typeof auth_status !== 'boolean') throw "can't get authentication status!"; _.delay(onSuccess, 0, auth_status); onSuccess(auth_status); } catch(e) { if (onFailure) onFailure(e.toString()); } } if (typeof auth_status !== 'boolean') withContext(returnAuthStatus); else setTimeout(returnAuthStatus, 0); <<<<<<< withCSRF(function() { xhr.ajax({ type: "POST", url: "/wsapi/logout", data: { csrf: csrf_token }, success: function() { csrf_token = undefined; withCSRF(function() { if (onSuccess) { _.defer(onSuccess); } }); } }); ======= withContext(function() { $.post("/wsapi/logout", { csrf: csrf_token }, function(result) { // assume the logout request is successful and // log the user out. There is no need to reset the // CSRF token. // FIXME: we should return a confirmation that the // user was successfully logged out. auth_status = false; withContext(function() { if (onSuccess) { onSuccess(); } }); } ); >>>>>>> withContext(function() { xhr.ajax({ type: "POST", url: "/wsapi/logout", data: { csrf: csrf_token }, success: function() { // assume the logout request is successful and // log the user out. There is no need to reset the // CSRF token. // FIXME: we should return a confirmation that the // user was successfully logged out. auth_status = false; if (onSuccess) _.defer(onSuccess); } }); <<<<<<< createUser: function(email, origin, onSuccess, onFailure) { withCSRF(function() { xhr.ajax({ ======= stageUser: function(email, password, onSuccess, onFailure) { withContext(function() { $.ajax({ >>>>>>> createUser: function(email, origin, onSuccess, onFailure) { withContext(function() { xhr.ajax({ <<<<<<< cancelUser: function(onSuccess, onFailure) { withCSRF(function() { xhr.ajax({ type: "POST", url: "/wsapi/account_cancel", data: {"csrf": csrf_token}, success: createDeferred(onSuccess), error: onFailure ======= cancelUser: function(onSuccess) { withContext(function() { $.post("/wsapi/account_cancel", {"csrf": csrf_token}, function(result) { if (onSuccess) { onSuccess(); } >>>>>>> cancelUser: function(onSuccess, onFailure) { withContext(function() { xhr.ajax({ type: "POST", url: "/wsapi/account_cancel", data: {"csrf": csrf_token}, success: createDeferred(onSuccess), error: onFailure <<<<<<< addEmail: function(email, origin, onSuccess, onFailure) { withCSRF(function() { xhr.ajax({ type: "POST", url: "/wsapi/stage_email", ======= addEmail: function(email, onSuccess, onFailure) { withContext(function() { $.ajax({ type: 'POST', url: '/wsapi/add_email', >>>>>>> addEmail: function(email, origin, onSuccess, onFailure) { withContext(function() { xhr.ajax({ type: "POST", url: "/wsapi/stage_email", <<<<<<< withCSRF(function() { xhr.ajax({ type: "POST", url: "/wsapi/remove_email", ======= withContext(function() { $.ajax({ type: 'POST', url: '/wsapi/remove_email', >>>>>>> withContext(function() { xhr.ajax({ type: "POST", url: "/wsapi/remove_email", <<<<<<< withCSRF(function() { xhr.ajax({ type: "POST", url: "/wsapi/cert_key", ======= withContext(function() { $.ajax({ type: 'POST', url: '/wsapi/cert_key', >>>>>>> withContext(function() { xhr.ajax({ type: "POST", url: "/wsapi/cert_key",
<<<<<<< if (info.type === "primary") { if (record.cert) { ======= if (info.state && 'offline' === info.state) { redirectToState("primary_offline", info); } else if (info.type === "primary") { // issuer MUST have changed... clear certs if ("transition_to_primary" === info.state && idInfo.cert) delete idInfo.cert; if (idInfo.cert) { >>>>>>> if (info.state && 'offline' === info.state) { redirectToState("primary_offline", info); } else if (info.type === "primary") { // issuer MUST have changed... clear certs if ("transition_to_primary" === info.state && idInfo.cert) delete idInfo.cert; if (record.cert) {
<<<<<<< const coding = require('./coding.js')({postMessage, contextState, controller}) const interaction = require('./interaction.js')({postMessage, api, controller}) ======= const interaction = require('./interaction.js')({api, controller}) >>>>>>> const coding = require('./coding.js')({postMessage, contextState, controller}) const interaction = require('./interaction.js')({api, controller}) <<<<<<< context.subscriptions.push(vscode.workspace.onDidChangeTextDocument(coding.onType)) context.subscriptions.push(vscode.debug.onDidStartDebugSession(coding.debugOn)) context.subscriptions.push(vscode.debug.onDidTerminateDebugSession(coding.debugOff)) ======= >>>>>>> context.subscriptions.push(vscode.workspace.onDidChangeTextDocument(coding.onType)) context.subscriptions.push(vscode.debug.onDidStartDebugSession(coding.debugOn)) context.subscriptions.push(vscode.debug.onDidTerminateDebugSession(coding.debugOff))
<<<<<<< import { modelHTML, sheetselectlistitemHTML, sheetselectlistHTML, keycode } from './constant'; import luckysheetsizeauto from './resize'; import { luckysheetMoveHighlightCell, luckysheetMoveHighlightCell2, luckysheetMoveHighlightRange, luckysheetMoveHighlightRange2 ======= import luckysheetsizeauto from './resize'; import { luckysheetMoveHighlightCell, >>>>>>> import luckysheetsizeauto from './resize'; import { luckysheetMoveHighlightCell, <<<<<<< import { labelFilterOptionState, orderbydatafiler, createFilter, createFilterOptions } from './filter'; import insertFormula from './insertFormula'; import { ======= import { >>>>>>> import { <<<<<<< getByteLen, rgbTohex, showrightclickmenu, luckysheetactiveCell, numFormat, mouseclickposition, ======= showrightclickmenu, luckysheetactiveCell, >>>>>>> showrightclickmenu, luckysheetactiveCell, <<<<<<< import { rowLocation, rowLocationByIndex, colLocation, colLocationByIndex, mouseposition ======= import { rowLocation, colLocation, mouseposition >>>>>>> import { rowLocation, colLocation, mouseposition <<<<<<< import { jfrefreshgrid, jfrefreshgridall, ======= import { jfrefreshgrid, >>>>>>> import { jfrefreshgrid, <<<<<<< if (pivotTable.isPivotRange(row_s, col_e)) { tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!", ""); ======= if(pivotTable.isPivotRange(row_s, col_e)){ tooltip.info(locale_drag.affectPivot,""); >>>>>>> if(pivotTable.isPivotRange(row_s, col_e)){ tooltip.info(locale_drag.affectPivot,""); <<<<<<< if (pivotTable.isPivotRange(row_e, col_s)) { tooltip.info("无法对所选单元格进行此更改,因为它会影响数据透视表!", ""); ======= if(pivotTable.isPivotRange(row_e, col_s)){ tooltip.info(locale_drag.affectPivot,""); >>>>>>> if(pivotTable.isPivotRange(row_e, col_s)){ tooltip.info(locale_drag.affectPivot,""); <<<<<<< //禁止前台编辑(只可 框选单元格、滚动查看表格) if (!Store.allowEdit) { return; } ======= // //禁止前台编辑(只可 框选单元格、滚动查看表格) // if(!Store.allowEdit){ // return; // } >>>>>>> // //禁止前台编辑(只可 框选单元格、滚动查看表格) // if(!Store.allowEdit){ // return; // } <<<<<<< let rowhiddenall = $.extend(true, rowhiddenother, rowhidden), rowhidenPre = json.parseJsonParm($top.data("rowhidden")); ======= let element = document.createElement('a'); element.setAttribute('href', URL.createObjectURL(blob)); element.setAttribute('download', locale_screenshot.screenshotImageName+'.png'); >>>>>>> let element = document.createElement('a'); element.setAttribute('href', URL.createObjectURL(blob)); element.setAttribute('download', locale_screenshot.screenshotImageName+'.png'); <<<<<<< //保存撤销 if (Store.clearjfundo) { let redo = {}; redo["type"] = "datachangeAll_filter"; redo["sheetIndex"] = Store.currentSheetIndex; ======= let clickHandler; element.addEventListener('click', clickHandler = function(){ requestAnimationFrame(function(){ URL.revokeObjectURL(element.href); }); >>>>>>> let clickHandler; element.addEventListener('click', clickHandler = function(){ requestAnimationFrame(function(){ URL.revokeObjectURL(element.href); }); <<<<<<< //公式栏 fx按钮 $("#luckysheet-wa-functionbox-fx").click(function () { //点击函数查找弹出框 if (Store.luckysheet_select_save.length == 0) { if (isEditMode()) { alert("请选择单元格插入函数"); } else { tooltip.info("请选择单元格插入函数", ""); } ======= >>>>>>> <<<<<<< let last = Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1]; let row_index = last["row_focus"], col_index = last["column_focus"]; let row = Store.visibledatarow[row_index], row_pre = row_index - 1 == -1 ? 0 : Store.visibledatarow[row_index - 1]; let col = Store.visibledatacolumn[col_index], col_pre = col_index - 1 == -1 ? 0 : Store.visibledatacolumn[col_index - 1]; luckysheetupdateCell(row, row_pre, row_index, col, col_pre, col_index, Store.flowdata); let cell = Store.flowdata[row_index][col_index]; if (cell != null && cell.f != null) { //单元格有计算 let functionStr = formula.getfunctionParam(cell.f); if (functionStr.fn != null) { //有函数公式 insertFormula.formulaParmDialog(functionStr.fn, functionStr.param); } else { //无函数公式 insertFormula.formulaListDialog(); } } else { //单元格无计算 $("#luckysheet-rich-text-editor").html('<span dir="auto" class="luckysheet-formula-text-color">=</span>'); $("#luckysheet-functionbox-cell").html($("#luckysheet-rich-text-editor").html()); insertFormula.formulaListDialog(); } ======= Store.luckysheet_model_move_state = true; >>>>>>> Store.luckysheet_model_move_state = true; <<<<<<< //公式选区操作 $("#luckysheet-formula-functionrange").on("mousedown", ".luckysheet-copy", function (event) { formula.rangeMove = true; Store.luckysheet_scroll_status = true; formula.rangeMoveObj = $(this).parent(); formula.rangeMoveIndex = $(this).parent().attr("rangeindex"); let mouse = mouseposition(event.pageX, event.pageY); let x = mouse[0] + $("#luckysheet-cell-main").scrollLeft(); let y = mouse[1] + $("#luckysheet-cell-main").scrollTop(); $("#luckysheet-formula-functionrange-highlight-" + formula.rangeMoveIndex).find(".luckysheet-selection-copy-hc").css("opacity", 0.13); let type = $(this).data("type"); if (type == "top") { y += 3; ======= //模态框关闭 $(document).on("click", ".luckysheet-modal-dialog-title-close, .luckysheet-model-close-btn", function (e) { //选择文本颜色和单元格颜色弹出框取消 if($("#textcolorselect").is(":visible")||$("#cellcolorselect").is(":visible")){ $("#luckysheet-conditionformat-dialog").show(); >>>>>>> //模态框关闭 $(document).on("click", ".luckysheet-modal-dialog-title-close, .luckysheet-model-close-btn", function (e) { //选择文本颜色和单元格颜色弹出框取消 if($("#textcolorselect").is(":visible")||$("#cellcolorselect").is(":visible")){ $("#luckysheet-conditionformat-dialog").show();
<<<<<<< change(date(2019, 7, 20), <>Added <SpellLink id={SPELLS.NULL_DYNAMO.id} /> essence.</>, emallson), ======= change(date(2019, 7, 21), 'Update error logging to reduce overhead.', Zerotorescue), change(date(2019, 7, 20), 'Allow for repeated phases in bossfights (e.g. Lady Ashvane / Radiance of Azshara).', Zeboot), change(date(2019, 7, 20), 'Made time filtering potion whitelist import from the potions module to avoid having to update separately each patch.', Zeboot), change(date(2019, 7, 20), <>Fixed <SpellLink id={SPELLS.CONCENTRATED_FLAME.id} /> not accounting for absorbs.</>, [Zeboot]), change(date(2019, 7, 20), 'Show changelog entries along with news on the frontpage.', [Zerotorescue]), change(date(2019, 7, 20), <>Removed ads by Google and most ad spots as they were not worth the degraded experience for you guys. Instead, please consider a monthly donation on <a href="https://www.patreon.com/wowanalyzer">Patreon</a> to support the project and unlock Premium, or bounty tickets on <a href="https://www.bountysource.com/teams/wowanalyzer">BountySource</a> for contributors to solve (currently active bounties: $1,550).</>, [Zerotorescue]), >>>>>>> change(date(2019, 7, 21), 'Update error logging to reduce overhead.', Zerotorescue), change(date(2019, 7, 20), <>Added <SpellLink id={SPELLS.NULL_DYNAMO.id} /> essence.</>, emallson), change(date(2019, 7, 20), 'Allow for repeated phases in bossfights (e.g. Lady Ashvane / Radiance of Azshara).', Zeboot), change(date(2019, 7, 20), 'Made time filtering potion whitelist import from the potions module to avoid having to update separately each patch.', Zeboot), change(date(2019, 7, 20), <>Fixed <SpellLink id={SPELLS.CONCENTRATED_FLAME.id} /> not accounting for absorbs.</>, [Zeboot]), change(date(2019, 7, 20), 'Show changelog entries along with news on the frontpage.', [Zerotorescue]), change(date(2019, 7, 20), <>Removed ads by Google and most ad spots as they were not worth the degraded experience for you guys. Instead, please consider a monthly donation on <a href="https://www.patreon.com/wowanalyzer">Patreon</a> to support the project and unlock Premium, or bounty tickets on <a href="https://www.bountysource.com/teams/wowanalyzer">BountySource</a> for contributors to solve (currently active bounties: $1,550).</>, [Zerotorescue]),
<<<<<<< this.id_element = element.find('div.ii.gt'); var classValue = this.id_element.attr('class'); if (classValue != null) { var matches = classValue.match(/(^|\s)m([\S]*)/); if (matches !== null) { this.id = matches.pop(); } } ======= this.id_element = element.find('div.ii.gt div.a3s.aXjCH'); this.id = this.id_element.attr('class').match(/(^|\s)m([\S]*)/).pop(); >>>>>>> this.id_element = element.find('div.ii.gt div.a3s.aXjCH'); var classValue = this.id_element.attr('class'); if (classValue != null) { var matches = classValue.match(/(^|\s)m([\S]*)/); if (matches !== null) { this.id = matches.pop(); } }
<<<<<<< assertEqual(r, '33+33+22'); })(); ======= console.log('r', r); assertEqual(r, '33+22+=33'); }.enableOverloading())(); >>>>>>> assertEqual(r, '33+22+=33'); })(); <<<<<<< assertEqual(r, '33-33+22'); })(); ======= assertEqual(r, '33+22-=33'); }.enableOverloading())(); >>>>>>> assertEqual(r, '33+22-=33'); })(); <<<<<<< assertEqual(r, '33*33+22'); })(); ======= assertEqual(r, '33+22*=33'); }.enableOverloading())(); >>>>>>> assertEqual(r, '33+22*=33'); })(); <<<<<<< assertEqual(r, '33/33+22'); })(); ======= assertEqual(r, '33+22/=33'); }.enableOverloading())(); >>>>>>> assertEqual(r, '33+22/=33'); })(); <<<<<<< assertEqual(r, '33%33+22'); })(); ======= assertEqual(r, '33+22%=33'); }.enableOverloading())(); >>>>>>> assertEqual(r, '33+22%=33'); })(); <<<<<<< assertEqual(r, '33<<33+22'); })(); ======= assertEqual(r, '33+22<<=33'); }.enableOverloading())(); >>>>>>> assertEqual(r, '33+22<<=33'); })(); <<<<<<< assertEqual(r, '33>>33+22'); })(); ======= assertEqual(r, '33+22>>=33'); }.enableOverloading())(); >>>>>>> assertEqual(r, '33+22>>=33'); })(); <<<<<<< assertEqual(r, '33^33+22'); })(); ======= assertEqual(r, '33+22^=33'); }.enableOverloading())(); >>>>>>> assertEqual(r, '33+22^=33'); })();
<<<<<<< else if (kcode == keycode.DELETE || kcode == keycode.BACKSPACE) { $("#luckysheet-delete-text").click(); ======= else if (kcode == keycode.DELETE) { if(imageCtrl.currentImgId != null){ imageCtrl.removeImgItem(); } else{ $("#luckysheet-delete-text").click(); } >>>>>>> else if (kcode == keycode.DELETE || kcode == keycode.BACKSPACE) { if(imageCtrl.currentImgId != null){ imageCtrl.removeImgItem(); } else{ $("#luckysheet-delete-text").click(); }
<<<<<<< name: 'Services', path: 'relationships.services.data[].id', description: 'Services that the service uses' }, { ======= name: 'Filters', path: 'relationships.filters.data[].id', description: 'Filters that the service uses' }, { >>>>>>> name: 'Services', path: 'relationships.services.data[].id', description: 'Services that the service uses' }, { name: 'Filters', path: 'relationships.filters.data[].id', description: 'Filters that the service uses' }, {
<<<<<<< rdns_tests.forEach(function(i) { it(i + ' with reverse DNS lookups', function() { return doCommand(i + ' --rdns') .should.be.fulfilled }); }) after(closeConnection) ======= it('MXS-2984: Malformed `list listeners` output', function() { return doCommand('list listeners RW-Split-Router --tsv') .then(res => { var d = res.split('\t') d[0].should.equal('RW-Split-Listener') d[1].should.equal('4006') d[2].should.equal('::') }) }); >>>>>>> rdns_tests.forEach(function(i) { it(i + ' with reverse DNS lookups', function() { return doCommand(i + ' --rdns') .should.be.fulfilled }); }) it('MXS-2984: Malformed `list listeners` output', function() { return doCommand('list listeners RW-Split-Router --tsv') .then(res => { var d = res.split('\t') d[0].should.equal('RW-Split-Listener') d[1].should.equal('4006') d[2].should.equal('::') }) }); after(closeConnection)
<<<<<<< if (!config.xid) { config.xid = ++[id for each ({ localId: id } in webapps)].sort(function(a, b) b - a)[0]; // NOTE: we can't currently use localId as code because webappsActor // if the emulator doesn't exit clean DOMApplicationRegistry._nextLocalId // will not be able to serialize "dom.mozApps.maxLocalId" and will be the // same for new app installed config.xkey = UUID.uuid().toString().slice(1, -1); ======= if (!config.xkey) { // generate an unique id for a registed app (used as appId by the // remote b2g-desktop install command) config.xkey = UUID.uuid().toString(); >>>>>>> if (!config.xkey) { // generate an unique id for a registed app (used as appId by the // remote b2g-desktop install command) config.xkey = UUID.uuid().toString().slice(1, -1);
<<<<<<< }, false); { let initialLatitude = 0, initialLongitude = 0, latitude = 0, longitude = 0, useCurrent = true, openWin = function openWin() { let params = { input: { lat: latitude, lon: longitude, useCurrent: useCurrent }, output: { lat: null, lon: null, useCurrent: useCurrent } }; Services.ww.openWindow(null, "chrome://prosthesis/content/geolocation.xul", "geolocationWindow", "chrome,dialog,menubar,centerscreen,modal", { wrappedJSObject: params }); useCurrent = params.output.useCurrent; if (useCurrent) { latitude = initialLatitude; longitude = initialLongitude; } else { latitude = params.output.lat || latitude; longitude = params.output.lon || longitude; } }, gotCoords = function gotCoords(message) { latitude = initialLatitude = message.wrappedJSObject.lat; longitude = initialLongitude = message.wrappedJSObject.lon; document.getElementById("geolocationButton") .addEventListener("click", openWin); }, sendCoords = function sendCoords() { Services.obs.notifyObservers({ wrappedJSObject: { lat: latitude, lon: longitude, } }, "r2d2b2g-geolocation-response", null); }; Services.obs.addObserver(gotCoords, "r2d2b2g-geolocation-setup", false); Services.obs.addObserver(sendCoords, "r2d2b2g-geolocation-request", false); } ======= }, false); document.getElementById("rotateButton").addEventListener("click", function() { Cu.import("resource://prosthesis/modules/GlobalSimulatorScreen.jsm"); GlobalSimulatorScreen.flipScreen(); }, false); >>>>>>> }, false); document.getElementById("rotateButton").addEventListener("click", function() { Cu.import("resource://prosthesis/modules/GlobalSimulatorScreen.jsm"); GlobalSimulatorScreen.flipScreen(); }, false); { let initialLatitude = 0, initialLongitude = 0, latitude = 0, longitude = 0, useCurrent = true, openWin = function openWin() { let params = { input: { lat: latitude, lon: longitude, useCurrent: useCurrent }, output: { lat: null, lon: null, useCurrent: useCurrent } }; Services.ww.openWindow(null, "chrome://prosthesis/content/geolocation.xul", "geolocationWindow", "chrome,dialog,menubar,centerscreen,modal", { wrappedJSObject: params }); useCurrent = params.output.useCurrent; if (useCurrent) { latitude = initialLatitude; longitude = initialLongitude; } else { latitude = params.output.lat || latitude; longitude = params.output.lon || longitude; } }, gotCoords = function gotCoords(message) { latitude = initialLatitude = message.wrappedJSObject.lat; longitude = initialLongitude = message.wrappedJSObject.lon; document.getElementById("geolocationButton") .addEventListener("click", openWin); }, sendCoords = function sendCoords() { Services.obs.notifyObservers({ wrappedJSObject: { lat: latitude, lon: longitude, } }, "r2d2b2g-geolocation-response", null); }; Services.obs.addObserver(gotCoords, "r2d2b2g-geolocation-setup", false); Services.obs.addObserver(sendCoords, "r2d2b2g-geolocation-request", false); }
<<<<<<< ======= // Chrome workaround: otherwise text is sometimes invisible (probably a rendering glitch due to the 3D transform graphics backend?) //_$epubHtml.css("visibility", "hidden"); // "flashing" in two-page spread mode is annoying :( _$epubHtml.css("opacity", "0.9"); _$iframe.css("visibility", "visible"); setTimeout(function() { //_$epubHtml.css("visibility", "visible"); _$epubHtml.css("opacity", "1"); }, 0); >>>>>>> // Chrome workaround: otherwise text is sometimes invisible (probably a rendering glitch due to the 3D transform graphics backend?) //_$epubHtml.css("visibility", "hidden"); // "flashing" in two-page spread mode is annoying :( _$epubHtml.css("opacity", "0.9"); _$iframe.css("visibility", "visible"); setTimeout(function() { //_$epubHtml.css("visibility", "visible"); _$epubHtml.css("opacity", "1"); }, 0); <<<<<<< _iframeLoader.loadIframe(_$iframe[0], src, function(sucsess){ onIFrameLoad(sucsess); if(callback) { callback(sucsess); } }, self); ======= //hide iframe until content is scaled _$iframe.css("visibility", "hidden"); self.trigger(ReadiumSDK.Views.OnePageView.SPINE_ITEM_OPEN_START, _$iframe, _currentSpineItem); _iframeLoader.loadIframe(_$iframe[0], src, onIFrameLoad, self, {spineItem : spineItem}); >>>>>>> //hide iframe until content is scaled _$iframe.css("visibility", "hidden"); self.trigger(ReadiumSDK.Views.OnePageView.SPINE_ITEM_OPEN_START, _$iframe, _currentSpineItem); _iframeLoader.loadIframe(_$iframe[0], src, function(sucsess){ onIFrameLoad(sucsess); if(callback) { callback(sucsess); } }, self); <<<<<<< this.getNavigator = function() { return new ReadiumSDK.Views.CfiNavigationLogic(_$el, _$iframe); }; ======= this.getElementByCfi = function(spineItem, cfi, classBlacklist, elementBlacklist, idBlacklist) { if(spineItem != _currentSpineItem) { console.error("spine item is not loaded"); return undefined; } var navigation = new ReadiumSDK.Views.CfiNavigationLogic(_$el, _$iframe); return navigation.getElementByCfi(cfi, classBlacklist, elementBlacklist, idBlacklist); }; >>>>>>> this.getNavigator = function() { return new ReadiumSDK.Views.CfiNavigationLogic(_$el, _$iframe); }; this.getElementByCfi = function(spineItem, cfi, classBlacklist, elementBlacklist, idBlacklist) { if(spineItem != _currentSpineItem) { console.error("spine item is not loaded"); return undefined; } var navigation = new ReadiumSDK.Views.CfiNavigationLogic(_$el, _$iframe); return navigation.getElementByCfi(cfi, classBlacklist, elementBlacklist, idBlacklist); };
<<<<<<< renderCurrentView: function(isReflowable) { if(this.currentView){ ======= function renderCurrentView(isReflowable) { if(_currentView){ >>>>>>> function renderCurrentView(isReflowable) { if(_currentView){ <<<<<<< ======= var viewCreationParams = { $viewport: _$el, spine: _spine, userStyles: _userStyles, iframeLoader: _iframeLoader }; >>>>>>> var viewCreationParams = { $viewport: _$el, spine: _spine, userStyles: _userStyles, iframeLoader: _iframeLoader }; <<<<<<< this.currentView = new ReadiumSDK.Views.ReflowableView({$viewport: this.$el, spine:this.spine, userStyles: this.userStyles, reader: this}); ======= _currentView = new ReadiumSDK.Views.ReflowableView(viewCreationParams); >>>>>>> _currentView = new ReadiumSDK.Views.ReflowableView(viewCreationParams); <<<<<<< openBook: function(openBookData) { var pack = openBookData.package ? openBookData.package : openBookData; this.package = new ReadiumSDK.Models.Package({packageData: pack}); ======= this.openBook = function(openBookData) { var pack = openBookData.package ? openBookData.package : openBookData; >>>>>>> this.openBook = function(openBookData) { var pack = openBookData.package ? openBookData.package : openBookData; <<<<<<< }, getDom: function() { return this.currentView.getDom(); }, setPackageDocument:function(packageDoc) { var parser = new window.DOMParser; if (_.isString(packageDoc)) this.packageDoc = parser.parseFromString(packageDoc, "text/xml"); else this.packageDoc = packageDoc; }, isThisCfiForVisibleSpineItems: function(CFI){ var result = false; this.forEachVisibleSpineItemThatMatchesCfi(CFI, function() { result = true; }); return result; }, createFullyQualifiedCfi : function(cfi, spineIndex) { if (cfi === undefined) return undefined; var packageDocCFIComponent = EPUBcfi.generatePackageDocumentCFIComponentWithSpineIndex(spineIndex, this.packageDoc); var completeCFI = EPUBcfi.generateCompleteCFI(packageDocCFIComponent, cfi); return completeCFI; }, getAnnotaitonsManagerForCurrentSpineItem: function () { // TODO DM this needs to be abstracted better. should be the same handler regardless of whether it's reflowable or fixed. if (this.currentView.isReflowable()) return {"annotationManager": this.currentView.annotations, "spineItemIndex" : this.currentView.spineItemIndex}; else return this.currentView.getAnnotaitonsManagerForCurrentSpineItem(); }, getCurrentSelectionCFI: function() { var cfi = undefined; var self = this; this.currentView.getDisplayingViews().forEach(function(view) { cfi = view.annotations.getCurrentSelectionCFI(); cfi = self.createFullyQualifiedCfi(cfi, view.currentSpineItem.index); if (cfi) return false; }); return cfi; }, addHighlight: function(CFI, id, type, styles) { var paginationInfo = this.currentView.getPaginationInfo(); var contentDocHrefFromCfi = EPUBcfi.getContentDocHref(CFI, this.packageDoc); var spineFromCfi = this.spine.getItemByHref(contentDocHrefFromCfi); var result = undefined; this.currentView.getDisplayingViews().forEach(function(view) { if (view.currentSpineItem.idref === spineFromCfi.idref) { result = view.annotations.addHighlight(CFI, id, type, styles); return false; } }); return result; }, updateAnnotationView: function(id, styles) { return this.getAnnotaitonsManagerForCurrentSpineItem().updateAnnotationView(id, styles); }, addSelectionHighlight: function(id, type) { var annotation; var spineItemIndex; this.currentView.getDisplayingViews().forEach(function(view) { if (view.annotations.getCurrentSelectionCFI()) { annotation = view.annotations.addSelectionHighlight(id, type); spineItemIndex = view.currentSpineItem.index; return false; } }); annotation.CFI = this.createFullyQualifiedCfi(annotation.CFI, spineItemIndex); return annotation; }, showPageByCFI : function (CFI, callback, callbackContext) { var contentDocHref = EPUBcfi.getContentDocHref(CFI, this.packageDoc); var spine = this.spine.getItemByHref(contentDocHref); var idref = spine.idref; var targetElementCFI; // TODODM: this is hacky replace it properly // what i'm doing here is essentially saying that we only expect one indirection step // between package document and content document. to properly make this work, we need // to wait until the content document is open and resolve the indirection then? // at least that's hwo justin does it. var cfiWrapperPattern = new RegExp("^.*!") // remove epubcfi( and indirection step var partiallyNakedCfi = CFI.replace(cfiWrapperPattern, ""); // remove last paren var nakedCfi = partiallyNakedCfi.substring(0, partiallyNakedCfi.length -1); console.log("idref: " + idref + " nakedCfi=" + nakedCfi); return this.openSpineItemElementCfi(idref, nakedCfi); }, removeAnnotation: function(id) { var result; this.currentView.getDisplayingViews().forEach(function(view) { console.log("Remove annotation=" + id); result = view.annotations.removeHighlight(id); }); return result; }, getCfiForCurrentPage:function() { var bookmark = $.parseJSON(this.bookmarkCurrentPage()); return this.createFullyQualifiedCfi(bookmark.contentCFI) }, redraw: function() { this.currentView.getDisplayingViews().forEach(function(view) { view.onViewportResize(); }); }, getVisibleAnnotationMidpoints: function () { var midpointsArray = []; this.currentView.getDisplayingViews().forEach(function(view) { var visibleMidpoints = view.getVisibleAnnotationMidpoints(); midpointsArray = midpointsArray.concat(visibleMidpoints); }); return midpointsArray; }, isVisibleCFI: function(cfi) { return this.isThisCfiForCurrentSpineItem(cfi) && this.currentView.isVisibleCFI(cfi); }, forEachVisibleSpineItem: function(callback) { var paginationInfo = this.currentView.getPaginationInfo(); _.each(paginationInfo.openPages, function(openPage) { callback(openPage); }); }, forEachVisibleSpineItemThatMatchesCfi: function(cfi, callback) { var idref = this.getSpineIdRefFromCfi(cfi); var result = undefined; this.forEachVisibleSpineItem(function(page){ if (idref === page.idref) { result = callback(page); return false; } }); return result; }, getSpineIdRefFromCfi: function(cfi) { var contentDocHrefFromCfi = EPUBcfi.getContentDocHref(cfi, this.packageDoc); var spineFromCfi = this.spine.getItemByHref(contentDocHrefFromCfi); return spineFromCfi.idref; }, ======= } >>>>>>> } // REfactor with boris function setPackageDocument(packageDoc) { var parser = new window.DOMParser; if (_.isString(packageDoc)) this.packageDoc = parser.parseFromString(packageDoc, "text/xml"); else this.packageDoc = packageDoc; }; this.isThisCfiForVisibleSpineItems = function(CFI){ var result = false; self.forEachVisibleSpineItemThatMatchesCfi(CFI, function() { result = true; }); return result; }; function createFullyQualifiedCfi(cfi, spineIndex) { if (cfi === undefined) return undefined; var packageDocCFIComponent = EPUBcfi.generatePackageDocumentCFIComponentWithSpineIndex(spineIndex, this.packageDoc); var completeCFI = EPUBcfi.generateCompleteCFI(packageDocCFIComponent, cfi); return completeCFI; }; function getAnnotaitonsManagerForCurrentSpineItem() { // TODO DM this needs to be abstracted better. should be the same handler regardless of whether it's reflowable or fixed. if (self.currentView.isReflowable()) return {"annotationManager": self.currentView.annotations, "spineItemIndex" : self.currentView.spineItemIndex}; else return self.currentView.getAnnotaitonsManagerForCurrentSpineItem(); }; this.getCurrentSelectionCFI = function() { var cfi = undefined; _currentView.getDisplayingViews().forEach(function(view) { cfi = view.annotations.getCurrentSelectionCFI(); cfi = self.createFullyQualifiedCfi(cfi, view.currentSpineItem.index); if (cfi) return false; }); return cfi; }; this.addHighlight = function(CFI, id, type, styles) { var paginationInfo = _currentView.getPaginationInfo(); var contentDocHrefFromCfi = EPUBcfi.getContentDocHref(CFI, this.packageDoc); var spineFromCfi = _spine.getItemByHref(contentDocHrefFromCfi); var result = undefined; _currentView.getDisplayingViews().forEach(function(view) { if (view.currentSpineItem.idref === spineFromCfi.idref) { result = view.annotations.addHighlight(CFI, id, type, styles); return false; } }); return result; }; this.updateAnnotationView = function(id, styles) { return self.getAnnotaitonsManagerForCurrentSpineItem().updateAnnotationView(id, styles); }; this.addSelectionHighlight = function(id, type) { var annotation; var spineItemIndex; _currentView.getDisplayingViews().forEach(function(view) { if (view.annotations.getCurrentSelectionCFI()) { annotation = view.annotations.addSelectionHighlight(id, type); spineItemIndex = view.currentSpineItem.index; return false; } }); annotation.CFI = createFullyQualifiedCfi(annotation.CFI, spineItemIndex); return annotation; }; this.showPageByCFI = function (CFI, callback, callbackContext) { var contentDocHref = EPUBcfi.getContentDocHref(CFI, this.packageDoc); var spine = _spine.getItemByHref(contentDocHref); var idref = spine.idref; var targetElementCFI; // TODODM: this is hacky replace it properly // what i'm doing here is essentially saying that we only expect one indirection step // between package document and content document. to properly make this work, we need // to wait until the content document is open and resolve the indirection then? // at least that's hwo justin does it. var cfiWrapperPattern = new RegExp("^.*!") // remove epubcfi( and indirection step var partiallyNakedCfi = CFI.replace(cfiWrapperPattern, ""); // remove last paren var nakedCfi = partiallyNakedCfi.substring(0, partiallyNakedCfi.length -1); console.log("idref: " + idref + " nakedCfi=" + nakedCfi); return self.openSpineItemElementCfi(idref, nakedCfi); }; this.removeAnnotation = function(id) { var result; _currentView.getDisplayingViews().forEach(function(view) { console.log("Remove annotation=" + id); result = view.annotations.removeHighlight(id); }); return result; }; this.getCfiForCurrentPage = function() { var bookmark = $.parseJSON(self.bookmarkCurrentPage()); return createFullyQualifiedCfi(bookmark.contentCFI) }; // refactor with boris? // needs a comment as to why this is needed // TODO DM this.redraw = function() { _currentView.getDisplayingViews().forEach(function(view) { view.onViewportResize(); }); }; this.getVisibleAnnotationMidpoints = function () { var midpointsArray = []; _currentView.getDisplayingViews().forEach(function(view) { var visibleMidpoints = view.getVisibleAnnotationMidpoints(); midpointsArray = midpointsArray.concat(visibleMidpoints); }); return midpointsArray; }; this.isVisibleCFI = function(cfi) { return this.isThisCfiForCurrentSpineItem(cfi) && _currentView.isVisibleCFI(cfi); }; function forEachVisibleSpineItem(callback) { var paginationInfo = _currentView.getPaginationInfo(); _.each(paginationInfo.openPages, function(openPage) { callback(openPage); }); }; function forEachVisibleSpineItemThatMatchesCfi(cfi, callback) { var idref = getSpineIdRefFromCfi(cfi); var result = undefined; forEachVisibleSpineItem(function(page){ if (idref === page.idref) { result = callback(page); return false; } }); return result; }; function getSpineIdRefFromCfi(cfi) { var contentDocHrefFromCfi = EPUBcfi.getContentDocHref(cfi, this.packageDoc); var spineFromCfi = _spine.getItemByHref(contentDocHrefFromCfi); return spineFromCfi.idref; };
<<<<<<< import bitcoreLib from 'bitcore-lib'; ======= import twemoji from 'twemoji'; >>>>>>> import bitcoreLib from 'bitcore-lib'; import twemoji from 'twemoji'; <<<<<<< } export function isValidBitcoinAddress(address) { if (typeof address !== 'string') { throw new Error('Please provide a string.'); } try { bitcoreLib.encoding.Base58Check.decode(address); return true; } catch (exc) { return false; } ======= } // applies a template to select2 to turn text emojis into images export function selectEmojis(option) { return $(`<span class="select2ImgOpt">${twemoji.parse(option.text, icon => (`../imgs/emojis/72X72/${icon}.png`))}</span>`); >>>>>>> } export function isValidBitcoinAddress(address) { if (typeof address !== 'string') { throw new Error('Please provide a string.'); } try { bitcoreLib.encoding.Base58Check.decode(address); return true; } catch (exc) { return false; } } // applies a template to select2 to turn text emojis into images export function selectEmojis(option) { return $(`<span class="select2ImgOpt">${twemoji.parse(option.text, icon => (`../imgs/emojis/72X72/${icon}.png`))}</span>`);
<<<<<<< ======= >>>>>>> <<<<<<< applySwitches($iframe); registerTriggers($iframe); // _mediaOverlayDataInjector.attachMediaOverlayData($iframe, spineItem, _viewerSettings); ======= _mediaOverlayDataInjector.attachMediaOverlayData($iframe, spineItem, _viewerSettings); >>>>>>> _mediaOverlayDataInjector.attachMediaOverlayData($iframe, spineItem, _viewerSettings); <<<<<<< }; function registerTriggers($iframe) { var contentDocument = $iframe[0].contentDocument; $('trigger', contentDocument).each(function() { var trigger = new ReadiumSDK.Models.Trigger(this); trigger.subscribe(contentDocument); }); } // Description: Parse the epub "switch" tags and hide // cases that are not supported function applySwitches($iframe) { var contentDocument = $iframe[0].contentDocument; // helper method, returns true if a given case node // is supported, false otherwise var isSupported = function(caseNode) { var ns = caseNode.attributes["required-namespace"]; if(!ns) { // the namespace was not specified, that should // never happen, we don't support it then console.log("Encountered a case statement with no required-namespace"); return false; } // all the xmlns that readium is known to support // TODO this is going to require maintenance var supportedNamespaces = ["http://www.w3.org/1998/Math/MathML"]; return _.include(supportedNamespaces, ns); }; $('switch', contentDocument).each( function() { // keep track of whether or now we found one var found = false; $('case', this).each(function() { if( !found && isSupported(this) ) { found = true; // we found the node, don't remove it } else { $(this).remove(); // remove the node from the dom // $(this).prop("hidden", true); } }); if(found) { // if we found a supported case, remove the default $('default', this).remove(); // $('default', this).prop("hidden", true); } }) } }; ======= }; /** * Lets user to subscribe to iframe's window events * * @method addIFrameEventsListener * @param {string} eventName event name. * @param {string} callback callback function. * @param {string} context user specified data passed to the callback function. * * @returns {undefined} */ this.addIFrameEventListener = function(eventName, callback, context) { _iframeLoader.addIFrameEventListener(eventName, callback, context); } >>>>>>> }; /** * Lets user to subscribe to iframe's window events * * @method addIFrameEventsListener * @param {string} eventName event name. * @param {string} callback callback function. * @param {string} context user specified data passed to the callback function. * * @returns {undefined} */ this.addIFrameEventListener = function(eventName, callback, context) { _iframeLoader.addIFrameEventListener(eventName, callback, context); } };
<<<<<<< ======= // This fixes rendering issues with WebView (native apps), which clips content embedded in iframes unless GPU hardware acceleration is enabled for CSS rendering. _$el.css("transform", "translateZ(0)"); _$contentFrame = $("#reflowable-content-frame", _$el); _$iframe = $("#epubContentIframe", _$el); _$iframe.css("left", ""); _$iframe.css("right", ""); _$iframe.css("position", "relative"); //_$iframe.css(_spine.isLeftToRight() ? "left" : "right", "0px"); _$iframe.css("overflow", "hidden"); _navigationLogic = new ReadiumSDK.Views.CfiNavigationLogic( _$contentFrame, _$iframe, { rectangleBased: true, paginationInfo: _paginationInfo }); >>>>>>> // This fixes rendering issues with WebView (native apps), which clips content embedded in iframes unless GPU hardware acceleration is enabled for CSS rendering. _$el.css("transform", "translateZ(0)");
<<<<<<< bookStyles: _bookStyles }, [elementClass]); pageView.on(ReadiumSDK.Views.OnePageView.SPINE_ITEM_OPEN_START, function($iframe, spineItem) { ======= bookStyles: _bookStyles, class: cssclass, contentAlignment: contentAlignment, enablePageTransitions: _enablePageTransitions }); pageView.on(ReadiumSDK.Views.OnePageView.SPINE_ITEM_OPEN_START, function($iframe, spineItem) { >>>>>>> bookStyles: _bookStyles, // class: cssclass, // contentAlignment: contentAlignment, enablePageTransitions: _enablePageTransitions }, [elementClass]); pageView.on(ReadiumSDK.Views.OnePageView.SPINE_ITEM_OPEN_START, function($iframe, spineItem) { <<<<<<< ======= this.getElementById = function(spineItem, id) { var views = getDisplayingViews(); for(var i = 0, count = views.length; i < count; i++) { var view = views[i]; if(view.currentSpineItem() == spineItem) { return view.getElementById(spineItem, id); } } console.error("spine item is not loaded"); return undefined; }; >>>>>>> this.getElementById = function(spineItem, id) { var views = getDisplayingViews(); for(var i = 0, count = views.length; i < count; i++) { var view = views[i]; if(view.currentSpineItem() == spineItem) { return view.getElementById(spineItem, id); } } console.error("spine item is not loaded"); return undefined; };
<<<<<<< ======= this.isElementVisible = visibilityCheckerFunc; this.isElementCfiVisible = function (partialCfi) { var pageIndex = this.getPageForElementCfi(partialCfi, ["cfi-marker", "mo-cfi-highlight"], [], ["MathJax_Message"]); var paginationInfo = options.paginationInfo || null; if (paginationInfo) { var openPages = [paginationInfo.currentSpreadIndex * paginationInfo.visibleColumnCount]; if (paginationInfo.visibleColumnCount == 2) { openPages.push(openPages[0] + 1); } return _.contains(openPages, pageIndex); } return undefined; }; this.getAllVisibleElementsWithSelector = function(selector, visibleContentOffset) { var elements = $(selector,this.getRootElement()).filter(function(e) { return true; }); var $newElements = []; $.each(elements, function() { $newElements.push($(this)); }); var visibleDivs = this.getVisibleElements($newElements, visibleContentOffset); return visibleDivs; }; this.getVisibleElements = function($elements, visibleContentOffsets) { var visibleElements = []; // Find the first visible text node $.each($elements, function() { var $element = this; var visibilityPercentage = visibilityCheckerFunc( $element, visibleContentOffsets, true); if (visibilityPercentage) { var $visibleElement = $element; visibleElements.push({ element: $visibleElement[0], // DOM Element is pushed percentVisible: visibilityPercentage }); return true; } // if element's position cannot be determined, just go to next one if (visibilityPercentage === null) { return true; } // continue if no visibleElements have been found yet, // stop otherwise return visibleElements.length === 0; }); return visibleElements; }; this.getVisibleTextElements = function(visibleContentOffsets) { var $elements = this.getTextElements($("body", this.getRootElement())); return this.getVisibleElements($elements, visibleContentOffsets); }; /** * @deprecated */ this.getMediaOverlayElements = function($root) { var $elements = []; function traverseCollection(elements) { if (elements == undefined) return; for(var i = 0, count = elements.length; i < count; i++) { var $element = $(elements[i]); if( $element.data("mediaOverlayData") ) { $elements.push($element); } else { traverseCollection($element[0].children); } } } traverseCollection([$root[0]]); return $elements; }; this.getTextElements = function($root) { >>>>>>>
<<<<<<< var _fontSize = 100; var _isIframeLoaded = false; ======= var _enablePageTransitions = options.enablePageTransitions; >>>>>>> var _fontSize = 100; var _isIframeLoaded = false; var _enablePageTransitions = options.enablePageTransitions; <<<<<<< //this is called by scroll_view for fixed spine item this.scaleToWidth = function(width) { var scale = width / _meta_size.width; self.transformContent(scale, 0, 0); }; //this is called by scroll_view for reflowable spine item this.resizeIFrameToContent = function() { // ReadiumSDK.Helpers.waitForRendering(_$iframe); var contHeight = getContentDocHeight(); _$iframe.css("height", contHeight + "px"); _$iframe.css("visibility", "visible"); _$el.css("height", contHeight + "px"); _$iframe.css("height", contHeight + "px"); _$iframe.css("visibility", "visible"); _$el.css("height", contHeight + "px"); setTimeout(function(){}, 0); // ReadiumSDK.Helpers.waitForRendering(_$iframe); }; this.setHeight = function(height) { _$iframe.css("height", height + "px"); _$iframe.css("visibility", "visible"); _$el.css("height", height + "px"); setTimeout(function(){}, 0); ReadiumSDK.Helpers.waitForRendering(_$iframe); }; this.elementHeight = function() { return _$el.height(); }; this.showIFrame = function() { _$iframe.css("visibility", "visible"); }; this.hideIFrame = function() { _$iframe.css("visibility", "hidden"); }; function getContentDocHeight(){ if(!_$epubHtml) { return 0; } return _$epubHtml.height(); } //this is called by fixed_view this.transformContent = function(scale, left, top) { ======= this.transformContentImmediate = function(scale, left, top) { var pageTransition_Translate = false; // TODO: from options var pageSwitchActuallyChanged = _pageSwitchActuallyChanged || _pageSwitchActuallyChanged_IFRAME_LOAD; _pageSwitchActuallyChanged_IFRAME_LOAD = false; // console.error("transformContent: "+pageSwitchActuallyChanged + " - " + _pageSwitchDir); >>>>>>> //this is called by scroll_view for fixed spine item this.scaleToWidth = function(width) { var scale = width / _meta_size.width; self.transformContent(scale, 0, 0); }; //this is called by scroll_view for reflowable spine item this.resizeIFrameToContent = function() { // ReadiumSDK.Helpers.waitForRendering(_$iframe); var contHeight = getContentDocHeight(); _$iframe.css("height", contHeight + "px"); _$iframe.css("visibility", "visible"); _$el.css("height", contHeight + "px"); _$iframe.css("height", contHeight + "px"); _$iframe.css("visibility", "visible"); _$el.css("height", contHeight + "px"); setTimeout(function(){}, 0); // ReadiumSDK.Helpers.waitForRendering(_$iframe); }; this.setHeight = function(height) { _$iframe.css("height", height + "px"); _$iframe.css("visibility", "visible"); _$el.css("height", height + "px"); setTimeout(function(){}, 0); ReadiumSDK.Helpers.waitForRendering(_$iframe); }; this.elementHeight = function() { return _$el.height(); }; this.showIFrame = function() { _$iframe.css("visibility", "visible"); }; this.hideIFrame = function() { _$iframe.css("visibility", "hidden"); }; function getContentDocHeight(){ if(!_$epubHtml) { return 0; } return _$epubHtml.height(); } this.transformContentImmediate = function(scale, left, top) { var pageTransition_Translate = false; // TODO: from options var pageSwitchActuallyChanged = _pageSwitchActuallyChanged || _pageSwitchActuallyChanged_IFRAME_LOAD; _pageSwitchActuallyChanged_IFRAME_LOAD = false; // console.error("transformContent: "+pageSwitchActuallyChanged + " - " + _pageSwitchDir);
<<<<<<< * @memberof Aggregations * * @param {String} field Field name to aggregate over. * @param {String} opts Additional options to include in the aggregation. * @param {String} name Aggregation name. Defaults to agg_date_histogram_<field>. * @return {Object} Date Histogram Aggregation. ======= * @param {String} field Field name to aggregate over. * @param {String} [name] Aggregation name. Defaults to agg_date_histogram_<field>. * @param {Object} opts Additional options to include in the aggregation. * @return {Object} Date Histogram Aggregation. >>>>>>> * @memberof Aggregations * * @param {String} field Field name to aggregate over. * @param {String} [name] Aggregation name. Defaults to agg_date_histogram_<field>. * @param {Object} opts Additional options to include in the aggregation. * @return {Object} Date Histogram Aggregation.
<<<<<<< * @memberof Aggregations * * @param {String} field Field name to aggregate over. * @param {String} opts Additional options to include in the aggregation. * @param {String} name Aggregation name. Defaults to agg_cardinality_<field>. * @return {Object} Cardinality Aggregation. ======= * @param {String} field Field name to aggregate over. * @param {String} [name] Aggregation name. Defaults to agg_cardinality_<field>. * @param {Object} opts Additional options to include in the aggregation. * @return {Object} Cardinality Aggregation. >>>>>>> * @memberof Aggregations * * @param {String} field Field name to aggregate over. * @param {String} [name] Aggregation name. Defaults to agg_cardinality_<field>. * @param {Object} opts Additional options to include in the aggregation. * @return {Object} Cardinality Aggregation.
<<<<<<< * @memberof Aggregations * * @param {String} field Field name to aggregate over. * @param {String} name Aggregation name. Defaults to agg_terms_<field>. * @param {Object} opts Additional options to include in the aggregation. * @return {Object} Range aggregation. ======= * @param {String} field Field name to aggregate over. * @param {String} [name] Aggregation name. Defaults to agg_terms_<field>. * @param {Object} opts Additional options to include in the aggregation. * @return {Object} Range aggregation. >>>>>>> * @memberof Aggregations * * @param {String} field Field name to aggregate over. * @param {String} [name] Aggregation name. Defaults to agg_terms_<field>. * @param {Object} opts Additional options to include in the aggregation. * @return {Object} Range aggregation.
<<<<<<< * @memberof Aggregations * * @param {String} field Field name to aggregate over. * @param {String} name Aggregation name. Defaults to agg_sum_<field>. * @return {Object} Sum Aggregation. ======= * @param {String} field Field name to aggregate over. * @param {String} [name] Aggregation name. Defaults to agg_sum_<field>. * @param {Object} opts Additional options to include in the aggregation. * @return {Object} Sum Aggregation. >>>>>>> * @memberof Aggregations * * @param {String} field Field name to aggregate over. * @param {String} [name] Aggregation name. Defaults to agg_sum_<field>. * @param {Object} opts Additional options to include in the aggregation. * @return {Object} Sum Aggregation.
<<<<<<< import { getInventory, events as inventoryEvents, } from '../../../utils/inventory'; ======= import { recordEvent } from '../../../utils/metrics'; >>>>>>> import { getInventory, events as inventoryEvents, } from '../../../utils/inventory'; import { recordEvent } from '../../../utils/metrics';
<<<<<<< this._root && this._hide(); ======= Dimensions.removeEventListener('change', this._windowChanged); Keyboard.removeListener('keyboardDidChangeFrame', this._keyboardDidChangeFrame); this._hide(); >>>>>>> this._root && this._hide(); Dimensions.removeEventListener('change', this._windowChanged); Keyboard.removeListener('keyboardDidChangeFrame', this._keyboardDidChangeFrame);
<<<<<<< thunk(rootClone) // revoke all proxies revoke(revocableProxies) ======= const maybeVoidReturn = thunk(rootClone) //values either than undefined will trigger warning; !Object.is(maybeVoidReturn, undefined) && console.warn( `Immer callback expects no return value. However ${typeof maybeVoidReturn} was returned`, ) >>>>>>> const maybeVoidReturn = thunk(rootClone) //values either than undefined will trigger warning; !Object.is(maybeVoidReturn, undefined) && console.warn( `Immer callback expects no return value. However ${typeof maybeVoidReturn} was returned`, ) // revoke all proxies revoke(revocableProxies)
<<<<<<< var getIndex = function (name) { return name.match(/(document|filename)\[(\d+)\]/)[2]; ======= getIndex = function (name) { return name.match(/files-(\d+)-(document|filename)/)[1]; >>>>>>> var getIndex = function (name) { return name.match(/files-(\d+)-(document|filename)/)[1]; <<<<<<< var setUpTextArea = function (textArea) { var fileNameInput = document.getElementsByName("filename[" + getIndex(textArea.name) + "]")[0]; ======= setUpTextArea = function (textArea) { var fileNameInput = document.getElementsByName("files-" + getIndex(textArea.name) + "-filename")[0]; >>>>>>> var setUpTextArea = function (textArea) { var fileNameInput = document.getElementsByName("files-" + getIndex(textArea.name) + "-filename")[0];
<<<<<<< if (statusMessage) return; statusMessage = app.statusBar.pushMessage({ msg: app.polyglot.t('listingDelete.deletingListing', { listing: `<em>${getTitle(model)}</em>` }), ======= const statusMessage = app.statusBar.pushMessage({ msg: `Deleting listing <em>${getTitle(model)}</em>... (translate me)`, >>>>>>> const statusMessage = app.statusBar.pushMessage({ msg: app.polyglot.t('listingDelete.deletingListing', { listing: `<em>${getTitle(model)}</em>` }),
<<<<<<< // Until we have legitimate profile models interfacing with the server, // we'll create a dummy "users" collection with a dummy set of "user" models const usersCl = new Collection([ { id: 'Qm63bf1a74e69375b5b53e940a057e072b4c5fa0a0', handle: 'sampatt', }, { id: 'Qm11111111iv1kgzh14sRkphaD3n5HraN2eRRNUGdeF6xY', }, { id: 'Qm222222222iv1kgzh14sRkphaD3n5HraN2eRRNUGdeF6xY', }, { id: 'Qmbbb75ac9028dd8aca7acb236b5dd7c4dfd9b5bc8', handle: 'themes', }, { id: 'Qma06aa22a38f0e62221ab74464c311bd88305f88c', handle: 'openbazaar', name: 'OB Store', }, ]); ======= import Settings from './models/Settings'; >>>>>>> import Settings from './models/Settings'; <<<<<<< .open('Unable to obtain the server configuration.', 'Is your server running?'); }); app.loadingModal.close(); app.pageNav.navigable = true; Backbone.history.start(); ======= .open(); }); return onboardDeferred.promise(); } const onboardIfNeededDeferred = $.Deferred(); function onboardIfNeeded() { isOnboardingNeeded().done((onboardingNeeded) => { if (onboardingNeeded) { // let's go onboard onboard().done(() => onboardIfNeededDeferred.resolve()); } else { onboardIfNeededDeferred.resolve(); } }); return onboardIfNeededDeferred.promise(); } // let's start our flow fetchConfig().done((data) => { app.profile = new Profile({ id: data.guid }); app.settings = new Settings(); onboardIfNeeded().done(() => { app.pageNav.navigable = true; app.loadingModal.close(); location.hash = location.hash || app.profile.id; Backbone.history.start(); }); }); >>>>>>> .open(); }); return onboardDeferred.promise(); } const onboardIfNeededDeferred = $.Deferred(); function onboardIfNeeded() { isOnboardingNeeded().done((onboardingNeeded) => { if (onboardingNeeded) { // let's go onboard onboard().done(() => onboardIfNeededDeferred.resolve()); } else { onboardIfNeededDeferred.resolve(); } }); return onboardIfNeededDeferred.promise(); } // let's start our flow fetchConfig().done((data) => { app.profile = new Profile({ id: data.guid }); app.settings = new Settings(); onboardIfNeeded().done(() => { app.pageNav.navigable = true; app.loadingModal.close(); location.hash = location.hash || app.profile.id; Backbone.history.start(); }); }); app.loadingModal.close(); app.pageNav.navigable = true; Backbone.history.start();
<<<<<<< localSourceImage: PropTypes.shape({ filename: PropTypes.string, directory: PropTypes.string, mode: PropTypes.string }) ======= localSourceImagePath: PropTypes.string, permissionDialogTitle: PropTypes.string, permissionDialogMessage: PropTypes.string, >>>>>>> localSourceImage: PropTypes.shape({ filename: PropTypes.string, directory: PropTypes.string, mode: PropTypes.string }), permissionDialogTitle: PropTypes.string, permissionDialogMessage: PropTypes.string, <<<<<<< localSourceImage: null ======= localSourceImagePath: null, permissionDialogTitle: '', permissionDialogMessage: '', >>>>>>> localSourceImage: null, permissionDialogTitle: '', permissionDialogMessage: '', <<<<<<< save(imageType, transparent, folder, filename, includeImage, cropToImageSize) { UIManager.dispatchViewManagerCommand(this._handle, UIManager.RNSketchCanvas.Commands.save, [ imageType, folder, filename, transparent, includeImage, cropToImageSize ]) ======= save(imageType, transparent, folder, filename) { UIManager.dispatchViewManagerCommand(this._handle, UIManager.RNSketchCanvas.Commands.save, [imageType, folder, filename, transparent]) >>>>>>> save(imageType, transparent, folder, filename, includeImage, cropToImageSize) { UIManager.dispatchViewManagerCommand(this._handle, UIManager.RNSketchCanvas.Commands.save, [imageType, folder, filename, transparent, includeImage, cropToImageSize]) <<<<<<< localSourceImage={this.props.localSourceImage} ======= localSourceImagePath={this.props.localSourceImagePath} permissionDialogTitle={this.props.permissionDialogTitle} permissionDialogMessage={this.props.permissionDialogMessage} >>>>>>> localSourceImage={this.props.localSourceImage} permissionDialogTitle={this.props.permissionDialogTitle} permissionDialogMessage={this.props.permissionDialogMessage}
<<<<<<< ======= const action = async ({ tableId }, options) => { >>>>>>> <<<<<<< loadConfig(configPath); ======= const { config: configPath } = options; loadConfig(configPath, options); >>>>>>> loadConfig(configPath, options); <<<<<<< ======= }; function configureCommanderHubDbDeleteCommand(commander) { commander .version(version) .description(DELETE_DESCRIPTION) .arguments('<tableId>') .action(async tableId => action({ tableId }, commander)); addLoggerOptions(commander); addPortalOptions(commander); addConfigOptions(commander); addUseEnvironmentOptions(commander); } module.exports = { DELETE_DESCRIPTION, // Yargs command, describe, handler, builder, // Commander configureCommanderHubDbDeleteCommand, >>>>>>>
<<<<<<< const watchCommand = require('../commands/watch'); ======= const authCommand = require('../commands/auth'); >>>>>>> const watchCommand = require('../commands/watch'); const authCommand = require('../commands/auth'); <<<<<<< .command(watchCommand) ======= .command(removeCommand) >>>>>>> .command(watchCommand) .command(removeCommand)
<<<<<<< const functionsCommand = require('../commands/functions'); ======= const listCommand = require('../commands/list'); >>>>>>> const functionsCommand = require('../commands/functions'); const listCommand = require('../commands/list'); <<<<<<< .command(functionsCommand) ======= .command({ ...listCommand, aliases: 'ls', }) >>>>>>> .command(functionsCommand) .command({ ...listCommand, aliases: 'ls', })
<<<<<<< const functionsCommand = require('../commands/functions'); ======= const openCommand = require('../commands/open'); >>>>>>> const functionsCommand = require('../commands/functions'); const openCommand = require('../commands/open'); <<<<<<< .command(functionsCommand) ======= .command(openCommand) >>>>>>> .command(functionsCommand) .command(openCommand)
<<<<<<< ======= addLoggerOptions, addUseEnvironmentOptions, >>>>>>> addUseEnvironmentOptions, <<<<<<< exports.handler = async options => { const { config: configPath, src, dest } = options; console.log('in'); setLogLevel(options); logDebugInfo(options); loadConfig(configPath); ======= const action = async ({ src, dest }, options) => { setLogLevel(options); logDebugInfo(options); const { config: configPath } = options; loadConfig(configPath, options); >>>>>>> exports.handler = async options => { const { config: configPath, src, dest } = options; setLogLevel(options); logDebugInfo(options); loadConfig(configPath, options); <<<<<<< ======= }; const configureCommanderFileManagerUploadCommand = commander => { commander .version(version) .description(UPLOAD_DESCRIPTION) .arguments('<src> <dest>') .action((src, dest) => action({ src, dest }, commander)); addConfigOptions(commander); addPortalOptions(commander); addLoggerOptions(commander); addUseEnvironmentOptions(commander); addHelpUsageTracking(commander, UPLOAD_COMMAND_NAME); }; module.exports = { UPLOAD_DESCRIPTION, // Yargs command, describe, handler, builder, // Commander configureCommanderFileManagerUploadCommand, >>>>>>>
<<<<<<< const functionsCommand = require('../commands/functions'); ======= const openCommand = require('../commands/open'); >>>>>>> const functionsCommand = require('../commands/functions'); const openCommand = require('../commands/open'); <<<<<<< .command(functionsCommand) ======= .command(openCommand) >>>>>>> .command(functionsCommand) .command(openCommand)
<<<<<<< /** * Moves file from srcPath to destPath * * @async * @param {number} portalId * @param {string} srcPath * @param {string} destPath * @returns {Promise} */ async function moveFile(portalId, srcPath, destPath) { return http.put(portalId, { uri: `${FILE_MAPPER_API_PATH}/rename/${srcPath}?path=${destPath}`, }); } ======= /** * Get directory contents * * @async * @param {string} path * @returns {Promise} */ async function getDirectoryContentsByPath(portalId, path) { return http.get(portalId, { uri: `${FILE_MAPPER_API_PATH}/meta/${path}`, }); } >>>>>>> /** * Moves file from srcPath to destPath * * @async * @param {number} portalId * @param {string} srcPath * @param {string} destPath * @returns {Promise} */ async function moveFile(portalId, srcPath, destPath) { return http.put(portalId, { uri: `${FILE_MAPPER_API_PATH}/rename/${srcPath}?path=${destPath}`, }); } /** * Get directory contents * * @async * @param {string} path * @returns {Promise} */ async function getDirectoryContentsByPath(portalId, path) { return http.get(portalId, { uri: `${FILE_MAPPER_API_PATH}/meta/${path}`, }); } <<<<<<< moveFile, ======= getDirectoryContentsByPath, >>>>>>> moveFile, getDirectoryContentsByPath,
<<<<<<< addPortalOptions, addConfigOptions, setLogLevel, getPortalId, } = require('../lib/commonOpts'); const { trackCommandUsage } = require('../lib/usageTracking'); const { logDebugInfo } = require('../lib/debugInfo'); const { ======= >>>>>>> addPortalOptions, addConfigOptions, setLogLevel, getPortalId, addUseEnvironmentOptions, } = require('../lib/commonOpts'); const { trackCommandUsage } = require('../lib/usageTracking'); const { logDebugInfo } = require('../lib/debugInfo'); const { <<<<<<< exports.command = 'logs <path>'; exports.describe = 'get logs for a function'; exports.handler = async options => { ======= const action = async ({ functionPath }, options) => { >>>>>>> exports.command = 'logs <path>'; exports.describe = 'get logs for a function'; exports.handler = async options => { <<<<<<< const { latest, tail, compact, path: functionPath } = options; ======= const { latest, file, follow, compact } = options; >>>>>>> const { latest, tail, compact, path: functionPath } = options; <<<<<<< ======= }; const handler = async argv => action({ functionPath: argv.path }, argv); // Commander Configuration const configureCommanderLogsCommand = commander => { commander .version(version) .description(DESCRIPTION) .arguments('<function_path>') .option('--latest', 'retrieve most recent log only') .option('--compact', 'output compact logs') .option('-f, --follow', 'tail logs') .action(async (functionPath, command = {}) => action({ functionPath }, command) ); addConfigOptions(commander); addPortalOptions(commander); addLoggerOptions(commander); addUseEnvironmentOptions(commander); addHelpUsageTracking(commander, COMMAND_NAME); }; module.exports = { // Yargs command, describe, builder, handler, // Commander configureCommanderLogsCommand, >>>>>>>
<<<<<<< const initCommand = require('../commands/init'); ======= const lintCommand = require('../commands/lint'); >>>>>>> const initCommand = require('../commands/init'); const lintCommand = require('../commands/lint'); <<<<<<< .command(initCommand) ======= .command(lintCommand) >>>>>>> .command(initCommand) .command(lintCommand)
<<<<<<< type: 'input', message: 'Enter your personal access key:', ======= message: 'Enter your personal CMS access key:', >>>>>>> type: 'input', message: 'Enter your personal CMS access key:',
<<<<<<< ======= async function action({ secretName, secretValue }, options) { >>>>>>> <<<<<<< loadConfig(configPath); ======= const { config: configPath } = options; loadConfig(configPath, options); >>>>>>> loadConfig(configPath, options); <<<<<<< }; ======= } function configureSecretsUpdateCommand(program) { program .version(version) .description('Update an existing HubSpot secret') .arguments('<name> <value>') .action(async (secretName, secretValue) => { await action({ secretName, secretValue }, program); }); addLoggerOptions(program); addPortalOptions(program); addConfigOptions(program); addUseEnvironmentOptions(program); } exports.command = 'update <name> <value>'; exports.describe = DESCRIPTION; >>>>>>> };
<<<<<<< const { trackCommandUsage, trackAuthAction } = require('../lib/usageTracking'); const { setLogLevel, addTestingOptions } = require('../lib/commonOpts'); const { promptUser, personalAccessKeyPrompt, PORTAL_NAME, } = require('../lib/prompts'); ======= const { promptUser, personalAccessKeyPrompt, PORTAL_NAME, OAUTH_FLOW, API_KEY_FLOW, } = require('../lib/prompts'); const { trackCommandUsage, addHelpUsageTracking, trackAuthAction, } = require('../lib/usageTracking'); const { addLoggerOptions, setLogLevel, addTestingOptions, } = require('../lib/commonOpts'); >>>>>>> const { trackCommandUsage, trackAuthAction } = require('../lib/usageTracking'); const { setLogLevel, addTestingOptions } = require('../lib/commonOpts'); const { OAUTH_FLOW, API_KEY_FLOW, PORTAL_NAME, personalAccessKeyPrompt, promptUser, } = require('../lib/prompts'); <<<<<<< exports.command = 'init'; exports.describe = `initialize ${DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} for a HubSpot portal`; exports.handler = async options => { ======= const personalAccessKeyConfigCreationFlow = async env => { const configData = await personalAccessKeyPrompt({ env }); const { name } = await promptUser([PORTAL_NAME]); const portalConfig = { ...configData, name, }; await updateConfigWithPersonalAccessKey(portalConfig, true); return portalConfig; }; const oauthConfigCreationFlow = async env => { const configData = await promptUser(OAUTH_FLOW); const portalConfig = { ...configData, env, }; await authenticateWithOauth(portalConfig); updateDefaultPortal(portalConfig.name); return portalConfig; }; const apiKeyConfigCreationFlow = async env => { const configData = await promptUser(API_KEY_FLOW); const portalConfig = { ...configData, env, }; updatePortalConfig(portalConfig); updateDefaultPortal(portalConfig.name); writeConfig(); return portalConfig; }; const CONFIG_CREATION_FLOWS = { [PERSONAL_ACCESS_KEY_AUTH_METHOD.value]: personalAccessKeyConfigCreationFlow, [OAUTH_AUTH_METHOD.value]: oauthConfigCreationFlow, [API_KEY_AUTH_METHOD.value]: apiKeyConfigCreationFlow, }; const action = async options => { const { auth: authType = PERSONAL_ACCESS_KEY_AUTH_METHOD.value } = options; >>>>>>> const personalAccessKeyConfigCreationFlow = async env => { const configData = await personalAccessKeyPrompt({ env }); const { name } = await promptUser([PORTAL_NAME]); const portalConfig = { ...configData, name, }; await updateConfigWithPersonalAccessKey(portalConfig, true); return portalConfig; }; const oauthConfigCreationFlow = async env => { const configData = await promptUser(OAUTH_FLOW); const portalConfig = { ...configData, env, }; await authenticateWithOauth(portalConfig); updateDefaultPortal(portalConfig.name); return portalConfig; }; const apiKeyConfigCreationFlow = async env => { const configData = await promptUser(API_KEY_FLOW); const portalConfig = { ...configData, env, }; updatePortalConfig(portalConfig); updateDefaultPortal(portalConfig.name); writeConfig(); return portalConfig; }; const CONFIG_CREATION_FLOWS = { [PERSONAL_ACCESS_KEY_AUTH_METHOD.value]: personalAccessKeyConfigCreationFlow, [OAUTH_AUTH_METHOD.value]: oauthConfigCreationFlow, [API_KEY_AUTH_METHOD.value]: apiKeyConfigCreationFlow, }; exports.command = 'init'; exports.describe = `initialize ${DEFAULT_HUBSPOT_CONFIG_YAML_FILE_NAME} for a HubSpot portal`; exports.handler = async options => { const { auth: authType = PERSONAL_ACCESS_KEY_AUTH_METHOD.value } = options; <<<<<<< trackCommandUsage('init', { authType: 'personalaccesskey' }); ======= trackCommandUsage(COMMAND_NAME, { authType, }); >>>>>>> trackCommandUsage('init', { authType, }); <<<<<<< trackAuthAction( 'init', PERSONAL_ACCESS_KEY_AUTH_METHOD.value, TRACKING_STATUS.STARTED ); ======= trackAuthAction(COMMAND_NAME, authType, TRACKING_STATUS.STARTED); >>>>>>> trackAuthAction('init', authType, TRACKING_STATUS.STARTED); <<<<<<< trackAuthAction( 'init', PERSONAL_ACCESS_KEY_AUTH_METHOD.value, TRACKING_STATUS.COMPLETE, portalId ); ======= trackAuthAction(COMMAND_NAME, authType, TRACKING_STATUS.COMPLETE, portalId); process.exit(); >>>>>>> trackAuthAction('init', authType, TRACKING_STATUS.COMPLETE, portalId); process.exit(); <<<<<<< trackAuthAction( 'init', PERSONAL_ACCESS_KEY_AUTH_METHOD.value, TRACKING_STATUS.ERROR ); ======= trackAuthAction(COMMAND_NAME, authType, TRACKING_STATUS.ERROR); >>>>>>> trackAuthAction('init', authType, TRACKING_STATUS.ERROR); <<<<<<< exports.builder = yargs => { ======= // Yargs Configuration const command = `${COMMAND_NAME}`; const describe = DESCRIPTION; const builder = yargs => { yargs.option('auth', { describe: 'specify auth method to use ["personalaccesskey", "oauth2", "apikey"]', type: 'string', choices: [ `${PERSONAL_ACCESS_KEY_AUTH_METHOD.value}`, `${OAUTH_AUTH_METHOD.value}`, `${API_KEY_AUTH_METHOD.value}`, ], default: PERSONAL_ACCESS_KEY_AUTH_METHOD.value, defaultDescription: `"${PERSONAL_ACCESS_KEY_AUTH_METHOD.value}": \nAn access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`, }); >>>>>>> exports.builder = yargs => { yargs.option('auth', { describe: 'specify auth method to use ["personalaccesskey", "oauth2", "apikey"]', type: 'string', choices: [ `${PERSONAL_ACCESS_KEY_AUTH_METHOD.value}`, `${OAUTH_AUTH_METHOD.value}`, `${API_KEY_AUTH_METHOD.value}`, ], default: PERSONAL_ACCESS_KEY_AUTH_METHOD.value, defaultDescription: `"${PERSONAL_ACCESS_KEY_AUTH_METHOD.value}": \nAn access token tied to a specific user account. This is the recommended way of authenticating with local development tools.`, }); <<<<<<< ======= }; const handler = async argv => action(argv); // Commander Configuration const configureCommanderInitCommand = program => { program .version(version) .description(DESCRIPTION) .option( '--auth', 'specify auth method to use ["personalaccesskey", "oauth2", "apikey"]' ) .action(async (command = {}) => action(command)); addLoggerOptions(program); addTestingOptions(program); addHelpUsageTracking(program, COMMAND_NAME); }; module.exports = { // Yargs command, describe, builder, handler, // Commander configureCommanderInitCommand, >>>>>>>
<<<<<<< 'click .js-resync': 'clickResync', ======= 'click .js-purge': 'clickPurge', >>>>>>> 'click .js-resync': 'clickResync', 'click .js-purge': 'clickPurge', <<<<<<< clickResync() { this.resyncCache(); } /** * Call to the server to remove cached files that are being shared on IPFS. * This call should not be aborted when the view is removed, it's critical the user is informed if * the call fails, even if they have navigated away from the view. */ resyncCache() { this.getCachedEl('.js-resync').addClass('processing'); this.getCachedEl('.js-resyncProgress').removeClass('hide'); this.getCachedEl('.js-resyncComplete').addClass('hide'); this.resync = $.post(app.getServerUrl('wallet/resyncblockchain')) .always(() => { this.getCachedEl('.js-resync').removeClass('processing'); }) .fail((xhr) => { const failReason = xhr.responseJSON && xhr.responseJSON.reason || ''; openSimpleMessage( app.polyglot.t('settings.advancedTab.server.resyncError'), failReason); }) .done(() => { // the resync can take several minutes, the user will probably navigate away before it's done this.getCachedEl('.js-resyncProgress').addClass('hide'); this.getCachedEl('.js-resyncComplete').removeClass('hide'); }); } ======= clickPurge() { this.purgeCache(); } /** * Call to the server to remove cached files that are being shared on IPFS. * This call should not be aborted when the view is removed, it's critical the user is informed if * the call fails, even if they have navigated away from the view. */ purgeCache() { this.getCachedEl('.js-purge').addClass('processing'); this.getCachedEl('.js-purgeComplete').addClass('hide'); this.purge = $.post(app.getServerUrl('ob/purgecache')) .always(() => { this.getCachedEl('.js-purge').removeClass('processing'); }) .fail((xhr) => { const failReason = xhr.responseJSON && xhr.responseJSON.reason || ''; openSimpleMessage( app.polyglot.t('settings.advancedTab.server.purgeError'), failReason); }) .done(() => { this.getCachedEl('.js-purgeComplete').removeClass('hide'); }); } >>>>>>> clickResync() { this.resyncCache(); } resyncCache() { this.getCachedEl('.js-resync').addClass('processing'); this.getCachedEl('.js-resyncProgress').removeClass('hide'); this.getCachedEl('.js-resyncComplete').addClass('hide'); this.resync = $.post(app.getServerUrl('wallet/resyncblockchain')) .always(() => { this.getCachedEl('.js-resync').removeClass('processing'); }) .fail((xhr) => { const failReason = xhr.responseJSON && xhr.responseJSON.reason || ''; openSimpleMessage( app.polyglot.t('settings.advancedTab.server.resyncError'), failReason); }) .done(() => { // this takes several minutes, the user will probably navigate away before it's done this.getCachedEl('.js-resyncProgress').addClass('hide'); this.getCachedEl('.js-resyncComplete').removeClass('hide'); }); } clickPurge() { this.purgeCache(); } /** * Call to the server to remove cached files that are being shared on IPFS. * This call should not be aborted when the view is removed, it's critical the user is informed if * the call fails, even if they have navigated away from the view. */ purgeCache() { this.getCachedEl('.js-purge').addClass('processing'); this.getCachedEl('.js-purgeComplete').addClass('hide'); this.purge = $.post(app.getServerUrl('ob/purgecache')) .always(() => { this.getCachedEl('.js-purge').removeClass('processing'); }) .fail((xhr) => { const failReason = xhr.responseJSON && xhr.responseJSON.reason || ''; openSimpleMessage( app.polyglot.t('settings.advancedTab.server.purgeError'), failReason); }) .done(() => { this.getCachedEl('.js-purgeComplete').removeClass('hide'); }); } <<<<<<< isSyncing: this.resync && this.resync.state() === 'pending', ======= isPurging: this.purge && this.purge.state() === 'pending', >>>>>>> isSyncing: this.resync && this.resync.state() === 'pending', isPurging: this.purge && this.purge.state() === 'pending',
<<<<<<< ======= const action = async ({ tableId, dest }, options) => { >>>>>>> <<<<<<< loadConfig(configPath); ======= const { config: configPath } = options; loadConfig(configPath, options); >>>>>>> loadConfig(configPath, options); <<<<<<< ======= }; function configureCommanderHubDbFetchCommand(commander) { commander .version(version) .description(FETCH_DESCRIPTION) .arguments('<tableId> [dest]') .action(async (tableId, dest, command = {}) => action({ tableId, dest }, command) ); addLoggerOptions(commander); addPortalOptions(commander); addConfigOptions(commander); addUseEnvironmentOptions(commander); } module.exports = { FETCH_DESCRIPTION, // Yargs command, describe, handler, builder, // Commander configureCommanderHubDbFetchCommand, >>>>>>>
<<<<<<< /*jshint strict:false*/ var utils = require('utils'); ======= /*jshint strict:false maxstatements: 99*/ var utils = require('utils'); casper.start('tests/site/index.html', function() { this.click('a[href="test.html"]'); }); casper.then(function() { this.test.comment('Casper.click()'); this.test.assertTitle('CasperJS test target', 'Casper.click() can click on a link'); }).thenClick('a', function() { this.test.comment('Casper.thenClick()'); this.test.assertTitle('CasperJS test form', 'Casper.thenClick() can click on a link'); }); >>>>>>> /*jshint strict:false maxstatements: 99*/ var utils = require('utils'); <<<<<<< casper.test.begin('clickLabel tests tests', 8, function(test) { casper.start('tests/site/click.html', function() { test.assert(this.clickLabel('test1'), 'Casper.clickLabel() can click an `href="javascript:` link'); test.assert(this.clickLabel('test2'), 'Casper.clickLabel() can click an `href="#"` link'); test.assert(this.clickLabel('test3'), 'Casper.clickLabel() can click an `onclick=".*; return false"` link'); test.assert(this.clickLabel('test4'), 'Casper.clickLabel() can click an unobstrusive js handled link'); var results = this.getGlobal('results'); test.assert(results.test1, 'Casper.clickLabel() has clicked an `href="javascript:` link'); test.assert(results.test2, 'Casper.clickLabel() has clicked an `href="#"` link'); test.assert(results.test3, 'Casper.clickLabel() has clicked an `onclick=".*; return false"` link'); test.assert(results.test4, 'Casper.clickLabel() has clicked an unobstrusive js handled link'); }).run(function() { test.done(); }); ======= // casper.mouse casper.then(function() { this.test.comment('Mouse.down()'); this.mouse.down(200, 100); var results = this.getGlobal('results'); this.test.assertEquals(results.testdown, [200, 100], 'Mouse.down() has pressed button to the specified position'); this.test.comment('Mouse.up()'); this.mouse.up(200, 100); results = this.getGlobal('results'); this.test.assertEquals(results.testup, [200, 100], 'Mouse.up() has released button to the specified position'); this.test.comment('Mouse.move()'); this.mouse.move(200, 100); results = this.getGlobal('results'); this.test.assertEquals(results.testmove, [200, 100], 'Mouse.move() has moved to the specified position'); if (utils.gteVersion(phantom.version, '1.8.0')) { this.test.comment('Mouse.doubleclick()'); this.mouse.doubleclick(200, 100); results = this.getGlobal('results'); this.test.assertEquals(results.testdoubleclick, [200, 100], 'Mouse.doubleclick() double-clicked the specified position'); } else { this.test.pass("Mouse.doubleclick() requires PhantomJS >= 1.8"); } >>>>>>> casper.test.begin('clickLabel tests tests', 8, function(test) { casper.start('tests/site/click.html', function() { test.assert(this.clickLabel('test1'), 'Casper.clickLabel() can click an `href="javascript:` link'); test.assert(this.clickLabel('test2'), 'Casper.clickLabel() can click an `href="#"` link'); test.assert(this.clickLabel('test3'), 'Casper.clickLabel() can click an `onclick=".*; return false"` link'); test.assert(this.clickLabel('test4'), 'Casper.clickLabel() can click an unobstrusive js handled link'); var results = this.getGlobal('results'); test.assert(results.test1, 'Casper.clickLabel() has clicked an `href="javascript:` link'); test.assert(results.test2, 'Casper.clickLabel() has clicked an `href="#"` link'); test.assert(results.test3, 'Casper.clickLabel() has clicked an `onclick=".*; return false"` link'); test.assert(results.test4, 'Casper.clickLabel() has clicked an unobstrusive js handled link'); }).run(function() { test.done(); }); <<<<<<< casper.test.begin('element focus on click', 1, function(test) { casper.start().then(function() { this.page.content = '<form><input type="text" name="foo"></form>' this.click('form input[name=foo]') this.page.sendEvent('keypress', 'bar'); test.assertEquals(this.getFormValues('form')['foo'], 'bar', 'Casper.click() sets the focus on clicked element'); }).run(function() { test.done(); }); ======= casper.run(function() { this.test.done(23); >>>>>>> casper.test.begin('element focus on click', 1, function(test) { casper.start().then(function() { this.page.content = '<form><input type="text" name="foo"></form>' this.click('form input[name=foo]') this.page.sendEvent('keypress', 'bar'); test.assertEquals(this.getFormValues('form')['foo'], 'bar', 'Casper.click() sets the focus on clicked element'); }).run(function() { test.done(); });
<<<<<<< import ActionBar from './ActionBar'; ======= import ActionBar from './ActionBar'; import ContractMenuItem from './ContractMenuItem'; >>>>>>> import ActionBar from './ActionBar'; import ContractMenuItem from './ContractMenuItem'; <<<<<<< this.listenTo(this.model, 'change:state', () => { if (this.actionBar) { this.actionBar.setState(this.actionBarButtonState); } }); ======= this.listenTo(this.model, 'otherContractArrived', () => { if (this.contractMenuItem) { this.contractMenuItem.setState(this.contractMenuItemState); } }); >>>>>>> this.listenTo(this.model, 'change:state', () => { if (this.actionBar) { this.actionBar.setState(this.actionBarButtonState); } }); this.listenTo(this.model, 'otherContractArrived', () => { if (this.contractMenuItem) { this.contractMenuItem.setState(this.contractMenuItemState); } }); <<<<<<< return this.moderatorId && ['AWAITING_FULFILLMENT', 'PENDING', 'FULFILLED'].indexOf(orderState) > -1; ======= // TODO todo ToDo !!! TODO todo ToDo !!! TODO todo ToDo !!! // todo: when escrow timeout code is ready, include this in the timeoutInfoView // also ensure order is funded if processing error showDisputeOrderButton = this.moderatorId && ['AWAITING_FULFILLMENT', 'PENDING', 'FULFILLED', 'PROCESSING_ERROR'].indexOf(orderState) > -1; >>>>>>> return this.moderatorId && ['AWAITING_FULFILLMENT', 'PENDING', 'FULFILLED', 'PROCESSING_ERROR'].indexOf(orderState) > -1;
<<<<<<< /** * Gets a list of currently open Review Opportunities. * @param {Number} limit The max number to return in one call. * @param {Number} offset Offset, used with limit to lazy load. * @return {Promise} Resolves to the api response in JSON. */ // This rule modification can be removed when mock api call is replaced /* eslint-disable class-methods-use-this */ getReviewOpportunities(limit, offset) { const endpoint = `/reviewOpportunities?limit=${limit}&offset=${offset}`; return this.private.api.get(endpoint) .then(res => (res.ok ? res.json() : new Error(res.statusText))) .then(res => ( res.result.status === 200 ? res.result.content : new Error(res.result.content) )); } /* eslint-enable class-methods-use-this */ ======= /** * Updates the challenge (saves the give challenge to the API). * @param {Object} challenge * @param {String} tokenV3 * @return {Promise} */ async updateChallenge(challenge) { const URL = `/challenges/${challenge.id}`; const body = { param: challenge }; let res = await this.private.api.putJson(URL, body); if (!res.ok) throw new Error(res.statusText); res = (await res.json()).result; if (res.status !== 200) throw new Error(res.content); return res.content; } >>>>>>> /** * Updates the challenge (saves the give challenge to the API). * @param {Object} challenge * @param {String} tokenV3 * @return {Promise} */ async updateChallenge(challenge) { const URL = `/challenges/${challenge.id}`; const body = { param: challenge }; let res = await this.private.api.putJson(URL, body); if (!res.ok) throw new Error(res.statusText); res = (await res.json()).result; if (res.status !== 200) throw new Error(res.content); return res.content; } /** * Gets a list of currently open Review Opportunities. * @param {Number} limit The max number to return in one call. * @param {Number} offset Offset, used with limit to lazy load. * @return {Promise} Resolves to the api response in JSON. */ // This rule modification can be removed when mock api call is replaced /* eslint-disable class-methods-use-this */ getReviewOpportunities(limit, offset) { const endpoint = `/reviewOpportunities?limit=${limit}&offset=${offset}`; return this.private.api.get(endpoint) .then(res => (res.ok ? res.json() : new Error(res.statusText))) .then(res => ( res.result.status === 200 ? res.result.content : new Error(res.result.content) )); }
<<<<<<< loadTemplate('modals/editListing/editListing.html', t => { this.$el.html(t({ createMode: this.createMode, selectedNavTabIndex: this.selectedNavTabIndex, returnText: this.options.returnText, listingCurrency: this.currency, currencies: this.currencies, contractTypes: metadata.contractTypesVerbose, conditionTypes: this.model.get('item') .conditionTypes .map((conditionType) => ({ code: conditionType, name: app.polyglot.t(`conditionTypes.${conditionType}`) })), errors: this.model.validationError || {}, photoUploadInprogress: !!this.inProgressPhotoUploads.length, uploadPhotoT: this.uploadPhotoT, expandedReturnPolicy: this.expandedReturnPolicy || !!this.model.get('refundPolicy'), expandedTermsAndConditions: this.expandedTermsAndConditions || !!this.model.get('termsAndConditions'), formatPrice, maxCatsWarning: this.maxCatsWarning, maxTagsWarning: this.maxTagsWarning, max: { title: item.max.titleLength, cats: item.max.cats, tags: item.max.tags, photos: this.MAX_PHOTOS, }, peerID: app.profile.id, slug: item.slug, shouldShowVariantInventorySection: this.shouldShowVariantInventorySection, ...this.model.toJSON(), })); ======= loadTemplate('modals/editListing/viewListingLinks.html', viewListingsT => { loadTemplate('modals/editListing/editListing.html', t => { this.$el.html(t({ createMode: this.createMode, selectedNavTabIndex: this.selectedNavTabIndex, returnText: this.options.returnText, listingCurrency: this.currency, currencies: this.currencies, contractTypes: metadata.contractTypesVerbose, conditionTypes: this.model.get('item') .conditionTypes .map((conditionType) => ({ code: conditionType, name: app.polyglot.t(`conditionTypes.${conditionType}`) })), errors: this.model.validationError || {}, photoUploadInprogress: !!this.inProgressPhotoUploads.length, uploadPhotoT: this.uploadPhotoT, expandedReturnPolicy: this.expandedReturnPolicy || !!this.model.get('refundPolicy'), expandedTermsAndConditions: this.expandedTermsAndConditions || !!this.model.get('termsAndConditions'), formatPrice, maxCatsWarning: this.maxCatsWarning, maxTagsWarning: this.maxTagsWarning, max: { title: item.max.titleLength, cats: item.max.cats, tags: item.max.tags, photos: this.MAX_PHOTOS, }, shouldShowVariantInventorySection: this.shouldShowVariantInventorySection, viewListingsT, ...this.model.toJSON(), })); this.setContractTypeClass(metadata.get('contractType')); super.render(); this._$scrollLinks = null; this._$scrollToSections = null; this._$currencySelect = null; this._$priceInput = null; this._$buttonSave = null; this._$inputPhotoUpload = null; this._$photoUploadingLabel = null; this._$editListingReturnPolicy = null; this._$editListingTermsAndConditions = null; this._$sectionShipping = null; this._$maxCatsWarning = null; this._$maxTagsWarning = null; this._$addShipOptSectionHeading = null; this._$variantInventorySection = null; this._$itemPrice = null; this.$photoUploadItems = this.$('.js-photoUploadItems'); this.$modalContent = this.$('.modalContent'); this.$tabControls = this.$('.tabControls'); this.$titleInput = this.$('#editListingTitle'); this.$editListingTags = this.$('#editListingTags'); this.$editListingCategories = this.$('#editListingCategories'); this.$shippingOptionsWrap = this.$('.js-shippingOptionsWrap'); this.$couponsSection = this.$('.js-couponsSection'); this.$variantsSection = this.$('.js-variantsSection'); this.$('#editContractType, #editListingVisibility, #editListingCondition').select2({ // disables the search box minimumResultsForSearch: Infinity, }); >>>>>>> loadTemplate('modals/editListing/viewListingLinks.html', viewListingsT => { loadTemplate('modals/editListing/editListing.html', t => { this.$el.html(t({ createMode: this.createMode, selectedNavTabIndex: this.selectedNavTabIndex, returnText: this.options.returnText, listingCurrency: this.currency, currencies: this.currencies, contractTypes: metadata.contractTypesVerbose, conditionTypes: this.model.get('item') .conditionTypes .map((conditionType) => ({ code: conditionType, name: app.polyglot.t(`conditionTypes.${conditionType}`) })), errors: this.model.validationError || {}, photoUploadInprogress: !!this.inProgressPhotoUploads.length, uploadPhotoT: this.uploadPhotoT, expandedReturnPolicy: this.expandedReturnPolicy || !!this.model.get('refundPolicy'), expandedTermsAndConditions: this.expandedTermsAndConditions || !!this.model.get('termsAndConditions'), formatPrice, maxCatsWarning: this.maxCatsWarning, maxTagsWarning: this.maxTagsWarning, max: { title: item.max.titleLength, cats: item.max.cats, tags: item.max.tags, photos: this.MAX_PHOTOS, }, peerID: app.profile.id, slug: item.slug, shouldShowVariantInventorySection: this.shouldShowVariantInventorySection, viewListingsT, ...this.model.toJSON(), })); this.setContractTypeClass(metadata.get('contractType')); super.render(); this._$scrollLinks = null; this._$scrollToSections = null; this._$currencySelect = null; this._$priceInput = null; this._$buttonSave = null; this._$inputPhotoUpload = null; this._$photoUploadingLabel = null; this._$editListingReturnPolicy = null; this._$editListingTermsAndConditions = null; this._$sectionShipping = null; this._$maxCatsWarning = null; this._$maxTagsWarning = null; this._$addShipOptSectionHeading = null; this._$variantInventorySection = null; this._$itemPrice = null; this.$photoUploadItems = this.$('.js-photoUploadItems'); this.$modalContent = this.$('.modalContent'); this.$tabControls = this.$('.tabControls'); this.$titleInput = this.$('#editListingTitle'); this.$editListingTags = this.$('#editListingTags'); this.$editListingCategories = this.$('#editListingCategories'); this.$shippingOptionsWrap = this.$('.js-shippingOptionsWrap'); this.$couponsSection = this.$('.js-couponsSection'); this.$variantsSection = this.$('.js-variantsSection'); this.$('#editContractType, #editListingVisibility, #editListingCondition').select2({ // disables the search box minimumResultsForSearch: Infinity, });
<<<<<<< import Moderators from '../../components/moderators/Moderators'; ======= import BulkCoinUpdateBtn from './BulkCoinUpdateBtn'; import Moderators from '../../components/Moderators'; >>>>>>> import Moderators from '../../components/moderators/Moderators'; import BulkCoinUpdateBtn from './BulkCoinUpdateBtn';
<<<<<<< const localizedPluralizedCount = app.polyglot.t('userPage.store.countListings', { smart_count: col.length, display_count: localizeNumber(col.length) }); const listingCountSpan = `<span class="txB">${localizedPluralizedCount}</span>`; ======= const countPhrase = app.polyglot.t('userPage.store.countListings', { smart_count: col.length }); >>>>>>> const countPhrase = app.polyglot.t('userPage.store.countListings', { smart_count: col.length, display_count: localizeNumber(col.length) }); <<<<<<< { smart_count: listingCountSpan }); ======= { countListings: `<span class="txB">${countPhrase}</span>` }); >>>>>>> { countListings: `<span class="txB">${countPhrase}</span>` });
<<<<<<< logged: true, ======= openNewTab: true, >>>>>>> logged: true, openNewTab: true,
<<<<<<< challengeV3, challengeV3Filtered, challengeV3User, username); ======= challengeV3, challengeV3Filtered, challengeV3User, challengeV2, username, ); >>>>>>> challengeV3, challengeV3Filtered, challengeV3User, username, );
<<<<<<< "You can do it", "It is not a sprint, it is a marathon. One step at a time", ======= "Success is the progressive realization of a worthy goal", "People with goals succeed because they know where they’re going", "All you need is the plan, the roadmap, and the courage to press on to your destination", "The opposite of courage in our society is not cowardice... it is conformity", "Whenever we’re afraid, it’s because we don’t know enough. If we understood enough, we would never be afraid", "The past does not equal the future", "The path to success is to take massive, determined action", "It’s what you practice in private that you will be rewarded for in public", >>>>>>> "You can do it", "It is not a sprint, it is a marathon. One step at a time", "Success is the progressive realization of a worthy goal", "People with goals succeed because they know where they’re going", "All you need is the plan, the roadmap, and the courage to press on to your destination", "The opposite of courage in our society is not cowardice... it is conformity", "Whenever we’re afraid, it’s because we don’t know enough. If we understood enough, we would never be afraid", "The past does not equal the future", "The path to success is to take massive, determined action", "It’s what you practice in private that you will be rewarded for in public",
<<<<<<< ======= /* @flow */ import bitcoin from 'bitcoinjs-lib' >>>>>>> /* @flow */ <<<<<<< t.throws(() => authenticator.isAuthenticationValid(testAddrs[1], challengeText), ======= const pkBad = bitcoin.ECPair.fromPublicKeyBuffer(testPairs[1].getPublicKeyBuffer()) const authBad = new auth.LegacyAuthentication(pkBad, authenticator.signature) t.throws(() => authenticator.isAuthenticationValid(testAddrs[1], [challengeText]), >>>>>>> t.throws(() => authenticator.isAuthenticationValid(testAddrs[1], [challengeText]), <<<<<<< { gaiaChallenge: challengeText, iss: testPairs[1].publicKey.toString('hex'), exp: 1 }) t.throws(() => new auth.V1Authentication(tokenWithoutIssuer).isAuthenticationValid(testAddrs[0], challengeText), ======= { gaiaChallenge: challengeText, iss: testPairs[1].getPublicKeyBuffer().toString('hex'), exp: 1 }) t.throws(() => new auth.V1Authentication(tokenWithoutIssuer).isAuthenticationValid(testAddrs[0], [challengeText]), >>>>>>> { gaiaChallenge: challengeText, iss: testPairs[1].publicKey.toString('hex'), exp: 1 }) t.throws(() => new auth.V1Authentication(tokenWithoutIssuer).isAuthenticationValid(testAddrs[0], [challengeText]), <<<<<<< { gaiaChallenge: challengeText, iss: testPairs[1].publicKey.toString('hex'), exp: 1 }) t.throws(() => new auth.V1Authentication(tokenWithoutIssuer).isAuthenticationValid(testAddrs[0], challengeText), ======= { gaiaChallenge: challengeText, iss: testPairs[1].getPublicKeyBuffer().toString('hex'), exp: 1 }) t.throws(() => new auth.V1Authentication(tokenWithoutIssuer).isAuthenticationValid(testAddrs[0], [challengeText]), >>>>>>> { gaiaChallenge: challengeText, iss: testPairs[1].publicKey.toString('hex'), exp: 1 }) t.throws(() => new auth.V1Authentication(tokenWithoutIssuer).isAuthenticationValid(testAddrs[0], [challengeText]), <<<<<<< { gaiaChallenge: challengeText, iss: testPairs[1].publicKey.toString('hex'), exp: 1 }) t.throws(() => new auth.V1Authentication(tokenWithoutIssuer).isAuthenticationValid(testAddrs[0], challengeText), ======= { gaiaChallenge: challengeText, iss: testPairs[1].getPublicKeyBuffer().toString('hex'), exp: 1 }) t.throws(() => new auth.V1Authentication(tokenWithoutIssuer).isAuthenticationValid(testAddrs[0], [challengeText]), >>>>>>> { gaiaChallenge: challengeText, iss: testPairs[1].publicKey.toString('hex'), exp: 1 }) t.throws(() => new auth.V1Authentication(tokenWithoutIssuer).isAuthenticationValid(testAddrs[0], [challengeText]),
<<<<<<< const digest = bitcoin.crypto.sha256(challengeText) const valid = (this.publickey.verify(digest, Buffer.from(this.signature, 'hex')) === true) ======= for (const challengeText of challengeTexts) { const digest = bitcoin.crypto.sha256(challengeText) const valid = (this.publickey.verify(digest, this.signature) === true) >>>>>>> for (const challengeText of challengeTexts) { const digest = bitcoin.crypto.sha256(challengeText) const valid = (this.publickey.verify(digest, Buffer.from(this.signature, 'hex')) === true)
<<<<<<< import test from 'tape-promise/tape' import * as auth from '../../src/server/authentication' import os from 'os' ======= import * as auth from '../../src/server/authentication' >>>>>>> import test from 'tape-promise/tape' import * as auth from '../../src/server/authentication' import os from 'os' <<<<<<< import { testPairs } from './common' import { InMemoryDriver } from './testDrivers/InMemoryDriver' ======= import { testPairs } from './common' >>>>>>> import { testPairs } from './common' import { InMemoryDriver } from './testDrivers/InMemoryDriver' <<<<<<< ======= let AzDriver const azDriverImport = '../../src/server/drivers/AzDriver' >>>>>>> <<<<<<< ======= test('auth failure', (t) => { let app = makeHttpServer(config) let sk = testPairs[1] let fileContents = sk.toWIF() let blob = Buffer(fileContents) let address = ecPairToAddress(sk) let path = `/store/${address}/helloWorld` let listPath = `/list-files/${address}` let prefix = '' let authorizationHeader = '' request(app).get('/hub_info/') .expect(200) .then((response) => { prefix = JSON.parse(response.text).read_url_prefix const challenge = JSON.parse(response.text).challenge_text const authPart = auth.V1Authentication.makeAuthPart(sk, challenge + 'f') return `bearer ${authPart}` }) .then((authorization) => { authorizationHeader = authorization return request(app).post(path) .set('Content-Type', 'application/octet-stream') .set('Authorization', authorization) .send(blob) .expect(401) }) .then((response) => { let json = JSON.parse(response.text) t.ok(json, 'Must return json') console.log(json) }) .catch((err) => t.false(true, `Unexpected err: ${err}`)) .then(() => { FetchMock.restore(); t.end() }) }) >>>>>>> test('auth failure', (t) => { let app = makeHttpServer(config) let sk = testPairs[1] let fileContents = sk.toWIF() let blob = Buffer(fileContents) let address = ecPairToAddress(sk) let path = `/store/${address}/helloWorld` let listPath = `/list-files/${address}` let prefix = '' let authorizationHeader = '' request(app).get('/hub_info/') .expect(200) .then((response) => { prefix = JSON.parse(response.text).read_url_prefix const challenge = JSON.parse(response.text).challenge_text const authPart = auth.V1Authentication.makeAuthPart(sk, challenge + 'f') return `bearer ${authPart}` }) .then((authorization) => { authorizationHeader = authorization return request(app).post(path) .set('Content-Type', 'application/octet-stream') .set('Authorization', authorization) .send(blob) .expect(401) }) .then((response) => { let json = JSON.parse(response.text) t.ok(json, 'Must return json') console.log(json) }) .catch((err) => t.false(true, `Unexpected err: ${err}`)) .then(() => { FetchMock.restore(); t.end() }) }) <<<<<<< const fetch = FetchMock.sandbox(NodeFetch) const app = makeHttpServer(config) const sk = testPairs[1] const fileContents = sk.toWIF() const blob = Buffer.from(fileContents) const address = sk.getAddress() const path = `/store/${address}/helloWorld` const listPath = `/list-files/${address}` ======= let app = makeHttpServer(config) let sk = testPairs[1] let fileContents = sk.toWIF() let blob = Buffer(fileContents) let address = ecPairToAddress(sk) let path = `/store/${address}/helloWorld` let listPath = `/list-files/${address}` >>>>>>> const fetch = FetchMock.sandbox(NodeFetch) const app = makeHttpServer(config) const sk = testPairs[1] const fileContents = sk.toWIF() const blob = Buffer.from(fileContents) let address = ecPairToAddress(sk) const path = `/store/${address}/helloWorld` const listPath = `/list-files/${address}`
<<<<<<< let sr = new StorageRequest(req, res, proofChecker, config.logger) ======= let sr = new StorageRequest(req, res, config) >>>>>>> let sr = new StorageRequest(req, res, proofChecker, config)
<<<<<<< import { ecPairToHexString } from 'blockstack' import { ValidationError, AuthTokenNumberValidationError } from './errors' ======= import { ecPairToHexString, ecPairToAddress } from 'blockstack' import { ValidationError } from './errors' >>>>>>> import { ecPairToHexString, ecPairToAddress } from 'blockstack' import { ValidationError, AuthTokenNumberValidationError } from './errors' <<<<<<< // check for revocations if (options && options.authTokenNumber) { const tokenAuthNumber = parseInt(decodedToken.payload.authNumber) const requiredAuthTokenNumber : number = options.authTokenNumber || 0 if (!tokenAuthNumber) { const message = `Gaia bucket requires auth token number of ${requiredAuthTokenNumber}` + ' but this token has no auth number. This token may have been revoked by the user.' throw new AuthTokenNumberValidationError(message, requiredAuthTokenNumber) } if (tokenAuthNumber !== options.authTokenNumber) { const message = `Gaia bucket requires auth token number of ${requiredAuthTokenNumber}` + ` but this token has auth number ${tokenAuthNumber}.` + ' This token may have been revoked by the user.' throw new AuthTokenNumberValidationError(message, requiredAuthTokenNumber) } } const issuerAddress = pubkeyHexToECPair(publicKey).getAddress() ======= const issuerAddress = ecPairToAddress(pubkeyHexToECPair(publicKey)) >>>>>>> // check for revocations if (options && options.authTokenNumber) { const tokenAuthNumber = parseInt(decodedToken.payload.authNumber) const requiredAuthTokenNumber : number = options.authTokenNumber || 0 if (!tokenAuthNumber) { const message = `Gaia bucket requires auth token number of ${requiredAuthTokenNumber}` + ' but this token has no auth number. This token may have been revoked by the user.' throw new AuthTokenNumberValidationError(message, requiredAuthTokenNumber) } if (tokenAuthNumber !== options.authTokenNumber) { const message = `Gaia bucket requires auth token number of ${requiredAuthTokenNumber}` + ` but this token has auth number ${tokenAuthNumber}.` + ' This token may have been revoked by the user.' throw new AuthTokenNumberValidationError(message, requiredAuthTokenNumber) } } const issuerAddress = ecPairToAddress(pubkeyHexToECPair(publicKey)) <<<<<<< const challengeText = getChallengeText(serverNameOpt) return authObject.isAuthenticationValid(address, challengeText, { validHubUrls, requireCorrectHubUrl, authTokenNumber: requiredAuthTokenNumber }) ======= const challengeTexts = [] challengeTexts.push(getChallengeText(serverName)) getLegacyChallengeTexts(serverName).forEach(challengeText => challengeTexts.push(challengeText)) return authObject.isAuthenticationValid(address, challengeTexts, { validHubUrls, requireCorrectHubUrl }) >>>>>>> const challengeTexts = [] challengeTexts.push(getChallengeText(serverNameOpt)) getLegacyChallengeTexts(serverName).forEach(challengeText => challengeTexts.push(challengeText)) return authObject.isAuthenticationValid(address, challengeTexts, { validHubUrls, requireCorrectHubUrl })
<<<<<<< this.browser = typeof this.options.browser !== undefined ? this.options.browser : typeof window !== 'undefined'; ======= this.browser = typeof(this.options.browser) !== 'undefined' ? this.options.browser : typeof (window) !== 'undefined'; >>>>>>> this.browser = typeof this.options.browser !== 'undefined' ? this.options.browser : typeof window !== 'undefined';
<<<<<<< import { throttle, isScrolledIntoView } from '../../../utils/dom'; ======= import Backbone from 'backbone'; import { isScrolledIntoView } from '../../../utils/dom'; >>>>>>> import { throttle, isScrolledIntoView } from '../../../utils/dom'; import Backbone from 'backbone';
<<<<<<< if(Meteor.isServer) { Meteor.methods({ delete_category: function(id){ PanoplyCMSCollections.Categories.update({ _id: id },{ $set:{ trash:true } }); }, update_category: function(id, data){ PanoplyCMSCollections.Categories.update({ _id: id }, { $set: { title: data.title, alias: data.alias, updateAt: new Date() } }); }, add_category: function(data){ return PanoplyCMSCollections.Categories.insert({ title: data.title, alias: data.alias, createdAt: new Date(), updateAt: '', status:1, trash:false, ownerId: Meteor.userId() }); }, restore_category:function(id){ PanoplyCMSCollections.Categories.update({_id:id},{ $set:{ trash:false} }) }, delete_category_parma:function(id){ PanoplyCMSCollections.Categories.remove({ _id:id }) } }); ======= if(Meteor.isServer) { Meteor.methods({ delete_category: function(id){ PanoplyCMSCollections.Categories.update({ _id: id },{ $set:{ trash:true } }); }, update_category: function(id, data){ PanoplyCMSCollections.Categories.update({ _id: id }, { $set: { title: data.title, alias: data.alias, column:data.column, updateAt: new Date() } }); }, add_category: function(data){ return PanoplyCMSCollections.Categories.insert({ title: data.title, alias: data.alias, createdAt: new Date(), updateAt: '', status:1, trash:false, column:data.column, ownerId: Meteor.userId() }); }, restore_category:function(id){ PanoplyCMSCollections.Categories.update({_id:id},{ $set:{ trash:false} }) }, delete_category_parma:function(id){ PanoplyCMSCollections.Categories.remove({ _id:id }) } }); >>>>>>> if(Meteor.isServer) { Meteor.methods({ delete_category: function(id){ PanoplyCMSCollections.Categories.update({ _id: id },{ $set:{ trash:true } }); }, update_category: function(id, data){ return PanoplyCMSCollections.Categories.update({ _id: id }, { $set: { title: data.title, alias: data.alias, column:data.column, updateAt: new Date() } }); }, add_category: function(data){ return PanoplyCMSCollections.Categories.insert({ title: data.title, alias: data.alias, createdAt: new Date(), updateAt: '', status:1, trash:false, column:data.column, ownerId: Meteor.userId() }); }, restore_category:function(id){ PanoplyCMSCollections.Categories.update({_id:id},{ $set:{ trash:false} }) }, delete_category_parma:function(id){ PanoplyCMSCollections.Categories.remove({ _id:id }) } });
<<<<<<< this.parent(); this.connect('activate', function () { settings.set_string('show-in-panel', 'sensor'); settings.set_string('sensor', label); }); ======= this.parent({reactive: false}); this._label = label; this._value = value; >>>>>>> this.parent(); this.connect('activate', function () { settings.set_string('show-in-panel', 'sensor'); settings.set_string('sensor', label); }); this._label = label; this._value = value;
<<<<<<< for each (let itemText in items){ item = new PopupMenu.PopupMenuItem(itemText, {reactive: false}); ======= for each (let itemText in tempItems){ item = new PopupMenu.PopupMenuItem(itemText); section.addMenuItem(item); } if (tempItems.length > 0 && (fanItems.length > 0 || voltageItems.length > 0)){ section.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); } for each (let itemText in fanItems){ item = new PopupMenu.PopupMenuItem(itemText); section.addMenuItem(item); } if (fanItems.length > 0 && voltageItems.length > 0){ section.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); } for each (let itemText in voltageItems){ item = new PopupMenu.PopupMenuItem(itemText); >>>>>>> for each (let itemText in tempItems){ item = new PopupMenu.PopupMenuItem(itemText, {reactive: false}); section.addMenuItem(item); } if (tempItems.length > 0 && (fanItems.length > 0 || voltageItems.length > 0)){ section.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); } for each (let itemText in fanItems){ item = new PopupMenu.PopupMenuItem(itemText, {reactive: false}); section.addMenuItem(item); } if (fanItems.length > 0 && voltageItems.length > 0){ section.addMenuItem(new PopupMenu.PopupSeparatorMenuItem()); } for each (let itemText in voltageItems){ item = new PopupMenu.PopupMenuItem(itemText, {reactive: false});
<<<<<<< '&forum=' + config.shortname + '&thread:ident=' + ctx.request.query.identifier, ======= '&forum=' + config.username + // '&thread:ident=' + ctx.request.query.identifier, // 此处如果不对identifier encode, 如果identifier中含有中文,disqus api会不识别报错 '&thread:ident=' + encodeURIComponent(ctx.request.query.identifier), >>>>>>> '&forum=' + config.shortname + // '&thread:ident=' + ctx.request.query.identifier, // 此处如果不对identifier encode, 如果identifier中含有中文,disqus api会不识别报错 '&thread:ident=' + encodeURIComponent(ctx.request.query.identifier), <<<<<<< '&forum=' + config.shortname + '&thread:ident=' + ctx.request.query.identifier, ======= '&forum=' + config.username + // '&thread:ident=' + ctx.request.query.identifier, // 此处如果不对identifier encode, 如果identifier中含有中文,disqus api会不识别报错 '&thread:ident=' + encodeURIComponent(ctx.request.query.identifier), >>>>>>> '&forum=' + config.shortname + // '&thread:ident=' + ctx.request.query.identifier, // 此处如果不对identifier encode, 如果identifier中含有中文,disqus api会不识别报错 '&thread:ident=' + encodeURIComponent(ctx.request.query.identifier),
<<<<<<< const refineArray = (arr, size) => arr.map(obj => { return { ...obj, index: obj.index % size } }) export const calculateSlideSize = (slider) => { ======= const calculateSlideSize = (slider) => { >>>>>>> export const calculateSlideSize = (slider) => {
<<<<<<< } SliderController.styleOptions = { paginations: ['pagination-style-1', 'pagination-style-2', 'pagination-style-3'], navs: ['nav-style-1', 'nav-style-2', 'nav-style-3', 'nav-style-4', 'nav-style-5'] } ======= } // Create jquery plugin ;(function ($) { $.fn.slider = function (opts, ...args) { return this.each((i, element) => { let instance = $(element).data('slider') if (!instance) { if (typeof opts === 'string') { throw new Error('This element was not initialized as a Slider yet') } instance = new SliderController(element, opts) $(element).data('slider', instance) } else { if (typeof opts === 'string') { instance[opts](...args) } } }) } })(jQuery) >>>>>>> } SliderController.styleOptions = { paginations: ['pagination-style-1', 'pagination-style-2', 'pagination-style-3'], navs: ['nav-style-1', 'nav-style-2', 'nav-style-3', 'nav-style-4', 'nav-style-5'] } // Create jquery plugin ;(function ($) { $.fn.slider = function (opts, ...args) { return this.each((i, element) => { let instance = $(element).data('slider') if (!instance) { if (typeof opts === 'string') { throw new Error('This element was not initialized as a Slider yet') } instance = new SliderController(element, opts) $(element).data('slider', instance) } else { if (typeof opts === 'string') { instance[opts](...args) } } }) } })(jQuery)
<<<<<<< export const PageFlySliderClasses = { ======= const SliderXClasses = { >>>>>>> export const SliderXClasses = { <<<<<<< export const calculatePFSlideSize = slider => { ======= const getSlideWidth = slider => { >>>>>>> export const getSlideWidth = slider => {
<<<<<<< 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"
<<<<<<< var arrayIndex, isArray, isFinite, isNumber, objectRef, sortedIndex, timeFormats, toString; ======= var arrayIndex, isArray, isFinite, isNaN, isNumber, objectRef, sortedIndex, toString; >>>>>>> var arrayIndex, isArray, isFinite, isNumber, objectRef, sortedIndex, timeFormats, toString; <<<<<<< isFinite = function(value) { return window.isFinite(value) && !window.isFinite(parseFloat(value)); }; isArray = function(value) { return toString.call(value) === '[object Array]'; }; timeFormats = [ { name: 'second', value: 1e3 }, { name: 'minute', value: 6e4 }, { name: 'hour', value: 36e5 }, { name: 'day', value: 864e5 }, { name: 'week', value: 6048e5 } ]; ======= isNaN = function(value) { return isNumber(value) && (value !== +value); }; isFinite = function(value) { return window.isFinite(value) && !isNaN(parseFloat(value)); }; isArray = function(value) { return toString.call(value) === '[object Array]'; }; >>>>>>> isNaN = function(value) { return isNumber(value) && (value !== +value); }; isFinite = function(value) { return window.isFinite(value) && !isNaN(parseFloat(value)); }; isArray = function(value) { return toString.call(value) === '[object Array]'; }; timeFormats = [ { name: 'second', value: 1e3 }, { name: 'minute', value: 6e4 }, { name: 'hour', value: 36e5 }, { name: 'day', value: 864e5 }, { name: 'week', value: 6048e5 } ]; <<<<<<< this.Humanize.frequency = function(list, verb) { var len, str, times; if (!isArray(list)) { return; } len = list.length; times = this.times(len); if (len === 0) { str = "" + times + " " + verb; } else { str = "" + verb + " " + times; } return str; }; this.Humanize.pace = function(value, intervalMs, unit) { var f, prefix, rate, relativePace, roundedPace, timeUnit, _i, _len; if (unit == null) { unit = 'time'; } if (value === 0 || intervalMs === 0) { return "No " + (this.pluralize(unit)); } prefix = 'Approximately'; timeUnit = null; rate = value / intervalMs; for (_i = 0, _len = timeFormats.length; _i < _len; _i++) { f = timeFormats[_i]; relativePace = rate * f.value; if (relativePace > 1) { timeUnit = f.name; break; } } if (!timeUnit) { prefix = 'Less than'; relativePace = 1; timeUnit = timeFormats[timeFormats.length - 1].name; } roundedPace = Math.round(relativePace); unit = this.pluralize(roundedPace, unit); return "" + prefix + " " + roundedPace + " " + unit + " per " + timeUnit; }; ======= this.Humanize.frequency = function(list, verb) { var len, str, times; if (!isArray(list)) { return; } len = list.length; times = this.times(len); if (len === 0) { str = "" + times + " " + verb; } else { str = "" + verb + " " + times; } return str; }; >>>>>>> this.Humanize.frequency = function(list, verb) { var len, str, times; if (!isArray(list)) { return; } len = list.length; times = this.times(len); if (len === 0) { str = "" + times + " " + verb; } else { str = "" + verb + " " + times; } return str; }; this.Humanize.pace = function(value, intervalMs, unit) { var f, prefix, rate, relativePace, roundedPace, timeUnit, _i, _len; if (unit == null) { unit = 'time'; } if (value === 0 || intervalMs === 0) { return "No " + (this.pluralize(unit)); } prefix = 'Approximately'; timeUnit = null; rate = value / intervalMs; for (_i = 0, _len = timeFormats.length; _i < _len; _i++) { f = timeFormats[_i]; relativePace = rate * f.value; if (relativePace > 1) { timeUnit = f.name; break; } } if (!timeUnit) { prefix = 'Less than'; relativePace = 1; timeUnit = timeFormats[timeFormats.length - 1].name; } roundedPace = Math.round(relativePace); unit = this.pluralize(roundedPace, unit); return "" + prefix + " " + roundedPace + " " + unit + " per " + timeUnit; };
<<<<<<< import twemoji from 'twemoji'; ======= import _ from 'underscore'; >>>>>>> import _ from 'underscore'; import 'jquery-zoom'; import twemoji from 'twemoji'; import is from 'is_js'; import app from '../../../app'; <<<<<<< 'click .js-rating': 'clickRating', ======= 'change .js-variantSelect': 'onChangeVariantSelect', >>>>>>> 'click .js-rating': 'clickRating', 'change .js-variantSelect': 'onChangeVariantSelect', <<<<<<< this.$reviews = this.$('.js-reviews'); // get the ratings data, if any $.get(app.getServerUrl(`ob/ratings/${this.vendor.peerID}/${this.model.get('slug')}`)) .always(data => this.onRatings(data)); ======= this.adjustPriceBySku(); >>>>>>> this.adjustPriceBySku(); this.$reviews = this.$('.js-reviews'); // get the ratings data, if any $.get(app.getServerUrl(`ob/ratings/${this.vendor.peerID}/${this.model.get('slug')}`)) .always(data => this.onRatings(data));
<<<<<<< ( metaRequired == metaPressed ) && ( altRequired == altPressed ) && ( ctrlRequired == ctrlPressed ) && ( shiftRequired == shiftPressed ) ======= ( altRequired === altPressed ) && ( ctrlRequired === ctrlPressed ) && ( shiftRequired === shiftPressed ) >>>>>>> ( metaRequired === metaPressed ) && ( altRequired === altPressed ) && ( ctrlRequired === ctrlPressed ) && ( shiftRequired === shiftPressed )
<<<<<<< 'test/lib/select2/select2.js', ======= 'test/lib/maskedinput/jquery.maskedinput-1.3.js', >>>>>>> 'test/lib/select2/select2.js', 'test/lib/maskedinput/jquery.maskedinput-1.3.js',
<<<<<<< // Sample Testacular configuration file, that contain pretty much all the available options // It's used for running client tests on Travis (http://travis-ci.org/#!/vojtajina/testacular) // Most of the options can be overriden by cli arguments (see testacular --help) // base path, that will be used to resolve files and exclude basePath = '..'; // list of files / patterns to load in the browser files = [ JASMINE, JASMINE_ADAPTER, 'test/lib/jquery/jquery-1.7.2.js', 'test/lib/jquery/jquery-ui-1.8.18.js', 'test/lib/angular-1.0.1/angular.js', 'test/lib/angular-1.0.1/angular-mocks.js', 'test/lib/codemirror/codemirror.js', 'test/lib/tinymce/tiny_mce.js', 'test/lib/tinymce/jquery.tinymce.js', 'test/lib/googlemaps/googlemaps.js', 'test/lib/bootstrap/bootstrap-modal.js', 'test/lib/select2/select2.js', 'test/lib/maskedinput/jquery.maskedinput-1.3.js', 'common/module.js', 'modules/*/*/*.js', 'modules/*/*/test/*.js', 'templates/*.js', 'templates/test/*.js' ]; // list of files to exclude exclude = []; // use dots reporter, as travis terminal does not support escaping sequences // possible values: 'dots' || 'progress' reporter = 'dots'; // these are default values, just to show available options // web server port port = 8080; // cli runner port runnerPort = 9100; // enable / disable colors in the output (reporters and logs) colors = true; // level of logging // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG logLevel = LOG_DEBUG; // enable / disable watching file and executing tests whenever any file changes autoWatch = false; // polling interval in ms (ignored on OS that support inotify) autoWatchInterval = 0; // Start these browsers, currently available: // - Chrome // - ChromeCanary // - Firefox // - Opera // - Safari // - PhantomJS ======= // Sample Testacular configuration file, that contain pretty much all the available options // It's used for running client tests on Travis (http://travis-ci.org/#!/vojtajina/testacular) // Most of the options can be overriden by cli arguments (see testacular --help) // base path, that will be used to resolve files and exclude basePath = '..'; // list of files / patterns to load in the browser files = [ JASMINE, JASMINE_ADAPTER, 'test/lib/jquery/jquery-1.7.2.js', 'test/lib/jquery/jquery-ui-1.8.18.js', 'test/lib/angular-1.0.1/angular.js', 'test/lib/angular-1.0.1/angular-mocks.js', 'test/lib/codemirror/codemirror.js', 'test/lib/tinymce/jquery.tinymce.js', 'test/lib/googlemaps/googlemaps.js', 'test/lib/bootstrap/bootstrap-modal.js', 'test/lib/calendar/calendar.js.min', 'common/module.js', 'modules/*/*/*.js', 'modules/*/*/test/*.js', 'templates/*.js', 'templates/test/*.js' ]; // list of files to exclude exclude = []; // use dots reporter, as travis terminal does not support escaping sequences // possible values: 'dots' || 'progress' reporter = 'dots'; // these are default values, just to show available options // web server port port = 8080; // cli runner port runnerPort = 9100; // enable / disable colors in the output (reporters and logs) colors = true; // level of logging // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG logLevel = LOG_DEBUG; // enable / disable watching file and executing tests whenever any file changes autoWatch = false; // polling interval in ms (ignored on OS that support inotify) autoWatchInterval = 0; // Start these browsers, currently available: // - Chrome // - ChromeCanary // - Firefox // - Opera // - Safari // - PhantomJS >>>>>>> // Sample Testacular configuration file, that contain pretty much all the available options // It's used for running client tests on Travis (http://travis-ci.org/#!/vojtajina/testacular) // Most of the options can be overriden by cli arguments (see testacular --help) // base path, that will be used to resolve files and exclude basePath = '..'; // list of files / patterns to load in the browser files = [ JASMINE, JASMINE_ADAPTER, 'test/lib/jquery/jquery-1.7.2.js', 'test/lib/jquery/jquery-ui-1.8.18.js', 'test/lib/angular-1.0.1/angular.js', 'test/lib/angular-1.0.1/angular-mocks.js', 'test/lib/codemirror/codemirror.js', 'test/lib/tinymce/tiny_mce.js', 'test/lib/tinymce/jquery.tinymce.js', 'test/lib/googlemaps/googlemaps.js', 'test/lib/bootstrap/bootstrap-modal.js', 'test/lib/select2/select2.js', 'test/lib/maskedinput/jquery.maskedinput-1.3.js', 'test/lib/calendar/calendar.js.min', 'common/module.js', 'modules/*/*/*.js', 'modules/*/*/test/*.js', 'templates/*.js', 'templates/test/*.js' ]; // list of files to exclude exclude = []; // use dots reporter, as travis terminal does not support escaping sequences // possible values: 'dots' || 'progress' reporter = 'dots'; // these are default values, just to show available options // web server port port = 8080; // cli runner port runnerPort = 9100; // enable / disable colors in the output (reporters and logs) colors = true; // level of logging // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG logLevel = LOG_DEBUG; // enable / disable watching file and executing tests whenever any file changes autoWatch = false; // polling interval in ms (ignored on OS that support inotify) autoWatchInterval = 0; // Start these browsers, currently available: // - Chrome // - ChromeCanary // - Firefox // - Opera // - Safari // - PhantomJS
<<<<<<< 'ui.directives', 'ui.config' ]);// Generated by CoffeeScript 1.3.3 ======= 'ui.directives' ]).value('ui.config', {}); /** * Binds a CodeMirror widget to a <textarea> element. */ angular.module('ui.directives').directive('uiCodemirror', ['ui.config', '$parse', function (uiConfig, $parse) { uiConfig.codemirror = uiConfig.codemirror || {}; return { require: 'ngModel', link: function (scope, elm, attrs, ngModel) { // Only works on textareas if ( !elm.is('textarea') ) { throw Error('Element must be a textarea'); } var codemirror; // This is the method that we use to get the value of the ui-codemirror attribute expression. var uiCodemirrorGet = $parse(attrs.uiCodemirror); // This method will be called whenever the code mirror widget content changes var onChangeHandler = function (ed) { // We only update the model if the value has changed - this helps get around a little problem where $render triggers a change despite already being inside a $apply loop. var newValue = ed.getValue(); if ( newValue !== ngModel.$viewValue ) { ngModel.$setViewValue(newValue); scope.$apply(); } }; // Create and wire up a new code mirror widget (unwiring a previous one if necessary) var updateCodeMirror = function(options) { // Merge together the options from the uiConfig and the attribute itself with the onChange event above. options = angular.extend({}, options, uiConfig.codemirror); // We actually want to run both handlers if the user has provided their own onChange handler. var userOnChange = options.onChange; if ( userOnChange ) { options.onChange = function(ed) { onChangeHandler(ed); userOnChange(ed); }; } else { options.onChange = onChangeHandler; } // If there is a codemirror widget for this element already then we need to unwire if first if ( codemirror ) { codemirror.toTextArea(); } // Create the new codemirror widget codemirror = CodeMirror.fromTextArea(elm[0], options); }; // Initialize the code mirror widget updateCodeMirror(uiCodemirrorGet()); // Now watch to see if the codemirror attribute gets updated scope.$watch(uiCodemirrorGet, updateCodeMirror, true); // Override the ngModelController $render method, which is what gets called when the model is updated. // This takes care of the synchronizing the codeMirror element with the underlying model, in the case that it is changed by something else. ngModel.$render = function() { codemirror.setValue(ngModel.$viewValue); }; } }; }]); // Generated by CoffeeScript 1.3.3 >>>>>>> 'ui.directives', 'ui.config' ]);/** * Binds a CodeMirror widget to a <textarea> element. */ angular.module('ui.directives').directive('uiCodemirror', ['ui.config', '$parse', function (uiConfig, $parse) { uiConfig.codemirror = uiConfig.codemirror || {}; return { require: 'ngModel', link: function (scope, elm, attrs, ngModel) { // Only works on textareas if ( !elm.is('textarea') ) { throw Error('ui-codemirror can only be applied to a textarea element'); } var codemirror; // This is the method that we use to get the value of the ui-codemirror attribute expression. var uiCodemirrorGet = $parse(attrs.uiCodemirror); // This method will be called whenever the code mirror widget content changes var onChangeHandler = function (ed) { // We only update the model if the value has changed - this helps get around a little problem where $render triggers a change despite already being inside a $apply loop. var newValue = ed.getValue(); if ( newValue !== ngModel.$viewValue ) { ngModel.$setViewValue(newValue); scope.$apply(); } }; // Create and wire up a new code mirror widget (unwiring a previous one if necessary) var updateCodeMirror = function(options) { // Merge together the options from the uiConfig and the attribute itself with the onChange event above. options = angular.extend({}, options, uiConfig.codemirror); // We actually want to run both handlers if the user has provided their own onChange handler. var userOnChange = options.onChange; if ( userOnChange ) { options.onChange = function(ed) { onChangeHandler(ed); userOnChange(ed); }; } else { options.onChange = onChangeHandler; } // If there is a codemirror widget for this element already then we need to unwire if first if ( codemirror ) { codemirror.toTextArea(); } // Create the new codemirror widget codemirror = CodeMirror.fromTextArea(elm[0], options); }; // Initialize the code mirror widget updateCodeMirror(uiCodemirrorGet()); // Now watch to see if the codemirror attribute gets updated scope.$watch(uiCodemirrorGet, updateCodeMirror, true); // Override the ngModelController $render method, which is what gets called when the model is updated. // This takes care of the synchronizing the codeMirror element with the underlying model, in the case that it is changed by something else. ngModel.$render = function() { codemirror.setValue(ngModel.$viewValue); }; } }; }]);// Generated by CoffeeScript 1.3.3 <<<<<<< ======= // Generated by CoffeeScript 1.3.3 >>>>>>> <<<<<<< return element.datepicker(opts); } }; } ]); ======= }; } ]); }).call(this); >>>>>>> return element.datepicker(opts); } }; } ]); <<<<<<< ======= /* Masked Input plugin for jQuery Copyright (c) 2007-2011 Josh Bush (digitalbush.com) Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) Version: 1.3 */ (function($) { var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask"; var iPhone = (window.orientation != undefined); $.mask = { //Predefined character definitions definitions: { '9': "[0-9]", 'a': "[A-Za-z]", '*': "[A-Za-z0-9]" }, dataName:"rawMaskFn" }; $.fn.extend({ //Helper Function for Caret positioning caret: function(begin, end) { if (this.length == 0) return; if (typeof begin == 'number') { end = (typeof end == 'number') ? end : begin; return this.each(function() { if (this.setSelectionRange) { this.setSelectionRange(begin, end); } else if (this.createTextRange) { var range = this.createTextRange(); range.collapse(true); range.moveEnd('character', end); range.moveStart('character', begin); range.select(); } }); } else { if (this[0].setSelectionRange) { begin = this[0].selectionStart; end = this[0].selectionEnd; } else if (document.selection && document.selection.createRange) { var range = document.selection.createRange(); begin = 0 - range.duplicate().moveStart('character', -100000); end = begin + range.text.length; } return { begin: begin, end: end }; } }, unmask: function() { return this.trigger("unmask"); }, isMaskValid: function(){ return $(this).data('mask-isvalid'); }, mask: function(mask, settings) { if (!mask && this.length > 0) { var input = $(this[0]); return input.data($.mask.dataName)(); } settings = $.extend({ placeholder: "_", completed: null }, settings); var defs = $.mask.definitions; var tests = []; var partialPosition = mask.length; var firstNonMaskPos = null; var len = mask.length; $.each(mask.split(""), function(i, c) { if (c == '?') { len--; partialPosition = i; } else if (defs[c]) { tests.push(new RegExp(defs[c])); if(firstNonMaskPos==null) firstNonMaskPos = tests.length - 1; } else { tests.push(null); } }); return this.trigger("unmask").each(function() { var input = $(this); var buffer = $.map(mask.split(""), function(c, i) { if (c != '?') return defs[c] ? settings.placeholder : c }); var focusText = input.val(); function seekNext(pos) { while (++pos <= len && !tests[pos]); return pos; }; function seekPrev(pos) { while (--pos >= 0 && !tests[pos]); return pos; }; function shiftL(begin,end) { if(begin<0) return; for (var i = begin,j = seekNext(end); i < len; i++) { if (tests[i]) { if (j < len && tests[i].test(buffer[j])) { buffer[i] = buffer[j]; buffer[j] = settings.placeholder; } else break; j = seekNext(j); } } writeBuffer(); input.caret(Math.max(firstNonMaskPos, begin)); }; function shiftR(pos) { for (var i = pos, c = settings.placeholder; i < len; i++) { if (tests[i]) { var j = seekNext(i); var t = buffer[i]; buffer[i] = c; if (j < len && tests[j].test(t)) c = t; else break; } } }; function keydownEvent(e) { var k=e.which; //backspace, delete, and escape get special treatment if(k == 8 || k == 46 || (iPhone && k == 127)){ var pos = input.caret(), begin = pos.begin, end = pos.end; if(end-begin==0){ begin=k!=46?seekPrev(begin):(end=seekNext(begin-1)); end=k==46?seekNext(end):end; } clearBuffer(begin, end); shiftL(begin,end-1); isValid(); //twarogowski return false; } else if (k == 27) {//escape input.val(focusText); input.caret(0, checkVal()); return false; } }; function keypressEvent(e) { var k = e.which, pos = input.caret(); if (e.ctrlKey || e.altKey || e.metaKey || k<32) {//Ignore return true; } else if (k) { if(pos.end-pos.begin!=0){ clearBuffer(pos.begin, pos.end); shiftL(pos.begin, pos.end-1); isValid(); //twarogowski } var p = seekNext(pos.begin - 1); if (p < len) { var c = String.fromCharCode(k); if (tests[p].test(c)) { shiftR(p); buffer[p] = c; writeBuffer(); var next = seekNext(p); input.caret(next); isValid(); //twarogowski if (settings.completed && next >= len) settings.completed.call(input); } } return false; } }; function clearBuffer(start, end) { for (var i = start; i < end && i < len; i++) { if (tests[i]) buffer[i] = settings.placeholder; } }; function writeBuffer() { return input.val(buffer.join('')).val(); }; function isValid(){ var test = input.val(); var lastMatch = -1; for (var i = 0, pos = 0; i < len; i++) { if (tests[i]) { buffer[i] = settings.placeholder; while (pos++ < test.length) { var c = test.charAt(pos - 1); if (tests[i].test(c)) { buffer[i] = c; lastMatch = i; break; } } if (pos > test.length) break; } else if (buffer[i] == test.charAt(pos) && i!=partialPosition) { pos++; lastMatch = i; } } var valid = (lastMatch + 1 >= partialPosition); input.data('mask-isvalid',valid); return valid; } function checkVal(allow) { //try to place characters where they belong var test = input.val(); var lastMatch = -1; for (var i = 0, pos = 0; i < len; i++) { if (tests[i]) { buffer[i] = settings.placeholder; while (pos++ < test.length) { var c = test.charAt(pos - 1); if (tests[i].test(c)) { buffer[i] = c; lastMatch = i; break; } } if (pos > test.length) break; } else if (buffer[i] == test.charAt(pos) && i!=partialPosition) { pos++; lastMatch = i; } } if (!allow && lastMatch + 1 < partialPosition) { input.val(""); clearBuffer(0, len); } else if (allow || lastMatch + 1 >= partialPosition) { writeBuffer(); if (!allow) input.val(input.val().substring(0, lastMatch + 1)); } return (partialPosition ? i : firstNonMaskPos); }; input.data($.mask.dataName,function(){ return $.map(buffer, function(c, i) { return tests[i]&&c!=settings.placeholder ? c : null; }).join(''); }) if (!input.attr("readonly")) input .one("unmask", function() { input .unbind(".mask") .removeData($.mask.dataName); }) .bind("focus.mask", function() { focusText = input.val(); var pos = checkVal(); writeBuffer(); var moveCaret=function(){ if (pos == mask.length) input.caret(0, pos); else input.caret(pos); }; ($.browser.msie ? moveCaret:function(){setTimeout(moveCaret,0)})(); }) .bind("blur.mask", function() { checkVal(); if (input.val() != focusText) input.change(); }) .bind("keydown.mask", keydownEvent) .bind("keypress.mask", keypressEvent) .bind(pasteEventName, function() { setTimeout(function() { input.caret(checkVal(true)); }, 0); }); checkVal(); //Perform initial check for existing values }); } }); })(jQuery); // Generated by CoffeeScript 1.3.3 >>>>>>> <<<<<<< }); } }; } ]); ======= } }; } ]); }).call(this); >>>>>>> }); } }; } ]); <<<<<<< }]);/** ======= }]); /** >>>>>>> }]);/** <<<<<<< return function(value) { var len = 0; if (typeof value.length == 'undefined') { for (key in value) len++; return len; } return value.length; }; });/** ======= return function(value) { return value.length; }; }); /** >>>>>>> return function(value) { var len = 0; if (typeof value.length == 'undefined') { for (key in value) len++; return len; } return value.length; }; });/**
<<<<<<< default: 1, description: 'Number of indentation characters to add per code level' ======= default: 2, description: 'Integer denoting count of indentation required' >>>>>>> default: 2, description: 'Number of indentation characters to add per code level' <<<<<<< default: 'tab', description: 'Character used for indentation' ======= default: 'space', description: 'String denoting type of indentation for code snippet. eg: \'space\', \'tab\'' >>>>>>> default: 'space', description: 'Character used for indentation'
<<<<<<< default: 0, description: 'Number of indentation characters to add per code level' ======= default: 2, description: 'Integer denoting count of indentation required' >>>>>>> default: 2, description: 'Number of indentation characters to add per code level' <<<<<<< default: 'tab', description: 'Character used for indentation' ======= default: 'space', description: 'String denoting type of indentation for code snippet. eg: \'space\', \'tab\'' >>>>>>> default: 'space', description: 'Character used for indentation'
<<<<<<< default: 0, description: 'Number of indentation characters to add per code level' ======= default: 2, description: 'Integer denoting count of indentation required' >>>>>>> default: 2, description: 'Number of indentation characters to add per code level' <<<<<<< default: 'tab', description: 'Character used for indentation' ======= default: 'space', description: 'String denoting type of indentation for code snippet. eg: \'space\', \'tab\'' >>>>>>> default: 'space', description: 'Character used for indentation'
<<<<<<< default: 0, description: 'Number of indentation characters to add per code level' ======= default: 2, description: 'Integer denoting count of indentation required' >>>>>>> default: 2, description: 'Number of indentation characters to add per code level'
<<<<<<< default: true, description: 'Remove white space and additional lines that may affect the server\'s response' ======= default: false, description: 'Trim request body fields' >>>>>>> default: false, description: 'Remove white space and additional lines that may affect the server\'s response'
<<<<<<< var wordCount = require( "./stringProcessing/countWords.js" ); var calculateFleschReading = require( "./analyses/calculateFleschReading" ); ======= >>>>>>> var wordCount = require( "./stringProcessing/countWords.js" ); var calculateFleschReading = require( "./analyses/calculateFleschReading" ); <<<<<<< "wordCount": wordCount, "calculateFleschReading": calculateFleschReading ======= "wordCount": wordCount, "getLinkStatistics": getLinkStatistics >>>>>>> "wordCount": wordCount, "calculateFleschReading": calculateFleschReading "getLinkStatistics": getLinkStatistics
<<<<<<< import { getRtlStyle, ScreenReaderText } from "@yoast/components"; ======= import { colors } from "@yoast/components/style-guide"; import { getDirectionalStyle } from "@yoast/helpers"; >>>>>>> import { colors } from "@yoast/components/style-guide"; import { getDirectionalStyle } from "@yoast/helpers"; import { ScreenReaderText } from "@yoast/components";
<<<<<<< export { makeOutboundLink } from "./makeOutboundLink"; export { default as validateFacebookImage } from "./social-preview-image-validation/facebookValidation"; export { default as validateTwitterImage } from "./social-preview-image-validation/twitterValidation"; ======= export { makeOutboundLink } from "./makeOutboundLink"; export * from "./hiddenInputHelper"; >>>>>>> export { makeOutboundLink } from "./makeOutboundLink"; export { default as validateFacebookImage } from "./social-preview-image-validation/facebookValidation"; export { default as validateTwitterImage } from "./social-preview-image-validation/twitterValidation"; export * from "./hiddenInputHelper";
<<<<<<< describe( "A test for filtering function words in supported languages", function() { // Function word: هذه const forms = buildStems( "هذه المعلومات", "ar", false ); expect( forms ).toEqual( new TopicPhrase( [ new StemOriginalPair( "المعلومات", "المعلومات" ) ], false ) ); } ); ======= describe( "A test for filtering function words in supported languages", function() { // Function word: שני const forms = buildStems( "שני תפוחים", "he", false ); expect( forms ).toEqual( new TopicPhrase( [ new StemOriginalPair( "תפוחים", "תפוחים" ) ], false ) ); } ); >>>>>>> describe( "A test for filtering function words in supported languages", function() { // Function word: שני const forms = buildStems( "שני תפוחים", "he", false ); expect( forms ).toEqual( new TopicPhrase( [ new StemOriginalPair( "תפוחים", "תפוחים" ) ], false ) ); } ); describe( "A test for filtering function words in supported languages", function() { // Function word: هذه const forms = buildStems( "هذه المعلومات", "ar", false ); expect( forms ).toEqual( new TopicPhrase( [ new StemOriginalPair( "المعلومات", "المعلومات" ) ], false ) ); } );
<<<<<<< import pl from "../../premium-configuration/data/morphologyData-pl-v9.json"; ======= import pt from "../../premium-configuration/data/morphologyData-pt-v9.json"; import id from "../../premium-configuration/data/morphologyData-id-v9.json"; >>>>>>> import pt from "../../premium-configuration/data/morphologyData-pt-v9.json"; import id from "../../premium-configuration/data/morphologyData-id-v9.json"; import pl from "../../premium-configuration/data/morphologyData-pl-v9.json"; <<<<<<< pl ======= pt, id, >>>>>>> pt, id, pl