content_type
stringclasses 8
values | main_lang
stringclasses 7
values | message
stringlengths 1
50
| sha
stringlengths 40
40
| patch
stringlengths 52
962k
| file_count
int64 1
300
|
---|---|---|---|---|---|
Javascript | Javascript | fix typescript regression | a1cfefe821d712eaa3af16353e20e9f7f9dea12b | <ide><path>lib/util/registerExternalSerializer.js
<ide> const {
<ide> SourceMapSource
<ide> } = require("webpack-sources");
<ide>
<add>/** @typedef {import("acorn").Position} Position */
<ide> /** @typedef {import("../Dependency").RealDependencyLocation} RealDependencyLocation */
<ide> /** @typedef {import("../Dependency").SourcePosition} SourcePosition */
<ide> /** @typedef {import("./serialization").ObjectDeserializerContext} ObjectDeserializerContext */ | 1 |
Javascript | Javascript | simplify fs.promises warning logic | 7ac939e106bf8d878f6e193bfef317f9bd237551 | <ide><path>lib/fs.js
<ide> const {
<ide> validateUint32
<ide> } = require('internal/validators');
<ide>
<del>let promisesWarn = true;
<ide> let truncateWarn = true;
<ide> let fs;
<ide>
<ide> // Lazy loaded
<del>let promises;
<add>let promises = null;
<ide> let watchers;
<ide> let ReadFileContext;
<ide> let ReadStream;
<ide> Object.defineProperties(fs, {
<ide> configurable: true,
<ide> enumerable: false,
<ide> get() {
<del> if (promisesWarn) {
<add> if (promises === null) {
<ide> promises = require('internal/fs/promises');
<del> promisesWarn = false;
<ide> process.emitWarning('The fs.promises API is experimental',
<ide> 'ExperimentalWarning');
<ide> } | 1 |
PHP | PHP | fix php notice when collation not set | e09d045e77189342e93d14674808d76a6ffc8ea3 | <ide><path>src/Illuminate/Database/Connectors/MySqlConnector.php
<ide> protected function configureEncoding($connection, array $config)
<ide> */
<ide> protected function getCollation(array $config)
<ide> {
<del> return ! is_null($config['collation']) ? " collate '{$config['collation']}'" : '';
<add> return isset($config['collation']) ? " collate '{$config['collation']}'" : '';
<ide> }
<ide>
<ide> /** | 1 |
Go | Go | rectify type defination for swarmrouter | ac5d86a672c9b46f2c26540690fcbd92c25715dc | <ide><path>api/server/router/swarm/cluster.go
<ide> import (
<ide> "github.com/docker/docker/daemon"
<ide> )
<ide>
<del>// buildRouter is a router to talk with the build controller
<add>// swarmRouter is a router to talk with the build controller
<ide> type swarmRouter struct {
<ide> backend Backend
<ide> routes []router.Route | 1 |
Mixed | Ruby | return unfrozen strings from to_sentence | 97d428b790f27a79f6cc2ea848fbb5eeba5de42d | <ide><path>activesupport/CHANGELOG.md
<add>* `Array#to_sentence` no longer returns a frozen string.
<add>
<add> Before:
<add> ['one', 'two'].to_sentence.frozen?
<add> # => true
<add>
<add> After:
<add> ['one', 'two'].to_sentence.frozen?
<add> # => false
<add>
<add> *Nicolas Dular*
<add>
<ide> * When an instance of `ActiveSupport::Duration` is converted to an `iso8601` duration string, if `weeks` are mixed with `date` parts, the `week` part will be converted to days.
<ide> This keeps the parser and serializer on the same page.
<ide>
<ide><path>activesupport/lib/active_support/core_ext/array/conversions.rb
<ide> def to_sentence(options = {})
<ide>
<ide> case length
<ide> when 0
<del> ""
<add> +""
<ide> when 1
<del> "#{self[0]}"
<add> +"#{self[0]}"
<ide> when 2
<del> "#{self[0]}#{options[:two_words_connector]}#{self[1]}"
<add> +"#{self[0]}#{options[:two_words_connector]}#{self[1]}"
<ide> else
<del> "#{self[0...-1].join(options[:words_connector])}#{options[:last_word_connector]}#{self[-1]}"
<add> +"#{self[0...-1].join(options[:words_connector])}#{options[:last_word_connector]}#{self[-1]}"
<ide> end
<ide> end
<ide>
<ide><path>activesupport/test/core_ext/array/conversions_test.rb
<ide> def test_always_returns_string
<ide> assert_instance_of String, [ActiveSupport::SafeBuffer.new("one"), "two"].to_sentence
<ide> assert_instance_of String, [ActiveSupport::SafeBuffer.new("one"), "two", "three"].to_sentence
<ide> end
<add>
<add> def test_returns_no_frozen_string
<add> assert_not [].to_sentence.frozen?
<add> assert_not ["one"].to_sentence.frozen?
<add> assert_not ["one", "two"].to_sentence.frozen?
<add> assert_not ["one", "two", "three"].to_sentence.frozen?
<add> end
<ide> end
<ide>
<ide> class ToSTest < ActiveSupport::TestCase | 3 |
Text | Text | highlight additional change in tutorial12.js | 24f523a351839496577c6566d8c7f859c75f5a0c | <ide><path>docs/docs/tutorial.md
<ide> So far, each component has rendered itself once based on its props. `props` are
<ide>
<ide> When the server fetches data, we will be changing the comment data we have. Let's add an array of comment data to the `CommentBox` component as its state:
<ide>
<del>```javascript{3-5}
<add>```javascript{3-5,10}
<ide> // tutorial12.js
<ide> var CommentBox = React.createClass({
<ide> getInitialState: function() { | 1 |
Javascript | Javascript | remove annoying space | 03c812a407f19c683268c50507be58866f1982d9 | <ide><path>lib/formatOutput.js
<ide> module.exports = function(stats, options) {
<ide> });
<ide> Object.keys(stats.fileSizes).forEach(function(file) {
<ide> var name = fileChunkNames[file] && fileChunkNames[file].join(" ") || "";
<del> var fileLine = sprintf("%" + maxLenChunkname + "s", name) + c("\033[1m") + sprintf("%" + (3 + maxLenFilename) + "s", file) + c("\033[22m")+": "+c("\033[1m") + sprintf("%8d", stats.fileSizes[file]) + c("\033[22m") + " chars/bytes ";
<add> var fileLine = sprintf("%" + maxLenChunkname + "s", name) + c("\033[1m") + sprintf("%" + (3 + maxLenFilename) + "s", file) + c("\033[22m")+": "+c("\033[1m") + sprintf("%8d", stats.fileSizes[file]) + c("\033[22m") + " chars/bytes";
<ide> buf.push(fileLine);
<ide> });
<ide> } | 1 |
Python | Python | add drop_last arg for data loader | 0e1869cc286d607f1598506be7bd1312b76ca82c | <ide><path>src/transformers/trainer.py
<ide> def get_train_dataloader(self) -> DataLoader:
<ide> batch_size=self.args.train_batch_size,
<ide> sampler=train_sampler,
<ide> collate_fn=self.data_collator.collate_batch,
<add> drop_last=self.args.dataloader_drop_last,
<ide> )
<ide>
<ide> return data_loader
<ide> def get_eval_dataloader(self, eval_dataset: Optional[Dataset] = None) -> DataLoa
<ide> sampler=sampler,
<ide> batch_size=self.args.eval_batch_size,
<ide> collate_fn=self.data_collator.collate_batch,
<add> drop_last=self.args.dataloader_drop_last,
<ide> )
<ide>
<ide> return data_loader
<ide><path>src/transformers/training_args.py
<ide> class TrainingArguments:
<ide> )
<ide> tpu_metrics_debug: bool = field(default=False, metadata={"help": "TPU: Whether to print debug metrics"})
<ide>
<add> dataloader_drop_last: bool = field(
<add> default=False, metadata={"help": "Drop the last incomplete batch if it is not divisible by the batch size."}
<add> )
<add>
<ide> @property
<ide> def train_batch_size(self) -> int:
<ide> if self.per_gpu_train_batch_size: | 2 |
Javascript | Javascript | simplify an option hook | cab18353a62d39699310bf8c982e897c391411a1 | <ide><path>src/attributes/val.js
<ide> jQuery.extend({
<ide>
<ide> while ( i-- ) {
<ide> option = options[ i ];
<del> if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
<add> if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) {
<ide> optionSet = true;
<ide> }
<ide> } | 1 |
PHP | PHP | add an integration test | 1312bde85ea4802a1b48d0ea712a9a8444dd1f0e | <ide><path>Cake/Test/TestCase/Model/Behavior/TimestampBehaviorTest.php
<ide> use Cake\Event\Event;
<ide> use Cake\Model\Behavior\TimestampBehavior;
<ide> use Cake\ORM\Entity;
<add>use Cake\ORM\TableRegistry;
<ide> use Cake\TestSuite\TestCase;
<ide>
<ide> /**
<ide> * Behavior test case
<ide> */
<ide> class TimestampBehaviorTest extends TestCase {
<ide>
<add>/**
<add> * autoFixtures
<add> *
<add> * Don't load fixtures for all tests
<add> *
<add> * @var bool
<add> */
<add> public $autoFixtures = false;
<add>
<add>/**
<add> * fixtures
<add> *
<add> * @var array
<add> */
<add> public $fixtures = [
<add> 'core.user'
<add> ];
<add>
<add>
<ide> /**
<ide> * Sanity check Implemented events
<ide> *
<ide> public function testSetTimestampExplicit() {
<ide> 'Should return the same value as initially set'
<ide> );
<ide> }
<add>
<add>/**
<add> * Test that calling save, triggers an insert including the created and updated field values
<add> *
<add> * @return void
<add> */
<add> public function testSaveTriggersInsert() {
<add> $this->loadFixtures('User'); //@TODO make fixtures more consistent/easier to use
<add>
<add> $table = TableRegistry::get('users');
<add> $table->addBehavior('Timestamp', [
<add> 'events' => [
<add> 'Model.beforeSave' => [
<add> 'created' => 'new',
<add> 'updated' => 'always'
<add> ]
<add> ]
<add> ]);
<add>
<add> $entity = new Entity([
<add> 'username' => 'timestamp',
<add> ]);
<add> $return = $table->save($entity);
<add> $this->assertSame($return, $entity);
<add>
<add> $row = $table->find('all')->where(['id' => $entity->id])->first();
<add>
<add> $now = time();
<add>
<add> $storedValue = $row->created->getTimestamp();
<add> $this->assertLessThan(3, abs($storedValue - $now), "The stored created timestamp is expected to within 3 seconds of the current timestamp");
<add>
<add> $storedValue = $row->updated->getTimestamp();
<add> $this->assertLessThan(3, abs($storedValue - $now), "The stored updated timestamp is expected to within 3 seconds of the current timestamp");
<add> }
<ide> } | 1 |
Go | Go | keep a consistent view of containers rendered | eed4c7b73f0cf98cf48943da1c082f3210b28c82 | <ide><path>container/container_unix.go
<ide> func (container *Container) ConfigMounts() []Mount {
<ide> return mounts
<ide> }
<ide>
<del>// UpdateContainer updates configuration of a container.
<add>// UpdateContainer updates configuration of a container. Callers must hold a Lock on the Container.
<ide> func (container *Container) UpdateContainer(hostConfig *containertypes.HostConfig) error {
<del> container.Lock()
<del> defer container.Unlock()
<del>
<ide> // update resources of container
<ide> resources := hostConfig.Resources
<ide> cResources := &container.HostConfig.Resources
<ide><path>container/container_windows.go
<ide> func (container *Container) TmpfsMounts() ([]Mount, error) {
<ide> return mounts, nil
<ide> }
<ide>
<del>// UpdateContainer updates configuration of a container
<add>// UpdateContainer updates configuration of a container. Callers must hold a Lock on the Container.
<ide> func (container *Container) UpdateContainer(hostConfig *containertypes.HostConfig) error {
<del> container.Lock()
<del> defer container.Unlock()
<del>
<ide> resources := hostConfig.Resources
<ide> if resources.CPUShares != 0 ||
<ide> resources.Memory != 0 ||
<ide><path>daemon/container.go
<ide> func (daemon *Daemon) load(id string) (*container.Container, error) {
<ide> }
<ide>
<ide> // Register makes a container object usable by the daemon as <container.ID>
<del>func (daemon *Daemon) Register(c *container.Container) {
<add>func (daemon *Daemon) Register(c *container.Container) error {
<ide> // Attach to stdout and stderr
<ide> if c.Config.OpenStdin {
<ide> c.StreamConfig.NewInputPipes()
<ide> } else {
<ide> c.StreamConfig.NewNopInputPipe()
<ide> }
<ide>
<add> // once in the memory store it is visible to other goroutines
<add> // grab a Lock until it has been replicated to avoid races
<add> c.Lock()
<add> defer c.Unlock()
<add>
<ide> daemon.containers.Add(c.ID, c)
<ide> daemon.idIndex.Add(c.ID)
<add> return daemon.containersReplica.Save(c.Snapshot())
<ide> }
<ide>
<ide> func (daemon *Daemon) newContainer(name string, platform string, config *containertypes.Config, hostConfig *containertypes.HostConfig, imgID image.ID, managed bool) (*container.Container, error) {
<ide> func (daemon *Daemon) setHostConfig(container *container.Container, hostConfig *
<ide>
<ide> runconfig.SetDefaultNetModeIfBlank(hostConfig)
<ide> container.HostConfig = hostConfig
<add> if err := daemon.containersReplica.Save(container.Snapshot()); err != nil {
<add> return err
<add> }
<ide> return container.ToDisk()
<ide> }
<ide>
<ide><path>daemon/container_operations.go
<ide> func (daemon *Daemon) getDNSSearchSettings(container *container.Container) []str
<ide>
<ide> return nil
<ide> }
<add>
<add>func (daemon *Daemon) saveAndReplicate(container *container.Container) error {
<add> container.Lock()
<add> defer container.Unlock()
<add> if err := daemon.containersReplica.Save(container.Snapshot()); err != nil {
<add> return fmt.Errorf("Error replicating container state: %v", err)
<add> }
<add> if err := container.ToDisk(); err != nil {
<add> return fmt.Errorf("Error saving container to disk: %v", err)
<add> }
<add> return nil
<add>}
<add>
<ide> func (daemon *Daemon) buildSandboxOptions(container *container.Container) ([]libnetwork.SandboxOption, error) {
<ide> var (
<ide> sboxOptions []libnetwork.SandboxOption
<ide> func (daemon *Daemon) ConnectToNetwork(container *container.Container, idOrName
<ide> return err
<ide> }
<ide> }
<del> if err := container.ToDisk(); err != nil {
<add> if err := daemon.saveAndReplicate(container); err != nil {
<ide> return fmt.Errorf("Error saving container to disk: %v", err)
<ide> }
<ide> return nil
<ide> func (daemon *Daemon) DisconnectFromNetwork(container *container.Container, netw
<ide> return err
<ide> }
<ide>
<del> if err := container.ToDisk(); err != nil {
<add> if err := daemon.saveAndReplicate(container); err != nil {
<ide> return fmt.Errorf("Error saving container to disk: %v", err)
<ide> }
<ide>
<ide> if n != nil {
<del> attributes := map[string]string{
<add> daemon.LogNetworkEventWithAttributes(n, "disconnect", map[string]string{
<ide> "container": container.ID,
<del> }
<del> daemon.LogNetworkEventWithAttributes(n, "disconnect", attributes)
<add> })
<ide> }
<add>
<ide> return nil
<ide> }
<ide>
<ide><path>daemon/create.go
<ide> func (daemon *Daemon) create(params types.ContainerCreateConfig, managed bool) (
<ide> logrus.Errorf("Error saving new container to disk: %v", err)
<ide> return nil, err
<ide> }
<del> daemon.Register(container)
<add> if err := daemon.Register(container); err != nil {
<add> return nil, err
<add> }
<ide> stateCtr.set(container.ID, "stopped")
<ide> daemon.LogContainerEvent(container, "create")
<ide> return container, nil
<ide><path>daemon/daemon.go
<ide> type Daemon struct {
<ide> ID string
<ide> repository string
<ide> containers container.Store
<add> containersReplica *container.MemDB
<ide> execCommands *exec.Store
<ide> downloadManager *xfer.LayerDownloadManager
<ide> uploadManager *xfer.LayerUploadManager
<ide> func (daemon *Daemon) restore() error {
<ide> activeSandboxes := make(map[string]interface{})
<ide> for id, c := range containers {
<ide> if err := daemon.registerName(c); err != nil {
<add> logrus.Errorf("Failed to register container name %s: %s", c.ID, err)
<add> delete(containers, id)
<add> continue
<add> }
<add> if err := daemon.Register(c); err != nil {
<ide> logrus.Errorf("Failed to register container %s: %s", c.ID, err)
<ide> delete(containers, id)
<ide> continue
<ide> }
<del> daemon.Register(c)
<ide>
<ide> // verify that all volumes valid and have been migrated from the pre-1.7 layout
<ide> if err := daemon.verifyVolumesInfo(c); err != nil {
<ide> func NewDaemon(config *config.Config, registryService registry.Service, containe
<ide> d.ID = trustKey.PublicKey().KeyID()
<ide> d.repository = daemonRepo
<ide> d.containers = container.NewMemoryStore()
<add> if d.containersReplica, err = container.NewMemDB(); err != nil {
<add> return nil, err
<add> }
<ide> d.execCommands = exec.NewStore()
<ide> d.trustKey = trustKey
<ide> d.idIndex = truncindex.NewTruncIndex([]string{})
<ide><path>daemon/delete.go
<ide> func (daemon *Daemon) cleanupContainer(container *container.Container, forceRemo
<ide> }
<ide>
<ide> // Mark container dead. We don't want anybody to be restarting it.
<del> container.SetDead()
<add> container.Lock()
<add> container.Dead = true
<add> if err = daemon.containersReplica.Save(container.Snapshot()); err != nil {
<add> container.Unlock()
<add> return err
<add> }
<ide>
<ide> // Save container state to disk. So that if error happens before
<ide> // container meta file got removed from disk, then a restart of
<ide> // docker should not make a dead container alive.
<del> if err := container.ToDiskLocking(); err != nil && !os.IsNotExist(err) {
<add> if err := container.ToDisk(); err != nil && !os.IsNotExist(err) {
<ide> logrus.Errorf("Error saving dying container to disk: %v", err)
<ide> }
<add> container.Unlock()
<ide>
<ide> // When container creation fails and `RWLayer` has not been created yet, we
<ide> // do not call `ReleaseRWLayer`
<ide> func (daemon *Daemon) cleanupContainer(container *container.Container, forceRemo
<ide> selinuxFreeLxcContexts(container.ProcessLabel)
<ide> daemon.idIndex.Delete(container.ID)
<ide> daemon.containers.Delete(container.ID)
<add> daemon.containersReplica.Delete(container.ID)
<ide> if e := daemon.removeMountPoints(container, removeVolume); e != nil {
<ide> logrus.Error(e)
<ide> }
<ide><path>daemon/health.go
<ide> func handleProbeResult(d *Daemon, c *container.Container, result *types.Healthch
<ide> // Else we're starting or healthy. Stay in that state.
<ide> }
<ide>
<add> // replicate Health status changes
<add> if err := d.containersReplica.Save(c.Snapshot()); err != nil {
<add> // queries will be inconsistent until the next probe runs or other state mutations
<add> // trigger a replication
<add> logrus.Errorf("Error replicating health state for container %s: %v", c.ID, err)
<add> }
<add>
<ide> if oldStatus != h.Status {
<ide> d.LogContainerEvent(c, "health_status: "+h.Status)
<ide> }
<ide><path>daemon/health_test.go
<ide> func TestNoneHealthcheck(t *testing.T) {
<ide> },
<ide> State: &container.State{},
<ide> }
<del> daemon := &Daemon{}
<add> store, err := container.NewMemDB()
<add> if err != nil {
<add> t.Fatal(err)
<add> }
<add> daemon := &Daemon{
<add> containersReplica: store,
<add> }
<ide>
<ide> daemon.initHealthMonitor(c)
<ide> if c.State.Health != nil {
<ide> func TestHealthStates(t *testing.T) {
<ide> Image: "image_name",
<ide> },
<ide> }
<add>
<add> store, err := container.NewMemDB()
<add> if err != nil {
<add> t.Fatal(err)
<add> }
<add>
<ide> daemon := &Daemon{
<del> EventsService: e,
<add> EventsService: e,
<add> containersReplica: store,
<ide> }
<ide>
<ide> c.Config.Healthcheck = &containertypes.HealthConfig{
<ide><path>daemon/monitor.go
<ide> func (daemon *Daemon) StateChanged(id string, e libcontainerd.StateInfo) error {
<ide> daemon.setStateCounter(c)
<ide>
<ide> defer c.Unlock()
<add> if err := daemon.containersReplica.Save(c.Snapshot()); err != nil {
<add> return err
<add> }
<ide> if err := c.ToDisk(); err != nil {
<ide> return err
<ide> }
<ide> func (daemon *Daemon) StateChanged(id string, e libcontainerd.StateInfo) error {
<ide> c.HasBeenStartedBefore = true
<ide> daemon.setStateCounter(c)
<ide>
<add> if err := daemon.containersReplica.Save(c.Snapshot()); err != nil {
<add> c.Reset(false)
<add> return err
<add> }
<ide> if err := c.ToDisk(); err != nil {
<ide> c.Reset(false)
<ide> return err
<ide> func (daemon *Daemon) StateChanged(id string, e libcontainerd.StateInfo) error {
<ide> // Container is already locked in this case
<ide> c.Paused = true
<ide> daemon.setStateCounter(c)
<add> if err := daemon.containersReplica.Save(c.Snapshot()); err != nil {
<add> return err
<add> }
<ide> if err := c.ToDisk(); err != nil {
<ide> return err
<ide> }
<ide> func (daemon *Daemon) StateChanged(id string, e libcontainerd.StateInfo) error {
<ide> // Container is already locked in this case
<ide> c.Paused = false
<ide> daemon.setStateCounter(c)
<add> if err := daemon.containersReplica.Save(c.Snapshot()); err != nil {
<add> return err
<add> }
<ide> if err := c.ToDisk(); err != nil {
<ide> return err
<ide> }
<ide><path>daemon/rename.go
<ide> func (daemon *Daemon) ContainerRename(oldName, newName string) error {
<ide> daemon.nameIndex.Release(oldName + k)
<ide> }
<ide> daemon.releaseName(oldName)
<add> if err = daemon.containersReplica.Save(container.Snapshot()); err != nil {
<add> return err
<add> }
<ide> if err = container.ToDisk(); err != nil {
<ide> return err
<ide> }
<ide> func (daemon *Daemon) ContainerRename(oldName, newName string) error {
<ide> if err != nil {
<ide> container.Name = oldName
<ide> container.NetworkSettings.IsAnonymousEndpoint = oldIsAnonymousEndpoint
<add> if e := daemon.containersReplica.Save(container.Snapshot()); err != nil {
<add> logrus.Errorf("%s: Failed in replicating state on rename failure: %v", container.ID, e)
<add> }
<ide> if e := container.ToDisk(); e != nil {
<ide> logrus.Errorf("%s: Failed in writing to Disk on rename failure: %v", container.ID, e)
<ide> }
<ide><path>daemon/start.go
<ide> func (daemon *Daemon) containerStart(container *container.Container, checkpoint
<ide> if container.ExitCode() == 0 {
<ide> container.SetExitCode(128)
<ide> }
<del> container.ToDisk()
<del>
<add> if err := daemon.containersReplica.Save(container.Snapshot()); err != nil {
<add> logrus.Errorf("%s: failed replicating state on start failure: %v", container.ID, err)
<add> }
<add> if err := container.ToDisk(); err != nil {
<add> logrus.Errorf("%s: failed writing to disk on start failure: %v", container.ID, err)
<add> }
<ide> container.Reset(false)
<ide>
<ide> daemon.Cleanup(container)
<ide><path>daemon/update.go
<ide> func (daemon *Daemon) update(name string, hostConfig *container.HostConfig) erro
<ide> if restoreConfig {
<ide> container.Lock()
<ide> container.HostConfig = &backupHostConfig
<add> daemon.containersReplica.Save(container.Snapshot())
<ide> container.ToDisk()
<ide> container.Unlock()
<ide> }
<ide> func (daemon *Daemon) update(name string, hostConfig *container.HostConfig) erro
<ide> return errCannotUpdate(container.ID, fmt.Errorf("Container is marked for removal and cannot be \"update\"."))
<ide> }
<ide>
<add> container.Lock()
<ide> if err := container.UpdateContainer(hostConfig); err != nil {
<ide> restoreConfig = true
<add> container.Unlock()
<ide> return errCannotUpdate(container.ID, err)
<ide> }
<add> if err := daemon.containersReplica.Save(container.Snapshot()); err != nil {
<add> restoreConfig = true
<add> container.Unlock()
<add> return errCannotUpdate(container.ID, err)
<add> }
<add> container.Unlock()
<ide>
<ide> // if Restart Policy changed, we need to update container monitor
<ide> if hostConfig.RestartPolicy.Name != "" { | 13 |
Python | Python | improve node image detection | 1e3d3cbc6fcc6f3cc862da31b9e17ca5450b95f6 | <ide><path>libcloud/compute/drivers/gce.py
<ide> def _to_node(self, node):
<ide> extra['canIpForward'] = node.get('canIpForward')
<ide> extra['serviceAccounts'] = node.get('serviceAccounts', [])
<ide> extra['scheduling'] = node.get('scheduling', {})
<add> extra['boot_disk'] = None
<ide>
<ide> for disk in extra['disks']:
<ide> if disk.get('boot') and disk.get('type') == 'PERSISTENT':
<ide> def _to_node(self, node):
<ide>
<ide> # For the node attributes, use just machine and image names, not full
<ide> # paths. Full paths are available in the "extra" dict.
<add> image = None
<ide> if extra['image']:
<ide> image = self._get_components_from_path(extra['image'])['name']
<ide> else:
<del> image = None
<add> if extra['boot_disk'] and \
<add> hasattr(extra['boot_disk'], 'extra') and \
<add> 'sourceImage' in extra['boot_disk'].extra and \
<add> extra['boot_disk'].extra['sourceImage'] is not None:
<add> src_image = extra['boot_disk'].extra['sourceImage']
<add> image = self._get_components_from_path(src_image)['name']
<add> extra['image'] = image
<ide> size = self._get_components_from_path(node['machineType'])['name']
<ide>
<ide> return Node(id=node['id'], name=node['name'],
<ide> def _to_storage_volume(self, volume):
<ide> extra['status'] = volume.get('status')
<ide> extra['creationTimestamp'] = volume.get('creationTimestamp')
<ide> extra['description'] = volume.get('description')
<add> extra['sourceImage'] = volume.get('sourceImage')
<add> extra['sourceImageId'] = volume.get('sourceImageId')
<add> extra['sourceSnapshot'] = volume.get('sourceSnapshot')
<add> extra['sourceSnapshotId'] = volume.get('sourceSnapshotId')
<add> extra['options'] = volume.get('options')
<add> if 'licenses' in volume:
<add> lic_objs = self._licenses_from_urls(licenses=volume['licenses'])
<add> extra['licenses'] = lic_objs
<add>
<ide> extra['type'] = volume.get('type', 'pd-standard').split('/')[-1]
<ide>
<ide> return StorageVolume(id=volume['id'], name=volume['name'], | 1 |
Text | Text | fix typo in fast-refresh.md | 24f056c9b3e18ccfca26272234fa231a8411f77a | <ide><path>docs/basic-features/fast-refresh.md
<ide> Sometimes, this can lead to unexpected results. For example, even a `useEffect`
<ide> with an empty array of dependencies would still re-run once during Fast Refresh.
<ide>
<ide> However, writing code resilient to occasional re-running of `useEffect` is a good practice even
<del>without Fash Refresh. It will make it easier for you to introduce new dependencies to it later on
<add>without Fast Refresh. It will make it easier for you to introduce new dependencies to it later on
<ide> and it's enforced by [React Strict Mode](/docs/api-reference/next.config.js/react-strict-mode),
<ide> which we highly recommend enabling. | 1 |
Go | Go | move daemon config directory | 9ed4400baf21528644c608eeda24fda081dfc4f2 | <ide><path>docker/daemon.go
<ide> import (
<ide> "io"
<ide> "os"
<ide> "path/filepath"
<del> "runtime"
<ide> "strings"
<ide> "time"
<ide>
<ide> func shutdownDaemon(d *daemon.Daemon, timeout time.Duration) {
<ide> logrus.Error("Force shutdown daemon")
<ide> }
<ide> }
<del>
<del>func getDaemonConfDir() string {
<del> // TODO: update for Windows daemon
<del> if runtime.GOOS == "windows" {
<del> return cliconfig.ConfigDir()
<del> }
<del> return "/etc/docker"
<del>}
<ide><path>docker/daemon_unix.go
<ide> func setDefaultUmask() error {
<ide>
<ide> return nil
<ide> }
<add>
<add>func getDaemonConfDir() string {
<add> return "/etc/docker"
<add>}
<ide><path>docker/daemon_windows.go
<ide> package main
<ide>
<ide> import (
<add> "os"
<add>
<ide> apiserver "github.com/docker/docker/api/server"
<ide> "github.com/docker/docker/daemon"
<ide> )
<ide> func currentUserIsOwner(f string) bool {
<ide> func setDefaultUmask() error {
<ide> return nil
<ide> }
<add>
<add>func getDaemonConfDir() string {
<add> return os.Getenv("PROGRAMDATA") + `\docker\config`
<add>} | 3 |
Text | Text | clarify details on connecting with react | 64fee67e29f465efde40ea0df5668b16a2741601 | <ide><path>docs/basics/UsageWithReact.md
<ide> const Footer = () => (
<ide> export default Footer
<ide> ```
<ide>
<del>#### `components/App.js`
<del>
<del>```js
<del>import React from 'react'
<del>import Footer from './Footer'
<del>import AddTodo from '../containers/AddTodo'
<del>import VisibleTodoList from '../containers/VisibleTodoList'
<del>
<del>const App = () => (
<del> <div>
<del> <AddTodo />
<del> <VisibleTodoList />
<del> <Footer />
<del> </div>
<del>)
<del>
<del>export default App
<del>```
<del>
<ide> ### Implementing Container Components
<ide>
<ide> Now it's time to hook up those presentational components to Redux by creating some containers. Technically, a container component is just a React component that uses [`store.subscribe()`](../api/Store.md#subscribe) to read a part of the Redux state tree and supply props to a presentational component it renders. You could write a container component by hand, but we suggest instead generating container components with the React Redux library's [`connect()`](https://github.com/reactjs/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options) function, which provides many useful optimizations to prevent unnecessary re-renders. (One result of this is that you shouldn't have to worry about the [React performance suggestion](https://facebook.github.io/react/docs/advanced-performance.html) of implementing `shouldComponentUpdate` yourself.)
<ide> export default VisibleTodoList
<ide>
<ide> #### `containers/AddTodo.js`
<ide>
<add>Recall as [mentioned previously](#designing-other-components), both the presentation and logic for the `AddTodo` component are mixed into a single definition.
<add>
<ide> ```js
<ide> import React from 'react'
<ide> import { connect } from 'react-redux'
<ide> AddTodo = connect()(AddTodo)
<ide> export default AddTodo
<ide> ```
<ide>
<add>If you are unfamiliar with the `ref` attribute, please read this [documentation](https://facebook.github.io/react/docs/refs-and-the-dom.html) to familiarize yourself with the recommended use of this attribute.
<add>
<add>### Tying the containers together within a component
<add>#### `components/App.js`
<add>
<add>```js
<add>import React from 'react'
<add>import Footer from './Footer'
<add>import AddTodo from '../containers/AddTodo'
<add>import VisibleTodoList from '../containers/VisibleTodoList'
<add>
<add>const App = () => (
<add> <div>
<add> <AddTodo />
<add> <TodoList />
<add> <Footer />
<add> </div>
<add>)
<add>
<add>export default App
<add>```
<add>
<ide> ## Passing the Store
<ide>
<ide> All container components need access to the Redux store so they can subscribe to it. One option would be to pass it as a prop to every container component. However it gets tedious, as you have to wire `store` even through presentational components just because they happen to render a container deep in the component tree. | 1 |
Go | Go | add config apis | 772855768785ce678751795c168e056a8db35d09 | <ide><path>api/server/router/swarm/backend.go
<ide> type Backend interface {
<ide> Update(uint64, types.Spec, types.UpdateFlags) error
<ide> GetUnlockKey() (string, error)
<ide> UnlockSwarm(req types.UnlockRequest) error
<add>
<ide> GetServices(basictypes.ServiceListOptions) ([]types.Service, error)
<ide> GetService(idOrName string, insertDefaults bool) (types.Service, error)
<ide> CreateService(types.ServiceSpec, string) (*basictypes.ServiceCreateResponse, error)
<ide> UpdateService(string, uint64, types.ServiceSpec, basictypes.ServiceUpdateOptions) (*basictypes.ServiceUpdateResponse, error)
<ide> RemoveService(string) error
<add>
<ide> ServiceLogs(context.Context, *backend.LogSelector, *basictypes.ContainerLogsOptions) (<-chan *backend.LogMessage, error)
<add>
<ide> GetNodes(basictypes.NodeListOptions) ([]types.Node, error)
<ide> GetNode(string) (types.Node, error)
<ide> UpdateNode(string, uint64, types.NodeSpec) error
<ide> RemoveNode(string, bool) error
<add>
<ide> GetTasks(basictypes.TaskListOptions) ([]types.Task, error)
<ide> GetTask(string) (types.Task, error)
<add>
<ide> GetSecrets(opts basictypes.SecretListOptions) ([]types.Secret, error)
<ide> CreateSecret(s types.SecretSpec) (string, error)
<ide> RemoveSecret(idOrName string) error
<ide> GetSecret(id string) (types.Secret, error)
<ide> UpdateSecret(idOrName string, version uint64, spec types.SecretSpec) error
<add>
<add> GetConfigs(opts basictypes.ConfigListOptions) ([]types.Config, error)
<add> CreateConfig(s types.ConfigSpec) (string, error)
<add> RemoveConfig(id string) error
<add> GetConfig(id string) (types.Config, error)
<add> UpdateConfig(idOrName string, version uint64, spec types.ConfigSpec) error
<ide> }
<ide><path>api/server/router/swarm/cluster.go
<ide> func (sr *swarmRouter) initRoutes() {
<ide> router.NewGetRoute("/swarm/unlockkey", sr.getUnlockKey),
<ide> router.NewPostRoute("/swarm/update", sr.updateCluster),
<ide> router.NewPostRoute("/swarm/unlock", sr.unlockCluster),
<add>
<ide> router.NewGetRoute("/services", sr.getServices),
<ide> router.NewGetRoute("/services/{id}", sr.getService),
<ide> router.NewPostRoute("/services/create", sr.createService),
<ide> router.NewPostRoute("/services/{id}/update", sr.updateService),
<ide> router.NewDeleteRoute("/services/{id}", sr.removeService),
<ide> router.NewGetRoute("/services/{id}/logs", sr.getServiceLogs, router.WithCancel),
<add>
<ide> router.NewGetRoute("/nodes", sr.getNodes),
<ide> router.NewGetRoute("/nodes/{id}", sr.getNode),
<ide> router.NewDeleteRoute("/nodes/{id}", sr.removeNode),
<ide> router.NewPostRoute("/nodes/{id}/update", sr.updateNode),
<add>
<ide> router.NewGetRoute("/tasks", sr.getTasks),
<ide> router.NewGetRoute("/tasks/{id}", sr.getTask),
<ide> router.NewGetRoute("/tasks/{id}/logs", sr.getTaskLogs, router.WithCancel),
<add>
<ide> router.NewGetRoute("/secrets", sr.getSecrets),
<ide> router.NewPostRoute("/secrets/create", sr.createSecret),
<ide> router.NewDeleteRoute("/secrets/{id}", sr.removeSecret),
<ide> router.NewGetRoute("/secrets/{id}", sr.getSecret),
<ide> router.NewPostRoute("/secrets/{id}/update", sr.updateSecret),
<add>
<add> router.NewGetRoute("/configs", sr.getConfigs),
<add> router.NewPostRoute("/configs/create", sr.createConfig),
<add> router.NewDeleteRoute("/configs/{id}", sr.removeConfig),
<add> router.NewGetRoute("/configs/{id}", sr.getConfig),
<add> router.NewPostRoute("/configs/{id}/update", sr.updateConfig),
<ide> }
<ide> }
<ide><path>api/server/router/swarm/cluster_routes.go
<ide> func (sr *swarmRouter) updateSecret(ctx context.Context, w http.ResponseWriter,
<ide>
<ide> return nil
<ide> }
<add>
<add>func (sr *swarmRouter) getConfigs(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
<add> if err := httputils.ParseForm(r); err != nil {
<add> return err
<add> }
<add> filters, err := filters.FromParam(r.Form.Get("filters"))
<add> if err != nil {
<add> return err
<add> }
<add>
<add> configs, err := sr.backend.GetConfigs(basictypes.ConfigListOptions{Filters: filters})
<add> if err != nil {
<add> return err
<add> }
<add>
<add> return httputils.WriteJSON(w, http.StatusOK, configs)
<add>}
<add>
<add>func (sr *swarmRouter) createConfig(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
<add> var config types.ConfigSpec
<add> if err := json.NewDecoder(r.Body).Decode(&config); err != nil {
<add> return err
<add> }
<add>
<add> id, err := sr.backend.CreateConfig(config)
<add> if err != nil {
<add> return err
<add> }
<add>
<add> return httputils.WriteJSON(w, http.StatusCreated, &basictypes.ConfigCreateResponse{
<add> ID: id,
<add> })
<add>}
<add>
<add>func (sr *swarmRouter) removeConfig(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
<add> if err := sr.backend.RemoveConfig(vars["id"]); err != nil {
<add> return err
<add> }
<add> w.WriteHeader(http.StatusNoContent)
<add>
<add> return nil
<add>}
<add>
<add>func (sr *swarmRouter) getConfig(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
<add> config, err := sr.backend.GetConfig(vars["id"])
<add> if err != nil {
<add> return err
<add> }
<add>
<add> return httputils.WriteJSON(w, http.StatusOK, config)
<add>}
<add>
<add>func (sr *swarmRouter) updateConfig(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
<add> var config types.ConfigSpec
<add> if err := json.NewDecoder(r.Body).Decode(&config); err != nil {
<add> return errors.NewBadRequestError(err)
<add> }
<add>
<add> rawVersion := r.URL.Query().Get("version")
<add> version, err := strconv.ParseUint(rawVersion, 10, 64)
<add> if err != nil {
<add> return errors.NewBadRequestError(fmt.Errorf("invalid config version"))
<add> }
<add>
<add> id := vars["id"]
<add> if err := sr.backend.UpdateConfig(id, version, config); err != nil {
<add> return err
<add> }
<add>
<add> return nil
<add>}
<ide><path>api/types/swarm/config.go
<add>package swarm
<add>
<add>import "os"
<add>
<add>// Config represents a config.
<add>type Config struct {
<add> ID string
<add> Meta
<add> Spec ConfigSpec
<add>}
<add>
<add>// ConfigSpec represents a config specification from a config in swarm
<add>type ConfigSpec struct {
<add> Annotations
<add> Data []byte `json:",omitempty"`
<add>}
<add>
<add>// ConfigReferenceFileTarget is a file target in a config reference
<add>type ConfigReferenceFileTarget struct {
<add> Name string
<add> UID string
<add> GID string
<add> Mode os.FileMode
<add>}
<add>
<add>// ConfigReference is a reference to a config in swarm
<add>type ConfigReference struct {
<add> File *ConfigReferenceFileTarget
<add> ConfigID string
<add> ConfigName string
<add>}
<ide><path>api/types/swarm/container.go
<ide> type ContainerSpec struct {
<ide> Hosts []string `json:",omitempty"`
<ide> DNSConfig *DNSConfig `json:",omitempty"`
<ide> Secrets []*SecretReference `json:",omitempty"`
<add> Configs []*ConfigReference `json:",omitempty"`
<ide> }
<ide><path>api/types/types.go
<ide> type SecretListOptions struct {
<ide> Filters filters.Args
<ide> }
<ide>
<add>// ConfigCreateResponse contains the information returned to a client
<add>// on the creation of a new config.
<add>type ConfigCreateResponse struct {
<add> // ID is the id of the created config.
<add> ID string
<add>}
<add>
<add>// ConfigListOptions holds parameters to list configs
<add>type ConfigListOptions struct {
<add> Filters filters.Args
<add>}
<add>
<ide> // PushResult contains the tag, manifest digest, and manifest size from the
<ide> // push. It's used to signal this information to the trust code in the client
<ide> // so it can sign the manifest if necessary.
<ide><path>daemon/cluster/configs.go
<add>package cluster
<add>
<add>import (
<add> apitypes "github.com/docker/docker/api/types"
<add> types "github.com/docker/docker/api/types/swarm"
<add> "github.com/docker/docker/daemon/cluster/convert"
<add> swarmapi "github.com/docker/swarmkit/api"
<add> "golang.org/x/net/context"
<add>)
<add>
<add>// GetConfig returns a config from a managed swarm cluster
<add>func (c *Cluster) GetConfig(input string) (types.Config, error) {
<add> var config *swarmapi.Config
<add>
<add> if err := c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
<add> s, err := getConfig(ctx, state.controlClient, input)
<add> if err != nil {
<add> return err
<add> }
<add> config = s
<add> return nil
<add> }); err != nil {
<add> return types.Config{}, err
<add> }
<add> return convert.ConfigFromGRPC(config), nil
<add>}
<add>
<add>// GetConfigs returns all configs of a managed swarm cluster.
<add>func (c *Cluster) GetConfigs(options apitypes.ConfigListOptions) ([]types.Config, error) {
<add> c.mu.RLock()
<add> defer c.mu.RUnlock()
<add>
<add> state := c.currentNodeState()
<add> if !state.IsActiveManager() {
<add> return nil, c.errNoManager(state)
<add> }
<add>
<add> filters, err := newListConfigsFilters(options.Filters)
<add> if err != nil {
<add> return nil, err
<add> }
<add> ctx, cancel := c.getRequestContext()
<add> defer cancel()
<add>
<add> r, err := state.controlClient.ListConfigs(ctx,
<add> &swarmapi.ListConfigsRequest{Filters: filters})
<add> if err != nil {
<add> return nil, err
<add> }
<add>
<add> configs := []types.Config{}
<add>
<add> for _, config := range r.Configs {
<add> configs = append(configs, convert.ConfigFromGRPC(config))
<add> }
<add>
<add> return configs, nil
<add>}
<add>
<add>// CreateConfig creates a new config in a managed swarm cluster.
<add>func (c *Cluster) CreateConfig(s types.ConfigSpec) (string, error) {
<add> var resp *swarmapi.CreateConfigResponse
<add> if err := c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
<add> configSpec := convert.ConfigSpecToGRPC(s)
<add>
<add> r, err := state.controlClient.CreateConfig(ctx,
<add> &swarmapi.CreateConfigRequest{Spec: &configSpec})
<add> if err != nil {
<add> return err
<add> }
<add> resp = r
<add> return nil
<add> }); err != nil {
<add> return "", err
<add> }
<add> return resp.Config.ID, nil
<add>}
<add>
<add>// RemoveConfig removes a config from a managed swarm cluster.
<add>func (c *Cluster) RemoveConfig(input string) error {
<add> return c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
<add> config, err := getConfig(ctx, state.controlClient, input)
<add> if err != nil {
<add> return err
<add> }
<add>
<add> req := &swarmapi.RemoveConfigRequest{
<add> ConfigID: config.ID,
<add> }
<add>
<add> _, err = state.controlClient.RemoveConfig(ctx, req)
<add> return err
<add> })
<add>}
<add>
<add>// UpdateConfig updates a config in a managed swarm cluster.
<add>// Note: this is not exposed to the CLI but is available from the API only
<add>func (c *Cluster) UpdateConfig(input string, version uint64, spec types.ConfigSpec) error {
<add> return c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
<add> config, err := getConfig(ctx, state.controlClient, input)
<add> if err != nil {
<add> return err
<add> }
<add>
<add> configSpec := convert.ConfigSpecToGRPC(spec)
<add>
<add> _, err = state.controlClient.UpdateConfig(ctx,
<add> &swarmapi.UpdateConfigRequest{
<add> ConfigID: config.ID,
<add> ConfigVersion: &swarmapi.Version{
<add> Index: version,
<add> },
<add> Spec: &configSpec,
<add> })
<add> return err
<add> })
<add>}
<ide><path>daemon/cluster/convert/config.go
<add>package convert
<add>
<add>import (
<add> swarmtypes "github.com/docker/docker/api/types/swarm"
<add> swarmapi "github.com/docker/swarmkit/api"
<add> gogotypes "github.com/gogo/protobuf/types"
<add>)
<add>
<add>// ConfigFromGRPC converts a grpc Config to a Config.
<add>func ConfigFromGRPC(s *swarmapi.Config) swarmtypes.Config {
<add> config := swarmtypes.Config{
<add> ID: s.ID,
<add> Spec: swarmtypes.ConfigSpec{
<add> Annotations: annotationsFromGRPC(s.Spec.Annotations),
<add> Data: s.Spec.Data,
<add> },
<add> }
<add>
<add> config.Version.Index = s.Meta.Version.Index
<add> // Meta
<add> config.CreatedAt, _ = gogotypes.TimestampFromProto(s.Meta.CreatedAt)
<add> config.UpdatedAt, _ = gogotypes.TimestampFromProto(s.Meta.UpdatedAt)
<add>
<add> return config
<add>}
<add>
<add>// ConfigSpecToGRPC converts Config to a grpc Config.
<add>func ConfigSpecToGRPC(s swarmtypes.ConfigSpec) swarmapi.ConfigSpec {
<add> return swarmapi.ConfigSpec{
<add> Annotations: swarmapi.Annotations{
<add> Name: s.Name,
<add> Labels: s.Labels,
<add> },
<add> Data: s.Data,
<add> }
<add>}
<add>
<add>// ConfigReferencesFromGRPC converts a slice of grpc ConfigReference to ConfigReference
<add>func ConfigReferencesFromGRPC(s []*swarmapi.ConfigReference) []*swarmtypes.ConfigReference {
<add> refs := []*swarmtypes.ConfigReference{}
<add>
<add> for _, r := range s {
<add> ref := &swarmtypes.ConfigReference{
<add> ConfigID: r.ConfigID,
<add> ConfigName: r.ConfigName,
<add> }
<add>
<add> if t, ok := r.Target.(*swarmapi.ConfigReference_File); ok {
<add> ref.File = &swarmtypes.ConfigReferenceFileTarget{
<add> Name: t.File.Name,
<add> UID: t.File.UID,
<add> GID: t.File.GID,
<add> Mode: t.File.Mode,
<add> }
<add> }
<add>
<add> refs = append(refs, ref)
<add> }
<add>
<add> return refs
<add>}
<ide><path>daemon/cluster/convert/container.go
<ide> func containerSpecFromGRPC(c *swarmapi.ContainerSpec) types.ContainerSpec {
<ide> ReadOnly: c.ReadOnly,
<ide> Hosts: c.Hosts,
<ide> Secrets: secretReferencesFromGRPC(c.Secrets),
<add> Configs: configReferencesFromGRPC(c.Configs),
<ide> }
<ide>
<ide> if c.DNSConfig != nil {
<ide> func secretReferencesToGRPC(sr []*types.SecretReference) []*swarmapi.SecretRefer
<ide>
<ide> return refs
<ide> }
<add>
<ide> func secretReferencesFromGRPC(sr []*swarmapi.SecretReference) []*types.SecretReference {
<ide> refs := make([]*types.SecretReference, 0, len(sr))
<ide> for _, s := range sr {
<ide> func secretReferencesFromGRPC(sr []*swarmapi.SecretReference) []*types.SecretRef
<ide> return refs
<ide> }
<ide>
<add>func configReferencesToGRPC(sr []*types.ConfigReference) []*swarmapi.ConfigReference {
<add> refs := make([]*swarmapi.ConfigReference, 0, len(sr))
<add> for _, s := range sr {
<add> ref := &swarmapi.ConfigReference{
<add> ConfigID: s.ConfigID,
<add> ConfigName: s.ConfigName,
<add> }
<add> if s.File != nil {
<add> ref.Target = &swarmapi.ConfigReference_File{
<add> File: &swarmapi.FileTarget{
<add> Name: s.File.Name,
<add> UID: s.File.UID,
<add> GID: s.File.GID,
<add> Mode: s.File.Mode,
<add> },
<add> }
<add> }
<add>
<add> refs = append(refs, ref)
<add> }
<add>
<add> return refs
<add>}
<add>
<add>func configReferencesFromGRPC(sr []*swarmapi.ConfigReference) []*types.ConfigReference {
<add> refs := make([]*types.ConfigReference, 0, len(sr))
<add> for _, s := range sr {
<add> target := s.GetFile()
<add> if target == nil {
<add> // not a file target
<add> logrus.Warnf("config target not a file: config=%s", s.ConfigID)
<add> continue
<add> }
<add> refs = append(refs, &types.ConfigReference{
<add> File: &types.ConfigReferenceFileTarget{
<add> Name: target.Name,
<add> UID: target.UID,
<add> GID: target.GID,
<add> Mode: target.Mode,
<add> },
<add> ConfigID: s.ConfigID,
<add> ConfigName: s.ConfigName,
<add> })
<add> }
<add>
<add> return refs
<add>}
<add>
<ide> func containerToGRPC(c types.ContainerSpec) (*swarmapi.ContainerSpec, error) {
<ide> containerSpec := &swarmapi.ContainerSpec{
<ide> Image: c.Image,
<ide> func containerToGRPC(c types.ContainerSpec) (*swarmapi.ContainerSpec, error) {
<ide> ReadOnly: c.ReadOnly,
<ide> Hosts: c.Hosts,
<ide> Secrets: secretReferencesToGRPC(c.Secrets),
<add> Configs: configReferencesToGRPC(c.Configs),
<ide> }
<ide>
<ide> if c.DNSConfig != nil {
<ide><path>daemon/cluster/filters.go
<ide> func newListSecretsFilters(filter filters.Args) (*swarmapi.ListSecretsRequest_Fi
<ide> Labels: runconfigopts.ConvertKVStringsToMap(filter.Get("label")),
<ide> }, nil
<ide> }
<add>
<add>func newListConfigsFilters(filter filters.Args) (*swarmapi.ListConfigsRequest_Filters, error) {
<add> accepted := map[string]bool{
<add> "name": true,
<add> "id": true,
<add> "label": true,
<add> }
<add> if err := filter.Validate(accepted); err != nil {
<add> return nil, err
<add> }
<add> return &swarmapi.ListConfigsRequest_Filters{
<add> NamePrefixes: filter.Get("name"),
<add> IDPrefixes: filter.Get("id"),
<add> Labels: runconfigopts.ConvertKVStringsToMap(filter.Get("label")),
<add> }, nil
<add>}
<ide><path>daemon/cluster/filters_test.go
<ide> func TestNewListSecretsFilters(t *testing.T) {
<ide> }
<ide> }
<ide> }
<add>
<add>func TestNewListConfigsFilters(t *testing.T) {
<add> validNameFilter := filters.NewArgs()
<add> validNameFilter.Add("name", "test_name")
<add>
<add> validIDFilter := filters.NewArgs()
<add> validIDFilter.Add("id", "7c9009d6720f6de3b492f5")
<add>
<add> validLabelFilter := filters.NewArgs()
<add> validLabelFilter.Add("label", "type=test")
<add> validLabelFilter.Add("label", "storage=ssd")
<add> validLabelFilter.Add("label", "memory")
<add>
<add> validAllFilter := filters.NewArgs()
<add> validAllFilter.Add("name", "nodeName")
<add> validAllFilter.Add("id", "7c9009d6720f6de3b492f5")
<add> validAllFilter.Add("label", "type=test")
<add> validAllFilter.Add("label", "memory")
<add>
<add> validFilters := []filters.Args{
<add> validNameFilter,
<add> validIDFilter,
<add> validLabelFilter,
<add> validAllFilter,
<add> }
<add>
<add> invalidTypeFilter := filters.NewArgs()
<add> invalidTypeFilter.Add("nonexist", "aaaa")
<add>
<add> invalidFilters := []filters.Args{
<add> invalidTypeFilter,
<add> }
<add>
<add> for _, filter := range validFilters {
<add> if _, err := newListConfigsFilters(filter); err != nil {
<add> t.Fatalf("Should get no error, got %v", err)
<add> }
<add> }
<add>
<add> for _, filter := range invalidFilters {
<add> if _, err := newListConfigsFilters(filter); err == nil {
<add> t.Fatalf("Should get an error for filter %s, while got nil", filter)
<add> }
<add> }
<add>}
<ide><path>daemon/cluster/helpers.go
<ide> func getSecret(ctx context.Context, c swarmapi.ControlClient, input string) (*sw
<ide> return rl.Secrets[0], nil
<ide> }
<ide>
<add>func getConfig(ctx context.Context, c swarmapi.ControlClient, input string) (*swarmapi.Config, error) {
<add> // attempt to lookup config by full ID
<add> if rg, err := c.GetConfig(ctx, &swarmapi.GetConfigRequest{ConfigID: input}); err == nil {
<add> return rg.Config, nil
<add> }
<add>
<add> // If any error (including NotFound), ListConfigs to match via full name.
<add> rl, err := c.ListConfigs(ctx, &swarmapi.ListConfigsRequest{
<add> Filters: &swarmapi.ListConfigsRequest_Filters{
<add> Names: []string{input},
<add> },
<add> })
<add> if err != nil || len(rl.Configs) == 0 {
<add> // If any error or 0 result, ListConfigs to match via ID prefix.
<add> rl, err = c.ListConfigs(ctx, &swarmapi.ListConfigsRequest{
<add> Filters: &swarmapi.ListConfigsRequest_Filters{
<add> IDPrefixes: []string{input},
<add> },
<add> })
<add> }
<add> if err != nil {
<add> return nil, err
<add> }
<add>
<add> if len(rl.Configs) == 0 {
<add> err := fmt.Errorf("config %s not found", input)
<add> return nil, errors.NewRequestNotFoundError(err)
<add> }
<add>
<add> if l := len(rl.Configs); l > 1 {
<add> return nil, fmt.Errorf("config %s is ambiguous (%d matches found)", input, l)
<add> }
<add>
<add> return rl.Configs[0], nil
<add>}
<add>
<ide> func getNetwork(ctx context.Context, c swarmapi.ControlClient, input string) (*swarmapi.Network, error) {
<ide> // GetNetwork to match via full ID.
<ide> if rg, err := c.GetNetwork(ctx, &swarmapi.GetNetworkRequest{NetworkID: input}); err == nil { | 12 |
Javascript | Javascript | add test for async contexts in performanceobserver | ef0f5b185d318c48f4331797e7be86241d676902 | <ide><path>test/parallel/test-performanceobserver-asynccontext.js
<add>'use strict';
<add>
<add>const common = require('../common');
<add>const assert = require('assert');
<add>const {
<add> performance,
<add> PerformanceObserver,
<add>} = require('perf_hooks');
<add>const {
<add> executionAsyncId,
<add> triggerAsyncId,
<add> executionAsyncResource,
<add>} = require('async_hooks');
<add>
<add>// Test Non-Buffered PerformanceObserver retains async context
<add>{
<add> const observer =
<add> new PerformanceObserver(common.mustCall(callback));
<add>
<add> const initialAsyncId = executionAsyncId();
<add> let asyncIdInTimeout;
<add> let asyncResourceInTimeout;
<add>
<add> function callback(list) {
<add> assert.strictEqual(triggerAsyncId(), initialAsyncId);
<add> assert.strictEqual(executionAsyncId(), asyncIdInTimeout);
<add> assert.strictEqual(executionAsyncResource(), asyncResourceInTimeout);
<add> observer.disconnect();
<add> }
<add> observer.observe({ entryTypes: ['mark'] });
<add>
<add> setTimeout(() => {
<add> asyncIdInTimeout = executionAsyncId();
<add> asyncResourceInTimeout = executionAsyncResource();
<add> performance.mark('test1');
<add> }, 0);
<add>} | 1 |
PHP | PHP | add setresult() to query | c6a5ab0a08bea76f8aca61182e11902b4af9b25c | <ide><path>lib/Cake/ORM/Query.php
<ide> class Query extends DatabaseQuery {
<ide> 'matching' => 1
<ide> ];
<ide>
<add>/**
<add> * A hydrated ResultSet.
<add> *
<add> * @var Cake\ORM\ResultSet
<add> * @see setResult()
<add> */
<add> protected $_results;
<add>
<ide> /**
<ide> * Returns the default table object that will be used by this query,
<ide> * that is, the table that will appear in the from clause.
<ide> public function normalizedContainments() {
<ide> return $this->_normalizedContainments = $contain;
<ide> }
<ide>
<add>/**
<add> * Set the result set for a query.
<add> *
<add> * Setting the resultset of a query will make execute() a no-op. Instead
<add> * of executing the SQL query and fetching results, the ResultSet provided to this
<add> * method will be returned.
<add> *
<add> * This method is most useful when combined with results stored in a persistent cache.
<add> *
<add> * @param Cake\ORM\ResultSet $results The results this query should return.
<add> * @return Query The query instance.
<add> */
<add> public function setResult(ResultSet $results) {
<add> $this->_results = $results;
<add> return $this;
<add> }
<add>
<ide> /**
<ide> * Compiles the SQL representation of this query and executes it using the
<del> * provided connection object. Returns a ResultSet iterator object
<add> * provided connection object. Returns a ResultSet iterator object.
<add> *
<add> * If a result set was set using setResult() that ResultSet will be returned.
<ide> *
<ide> * Resulting object is traversable, so it can be used in any loop as you would
<ide> * with an array.
<ide> *
<ide> * @return Cake\ORM\ResultSet
<ide> */
<ide> public function execute() {
<add> if (isset($this->_results)) {
<add> return $this->_results;
<add> }
<ide> return new ResultSet($this, parent::execute());
<ide> }
<ide>
<ide><path>lib/Cake/Test/TestCase/ORM/QueryTest.php
<ide> use Cake\Core\Configure;
<ide> use Cake\Model\ConnectionManager;
<ide> use Cake\ORM\Query;
<add>use Cake\ORM\ResultSet;
<ide> use Cake\ORM\Table;
<ide>
<ide> /**
<ide> public function testFilteringByBelongsToMany() {
<ide> $this->assertEquals($expected, $results);
<ide> }
<ide>
<add>/**
<add> * Test setResult()
<add> *
<add> * @return void
<add> */
<add> public function testSetResult() {
<add> $query = new Query($this->connection);
<add> $stmt = $this->getMock('Cake\Database\StatementInterface');
<add> $results = new ResultSet($query, $stmt);
<add> $query->setResult($results);
<add> $this->assertSame($results, $query->execute());
<add> }
<add>
<ide> } | 2 |
Javascript | Javascript | add weekdaysmin (dd format) and tests | f47cb47a8990ccd731faa4d9b22413d1db995069 | <ide><path>lang/ca.js
<ide> monthsShort : "Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),
<ide> weekdays : "Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),
<ide> weekdaysShort : "Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),
<add> weekdaysMin : "Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),
<ide> longDateFormat : {
<ide> LT : "H:mm",
<ide> L : "DD/MM/YYYY",
<ide><path>lang/cv.js
<ide> monthsShort : "кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),
<ide> weekdays : "вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),
<ide> weekdaysShort : "выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),
<add> weekdaysMin : "вр_тн_ыт_юн_кç_эр_шм".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "DD-MM-YYYY",
<ide><path>lang/da.js
<ide> monthsShort : "Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),
<ide> weekdays : "Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),
<ide> weekdaysShort : "Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),
<add> weekdaysMin : "Sø_Ma_Ti_On_To_Fr_Lø".split("_"),
<ide> longDateFormat : {
<ide> LT : "h:mm A",
<ide> L : "DD/MM/YYYY",
<ide><path>lang/de.js
<ide> monthsShort : "Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),
<ide> weekdays : "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),
<ide> weekdaysShort : "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),
<add> weekdaysMin : "So_Mo_Di_Mi_Do_Fr_Sa".split("_"),
<ide> longDateFormat : {
<ide> LT: "H:mm U\\hr",
<ide> L : "DD.MM.YYYY",
<ide><path>lang/en-gb.js
<ide> monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
<ide> weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
<ide> weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
<add> weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
<ide> longDateFormat : {
<ide> LT : "h:mm A",
<ide> L : "DD/MM/YYYY",
<ide><path>lang/es.js
<ide> monthsShort : "Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),
<ide> weekdays : "Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),
<ide> weekdaysShort : "Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),
<add> weekdaysMin : "Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),
<ide> longDateFormat : {
<ide> LT : "H:mm",
<ide> L : "DD/MM/YYYY",
<ide><path>lang/eu.js
<ide> monthsShort : "urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),
<ide> weekdays : "igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),
<ide> weekdaysShort : "ig._al._ar._az._og._ol._lr.".split("_"),
<add> weekdaysMin : "Ig_Al_Ar_Az_Og_Ol_Lr".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "YYYY-MM-DD",
<ide><path>lang/fi.js
<ide> monthsShort : "tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),
<ide> weekdays : "sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),
<ide> weekdaysShort : "su_ma_ti_ke_to_pe_la".split("_"),
<add> weekdaysMin : "Su_Ma_Ti_Ke_To_Pe_La".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH.mm",
<ide> L : "DD.MM.YYYY",
<ide> if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
<ide> this.moment.lang('fi', lang);
<ide> }
<del>}());
<ide>\ No newline at end of file
<add>}());
<ide><path>lang/fr.js
<ide> monthsShort : "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),
<ide> weekdays : "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),
<ide> weekdaysShort : "dim._lun._mar._mer._jeu._ven._sam.".split("_"),
<add> weekdaysMin : "D_L_Ma_Me_J_V_S".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "DD/MM/YYYY",
<ide><path>lang/gl.js
<ide> monthsShort : "Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),
<ide> weekdays : "Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),
<ide> weekdaysShort : "Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),
<add> weekdaysMin : "Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),
<ide> longDateFormat : {
<ide> LT : "H:mm",
<ide> L : "DD/MM/YYYY",
<ide><path>lang/is.js
<ide> monthsShort : "jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),
<ide> weekdays : "sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),
<ide> weekdaysShort : "sun_mán_þri_mið_fim_fös_lau".split("_"),
<add> weekdaysMin : "Su_Má_Þr_Mi_Fi_Fö_La".split("_"),
<ide> longDateFormat : {
<ide> LT : "H:mm",
<ide> L : "DD/MM/YYYY",
<ide><path>lang/it.js
<ide> monthsShort : "Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),
<ide> weekdays : "Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),
<ide> weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
<del> longDateFormat : {
<add> weekdaysMin : "Do_Lu_Ma_Me_Gi_Ve_Sa".split("_"),
<add> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "DD/MM/YYYY",
<ide> LL : "D MMMM YYYY",
<ide><path>lang/jp.js
<ide> monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
<ide> weekdays : "日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),
<ide> weekdaysShort : "日_月_火_水_木_金_土".split("_"),
<add> weekdaysMin : "日_月_火_水_木_金_土".split("_"),
<ide> longDateFormat : {
<ide> LT : "Ah:mm",
<ide> L : "YYYY/MM/DD",
<ide><path>lang/kr.js
<ide> monthsShort : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),
<ide> weekdays : "일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),
<ide> weekdaysShort : "일_월_화_수_목_금_토".split("_"),
<add> weekdaysMin : "일_월_화_수_목_금_토".split("_"),
<ide> longDateFormat : {
<ide> LT : "A h시 mm분",
<ide> L : "YYYY.MM.DD",
<ide><path>lang/nb.js
<ide> monthsShort : "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),
<ide> weekdays : "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),
<ide> weekdaysShort : "søn_man_tir_ons_tor_fre_lør".split("_"),
<add> weekdaysMin : "Sø_Ma_Ti_On_To_Fr_Lø".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "YYYY-MM-DD",
<ide><path>lang/nl.js
<ide> monthsShort : "jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),
<ide> weekdays : "zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),
<ide> weekdaysShort : "zo._ma._di._wo._do._vr._za.".split("_"),
<del> longDateFormat : {
<add> weekdaysMin : "Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),
<add> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "DD-MM-YYYY",
<ide> LL : "D MMMM YYYY",
<ide><path>lang/pl.js
<ide> monthsShort : "sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),
<ide> weekdays : "niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),
<ide> weekdaysShort : "nie_pon_wt_śr_czw_pt_sb".split("_"),
<add> weekdaysMin : "N_Pn_Wt_Śr_Cz_Pt_So".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "DD-MM-YYYY",
<ide><path>lang/pt.js
<ide> monthsShort : "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),
<ide> weekdays : "Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),
<ide> weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),
<del> longDateFormat : {
<add> weekdaysMin : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),
<add> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "DD/MM/YYYY",
<ide> LL : "D \\de MMMM \\de YYYY",
<ide><path>lang/ru.js
<ide> monthsShort : "янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),
<ide> weekdays : "воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),
<ide> weekdaysShort : "вск_пнд_втр_срд_чтв_птн_суб".split("_"),
<add> weekdaysMin : "вс_пн_вт_ср_чт_пт_сб".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "DD-MM-YYYY",
<ide><path>lang/sv.js
<ide> monthsShort : "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),
<ide> weekdays : "söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),
<ide> weekdaysShort : "sön_mån_tis_ons_tor_fre_lör".split("_"),
<add> weekdaysMin : "Sö_Må_Ti_On_To_Fr_Lö".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "YYYY-MM-DD",
<ide><path>lang/tr.js
<ide> monthsShort : "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),
<ide> weekdays : "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),
<ide> weekdaysShort : "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),
<add> weekdaysMin : "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "DD.MM.YYYY",
<ide><path>lang/zh-cn.js
<ide> monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
<ide> weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
<ide> weekdaysShort : "周日_周一_周二_周三_周四_周五_周六".split("_"),
<add> weekdaysMin : "日_一_二_三_四_五_六".split("_"),
<ide> longDateFormat : {
<ide> LT : "Ah点mm",
<ide> L : "YYYY年MMMD日",
<ide><path>lang/zh-tw.js
<ide> monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
<ide> weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
<ide> weekdaysShort : "週日_週一_週二_週三_週四_週五_週六".split("_"),
<add> weekdaysMin : "日_一_二_三_四_五_六".split("_"),
<ide> longDateFormat : {
<ide> LT : "Ah點mm",
<ide> L : "YYYY年MMMD日",
<ide><path>min/lang-all.min.js
<ide> // moment.js language configuration
<ide> // language : catalan (ca)
<ide> // author : Juan G. Hurtado : https://github.com/juanghurtado
<del>(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})(),function(){var a={months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ",LLL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT",LLLL:"dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:"%sран",past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:function(a){return"-мĕш"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("cv",a)}(),function(){var a={months:"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),weekdays:"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),weekdaysShort:"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd D. MMMM, YYYY h:mm A"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"minut",mm:"%d minutter",h:"time",hh:"%d timer",d:"dag",dd:"%d dage",M:"månede",MM:"%d måneder",y:"år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("da",a)}(),function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)}(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)}(),function(){function c(a,b,c,e){var f="";switch(c){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"päivän":"päivä";case"dd":f=e?"päivän":"päivää";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=d(a,e)+" "+f,f}function d(c,d){return c<10?d?b[c]:a[c]:c}var a=["nolla","yksi","kaksi","kolme","neljä","viisi","kuusi","seitsemän","kahdeksan","yhdeksän"],b=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]],e={months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMMt\\a YYYY",LLL:"Do MMMMt\\a YYYY, klo LT",LLLL:"dddd, Do MMMMt\\a YYYY, klo LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=e),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fi",e)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)}(),function(){var a=function(a){return a%100==11?!0:a%10==1?!1:!0},b=function(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return c?"mínúta":"mínútu";case"mm":return a(b)?f+(c||e?"mínútur":"mínútum"):c?f+"mínúta":f+"mínútu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return a(b)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return a(b)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}},c={months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY kl. LT",LLLL:"dddd, D. MMMM YYYY kl. LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:b,m:b,mm:b,h:"klukkustund",hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("is",c)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah:mm",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 LT",LLLL:"YYYY年M月D日 dddd LT"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("jp",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a=[function(a){return a%10===1&&a%100!==11},function(a){return a%10>=2&&a%10<=4&&a%10%1===0&&(a%100<12||a%100>14)},function(a){return a%10===0||a%10>=5&&a%10<=9&&a%10%1===0||a%100>=11&&a%100<=14&&a%100%1===0},function(a){return!0}],b=function(b,c){var d=b.split("_"),e=Math.min(a.length,d.length),f=-1;while(++f<e)if(a[f](c))return d[f];return d[e-1]},c=function(a,c,d){var e={mm:"минута_минуты_минут_минуты",hh:"час_часа_часов_часа",dd:"день_дня_дней_дня",MM:"месяц_месяца_месяцев_месяца",yy:"год_года_лет_года"};return d==="m"?c?"минута":"минуту":a+" "+b(e[d],+a)},d={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:c,mm:c,h:"час",hh:c,d:"день",dd:c,M:"месяц",MM:c,y:"год",yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=d),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",d)}(),function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd[en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)}(),function(){var a={months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("tr",a)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-cn",a)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-tw",a)}();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})(),function(){var a={months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ",LLL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT",LLLL:"dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:"%sран",past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:function(a){return"-мĕш"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("cv",a)}(),function(){var a={months:"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),weekdays:"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),weekdaysShort:"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd D. MMMM, YYYY h:mm A"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"minut",mm:"%d minutter",h:"time",hh:"%d timer",d:"dag",dd:"%d dage",M:"månede",MM:"%d måneder",y:"år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("da",a)}(),function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)}(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"Ig_Al_Ar_Az_Og_Ol_Lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)}(),function(){function c(a,b,c,e){var f="";switch(c){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"päivän":"päivä";case"dd":f=e?"päivän":"päivää";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=d(a,e)+" "+f,f}function d(c,d){return c<10?d?b[c]:a[c]:c}var a=["nolla","yksi","kaksi","kolme","neljä","viisi","kuusi","seitsemän","kahdeksan","yhdeksän"],b=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]],e={months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"Su_Ma_Ti_Ke_To_Pe_La".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMMt\\a YYYY",LLL:"Do MMMMt\\a YYYY, klo LT",LLLL:"dddd, Do MMMMt\\a YYYY, klo LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=e),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fi",e)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"D_L_Ma_Me_J_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)}(),function(){var a=function(a){return a%100==11?!0:a%10==1?!1:!0},b=function(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return c?"mínúta":"mínútu";case"mm":return a(b)?f+(c||e?"mínútur":"mínútum"):c?f+"mínúta":f+"mínútu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return a(b)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return a(b)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}},c={months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY kl. LT",LLLL:"dddd, D. MMMM YYYY kl. LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:b,m:b,mm:b,h:"klukkustund",hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("is",c)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"Do_Lu_Ma_Me_Gi_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah:mm",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 LT",LLLL:"YYYY年M月D日 dddd LT"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("jp",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a=[function(a){return a%10===1&&a%100!==11},function(a){return a%10>=2&&a%10<=4&&a%10%1===0&&(a%100<12||a%100>14)},function(a){return a%10===0||a%10>=5&&a%10<=9&&a%10%1===0||a%100>=11&&a%100<=14&&a%100%1===0},function(a){return!0}],b=function(b,c){var d=b.split("_"),e=Math.min(a.length,d.length),f=-1;while(++f<e)if(a[f](c))return d[f];return d[e-1]},c=function(a,c,d){var e={mm:"минута_минуты_минут_минуты",hh:"час_часа_часов_часа",dd:"день_дня_дней_дня",MM:"месяц_месяца_месяцев_месяца",yy:"год_года_лет_года"};return d==="m"?c?"минута":"минуту":a+" "+b(e[d],+a)},d={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:c,mm:c,h:"час",hh:c,d:"день",dd:c,M:"месяц",MM:c,y:"год",yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=d),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",d)}(),function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"Sö_Må_Ti_On_To_Fr_Lö".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd[en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)}(),function(){var a={months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("tr",a)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-cn",a)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-tw",a)}();
<ide>\ No newline at end of file
<ide><path>min/lang/ca.js
<ide> // moment.js language configuration
<ide> // language : catalan (ca)
<ide> // author : Juan G. Hurtado : https://github.com/juanghurtado
<del>(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/cv.js
<ide> // moment.js language configuration
<ide> // language : chuvash (cv)
<ide> // author : Anatoly Mironov : https://github.com/mirontoli
<del>(function(){var a={months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ",LLL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT",LLLL:"dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:"%sран",past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:function(a){return"-мĕш"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("cv",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ",LLL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT",LLLL:"dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:"%sран",past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:function(a){return"-мĕш"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("cv",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/da.js
<ide> // moment.js language configuration
<ide> // language : danish (da)
<ide> // author : Ulrik Nielsen : https://github.com/mrbase
<del>(function(){var a={months:"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),weekdays:"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),weekdaysShort:"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd D. MMMM, YYYY h:mm A"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"minut",mm:"%d minutter",h:"time",hh:"%d timer",d:"dag",dd:"%d dage",M:"månede",MM:"%d måneder",y:"år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("da",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),weekdays:"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),weekdaysShort:"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd D. MMMM, YYYY h:mm A"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"minut",mm:"%d minutter",h:"time",hh:"%d timer",d:"dag",dd:"%d dage",M:"månede",MM:"%d måneder",y:"år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("da",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/de.js
<ide> // moment.js language configuration
<ide> // language : german (de)
<ide> // author : lluchs : https://github.com/lluchs
<del>(function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/en-gb.js
<ide> // moment.js language configuration
<ide> // language : great britain english (en-gb)
<ide> // author : Chris Gedrim : https://github.com/chrisgedrim
<del>(function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/es.js
<ide> // moment.js language configuration
<ide> // language : spanish (es)
<ide> // author : Julio Napurí : https://github.com/julionc
<del>(function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/eu.js
<ide> // moment.js language configuration
<ide> // language : euskara (eu)
<ide> // author : Eneko Illarramendi : https://github.com/eillarra
<del>(function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"Ig_Al_Ar_Az_Og_Ol_Lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/fi.js
<ide> // moment.js language configuration
<ide> // language : finnish (fi)
<ide> // author : Tarmo Aidantausta : https://github.com/bleadof
<del>(function(){function c(a,b,c,e){var f="";switch(c){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"päivän":"päivä";case"dd":f=e?"päivän":"päivää";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=d(a,e)+" "+f,f}function d(c,d){return c<10?d?b[c]:a[c]:c}var a=["nolla","yksi","kaksi","kolme","neljä","viisi","kuusi","seitsemän","kahdeksan","yhdeksän"],b=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]],e={months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMMt\\a YYYY",LLL:"Do MMMMt\\a YYYY, klo LT",LLLL:"dddd, Do MMMMt\\a YYYY, klo LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=e),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fi",e)})();
<ide>\ No newline at end of file
<add>(function(){function c(a,b,c,e){var f="";switch(c){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"päivän":"päivä";case"dd":f=e?"päivän":"päivää";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=d(a,e)+" "+f,f}function d(c,d){return c<10?d?b[c]:a[c]:c}var a=["nolla","yksi","kaksi","kolme","neljä","viisi","kuusi","seitsemän","kahdeksan","yhdeksän"],b=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]],e={months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"Su_Ma_Ti_Ke_To_Pe_La".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMMt\\a YYYY",LLL:"Do MMMMt\\a YYYY, klo LT",LLLL:"dddd, Do MMMMt\\a YYYY, klo LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=e),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fi",e)})();
<ide>\ No newline at end of file
<ide><path>min/lang/fr.js
<ide> // moment.js language configuration
<ide> // language : french (fr)
<ide> // author : John Fischer : https://github.com/jfroffice
<del>(function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"D_L_Ma_Me_J_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/gl.js
<ide> // moment.js language configuration
<ide> // language : galician (gl)
<ide> // author : Juan G. Hurtado : https://github.com/juanghurtado
<del>(function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/is.js
<ide> // moment.js language configuration
<ide> // language : icelandic (is)
<ide> // author : Hinrik Örn Sigurðsson : https://github.com/hinrik
<del>(function(){var a=function(a){return a%100==11?!0:a%10==1?!1:!0},b=function(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return c?"mínúta":"mínútu";case"mm":return a(b)?f+(c||e?"mínútur":"mínútum"):c?f+"mínúta":f+"mínútu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return a(b)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return a(b)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}},c={months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY kl. LT",LLLL:"dddd, D. MMMM YYYY kl. LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:b,m:b,mm:b,h:"klukkustund",hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("is",c)})();
<ide>\ No newline at end of file
<add>(function(){var a=function(a){return a%100==11?!0:a%10==1?!1:!0},b=function(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return c?"mínúta":"mínútu";case"mm":return a(b)?f+(c||e?"mínútur":"mínútum"):c?f+"mínúta":f+"mínútu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return a(b)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return a(b)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}},c={months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY kl. LT",LLLL:"dddd, D. MMMM YYYY kl. LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:b,m:b,mm:b,h:"klukkustund",hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("is",c)})();
<ide>\ No newline at end of file
<ide><path>min/lang/it.js
<ide> // moment.js language configuration
<ide> // language : italian (it)
<ide> // author : Lorenzo : https://github.com/aliem
<del>(function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"Do_Lu_Ma_Me_Gi_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/jp.js
<ide> // moment.js language configuration
<ide> // language : japanese (jp)
<ide> // author : LI Long : https://github.com/baryon
<del>(function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah:mm",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 LT",LLLL:"YYYY年M月D日 dddd LT"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("jp",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah:mm",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 LT",LLLL:"YYYY年M月D日 dddd LT"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("jp",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/kr.js
<ide> // moment.js language configuration
<ide> // language : korean (kr)
<ide> // author : Kyungwook, Park : https://github.com/kyungw00k
<del>(function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/nb.js
<ide> // moment.js language configuration
<ide> // language : norwegian bokmål (nb)
<ide> // author : Espen Hovlandsdal : https://github.com/rexxars
<del>(function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/nl.js
<ide> // moment.js language configuration
<ide> // language : dutch (nl)
<ide> // author : Joris Röling : https://github.com/jjupiter
<del>(function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/pl.js
<ide> // moment.js language configuration
<ide> // language : polish (pl)
<ide> // author : Rafal Hirsz : https://github.com/evoL
<del>(function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)})();
<ide>\ No newline at end of file
<add>(function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)})();
<ide>\ No newline at end of file
<ide><path>min/lang/pt.js
<ide> // moment.js language configuration
<ide> // language : portuguese (pt)
<ide> // author : Jefferson : https://github.com/jalex79
<del>(function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/ru.js
<ide> // moment.js language configuration
<ide> // language : russian (ru)
<ide> // author : Viktorminator : https://github.com/Viktorminator
<del>(function(){var a=[function(a){return a%10===1&&a%100!==11},function(a){return a%10>=2&&a%10<=4&&a%10%1===0&&(a%100<12||a%100>14)},function(a){return a%10===0||a%10>=5&&a%10<=9&&a%10%1===0||a%100>=11&&a%100<=14&&a%100%1===0},function(a){return!0}],b=function(b,c){var d=b.split("_"),e=Math.min(a.length,d.length),f=-1;while(++f<e)if(a[f](c))return d[f];return d[e-1]},c=function(a,c,d){var e={mm:"минута_минуты_минут_минуты",hh:"час_часа_часов_часа",dd:"день_дня_дней_дня",MM:"месяц_месяца_месяцев_месяца",yy:"год_года_лет_года"};return d==="m"?c?"минута":"минуту":a+" "+b(e[d],+a)},d={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:c,mm:c,h:"час",hh:c,d:"день",dd:c,M:"месяц",MM:c,y:"год",yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=d),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",d)})();
<ide>\ No newline at end of file
<add>(function(){var a=[function(a){return a%10===1&&a%100!==11},function(a){return a%10>=2&&a%10<=4&&a%10%1===0&&(a%100<12||a%100>14)},function(a){return a%10===0||a%10>=5&&a%10<=9&&a%10%1===0||a%100>=11&&a%100<=14&&a%100%1===0},function(a){return!0}],b=function(b,c){var d=b.split("_"),e=Math.min(a.length,d.length),f=-1;while(++f<e)if(a[f](c))return d[f];return d[e-1]},c=function(a,c,d){var e={mm:"минута_минуты_минут_минуты",hh:"час_часа_часов_часа",dd:"день_дня_дней_дня",MM:"месяц_месяца_месяцев_месяца",yy:"год_года_лет_года"};return d==="m"?c?"минута":"минуту":a+" "+b(e[d],+a)},d={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:c,mm:c,h:"час",hh:c,d:"день",dd:c,M:"месяц",MM:c,y:"год",yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=d),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",d)})();
<ide>\ No newline at end of file
<ide><path>min/lang/sv.js
<ide> // moment.js language configuration
<ide> // language : swedish (sv)
<ide> // author : Jens Alm : https://github.com/ulmus
<del>(function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd[en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"Sö_Må_Ti_On_To_Fr_Lö".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd[en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/tr.js
<ide> // moment.js language configuration
<ide> // language : turkish (tr)
<ide> // author : Erhan Gundogan : https://github.com/erhangundogan
<del>(function(){var a={months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("tr",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("tr",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/zh-cn.js
<ide> // moment.js language configuration
<ide> // language : chinese
<ide> // author : suupic : https://github.com/suupic
<del>(function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-cn",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-cn",a)})();
<ide>\ No newline at end of file
<ide><path>min/lang/zh-tw.js
<ide> // moment.js language configuration
<ide> // language : traditional chinese (zh-tw)
<ide> // author : Ben : https://github.com/ben-lin
<del>(function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-tw",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-tw",a)})();
<ide>\ No newline at end of file
<ide><path>min/moment.min.js
<ide> // author : Tim Wood
<ide> // license : MIT
<ide> // momentjs.com
<del>(function(a,b){function A(a,b){this._d=a,this._isUTC=!!b}function B(a){return a<0?Math.ceil(a):Math.floor(a)}function C(a){var b=this._data={},c=a.years||a.y||0,d=a.months||a.M||0,e=a.weeks||a.w||0,f=a.days||a.d||0,g=a.hours||a.h||0,h=a.minutes||a.m||0,i=a.seconds||a.s||0,j=a.milliseconds||a.ms||0;this._milliseconds=j+i*1e3+h*6e4+g*36e5,this._days=f+e*7,this._months=d+c*12,b.milliseconds=j%1e3,i+=B(j/1e3),b.seconds=i%60,h+=B(i/60),b.minutes=h%60,g+=B(h/60),b.hours=g%24,f+=B(g/24),f+=e*7,b.days=f%30,d+=B(f/30),b.months=d%12,c+=B(d/12),b.years=c}function D(a,b){var c=a+"";while(c.length<b)c="0"+c;return c}function E(a,b,c){var d=b._milliseconds,e=b._days,f=b._months,g;d&&a._d.setTime(+a+d*c),e&&a.date(a.date()+e*c),f&&(g=a.date(),a.date(1).month(a.month()+f*c).date(Math.min(g,a.daysInMonth())))}function F(a){return Object.prototype.toString.call(a)==="[object Array]"}function G(b){return new a(b[0],b[1]||0,b[2]||1,b[3]||0,b[4]||0,b[5]||0,b[6]||0)}function H(b,d){function q(d){var l,r;switch(d){case"M":return e+1;case"Mo":return e+1+o(e+1);case"MM":return D(e+1,2);case"MMM":return c.monthsShort[e];case"MMMM":return c.months[e];case"D":return f;case"Do":return f+o(f);case"DD":return D(f,2);case"DDD":return l=new a(g,e,f),r=new a(g,0,1),~~((l-r)/864e5+1.5);case"DDDo":return l=q("DDD"),l+o(l);case"DDDD":return D(q("DDD"),3);case"d":return h;case"do":return h+o(h);case"ddd":return c.weekdaysShort[h];case"dddd":return c.weekdays[h];case"w":return l=new a(g,e,f-h+5),r=new a(l.getFullYear(),0,4),~~((l-r)/864e5/7+1.5);case"wo":return l=q("w"),l+o(l);case"ww":return D(q("w"),2);case"YY":return D(g%100,2);case"YYYY":return g;case"a":return p?p(i,j,!1):i>11?"pm":"am";case"A":return p?p(i,j,!0):i>11?"PM":"AM";case"H":return i;case"HH":return D(i,2);case"h":return i%12||12;case"hh":return D(i%12||12,2);case"m":return j;case"mm":return D(j,2);case"s":return k;case"ss":return D(k,2);case"S":return~~(m/100);case"SS":return D(~~(m/10),2);case"SSS":return D(m,3);case"Z":return(n<0?"-":"+")+D(~~(Math.abs(n)/60),2)+":"+D(~~(Math.abs(n)%60),2);case"ZZ":return(n<0?"-":"+")+D(~~(10*Math.abs(n)/6),4);case"L":case"LL":case"LLL":case"LLLL":case"LT":return H(b,c.longDateFormat[d]);default:return d.replace(/(^\[)|(\\)|\]$/g,"")}}var e=b.month(),f=b.date(),g=b.year(),h=b.day(),i=b.hours(),j=b.minutes(),k=b.seconds(),m=b.milliseconds(),n=-b.zone(),o=c.ordinal,p=c.meridiem;return d.replace(l,q)}function I(a){switch(a){case"DDDD":return p;case"YYYY":return q;case"S":case"SS":case"SSS":case"DDD":return o;case"MMM":case"MMMM":case"ddd":case"dddd":case"a":case"A":return r;case"Z":case"ZZ":return s;case"T":return t;case"MM":case"DD":case"dd":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return n;default:return new RegExp(a.replace("\\",""))}}function J(a,b,d,e){var f;switch(a){case"M":case"MM":d[1]=b==null?0:~~b-1;break;case"MMM":case"MMMM":for(f=0;f<12;f++)if(c.monthsParse[f].test(b)){d[1]=f;break}break;case"D":case"DD":case"DDD":case"DDDD":d[2]=~~b;break;case"YY":b=~~b,d[0]=b+(b>70?1900:2e3);break;case"YYYY":d[0]=~~Math.abs(b);break;case"a":case"A":e.isPm=(b+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":d[3]=~~b;break;case"m":case"mm":d[4]=~~b;break;case"s":case"ss":d[5]=~~b;break;case"S":case"SS":case"SSS":d[6]=~~(("0."+b)*1e3);break;case"Z":case"ZZ":e.isUTC=!0,f=(b+"").match(x),f&&f[1]&&(e.tzh=~~f[1]),f&&f[2]&&(e.tzm=~~f[2]),f&&f[0]==="+"&&(e.tzh=-e.tzh,e.tzm=-e.tzm)}}function K(b,c){var d=[0,0,1,0,0,0,0],e={tzh:0,tzm:0},f=c.match(l),g,h;for(g=0;g<f.length;g++)h=(I(f[g]).exec(b)||[])[0],b=b.replace(I(f[g]),""),J(f[g],h,d,e);return e.isPm&&d[3]<12&&(d[3]+=12),e.isPm===!1&&d[3]===12&&(d[3]=0),d[3]+=e.tzh,d[4]+=e.tzm,e.isUTC?new a(a.UTC.apply({},d)):G(d)}function L(a,b){var c=Math.min(a.length,b.length),d=Math.abs(a.length-b.length),e=0,f;for(f=0;f<c;f++)~~a[f]!==~~b[f]&&e++;return e+d}function M(a,b){var c,d=a.match(m)||[],e,f=99,g,h,i;for(g=0;g<b.length;g++)h=K(a,b[g]),e=H(new A(h),b[g]).match(m)||[],i=L(d,e),i<f&&(f=i,c=h);return c}function N(b){var c="YYYY-MM-DDT",d;if(u.exec(b)){for(d=0;d<4;d++)if(w[d][1].exec(b)){c+=w[d][0];break}return s.exec(b)?K(b,c+" Z"):K(b,c)}return new a(b)}function O(a,b,d,e){var f=c.relativeTime[a];return typeof f=="function"?f(b||1,!!d,a,e):f.replace(/%d/i,b||1)}function P(a,b){var c=e(Math.abs(a)/1e3),d=e(c/60),f=e(d/60),g=e(f/24),h=e(g/365),i=c<45&&["s",c]||d===1&&["m"]||d<45&&["mm",d]||f===1&&["h"]||f<22&&["hh",f]||g===1&&["d"]||g<=25&&["dd",g]||g<=45&&["M"]||g<345&&["MM",e(g/30)]||h===1&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,O.apply({},i)}function Q(a,b){c.fn[a]=function(a){var c=this._isUTC?"UTC":"";return a!=null?(this._d["set"+c+b](a),this):this._d["get"+c+b]()}}function R(a){c.duration.fn[a]=function(){return this._data[a]}}function S(a,b){c.duration.fn["as"+a]=function(){return+this/b}}var c,d="1.6.2",e=Math.round,f,g={},h="en",i=typeof module!="undefined",j="months|monthsShort|monthsParse|weekdays|weekdaysShort|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),k=/^\/?Date\((\-?\d+)/i,l=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|LT|LL?L?L?)/g,m=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,n=/\d\d?/,o=/\d{1,3}/,p=/\d{3}/,q=/\d{4}/,r=/[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i,s=/Z|[\+\-]\d\d:?\d\d/i,t=/T/i,u=/^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,v="YYYY-MM-DDTHH:mm:ssZ",w=[["HH:mm:ss.S",/T\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/T\d\d:\d\d:\d\d/],["HH:mm",/T\d\d:\d\d/],["HH",/T\d\d/]],x=/([\+\-]|\d\d)/gi,y="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),z={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6};c=function(d,e){if(d===null||d==="")return null;var f,g,h;return c.isMoment(d)?(f=new a(+d._d),h=d._isUTC):e?F(e)?f=M(d,e):f=K(d,e):(g=k.exec(d),f=d===b?new a:g?new a(+g[1]):d instanceof a?d:F(d)?G(d):typeof d=="string"?N(d):new a(d)),new A(f,h)},c.utc=function(b,d){return F(b)?new A(new a(a.UTC.apply({},b)),!0):d&&b?c(b+" +0000",d+" Z").utc():c(b&&!s.exec(b)?b+"+0000":b).utc()},c.unix=function(a){return c(a*1e3)},c.duration=function(a,b){var d=c.isDuration(a),e=typeof a=="number",f=d?a._data:e?{}:a;return e&&(b?f[b]=a:f.milliseconds=a),new C(f)},c.humanizeDuration=function(a,b,d){return c.duration(a,b===!0?null:b).humanize(b===!0?!0:d)},c.version=d,c.defaultFormat=v,c.lang=function(a,b){var d,e,f=[];if(!a)return h;if(b){for(d=0;d<12;d++)f[d]=new RegExp("^"+b.months[d]+"|^"+b.monthsShort[d].replace(".",""),"i");b.monthsParse=b.monthsParse||f,g[a]=b}if(g[a]){for(d=0;d<j.length;d++)c[j[d]]=g[a][j[d]]||g.en[j[d]];h=a}else i&&(e=require("./lang/"+a),c.lang(a,e))},c.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},meridiem:!1,calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),c.isMoment=function(a){return a instanceof A},c.isDuration=function(a){return a instanceof C},c.fn=A.prototype={clone:function(){return c(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this._d.toString()},toDate:function(){return this._d},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(a){return H(this,a?a:c.defaultFormat)},add:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return E(this,d,1),this},subtract:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return E(this,d,-1),this},diff:function(a,b,d){var f=this._isUTC?c(a).utc():c(a).local(),g=(this.zone()-f.zone())*6e4,h=this._d-f._d-g,i=this.year()-f.year(),j=this.month()-f.month(),k=this.date()-f.date(),l;return b==="months"?l=i*12+j+k/30:b==="years"?l=i+(j+k/30)/12:l=b==="seconds"?h/1e3:b==="minutes"?h/6e4:b==="hours"?h/36e5:b==="days"?h/864e5:b==="weeks"?h/6048e5:h,d?l:e(l)},from:function(a,b){return c.duration(this.diff(a)).humanize(!b)},fromNow:function(a){return this.from(c(),a)},calendar:function(){var a=this.diff(c().sod(),"days",!0),b=c.calendar,d=b.sameElse,e=a<-6?d:a<-1?b.lastWeek:a<0?b.lastDay:a<1?b.sameDay:a<2?b.nextDay:a<7?b.nextWeek:d;return this.format(typeof e=="function"?e.apply(this):e)},isLeapYear:function(){var a=this.year();return a%4===0&&a%100!==0||a%400===0},isDST:function(){return this.zone()<c([this.year()]).zone()||this.zone()<c([this.year(),5]).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return a==null?b:this.add({d:a-b})},startOf:function(a){var b=this.clone();switch(a){case"year":b.month(0);case"month":b.date(1);case"day":b.hours(0);case"hour":b.minutes(0);case"minute":b.seconds(0);case"second":b.milliseconds(0)}return b},endOf:function(a){return this.startOf(a).add(a+"s",1).subtract("milliseconds",1)},sod:function(){return this.startOf("day")},eod:function(){return this.endOf("day")},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return c.utc([this.year(),this.month()+1,0]).date()}};for(f=0;f<y.length;f++)Q(y[f].toLowerCase(),y[f]);Q("year","FullYear"),c.duration.fn=C.prototype={weeks:function(){return B(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months*2592e6},humanize:function(a){var b=+this,d=c.relativeTime,e=P(b,!a);return a&&(e=(b<=0?d.past:d.future).replace(/%s/i,e)),e}};for(f in z)z.hasOwnProperty(f)&&(S(f,z[f]),R(f.toLowerCase()));S("Weeks",6048e5),i&&(module.exports=c),typeof window!="undefined"&&typeof ender=="undefined"&&(window.moment=c),typeof define=="function"&&define.amd&&define("moment",[],function(){return c})})(Date);
<ide>\ No newline at end of file
<add>(function(a,b){function A(a,b){this._d=a,this._isUTC=!!b}function B(a){return a<0?Math.ceil(a):Math.floor(a)}function C(a){var b=this._data={},c=a.years||a.y||0,d=a.months||a.M||0,e=a.weeks||a.w||0,f=a.days||a.d||0,g=a.hours||a.h||0,h=a.minutes||a.m||0,i=a.seconds||a.s||0,j=a.milliseconds||a.ms||0;this._milliseconds=j+i*1e3+h*6e4+g*36e5,this._days=f+e*7,this._months=d+c*12,b.milliseconds=j%1e3,i+=B(j/1e3),b.seconds=i%60,h+=B(i/60),b.minutes=h%60,g+=B(h/60),b.hours=g%24,f+=B(g/24),f+=e*7,b.days=f%30,d+=B(f/30),b.months=d%12,c+=B(d/12),b.years=c}function D(a,b){var c=a+"";while(c.length<b)c="0"+c;return c}function E(a,b,c){var d=b._milliseconds,e=b._days,f=b._months,g;d&&a._d.setTime(+a+d*c),e&&a.date(a.date()+e*c),f&&(g=a.date(),a.date(1).month(a.month()+f*c).date(Math.min(g,a.daysInMonth())))}function F(a){return Object.prototype.toString.call(a)==="[object Array]"}function G(b){return new a(b[0],b[1]||0,b[2]||1,b[3]||0,b[4]||0,b[5]||0,b[6]||0)}function H(b,d){function q(d){var l,r;switch(d){case"M":return e+1;case"Mo":return e+1+o(e+1);case"MM":return D(e+1,2);case"MMM":return c.monthsShort[e];case"MMMM":return c.months[e];case"D":return f;case"Do":return f+o(f);case"DD":return D(f,2);case"DDD":return l=new a(g,e,f),r=new a(g,0,1),~~((l-r)/864e5+1.5);case"DDDo":return l=q("DDD"),l+o(l);case"DDDD":return D(q("DDD"),3);case"d":return h;case"dd":return c.weekdaysMin[h];case"do":return h+o(h);case"ddd":return c.weekdaysShort[h];case"dddd":return c.weekdays[h];case"w":return l=new a(g,e,f-h+5),r=new a(l.getFullYear(),0,4),~~((l-r)/864e5/7+1.5);case"wo":return l=q("w"),l+o(l);case"ww":return D(q("w"),2);case"YY":return D(g%100,2);case"YYYY":return g;case"a":return p?p(i,j,!1):i>11?"pm":"am";case"A":return p?p(i,j,!0):i>11?"PM":"AM";case"H":return i;case"HH":return D(i,2);case"h":return i%12||12;case"hh":return D(i%12||12,2);case"m":return j;case"mm":return D(j,2);case"s":return k;case"ss":return D(k,2);case"S":return~~(m/100);case"SS":return D(~~(m/10),2);case"SSS":return D(m,3);case"Z":return(n<0?"-":"+")+D(~~(Math.abs(n)/60),2)+":"+D(~~(Math.abs(n)%60),2);case"ZZ":return(n<0?"-":"+")+D(~~(10*Math.abs(n)/6),4);case"L":case"LL":case"LLL":case"LLLL":case"LT":return H(b,c.longDateFormat[d]);default:return d.replace(/(^\[)|(\\)|\]$/g,"")}}var e=b.month(),f=b.date(),g=b.year(),h=b.day(),i=b.hours(),j=b.minutes(),k=b.seconds(),m=b.milliseconds(),n=-b.zone(),o=c.ordinal,p=c.meridiem;return d.replace(l,q)}function I(a){switch(a){case"DDDD":return p;case"YYYY":return q;case"S":case"SS":case"SSS":case"DDD":return o;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":case"a":case"A":return r;case"Z":case"ZZ":return s;case"T":return t;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return n;default:return new RegExp(a.replace("\\",""))}}function J(a,b,d,e){var f;switch(a){case"M":case"MM":d[1]=b==null?0:~~b-1;break;case"MMM":case"MMMM":for(f=0;f<12;f++)if(c.monthsParse[f].test(b)){d[1]=f;break}break;case"D":case"DD":case"DDD":case"DDDD":d[2]=~~b;break;case"YY":b=~~b,d[0]=b+(b>70?1900:2e3);break;case"YYYY":d[0]=~~Math.abs(b);break;case"a":case"A":e.isPm=(b+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":d[3]=~~b;break;case"m":case"mm":d[4]=~~b;break;case"s":case"ss":d[5]=~~b;break;case"S":case"SS":case"SSS":d[6]=~~(("0."+b)*1e3);break;case"Z":case"ZZ":e.isUTC=!0,f=(b+"").match(x),f&&f[1]&&(e.tzh=~~f[1]),f&&f[2]&&(e.tzm=~~f[2]),f&&f[0]==="+"&&(e.tzh=-e.tzh,e.tzm=-e.tzm)}}function K(b,c){var d=[0,0,1,0,0,0,0],e={tzh:0,tzm:0},f=c.match(l),g,h;for(g=0;g<f.length;g++)h=(I(f[g]).exec(b)||[])[0],b=b.replace(I(f[g]),""),J(f[g],h,d,e);return e.isPm&&d[3]<12&&(d[3]+=12),e.isPm===!1&&d[3]===12&&(d[3]=0),d[3]+=e.tzh,d[4]+=e.tzm,e.isUTC?new a(a.UTC.apply({},d)):G(d)}function L(a,b){var c=Math.min(a.length,b.length),d=Math.abs(a.length-b.length),e=0,f;for(f=0;f<c;f++)~~a[f]!==~~b[f]&&e++;return e+d}function M(a,b){var c,d=a.match(m)||[],e,f=99,g,h,i;for(g=0;g<b.length;g++)h=K(a,b[g]),e=H(new A(h),b[g]).match(m)||[],i=L(d,e),i<f&&(f=i,c=h);return c}function N(b){var c="YYYY-MM-DDT",d;if(u.exec(b)){for(d=0;d<4;d++)if(w[d][1].exec(b)){c+=w[d][0];break}return s.exec(b)?K(b,c+" Z"):K(b,c)}return new a(b)}function O(a,b,d,e){var f=c.relativeTime[a];return typeof f=="function"?f(b||1,!!d,a,e):f.replace(/%d/i,b||1)}function P(a,b){var c=e(Math.abs(a)/1e3),d=e(c/60),f=e(d/60),g=e(f/24),h=e(g/365),i=c<45&&["s",c]||d===1&&["m"]||d<45&&["mm",d]||f===1&&["h"]||f<22&&["hh",f]||g===1&&["d"]||g<=25&&["dd",g]||g<=45&&["M"]||g<345&&["MM",e(g/30)]||h===1&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,O.apply({},i)}function Q(a,b){c.fn[a]=function(a){var c=this._isUTC?"UTC":"";return a!=null?(this._d["set"+c+b](a),this):this._d["get"+c+b]()}}function R(a){c.duration.fn[a]=function(){return this._data[a]}}function S(a,b){c.duration.fn["as"+a]=function(){return+this/b}}var c,d="1.6.2",e=Math.round,f,g={},h="en",i=typeof module!="undefined",j="months|monthsShort|monthsParse|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),k=/^\/?Date\((\-?\d+)/i,l=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|LT|LL?L?L?)/g,m=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,n=/\d\d?/,o=/\d{1,3}/,p=/\d{3}/,q=/\d{4}/,r=/[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i,s=/Z|[\+\-]\d\d:?\d\d/i,t=/T/i,u=/^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,v="YYYY-MM-DDTHH:mm:ssZ",w=[["HH:mm:ss.S",/T\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/T\d\d:\d\d:\d\d/],["HH:mm",/T\d\d:\d\d/],["HH",/T\d\d/]],x=/([\+\-]|\d\d)/gi,y="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),z={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6};c=function(d,e){if(d===null||d==="")return null;var f,g,h;return c.isMoment(d)?(f=new a(+d._d),h=d._isUTC):e?F(e)?f=M(d,e):f=K(d,e):(g=k.exec(d),f=d===b?new a:g?new a(+g[1]):d instanceof a?d:F(d)?G(d):typeof d=="string"?N(d):new a(d)),new A(f,h)},c.utc=function(b,d){return F(b)?new A(new a(a.UTC.apply({},b)),!0):d&&b?c(b+" +0000",d+" Z").utc():c(b&&!s.exec(b)?b+"+0000":b).utc()},c.unix=function(a){return c(a*1e3)},c.duration=function(a,b){var d=c.isDuration(a),e=typeof a=="number",f=d?a._data:e?{}:a;return e&&(b?f[b]=a:f.milliseconds=a),new C(f)},c.humanizeDuration=function(a,b,d){return c.duration(a,b===!0?null:b).humanize(b===!0?!0:d)},c.version=d,c.defaultFormat=v,c.lang=function(a,b){var d,e,f=[];if(!a)return h;if(b){for(d=0;d<12;d++)f[d]=new RegExp("^"+b.months[d]+"|^"+b.monthsShort[d].replace(".",""),"i");b.monthsParse=b.monthsParse||f,g[a]=b}if(g[a]){for(d=0;d<j.length;d++)c[j[d]]=g[a][j[d]]||g.en[j[d]];h=a}else i&&(e=require("./lang/"+a),c.lang(a,e))},c.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},meridiem:!1,calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),c.isMoment=function(a){return a instanceof A},c.isDuration=function(a){return a instanceof C},c.fn=A.prototype={clone:function(){return c(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this._d.toString()},toDate:function(){return this._d},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(a){return H(this,a?a:c.defaultFormat)},add:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return E(this,d,1),this},subtract:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return E(this,d,-1),this},diff:function(a,b,d){var f=this._isUTC?c(a).utc():c(a).local(),g=(this.zone()-f.zone())*6e4,h=this._d-f._d-g,i=this.year()-f.year(),j=this.month()-f.month(),k=this.date()-f.date(),l;return b==="months"?l=i*12+j+k/30:b==="years"?l=i+(j+k/30)/12:l=b==="seconds"?h/1e3:b==="minutes"?h/6e4:b==="hours"?h/36e5:b==="days"?h/864e5:b==="weeks"?h/6048e5:h,d?l:e(l)},from:function(a,b){return c.duration(this.diff(a)).humanize(!b)},fromNow:function(a){return this.from(c(),a)},calendar:function(){var a=this.diff(c().sod(),"days",!0),b=c.calendar,d=b.sameElse,e=a<-6?d:a<-1?b.lastWeek:a<0?b.lastDay:a<1?b.sameDay:a<2?b.nextDay:a<7?b.nextWeek:d;return this.format(typeof e=="function"?e.apply(this):e)},isLeapYear:function(){var a=this.year();return a%4===0&&a%100!==0||a%400===0},isDST:function(){return this.zone()<c([this.year()]).zone()||this.zone()<c([this.year(),5]).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return a==null?b:this.add({d:a-b})},startOf:function(a){var b=this.clone();switch(a){case"year":b.month(0);case"month":b.date(1);case"day":b.hours(0);case"hour":b.minutes(0);case"minute":b.seconds(0);case"second":b.milliseconds(0)}return b},endOf:function(a){return this.startOf(a).add(a+"s",1).subtract("milliseconds",1)},sod:function(){return this.startOf("day")},eod:function(){return this.endOf("day")},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return c.utc([this.year(),this.month()+1,0]).date()}};for(f=0;f<y.length;f++)Q(y[f].toLowerCase(),y[f]);Q("year","FullYear"),c.duration.fn=C.prototype={weeks:function(){return B(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months*2592e6},humanize:function(a){var b=+this,d=c.relativeTime,e=P(b,!a);return a&&(e=(b<=0?d.past:d.future).replace(/%s/i,e)),e}};for(f in z)z.hasOwnProperty(f)&&(S(f,z[f]),R(f.toLowerCase()));S("Weeks",6048e5),i&&(module.exports=c),typeof window!="undefined"&&typeof ender=="undefined"&&(window.moment=c),typeof define=="function"&&define.amd&&define("moment",[],function(){return c})})(Date);
<ide>\ No newline at end of file
<ide><path>min/moment.min.pretty.js
<ide> return D(q("DDD"), 3);
<ide> case "d":
<ide> return h;
<add> case "dd":
<add> return c.weekdaysMin[h];
<ide> case "do":
<ide> return h + o(h);
<ide> case "ddd":
<ide> return o;
<ide> case "MMM":
<ide> case "MMMM":
<add> case "dd":
<ide> case "ddd":
<ide> case "dddd":
<ide> case "a":
<ide> return t;
<ide> case "MM":
<ide> case "DD":
<del> case "dd":
<ide> case "YY":
<ide> case "HH":
<ide> case "hh":
<ide> return +this / b;
<ide> };
<ide> }
<del> var c, d = "1.6.2", e = Math.round, f, g = {}, h = "en", i = typeof module != "undefined", j = "months|monthsShort|monthsParse|weekdays|weekdaysShort|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"), k = /^\/?Date\((\-?\d+)/i, l = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|LT|LL?L?L?)/g, m = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi, n = /\d\d?/, o = /\d{1,3}/, p = /\d{3}/, q = /\d{4}/, r = /[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i, s = /Z|[\+\-]\d\d:?\d\d/i, t = /T/i, u = /^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/, v = "YYYY-MM-DDTHH:mm:ssZ", w = [ [ "HH:mm:ss.S", /T\d\d:\d\d:\d\d\.\d{1,3}/ ], [ "HH:mm:ss", /T\d\d:\d\d:\d\d/ ], [ "HH:mm", /T\d\d:\d\d/ ], [ "HH", /T\d\d/ ] ], x = /([\+\-]|\d\d)/gi, y = "Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"), z = {
<add> var c, d = "1.6.2", e = Math.round, f, g = {}, h = "en", i = typeof module != "undefined", j = "months|monthsShort|monthsParse|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"), k = /^\/?Date\((\-?\d+)/i, l = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|LT|LL?L?L?)/g, m = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi, n = /\d\d?/, o = /\d{1,3}/, p = /\d{3}/, q = /\d{4}/, r = /[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i, s = /Z|[\+\-]\d\d:?\d\d/i, t = /T/i, u = /^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/, v = "YYYY-MM-DDTHH:mm:ssZ", w = [ [ "HH:mm:ss.S", /T\d\d:\d\d:\d\d\.\d{1,3}/ ], [ "HH:mm:ss", /T\d\d:\d\d:\d\d/ ], [ "HH:mm", /T\d\d:\d\d/ ], [ "HH", /T\d\d/ ] ], x = /([\+\-]|\d\d)/gi, y = "Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"), z = {
<ide> Milliseconds: 1,
<ide> Seconds: 1e3,
<ide> Minutes: 6e4,
<ide> monthsShort: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
<ide> weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
<ide> weekdaysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
<add> weekdaysMin: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
<ide> longDateFormat: {
<ide> LT: "h:mm A",
<ide> L: "MM/DD/YYYY",
<ide><path>moment.js
<ide> hasModule = (typeof module !== 'undefined'),
<ide>
<ide> // parameters to check for on the lang config
<del> langConfigProperties = 'months|monthsShort|monthsParse|weekdays|weekdaysShort|longDateFormat|calendar|relativeTime|ordinal|meridiem'.split('|'),
<add> langConfigProperties = 'months|monthsShort|monthsParse|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem'.split('|'),
<ide>
<ide> // ASP.NET json date format regex
<ide> aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
<ide>
<ide> // format tokens
<del> formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|LT|LL?L?L?)/g,
<add> formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|LT|LL?L?L?)/g,
<ide>
<ide> // parsing tokens
<ide> parseMultipleFormatChunker = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,
<ide> // WEEKDAY
<ide> case 'd' :
<ide> return currentDay;
<add> case 'dd' :
<add> return moment.weekdaysMin[currentDay];
<ide> case 'do' :
<ide> return currentDay + ordinal(currentDay);
<ide> case 'ddd' :
<ide> return parseTokenOneToThreeDigits;
<ide> case 'MMM':
<ide> case 'MMMM':
<add> case 'dd':
<ide> case 'ddd':
<ide> case 'dddd':
<ide> case 'a':
<ide> return parseTokenT;
<ide> case 'MM':
<ide> case 'DD':
<del> case 'dd':
<ide> case 'YY':
<ide> case 'HH':
<ide> case 'hh':
<ide> monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
<ide> weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
<ide> weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
<add> weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
<ide> longDateFormat : {
<ide> LT : "h:mm A",
<ide> L : "MM/DD/YYYY",
<ide><path>test/lang/ca.js
<ide> exports["lang:ca"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('ca');
<del> var expected = "Diumenge Dg._Dilluns Dl._Dimarts Dt._Dimecres Dc._Dijous Dj._Divendres Dv._Dissabte Ds.".split("_");
<add> var expected = "Diumenge Dg. Dg_Dilluns Dl. Dl_Dimarts Dt. Dt_Dimecres Dc. Dc_Dijous Dj. Dj_Divendres Dv. Dv_Dissabte Ds. Ds".split("_");
<ide>
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:ca"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/cv.js
<ide> exports["lang:cv"] = {
<ide> ['M Mo MM MMMM MMM', '2 2-мĕш 02 нарăс нар'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14-мĕш 14'],
<del> ['d do dddd ddd', '0 0-мĕш вырсарникун выр'],
<add> ['d do dddd ddd dd', '0 0-мĕш вырсарникун выр вр'],
<ide> ['DDD DDDo DDDD', '45 45-мĕш 045'],
<ide> ['w wo ww', '8 8-мĕш 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:cv"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('cv');
<del> var expected = 'вырсарникун выр_тунтикун тун_ытларикун ытл_юнкун юн_кĕçнерникун кĕç_эрнекун эрн_шăматкун шăм'.split("_");
<add> var expected = 'вырсарникун выр вр_тунтикун тун тн_ытларикун ытл ыт_юнкун юн юн_кĕçнерникун кĕç кç_эрнекун эрн эр_шăматкун шăм шм'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide><path>test/lang/da.js
<ide> exports["lang:da"] = {
<ide> ['M Mo MM MMMM MMM', '2 2. 02 Februar Feb'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14. 14'],
<del> ['d do dddd ddd', '0 0. Søndag Søn'],
<add> ['d do dddd ddd dd', '0 0. Søndag Søn Sø'],
<ide> ['DDD DDDo DDDD', '45 45. 045'],
<ide> ['w wo ww', '8 8. 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:da"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('da');
<del> var expected = 'Søndag Søn_Mandag Man_Tirsdag Tir_Onsdag Ons_Torsdag Tor_Fredag Fre_Lørdag Lør'.split("_");
<add> var expected = 'Søndag Søn Sø_Mandag Man Ma_Tirsdag Tir Ti_Onsdag Ons On_Torsdag Tor To_Fredag Fre Fr_Lørdag Lør Lø'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:da"] = {
<ide> test.equal(moment().add({d:5}).fromNow(), "om 5 dage", "in 5 days");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/de.js
<ide> exports["lang:de"] = {
<ide> ['M Mo MM MMMM MMM', '2 2. 02 Februar Febr.'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14. 14'],
<del> ['d do dddd ddd', '0 0. Sonntag So.'],
<add> ['d do dddd ddd dd', '0 0. Sonntag So. So'],
<ide> ['DDD DDDo DDDD', '45 45. 045'],
<ide> ['w wo ww', '8 8. 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:de"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('de');
<del> var expected = 'Sonntag So._Montag Mo._Dienstag Di._Mittwoch Mi._Donnerstag Do._Freitag Fr._Samstag Sa.'.split("_");
<add> var expected = 'Sonntag So. So_Montag Mo. Mo_Dienstag Di. Di_Mittwoch Mi. Mi_Donnerstag Do. Do_Freitag Fr. Fr_Samstag Sa. Sa'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:de"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/en-gb.js
<ide> exports["lang:en-gb"] = {
<ide> ['M Mo MM MMMM MMM', '2 2nd 02 February Feb'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14th 14'],
<del> ['d do dddd ddd', '0 0th Sunday Sun'],
<add> ['d do dddd ddd dd', '0 0th Sunday Sun Su'],
<ide> ['DDD DDDo DDDD', '45 45th 045'],
<ide> ['w wo ww', '8 8th 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:en-gb"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('en-gb');
<del> var expected = 'Sunday Sun_Monday Mon_Tuesday Tue_Wednesday Wed_Thursday Thu_Friday Fri_Saturday Sat'.split("_");
<add> var expected = 'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:en-gb"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/en.js
<ide> exports["lang:en"] = {
<ide> ['M Mo MM MMMM MMM', '2 2nd 02 February Feb'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14th 14'],
<del> ['d do dddd ddd', '0 0th Sunday Sun'],
<add> ['d do dddd ddd dd', '0 0th Sunday Sun Su'],
<ide> ['DDD DDDo DDDD', '45 45th 045'],
<ide> ['w wo ww', '8 8th 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:en"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('en');
<del> var expected = 'Sunday Sun_Monday Mon_Tuesday Tue_Wednesday Wed_Thursday Thu_Friday Fri_Saturday Sat'.split("_");
<add> var expected = 'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:en"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/es.js
<ide> exports["lang:es"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('es');
<del> var expected = 'Domingo Dom._Lunes Lun._Martes Mar._Miércoles Mié._Jueves Jue._Viernes Vie._Sábado Sáb.'.split("_");
<add> var expected = 'Domingo Dom. Do_Lunes Lun. Lu_Martes Mar. Ma_Miércoles Mié. Mi_Jueves Jue. Ju_Viernes Vie. Vi_Sábado Sáb. Sá'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:es"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/eu.js
<ide> exports["lang:eu"] = {
<ide> ['M Mo MM MMMM MMM', '2 2. 02 otsaila ots.'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14. 14'],
<del> ['d do dddd ddd', '0 0. igandea ig.'],
<add> ['d do dddd ddd dd', '0 0. igandea ig. Ig'],
<ide> ['DDD DDDo DDDD', '45 45. 045'],
<ide> ['w wo ww', '8 8. 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:eu"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('eu');
<del> var expected = 'igandea ig._astelehena al._asteartea ar._asteazkena az._osteguna og._ostirala ol._larunbata lr.'.split("_");
<add> var expected = 'igandea ig. Ig_astelehena al. Al_asteartea ar. Ar_asteazkena az. Az_osteguna og. Og_ostirala ol. Ol_larunbata lr. Lr'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:eu"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/fi.js
<ide> exports["lang:fi"] = {
<ide> ['M Mo MM MMMM MMM', '2 2. 02 helmikuu hel'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14. 14'],
<del> ['d do dddd ddd', '0 0. sunnuntai su'],
<add> ['d do dddd ddd dd', '0 0. sunnuntai su Su'],
<ide> ['DDD DDDo DDDD', '45 45. 045'],
<ide> ['w wo ww', '8 8. 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:fi"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('fi');
<del> var expected = 'sunnuntai su_maanantai ma_tiistai ti_keskiviikko ke_torstai to_perjantai pe_lauantai la'.split("_");
<add> var expected = 'sunnuntai su Su_maanantai ma Ma_tiistai ti Ti_keskiviikko ke Ke_torstai to To_perjantai pe Pe_lauantai la La'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:fi"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "kaden viikon päästä");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/fr.js
<ide> exports["lang:fr"] = {
<ide> ['M Mo MM MMMM MMM', '2 2ème 02 février févr.'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14ème 14'],
<del> ['d do dddd ddd', '0 0ème dimanche dim.'],
<add> ['d do dddd ddd dd', '0 0ème dimanche dim. D'],
<ide> ['DDD DDDo DDDD', '45 45ème 045'],
<ide> ['w wo ww', '8 8ème 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:fr"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('fr');
<del> var expected = 'dimanche dim._lundi lun._mardi mar._mercredi mer._jeudi jeu._vendredi ven._samedi sam.'.split("_");
<add> var expected = 'dimanche dim. D_lundi lun. L_mardi mar. Ma_mercredi mer. Me_jeudi jeu. J_vendredi ven. V_samedi sam. S'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:fr"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/gl.js
<ide> exports["lang:gl"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('gl');
<del> var expected = "Domingo Dom._Luns Lun._Martes Mar._Mércores Mér._Xoves Xov._Venres Ven._Sábado Sáb.".split("_");
<add> var expected = "Domingo Dom. Do_Luns Lun. Lu_Martes Mar. Ma_Mércores Mér. Mé_Xoves Xov. Xo_Venres Ven. Ve_Sábado Sáb. Sá".split("_");
<ide>
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide><path>test/lang/is.js
<ide> exports["lang:is"] = {
<ide> ['M Mo MM MMMM MMM', '2 2. 02 febrúar feb'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14. 14'],
<del> ['d do dddd ddd', '0 0. sunnudagur sun'],
<add> ['d do dddd ddd dd', '0 0. sunnudagur sun Su'],
<ide> ['DDD DDDo DDDD', '45 45. 045'],
<ide> ['w wo ww', '8 8. 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:is"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('is');
<del> var expected = 'sunnudagur sun_mánudagur mán_þriðjudagur þri_miðvikudagur mið_fimmtudagur fim_föstudagur fös_laugardagur lau'.split("_");
<add> var expected = 'sunnudagur sun Su_mánudagur mán Má_þriðjudagur þri Þr_miðvikudagur mið Mi_fimmtudagur fim Fi_föstudagur fös Fö_laugardagur lau La'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide><path>test/lang/it.js
<ide> exports["lang:it"] = {
<ide> ['M Mo MM MMMM MMM', '2 2º 02 Febbraio Feb'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14º 14'],
<del> ['d do dddd ddd', '0 0º Domenica Dom'],
<add> ['d do dddd ddd dd', '0 0º Domenica Dom Do'],
<ide> ['DDD DDDo DDDD', '45 45º 045'],
<ide> ['w wo ww', '8 8º 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:it"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('it');
<del> var expected = 'Domenica Dom_Lunedi Lun_Martedi Mar_Mercoledi Mer_Giovedi Gio_Venerdi Ven_Sabato Sab'.split("_");
<add> var expected = 'Domenica Dom Do_Lunedi Lun Lu_Martedi Mar Ma_Mercoledi Mer Me_Giovedi Gio Gi_Venerdi Ven Ve_Sabato Sab Sa'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:it"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/jp.js
<ide> exports["lang:jp"] = {
<ide> ['M Mo MM MMMM MMM', '2 2 02 2月 2月'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14 14'],
<del> ['d do dddd ddd', '0 0 日曜日 日'],
<add> ['d do dddd ddd dd', '0 0 日曜日 日 日'],
<ide> ['DDD DDDo DDDD', '45 45 045'],
<ide> ['w wo ww', '8 8 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:jp"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('jp');
<del> var expected = '日曜日 日_月曜日 月_火曜日 火_水曜日 水_木曜日 木_金曜日 金_土曜日 土'.split("_");
<add> var expected = '日曜日 日 日_月曜日 月 月_火曜日 火 火_水曜日 水 水_木曜日 木 木_金曜日 金 金_土曜日 土 土'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide><path>test/lang/kr.js
<ide> exports["lang:kr"] = {
<ide> ['M Mo MM MMMM MMM', '2 2일 02 2월 2월'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14일 14'],
<del> ['d do dddd ddd', '0 0일 일요일 일'],
<add> ['d do dddd ddd dd', '0 0일 일요일 일 일'],
<ide> ['DDD DDDo DDDD', '45 45일 045'],
<ide> ['w wo ww', '8 8일 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:kr"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('kr');
<del> var expected = '일요일 일_월요일 월_화요일 화_수요일 수_목요일 목_금요일 금_토요일 토'.split("_");
<add> var expected = '일요일 일 일_월요일 월 월_화요일 화 화_수요일 수 수_목요일 목 목_금요일 금 금_토요일 토 토'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide><path>test/lang/nb.js
<ide> exports["lang:nb"] = {
<ide> ['M Mo MM MMMM MMM', '2 2. 02 februar feb'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14. 14'],
<del> ['d do dddd ddd', '0 0. søndag søn'],
<add> ['d do dddd ddd dd', '0 0. søndag søn Sø'],
<ide> ['DDD DDDo DDDD', '45 45. 045'],
<ide> ['w wo ww', '8 8. 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:nb"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('nb');
<del> var expected = 'søndag søn_mandag man_tirsdag tir_onsdag ons_torsdag tor_fredag fre_lørdag lør'.split("_");
<add> var expected = 'søndag søn Sø_mandag man Ma_tirsdag tir Ti_onsdag ons On_torsdag tor To_fredag fre Fr_lørdag lør Lø'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:nb"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/nl.js
<ide> exports["lang:nl"] = {
<ide> ['M Mo MM MMMM MMM', '2 2de 02 februari feb.'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14de 14'],
<del> ['d do dddd ddd', '0 0de zondag zo.'],
<add> ['d do dddd ddd dd', '0 0de zondag zo. Zo'],
<ide> ['DDD DDDo DDDD', '45 45ste 045'],
<ide> ['w wo ww', '8 8ste 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:nl"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('nl');
<del> var expected = 'zondag zo._maandag ma._dinsdag di._woensdag wo._donderdag do._vrijdag vr._zaterdag za.'.split("_");
<add> var expected = 'zondag zo. Zo_maandag ma. Ma_dinsdag di. Di_woensdag wo. Wo_donderdag do. Do_vrijdag vr. Vr_zaterdag za. Za'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:nl"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/pl.js
<ide> exports["lang:pl"] = {
<ide> ['M Mo MM MMMM MMM', '2 2. 02 luty lut'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14. 14'],
<del> ['d do dddd ddd', '0 0. niedziela nie'],
<add> ['d do dddd ddd dd', '0 0. niedziela nie N'],
<ide> ['DDD DDDo DDDD', '45 45. 045'],
<ide> ['w wo ww', '8 8. 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:pl"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('pl');
<del> var expected = 'niedziela nie_poniedziałek pon_wtorek wt_środa śr_czwartek czw_piątek pt_sobota sb'.split("_");
<add> var expected = 'niedziela nie N_poniedziałek pon Pn_wtorek wt Wt_środa śr Śr_czwartek czw Cz_piątek pt Pt_sobota sb So'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:pl"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/pt.js
<ide> exports["lang:pt"] = {
<ide> ['M Mo MM MMMM MMM', '2 2º 02 Fevereiro Fev'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14º 14'],
<del> ['d do dddd ddd', '0 0º Domingo Dom'],
<add> ['d do dddd ddd dd', '0 0º Domingo Dom Dom'],
<ide> ['DDD DDDo DDDD', '45 45º 045'],
<ide> ['w wo ww', '8 8º 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:pt"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('pt');
<del> var expected = 'Domingo Dom_Segunda-feira Seg_Terça-feira Ter_Quarta-feira Qua_Quinta-feira Qui_Sexta-feira Sex_Sábado Sáb'.split("_");
<add> var expected = 'Domingo Dom Dom_Segunda-feira Seg Seg_Terça-feira Ter Ter_Quarta-feira Qua Qua_Quinta-feira Qui Qui_Sexta-feira Sex Sex_Sábado Sáb Sáb'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:pt"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/ru.js
<ide> exports["lang:ru"] = {
<ide> ['M Mo MM MMMM MMM', '2 2. 02 февраль фев'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14. 14'],
<del> ['d do dddd ddd', '0 0. воскресенье вск'],
<add> ['d do dddd ddd dd', '0 0. воскресенье вск вс'],
<ide> ['DDD DDDo DDDD', '45 45. 045'],
<ide> ['w wo ww', '8 8. 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:ru"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('ru');
<del> var expected = 'воскресенье вск_понедельник пнд_вторник втр_среда срд_четверг чтв_пятница птн_суббота суб'.split("_");
<add> var expected = 'воскресенье вск вс_понедельник пнд пн_вторник втр вт_среда срд ср_четверг чтв чт_пятница птн пт_суббота суб сб'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:ru"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/sv.js
<ide> exports["lang:sv"] = {
<ide> ['M Mo MM MMMM MMM', '2 2a 02 februari feb'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14e 14'],
<del> ['d do dddd ddd', '0 0e söndag sön'],
<add> ['d do dddd ddd dd', '0 0e söndag sön Sö'],
<ide> ['DDD DDDo DDDD', '45 45e 045'],
<ide> ['w wo ww', '8 8e 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:sv"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('sv');
<del> var expected = 'söndag sön_måndag mån_tisdag tis_onsdag ons_torsdag tor_fredag fre_lördag lör'.split("_");
<add> var expected = 'söndag sön Sö_måndag mån Må_tisdag tis Ti_onsdag ons On_torsdag tor To_fredag fre Fr_lördag lör Lö'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:sv"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/tr.js
<ide> exports["lang:tr"] = {
<ide> ['M Mo MM MMMM MMM', '2 2nd 02 Şubat Şub'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14th 14'],
<del> ['d do dddd ddd', '0 0th Pazar Paz'],
<add> ['d do dddd ddd dd', '0 0th Pazar Paz Pz'],
<ide> ['DDD DDDo DDDD', '45 45th 045'],
<ide> ['w wo ww', '8 8th 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:tr"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('tr');
<del> var expected = 'Pazar Paz_Pazartesi Pts_Salı Sal_Çarşamba Çar_Perşembe Per_Cuma Cum_Cumartesi Cts'.split("_");
<add> var expected = 'Pazar Paz Pz_Pazartesi Pts Pt_Salı Sal Sa_Çarşamba Çar Ça_Perşembe Per Pe_Cuma Cum Cu_Cumartesi Cts Ct'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide> exports["lang:tr"] = {
<ide> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<ide> test.done();
<ide> }
<del>};
<ide>\ No newline at end of file
<add>};
<ide><path>test/lang/zh-cn.js
<ide> exports["lang:zh-cn"] = {
<ide> ['M Mo MM MMMM MMM', '2 2 02 二月 2月'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14 14'],
<del> ['d do dddd ddd', '0 0 星期日 周日'],
<add> ['d do dddd ddd dd', '0 0 星期日 周日 日'],
<ide> ['DDD DDDo DDDD', '45 45 045'],
<ide> ['w wo ww', '8 8 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:zh-cn"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('zh-cn');
<del> var expected = '星期日 周日_星期一 周一_星期二 周二_星期三 周三_星期四 周四_星期五 周五_星期六 周六'.split("_");
<add> var expected = '星期日 周日 日_星期一 周一 一_星期二 周二 二_星期三 周三 三_星期四 周四 四_星期五 周五 五_星期六 周六 六'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> },
<ide><path>test/lang/zh-tw.js
<ide> exports["lang:zh-tw"] = {
<ide> ['M Mo MM MMMM MMM', '2 2 02 二月 2月'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14 14'],
<del> ['d do dddd ddd', '0 0 星期日 週日'],
<add> ['d do dddd ddd dd', '0 0 星期日 週日 日'],
<ide> ['DDD DDDo DDDD', '45 45 045'],
<ide> ['w wo ww', '8 8 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:zh-tw"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('zh-tw');
<del> var expected = '星期日 週日_星期一 週一_星期二 週二_星期三 週三_星期四 週四_星期五 週五_星期六 週六'.split("_");
<add> var expected = '星期日 週日 日_星期一 週一 一_星期二 週二 二_星期三 週三 三_星期四 週四 四_星期五 週五 五_星期六 週六 六'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<del> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<ide> }
<ide> test.done();
<ide> }, | 74 |
Python | Python | build morphologizer in setup.py | 031b0d2a3ad5bd8b9a432acb857b4babbc153923 | <ide><path>setup.py
<ide> 'spacy.attrs',
<ide> 'spacy.morphology',
<ide> 'spacy.pipeline',
<add> 'spacy._morphologizer',
<ide> 'spacy.syntax.stateclass',
<ide> 'spacy.syntax._state',
<ide> 'spacy.tokenizer', | 1 |
Javascript | Javascript | fix runtime config in `next export` | bd249180c67e96e609bff92fe3e751015a94861f | <ide><path>packages/next/export/index.js
<ide> import { resolve, join } from 'path'
<ide> import { existsSync, readFileSync } from 'fs'
<ide> import loadConfig from 'next-server/next-config'
<ide> import { PHASE_EXPORT, SERVER_DIRECTORY, PAGES_MANIFEST, CONFIG_FILE, BUILD_ID_FILE, CLIENT_STATIC_FILES_PATH } from 'next-server/constants'
<del>import * as envConfig from 'next-server/config'
<ide> import createProgress from 'tty-aware-progress'
<ide>
<ide> export default async function (dir, options, configuration) {
<ide> export default async function (dir, options, configuration) {
<ide> renderOpts.runtimeConfig = publicRuntimeConfig
<ide> }
<ide>
<del> envConfig.setConfig({
<del> serverRuntimeConfig,
<del> publicRuntimeConfig
<del> })
<del>
<ide> // We need this for server rendering the Link component.
<ide> global.__NEXT_DATA__ = {
<ide> nextExport: true
<ide> export default async function (dir, options, configuration) {
<ide> exportPathMap: chunk.pathMap,
<ide> outDir,
<ide> renderOpts,
<add> serverRuntimeConfig,
<ide> concurrency
<ide> })
<ide> worker.on('message', ({ type, payload }) => {
<ide><path>packages/next/export/worker.js
<ide> const { renderToHTML } = require('next-server/dist/server/render')
<ide> const { writeFile } = require('fs')
<ide> const Sema = require('async-sema')
<ide> const {loadComponents} = require('next-server/dist/server/load-components')
<add>const envConfig = require('next-server/config')
<ide>
<ide> process.on(
<ide> 'message',
<ide> process.on(
<ide> exportPathMap,
<ide> outDir,
<ide> renderOpts,
<add> serverRuntimeConfig,
<ide> concurrency
<ide> }) => {
<ide> const sema = new Sema(concurrency, { capacity: exportPaths.length })
<ide> process.on(
<ide> const { page, query = {} } = exportPathMap[path]
<ide> const req = { url: path }
<ide> const res = {}
<add> envConfig.setConfig({
<add> serverRuntimeConfig,
<add> publicRuntimeConfig: renderOpts.runtimeConfig
<add> })
<ide>
<ide> let htmlFilename = `${path}${sep}index.html`
<ide> if (extname(path) !== '') {
<ide><path>test/integration/export/next.config.js
<ide> const {PHASE_DEVELOPMENT_SERVER} = require('next-server/constants')
<ide> module.exports = (phase) => {
<ide> return {
<ide> distDir: phase === PHASE_DEVELOPMENT_SERVER ? '.next-dev' : '.next',
<add> publicRuntimeConfig: {
<add> foo: 'foo'
<add> },
<add> serverRuntimeConfig: {
<add> bar: 'bar'
<add> },
<ide> exportPathMap: function () {
<ide> return {
<ide> '/': { page: '/' },
<ide><path>test/integration/export/pages/about.js
<ide> import Link from 'next/link'
<add>import getConfig from 'next/config'
<add>const { publicRuntimeConfig, serverRuntimeConfig } = getConfig()
<ide>
<del>export default () => (
<add>const About = ({ bar }) => (
<ide> <div id='about-page'>
<ide> <div>
<ide> <Link href='/'>
<ide> <a>Go Back</a>
<ide> </Link>
<ide> </div>
<del> <p>This is the About page</p>
<add> <p>{`This is the About page ${publicRuntimeConfig.foo}${bar || ''}`}</p>
<ide> </div>
<ide> )
<add>
<add>About.getInitialProps = async (ctx) => {
<add> return { bar: serverRuntimeConfig.bar }
<add>}
<add>
<add>export default About
<ide><path>test/integration/export/test/browser.js
<ide> export default function (context) {
<ide> .waitForElementByCss('#about-page')
<ide> .elementByCss('#about-page p').text()
<ide>
<del> expect(text).toBe('This is the About page')
<add> expect(text).toBe('This is the About page foo')
<ide> browser.close()
<ide> })
<ide>
<ide> export default function (context) {
<ide> .waitForElementByCss('#about-page')
<ide> .elementByCss('#about-page p').text()
<ide>
<del> expect(text).toBe('This is the About page')
<add> expect(text).toBe('This is the About page foo')
<ide> browser.close()
<ide> })
<ide>
<ide><path>test/integration/export/test/ssr.js
<ide> export default function (context) {
<ide> expect(html).toMatch(/This is the home page/)
<ide> })
<ide>
<add> it('should render the about page', async () => {
<add> const html = await renderViaHTTP(context.port, '/about')
<add> expect(html).toMatch(/This is the About page foobar/)
<add> })
<add>
<ide> it('should render links correctly', async () => {
<ide> const html = await renderViaHTTP(context.port, '/')
<ide> const $ = cheerio.load(html) | 6 |
Javascript | Javascript | create bidi closure | 3b297368820b22738b5000a7ca291634209719c5 | <ide><path>src/bidi.js
<ide>
<ide> 'use strict';
<ide>
<del>// Character types for symbols from 0000 to 00FF.
<del>var baseTypes = [
<del> 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S', 'WS',
<del> 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
<del> 'BN', 'BN', 'B', 'B', 'B', 'S', 'WS', 'ON', 'ON', 'ET', 'ET', 'ET', 'ON',
<del> 'ON', 'ON', 'ON', 'ON', 'ON', 'CS', 'ON', 'CS', 'ON', 'EN', 'EN', 'EN', 'EN',
<del> 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'ON', 'ON', 'ON', 'ON', 'ON', 'ON', 'ON',
<del> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<del> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON', 'ON', 'ON',
<del> 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<del> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON',
<del> 'ON', 'ON', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'B', 'BN', 'BN', 'BN', 'BN',
<del> 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
<del> 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'CS', 'ON', 'ET', 'ET',
<del> 'ET', 'ET', 'ON', 'ON', 'ON', 'ON', 'L', 'ON', 'ON', 'ON', 'ON', 'ON', 'ET',
<del> 'ET', 'EN', 'EN', 'ON', 'L', 'ON', 'ON', 'ON', 'EN', 'L', 'ON', 'ON', 'ON',
<del> 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<del> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L',
<del> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<del> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'L', 'L',
<del> 'L', 'L', 'L', 'L', 'L', 'L'
<del>];
<del>
<del>// Character types for symbols from 0600 to 06FF
<del>var arabicTypes = [
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'CS',
<del> 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'NSM',
<del> 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
<del> 'NSM', 'NSM', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AN', 'AN', 'AN',
<del> 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'ET', 'AN', 'AN', 'AL', 'AL', 'AL',
<del> 'NSM', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'NSM',
<del> 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
<del> 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'ON', 'NSM', 'NSM', 'NSM',
<del> 'NSM', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<del> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL'
<del>];
<del>
<del>function bidi(text, startLevel) {
<add>var bidi = (function bidiClosure() {
<add> // Character types for symbols from 0000 to 00FF.
<add> var baseTypes = [
<add> 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S', 'WS',
<add> 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
<add> 'BN', 'BN', 'B', 'B', 'B', 'S', 'WS', 'ON', 'ON', 'ET', 'ET', 'ET', 'ON',
<add> 'ON', 'ON', 'ON', 'ON', 'ON', 'CS', 'ON', 'CS', 'ON', 'EN', 'EN', 'EN',
<add> 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'ON', 'ON', 'ON', 'ON', 'ON',
<add> 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<add> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON',
<add> 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<add> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<add> 'L', 'ON', 'ON', 'ON', 'ON', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'B', 'BN',
<add> 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
<add> 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
<add> 'BN', 'CS', 'ON', 'ET', 'ET', 'ET', 'ET', 'ON', 'ON', 'ON', 'ON', 'L', 'ON',
<add> 'ON', 'ON', 'ON', 'ON', 'ET', 'ET', 'EN', 'EN', 'ON', 'L', 'ON', 'ON', 'ON',
<add> 'EN', 'L', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<add> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<add> 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<add> 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L',
<add> 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L'
<add> ];
<add>
<add> // Character types for symbols from 0600 to 06FF
<add> var arabicTypes = [
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
<add> 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN',
<add> 'AN', 'ET', 'AN', 'AN', 'AL', 'AL', 'AL', 'NSM', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
<add> 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'ON', 'NSM',
<add> 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL',
<add> 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL'
<add> ];
<add>
<ide> function isOdd(i) {
<ide> return (i & 1) != 0;
<ide> }
<ide> function bidi(text, startLevel) {
<ide> }
<ide> }
<ide>
<del> var str = text.str;
<del> var strLength = str.length;
<del> if (strLength == 0)
<del> return str;
<add> return (function bidi(text, startLevel) {
<add> var str = text.str;
<add> var strLength = str.length;
<add> if (strLength == 0)
<add> return str;
<add>
<add> // get types, fill arrays
<add>
<add> var chars = new Array(strLength);
<add> var types = new Array(strLength);
<add> var oldtypes = new Array(strLength);
<add> var numBidi = 0;
<add>
<add> for (var i = 0; i < strLength; ++i) {
<add> chars[i] = str.charAt(i);
<add>
<add> var charCode = str.charCodeAt(i);
<add> var charType = 'L';
<add> if (charCode <= 0x00ff)
<add> charType = baseTypes[charCode];
<add> else if (0x0590 <= charCode && charCode <= 0x05f4)
<add> charType = 'R';
<add> else if (0x0600 <= charCode && charCode <= 0x06ff)
<add> charType = arabicTypes[charCode & 0xff];
<add> else if (0x0700 <= charCode && charCode <= 0x08AC)
<add> charType = 'AL';
<add>
<add> if (charType == 'R' || charType == 'AL' || charType == 'AN')
<add> numBidi++;
<add>
<add> oldtypes[i] = types[i] = charType;
<add> }
<ide>
<del> // get types, fill arrays
<add> // detect the bidi method
<add> // if there are no rtl characters then no bidi needed
<add> // if less than 30% chars are rtl then string is primarily ltr
<add> // if more than 30% chars are rtl then string is primarily rtl
<add> if (numBidi == 0) {
<add> text.direction = 'ltr';
<add> return str;
<add> }
<ide>
<del> var chars = new Array(strLength);
<del> var types = new Array(strLength);
<del> var oldtypes = new Array(strLength);
<del> var numBidi = 0;
<add> if (startLevel == -1) {
<add> if ((strLength / numBidi) < 0.3) {
<add> text.direction = 'ltr';
<add> startLevel = 0;
<add> } else {
<add> text.direction = 'rtl';
<add> startLevel = 1;
<add> }
<add> }
<ide>
<del> for (var i = 0; i < strLength; ++i) {
<del> chars[i] = str.charAt(i);
<add> var levels = new Array(strLength);
<ide>
<del> var charCode = str.charCodeAt(i);
<del> var charType = 'L';
<del> if (charCode <= 0x00ff)
<del> charType = baseTypes[charCode];
<del> else if (0x0590 <= charCode && charCode <= 0x05f4)
<del> charType = 'R';
<del> else if (0x0600 <= charCode && charCode <= 0x06ff)
<del> charType = arabicTypes[charCode & 0xff];
<del> else if (0x0700 <= charCode && charCode <= 0x08AC)
<del> charType = 'AL';
<add> for (var i = 0; i < strLength; ++i) {
<add> levels[i] = startLevel;
<add> }
<ide>
<del> if (charType == 'R' || charType == 'AL' || charType == 'AN')
<del> numBidi++;
<add> var diffChars = new Array(strLength);
<add> var diffLevels = new Array(strLength);
<add> var diffTypes = new Array(strLength);
<ide>
<del> oldtypes[i] = types[i] = charType;
<del> }
<add> /*
<add> X1-X10: skip most of this, since we are NOT doing the embeddings.
<add> */
<ide>
<del> // detect the bidi method
<del> // if there are no rtl characters then no bidi needed
<del> // if less than 30% chars are rtl then string is primarily ltr
<del> // if more than 30% chars are rtl then string is primarily rtl
<del> if (numBidi == 0) {
<del> text.direction = 'ltr';
<del> return str;
<del> }
<add> var e = isOdd(startLevel) ? 'R' : 'L';
<add> var sor = e;
<add> var eor = sor;
<ide>
<del> if (startLevel == -1) {
<del> if ((strLength / numBidi) < 0.3) {
<del> text.direction = 'ltr';
<del> startLevel = 0;
<del> } else {
<del> text.direction = 'rtl';
<del> startLevel = 1;
<add> /*
<add> W1. Examine each non-spacing mark (NSM) in the level run, and change the
<add> type of the NSM to the type of the previous character. If the NSM is at the
<add> start of the level run, it will get the type of sor.
<add> */
<add>
<add> var lastType = sor;
<add> for (var i = 0; i < strLength; ++i) {
<add> if (types[i] == 'NSM')
<add> types[i] = lastType;
<add> else
<add> lastType = types[i];
<ide> }
<del> }
<ide>
<del> var levels = new Array(strLength);
<add> /*
<add> W2. Search backwards from each instance of a European number until the
<add> first strong type (R, L, AL, or sor) is found. If an AL is found, change
<add> the type of the European number to Arabic number.
<add> */
<ide>
<del> for (var i = 0; i < strLength; ++i) {
<del> levels[i] = startLevel;
<del> }
<add> var lastType = sor;
<add> for (var i = 0; i < strLength; ++i) {
<add> var t = types[i];
<add> if (t == 'EN')
<add> types[i] = (lastType == 'AL') ? 'AN' : 'EN';
<add> else if (t == 'R' || t == 'L' || t == 'AL')
<add> lastType = t;
<add> }
<ide>
<del> var diffChars = new Array(strLength);
<del> var diffLevels = new Array(strLength);
<del> var diffTypes = new Array(strLength);
<del>
<del> /*
<del> X1-X10: skip most of this, since we are NOT doing the embeddings.
<del> */
<del>
<del> var e = isOdd(startLevel) ? 'R' : 'L';
<del> var sor = e;
<del> var eor = sor;
<del>
<del> /*
<del> W1. Examine each non-spacing mark (NSM) in the level run, and change the type
<del> of the NSM to the type of the previous character. If the NSM is at the start
<del> of the level run, it will get the type of sor.
<del> */
<del>
<del> var lastType = sor;
<del> for (var i = 0; i < strLength; ++i) {
<del> if (types[i] == 'NSM')
<del> types[i] = lastType;
<del> else
<del> lastType = types[i];
<del> }
<add> /*
<add> W3. Change all ALs to R.
<add> */
<ide>
<del> /*
<del> W2. Search backwards from each instance of a European number until the first
<del> strong type (R, L, AL, or sor) is found. If an AL is found, change the type
<del> of the European number to Arabic number.
<del> */
<del>
<del> var lastType = sor;
<del> for (var i = 0; i < strLength; ++i) {
<del> var t = types[i];
<del> if (t == 'EN')
<del> types[i] = (lastType == 'AL') ? 'AN' : 'EN';
<del> else if (t == 'R' || t == 'L' || t == 'AL')
<del> lastType = t;
<del> }
<add> for (var i = 0; i < strLength; ++i) {
<add> var t = types[i];
<add> if (t == 'AL')
<add> types[i] = 'R';
<add> }
<ide>
<del> /*
<del> W3. Change all ALs to R.
<del> */
<add> /*
<add> W4. A single European separator between two European numbers changes to a
<add> European number. A single common separator between two numbers of the same
<add> type changes to that type:
<add> */
<ide>
<del> for (var i = 0; i < strLength; ++i) {
<del> var t = types[i];
<del> if (t == 'AL')
<del> types[i] = 'R';
<del> }
<add> for (var i = 1; i < strLength - 1; ++i) {
<add> if (types[i] == 'ES' && types[i - 1] == 'EN' && types[i + 1] == 'EN')
<add> types[i] = 'EN';
<add> if (types[i] == 'CS' && (types[i - 1] == 'EN' || types[i - 1] == 'AN') &&
<add> types[i + 1] == types[i - 1])
<add> types[i] = types[i - 1];
<add> }
<ide>
<del> /*
<del> W4. A single European separator between two European numbers changes to a
<del> European number. A single common separator between two numbers of the same
<del> type changes to that type:
<del> */
<del>
<del> for (var i = 1; i < strLength - 1; ++i) {
<del> if (types[i] == 'ES' && types[i - 1] == 'EN' && types[i + 1] == 'EN')
<del> types[i] = 'EN';
<del> if (types[i] == 'CS' && (types[i - 1] == 'EN' || types[i - 1] == 'AN') &&
<del> types[i + 1] == types[i - 1])
<del> types[i] = types[i - 1];
<del> }
<add> /*
<add> W5. A sequence of European terminators adjacent to European numbers changes
<add> to all European numbers:
<add> */
<ide>
<del> /*
<del> W5. A sequence of European terminators adjacent to European numbers changes
<del> to all European numbers:
<del> */
<del>
<del> for (var i = 0; i < strLength; ++i) {
<del> if (types[i] == 'EN') {
<del> // do before
<del> for (var j = i - 1; j >= 0; --j) {
<del> if (types[j] != 'ET')
<del> break;
<del> types[j] = 'EN';
<del> }
<del> // do after
<del> for (var j = i + 1; j < strLength; --j) {
<del> if (types[j] != 'ET')
<del> break;
<del> types[j] = 'EN';
<add> for (var i = 0; i < strLength; ++i) {
<add> if (types[i] == 'EN') {
<add> // do before
<add> for (var j = i - 1; j >= 0; --j) {
<add> if (types[j] != 'ET')
<add> break;
<add> types[j] = 'EN';
<add> }
<add> // do after
<add> for (var j = i + 1; j < strLength; --j) {
<add> if (types[j] != 'ET')
<add> break;
<add> types[j] = 'EN';
<add> }
<ide> }
<ide> }
<del> }
<ide>
<del> /*
<del> W6. Otherwise, separators and terminators change to Other Neutral:
<del> */
<add> /*
<add> W6. Otherwise, separators and terminators change to Other Neutral:
<add> */
<ide>
<del> for (var i = 0; i < strLength; ++i) {
<del> var t = types[i];
<del> if (t == 'WS' || t == 'ES' || t == 'ET' || t == 'CS')
<del> types[i] = 'ON';
<del> }
<add> for (var i = 0; i < strLength; ++i) {
<add> var t = types[i];
<add> if (t == 'WS' || t == 'ES' || t == 'ET' || t == 'CS')
<add> types[i] = 'ON';
<add> }
<ide>
<del> /*
<del> W7. Search backwards from each instance of a European number until the first
<del> strong type (R, L, or sor) is found. If an L is found, then change the type
<del> of the European number to L.
<del> */
<del>
<del> var lastType = sor;
<del> for (var i = 0; i < strLength; ++i) {
<del> var t = types[i];
<del> if (t == 'EN')
<del> types[i] = (lastType == 'L') ? 'L' : 'EN';
<del> else if (t == 'R' || t == 'L')
<del> lastType = t;
<del> }
<add> /*
<add> W7. Search backwards from each instance of a European number until the
<add> first strong type (R, L, or sor) is found. If an L is found, then change
<add> the type of the European number to L.
<add> */
<ide>
<del> /*
<del> N1. A sequence of neutrals takes the direction of the surrounding strong text
<del> if the text on both sides has the same direction. European and Arabic numbers
<del> are treated as though they were R. Start-of-level-run (sor) and
<del> end-of-level-run (eor) are used at level run boundaries.
<del> */
<del>
<del> for (var i = 0; i < strLength; ++i) {
<del> if (types[i] == 'ON') {
<del> var end = findUnequal(types, i + 1, 'ON');
<del> var before = sor;
<del> if (i > 0)
<del> before = types[i - 1];
<del> var after = eor;
<del> if (end + 1 < strLength)
<del> after = types[end + 1];
<del> if (before != 'L')
<del> before = 'R';
<del> if (after != 'L')
<del> after = 'R';
<del> if (before == after)
<del> setValues(types, i, end, before);
<del> i = end - 1; // reset to end (-1 so next iteration is ok)
<add> var lastType = sor;
<add> for (var i = 0; i < strLength; ++i) {
<add> var t = types[i];
<add> if (t == 'EN')
<add> types[i] = (lastType == 'L') ? 'L' : 'EN';
<add> else if (t == 'R' || t == 'L')
<add> lastType = t;
<ide> }
<del> }
<del>
<del> /*
<del> N2. Any remaining neutrals take the embedding direction.
<del> */
<ide>
<del> for (var i = 0; i < strLength; ++i) {
<del> if (types[i] == 'ON')
<del> types[i] = e;
<del> }
<add> /*
<add> N1. A sequence of neutrals takes the direction of the surrounding strong
<add> text if the text on both sides has the same direction. European and Arabic
<add> numbers are treated as though they were R. Start-of-level-run (sor) and
<add> end-of-level-run (eor) are used at level run boundaries.
<add> */
<ide>
<del> /*
<del> I1. For all characters with an even (left-to-right) embedding direction,
<del> those of type R go up one level and those of type AN or EN go up two levels.
<del> I2. For all characters with an odd (right-to-left) embedding direction, those
<del> of type L, EN or AN go up one level.
<del> */
<del>
<del> for (var i = 0; i < strLength; ++i) {
<del> var t = types[i];
<del> if (isEven(levels[i])) {
<del> if (t == 'R') {
<del> levels[i] += 1;
<del> } else if (t == 'AN' || t == 'EN') {
<del> levels[i] += 2;
<add> for (var i = 0; i < strLength; ++i) {
<add> if (types[i] == 'ON') {
<add> var end = findUnequal(types, i + 1, 'ON');
<add> var before = sor;
<add> if (i > 0)
<add> before = types[i - 1];
<add> var after = eor;
<add> if (end + 1 < strLength)
<add> after = types[end + 1];
<add> if (before != 'L')
<add> before = 'R';
<add> if (after != 'L')
<add> after = 'R';
<add> if (before == after)
<add> setValues(types, i, end, before);
<add> i = end - 1; // reset to end (-1 so next iteration is ok)
<ide> }
<del> } else { // isOdd, so
<del> if (t == 'L' || t == 'AN' || t == 'EN') {
<del> levels[i] += 1;
<add> }
<add>
<add> /*
<add> N2. Any remaining neutrals take the embedding direction.
<add> */
<add>
<add> for (var i = 0; i < strLength; ++i) {
<add> if (types[i] == 'ON')
<add> types[i] = e;
<add> }
<add>
<add> /*
<add> I1. For all characters with an even (left-to-right) embedding direction,
<add> those of type R go up one level and those of type AN or EN go up two
<add> levels.
<add> I2. For all characters with an odd (right-to-left) embedding direction,
<add> those of type L, EN or AN go up one level.
<add> */
<add>
<add> for (var i = 0; i < strLength; ++i) {
<add> var t = types[i];
<add> if (isEven(levels[i])) {
<add> if (t == 'R') {
<add> levels[i] += 1;
<add> } else if (t == 'AN' || t == 'EN') {
<add> levels[i] += 2;
<add> }
<add> } else { // isOdd, so
<add> if (t == 'L' || t == 'AN' || t == 'EN') {
<add> levels[i] += 1;
<add> }
<ide> }
<ide> }
<del> }
<ide>
<del> /*
<del> L1. On each line, reset the embedding level of the following characters to
<del> the paragraph embedding level:
<del>
<del> segment separators,
<del> paragraph separators,
<del> any sequence of whitespace characters preceding a segment separator or
<del> paragraph separator, and any sequence of white space characters at the end
<del> of the line.
<del> */
<del>
<del> // don't bother as text is only single line
<del>
<del> /*
<del> L2. From the highest level found in the text to the lowest odd level on each
<del> line, reverse any contiguous sequence of characters that are at that level or
<del> higher.
<del> */
<del>
<del> // find highest level & lowest odd level
<del>
<del> var highestLevel = -1;
<del> var lowestOddLevel = 99;
<del> for (var i = 0, ii = levels.length; i < ii; ++i) {
<del> var level = levels[i];
<del> if (highestLevel < level)
<del> highestLevel = level;
<del> if (lowestOddLevel > level && isOdd(level))
<del> lowestOddLevel = level;
<del> }
<add> /*
<add> L1. On each line, reset the embedding level of the following characters to
<add> the paragraph embedding level:
<add>
<add> segment separators,
<add> paragraph separators,
<add> any sequence of whitespace characters preceding a segment separator or
<add> paragraph separator, and any sequence of white space characters at the end
<add> of the line.
<add> */
<add>
<add> // don't bother as text is only single line
<ide>
<del> // now reverse between those limits
<add> /*
<add> L2. From the highest level found in the text to the lowest odd level on
<add> each line, reverse any contiguous sequence of characters that are at that
<add> level or higher.
<add> */
<add>
<add> // find highest level & lowest odd level
<ide>
<del> for (var level = highestLevel; level >= lowestOddLevel; --level) {
<del> // find segments to reverse
<del> var start = -1;
<add> var highestLevel = -1;
<add> var lowestOddLevel = 99;
<ide> for (var i = 0, ii = levels.length; i < ii; ++i) {
<del> if (levels[i] < level) {
<del> if (start >= 0) {
<del> reverseValues(chars, start, i);
<del> start = -1;
<add> var level = levels[i];
<add> if (highestLevel < level)
<add> highestLevel = level;
<add> if (lowestOddLevel > level && isOdd(level))
<add> lowestOddLevel = level;
<add> }
<add>
<add> // now reverse between those limits
<add>
<add> for (var level = highestLevel; level >= lowestOddLevel; --level) {
<add> // find segments to reverse
<add> var start = -1;
<add> for (var i = 0, ii = levels.length; i < ii; ++i) {
<add> if (levels[i] < level) {
<add> if (start >= 0) {
<add> reverseValues(chars, start, i);
<add> start = -1;
<add> }
<add> } else if (start < 0) {
<add> start = i;
<ide> }
<del> } else if (start < 0) {
<del> start = i;
<add> }
<add> if (start >= 0) {
<add> reverseValues(chars, start, levels.length);
<ide> }
<ide> }
<del> if (start >= 0) {
<del> reverseValues(chars, start, levels.length);
<del> }
<del> }
<ide>
<del> /*
<del> L3. Combining marks applied to a right-to-left base character will at this
<del> point precede their base character. If the rendering engine expects them to
<del> follow the base characters in the final display process, then the ordering of
<del> the marks and the base character must be reversed.
<del> */
<add> /*
<add> L3. Combining marks applied to a right-to-left base character will at this
<add> point precede their base character. If the rendering engine expects them to
<add> follow the base characters in the final display process, then the ordering
<add> of the marks and the base character must be reversed.
<add> */
<ide>
<del> // don't bother for now
<add> // don't bother for now
<ide>
<del> /*
<del> L4. A character that possesses the mirrored property as specified by
<del> Section 4.7, Mirrored, must be depicted by a mirrored glyph if the resolved
<del> directionality of that character is R.
<del> */
<add> /*
<add> L4. A character that possesses the mirrored property as specified by
<add> Section 4.7, Mirrored, must be depicted by a mirrored glyph if the resolved
<add> directionality of that character is R.
<add> */
<ide>
<del> // don't mirror as characters are already mirrored in the pdf
<add> // don't mirror as characters are already mirrored in the pdf
<ide>
<del> // Finally, return string
<add> // Finally, return string
<ide>
<del> var result = '';
<del> for (var i = 0, ii = chars.length; i < ii; ++i) {
<del> var ch = chars[i];
<del> if (ch != '<' && ch != '>')
<del> result += ch;
<del> }
<del> return result;
<del>}
<add> var result = '';
<add> for (var i = 0, ii = chars.length; i < ii; ++i) {
<add> var ch = chars[i];
<add> if (ch != '<' && ch != '>')
<add> result += ch;
<add> }
<add> return result;
<add> });
<add>})(); | 1 |
Go | Go | remove unused netnsroot field in builder-next | 8ab9e78ee4ddcffdb91d106948ed3fb6fb322b1e | <ide><path>builder/builder-next/builder.go
<ide> func init() {
<ide> type Opt struct {
<ide> SessionManager *session.Manager
<ide> Root string
<del> NetnsRoot string
<ide> Dist images.DistributionServices
<ide> NetworkController libnetwork.NetworkController
<ide> }
<ide><path>builder/builder-next/controller.go
<ide> func newController(rt http.RoundTripper, opt Opt) (*control.Controller, error) {
<ide> return nil, err
<ide> }
<ide>
<del> exec, err := newExecutor(root, opt.NetnsRoot, opt.NetworkController)
<add> exec, err := newExecutor(root, opt.NetworkController)
<ide> if err != nil {
<ide> return nil, err
<ide> }
<ide><path>builder/builder-next/executor_unix.go
<ide> import (
<ide>
<ide> const networkName = "bridge"
<ide>
<del>func newExecutor(root, netnsRoot string, net libnetwork.NetworkController) (executor.Executor, error) {
<add>func newExecutor(root string, net libnetwork.NetworkController) (executor.Executor, error) {
<ide> networkProviders := map[pb.NetMode]network.Provider{
<del> pb.NetMode_UNSET: &bridgeProvider{NetworkController: net, netnsRoot: netnsRoot},
<add> pb.NetMode_UNSET: &bridgeProvider{NetworkController: net},
<ide> pb.NetMode_HOST: network.NewHostProvider(),
<ide> pb.NetMode_NONE: network.NewNoneProvider(),
<ide> }
<ide> func newExecutor(root, netnsRoot string, net libnetwork.NetworkController) (exec
<ide>
<ide> type bridgeProvider struct {
<ide> libnetwork.NetworkController
<del> netnsRoot string
<ide> }
<ide>
<ide> func (p *bridgeProvider) New() (network.Namespace, error) {
<ide><path>builder/builder-next/executor_windows.go
<ide> import (
<ide> "github.com/moby/buildkit/executor"
<ide> )
<ide>
<del>func newExecutor(_, _ string, _ libnetwork.NetworkController) (executor.Executor, error) {
<add>func newExecutor(_ string, _ libnetwork.NetworkController) (executor.Executor, error) {
<ide> return &winExecutor{}, nil
<ide> }
<ide>
<ide><path>cmd/dockerd/daemon.go
<ide> func newRouterOptions(config *config.Config, daemon *daemon.Daemon) (routerOptio
<ide> bk, err := buildkit.New(buildkit.Opt{
<ide> SessionManager: sm,
<ide> Root: filepath.Join(config.Root, "buildkit"),
<del> NetnsRoot: filepath.Join(config.ExecRoot, "netns"),
<ide> Dist: daemon.DistributionServices(),
<ide> NetworkController: daemon.NetworkController(),
<ide> }) | 5 |
Text | Text | add tag variant for 2.3 | 4d1ba6feb414177457fcec5983038216e32f1a12 | <ide><path>website/docs/api/cli.md
<ide> $ python -m spacy init-model [lang] [output_dir] [--jsonl-loc] [--vectors-loc]
<ide> [--prune-vectors]
<ide> ```
<ide>
<del>| Argument | Type | Description |
<del>| -------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
<del>| `lang` | positional | Model language [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), e.g. `en`. |
<del>| `output_dir` | positional | Model output directory. Will be created if it doesn't exist. |
<del>| `--jsonl-loc`, `-j` | option | Optional location of JSONL-formatted [vocabulary file](/api/annotation#vocab-jsonl) with lexical attributes. |
<del>| `--vectors-loc`, `-v` | option | Optional location of vectors. Should be a file where the first row contains the dimensions of the vectors, followed by a space-separated Word2Vec table. File can be provided in `.txt` format or as a zipped text file in `.zip` or `.tar.gz` format. |
<del>| `--truncate-vectors`, `-t` | option | Number of vectors to truncate to when reading in vectors file. Defaults to `0` for no truncation. |
<del>| `--prune-vectors`, `-V` | option | Number of vectors to prune the vocabulary to. Defaults to `-1` for no pruning. |
<del>| `--vectors-name`, `-vn` | option | Name to assign to the word vectors in the `meta.json`, e.g. `en_core_web_md.vectors`. |
<del>| **CREATES** | model | A spaCy model containing the vocab and vectors. |
<add>| Argument | Type | Description |
<add>| ------------------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
<add>| `lang` | positional | Model language [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), e.g. `en`. |
<add>| `output_dir` | positional | Model output directory. Will be created if it doesn't exist. |
<add>| `--jsonl-loc`, `-j` | option | Optional location of JSONL-formatted [vocabulary file](/api/annotation#vocab-jsonl) with lexical attributes. |
<add>| `--vectors-loc`, `-v` | option | Optional location of vectors. Should be a file where the first row contains the dimensions of the vectors, followed by a space-separated Word2Vec table. File can be provided in `.txt` format or as a zipped text file in `.zip` or `.tar.gz` format. |
<add>| `--truncate-vectors`, `-t` <Tag variant="new">2.3</Tag> | option | Number of vectors to truncate to when reading in vectors file. Defaults to `0` for no truncation. |
<add>| `--prune-vectors`, `-V` | option | Number of vectors to prune the vocabulary to. Defaults to `-1` for no pruning. |
<add>| `--vectors-name`, `-vn` | option | Name to assign to the word vectors in the `meta.json`, e.g. `en_core_web_md.vectors`. |
<add>| **CREATES** | model | A spaCy model containing the vocab and vectors. |
<ide>
<ide> ## Evaluate {#evaluate new="2"}
<ide> | 1 |
Ruby | Ruby | fix default samesite for session cookies | c95780d7c665553dc7e86d5fa4eb3a84478f1e25 | <ide><path>actionpack/lib/action_dispatch/middleware/cookies.rb
<ide> def cookies_serializer
<ide> end
<ide>
<ide> def cookies_same_site_protection
<del> get_header(Cookies::COOKIES_SAME_SITE_PROTECTION) || Proc.new { }
<add> get_header(Cookies::COOKIES_SAME_SITE_PROTECTION)&.call(self)
<ide> end
<ide>
<ide> def cookies_digest
<ide> def handle_options(options)
<ide> options[:path] ||= "/"
<ide>
<ide> unless options.key?(:same_site)
<del> options[:same_site] = request.cookies_same_site_protection.call(request)
<add> options[:same_site] = request.cookies_same_site_protection
<ide> end
<ide>
<ide> if options[:domain] == :all || options[:domain] == "all"
<ide><path>actionpack/lib/action_dispatch/middleware/session/cookie_store.rb
<ide> def initialize(session_id, cookie_value = {})
<ide> end
<ide> end
<ide>
<add> DEFAULT_SAME_SITE = proc { |request| request.cookies_same_site_protection } # :nodoc:
<add>
<ide> def initialize(app, options = {})
<del> super(app, options.merge!(cookie_only: true))
<add> options[:cookie_only] = true
<add> options[:same_site] = DEFAULT_SAME_SITE if !options.key?(:same_site)
<add> super
<ide> end
<ide>
<ide> def delete_session(req, session_id, options)
<ide><path>actionpack/test/dispatch/session/cookie_store_test.rb
<ide> class CookieStoreTest < ActionDispatch::IntegrationTest
<ide> Generator = ActiveSupport::KeyGenerator.new(SessionSecret, iterations: 1000)
<ide> Rotations = ActiveSupport::Messages::RotationConfiguration.new
<ide>
<add> SameSite = proc { :lax }
<add>
<ide> Encryptor = ActiveSupport::MessageEncryptor.new(
<ide> Generator.generate_key(SessionSalt, 32), cipher: "aes-256-gcm", serializer: Marshal
<ide> )
<ide> def test_session_store_with_all_domains
<ide> end
<ide> end
<ide>
<add> test "default same_site derives SameSite from env" do
<add> with_test_route_set do
<add> get "/set_session_value"
<add> assert_match %r/SameSite=Lax/, headers["Set-Cookie"]
<add> end
<add> end
<add>
<add> test "explicit same_site sets SameSite" do
<add> with_test_route_set(same_site: :strict) do
<add> get "/set_session_value"
<add> assert_match %r/SameSite=Strict/, headers["Set-Cookie"]
<add> end
<add> end
<add>
<add> test "explicit nil same_site omits SameSite" do
<add> with_test_route_set(same_site: nil) do
<add> get "/set_session_value"
<add> assert_no_match %r/SameSite=/, headers["Set-Cookie"]
<add> end
<add> end
<add>
<ide> private
<del> # Overwrite get to send SessionSecret in env hash
<add> # Overwrite `get` to set env hash
<ide> def get(path, **options)
<ide> options[:headers] ||= {}
<ide> options[:headers].tap do |config|
<ide> def get(path, **options)
<ide>
<ide> config["action_dispatch.key_generator"] ||= Generator
<ide> config["action_dispatch.cookies_rotations"] ||= Rotations
<add>
<add> config["action_dispatch.cookies_same_site_protection"] ||= SameSite
<ide> end
<ide>
<ide> super
<ide><path>railties/test/application/configuration_test.rb
<ide> def index
<ide> make_basic_app
<ide>
<ide> assert_equal ActionDispatch::Session::CookieStore, app.config.session_store
<del> assert_equal session_options, app.config.session_options
<add> session_options.each do |key, value|
<add> assert_equal value, app.config.session_options[key]
<add> end
<ide> end
<ide>
<ide> test "config.log_level defaults to debug in development" do | 4 |
Javascript | Javascript | skip the windows path test for now | b2b702158213092d73615f1f75b20dd6df0ddec9 | <ide><path>test/NormalModule.test.js
<ide> describe("NormalModule", function() {
<ide> }).should.eql("../userRequest!../other/userRequest!../thing/is/off/here");
<ide> });
<ide> });
<del>
<del> describe("when running on a windows machine", function() {
<del> let sep;
<del> beforeEach(function() {
<del> userRequest = "some\\userRequest!some\\other\\userRequest!some\\thing\\is\\off\\here";
<del> sep = path.sep;
<del> path.sep = "\\";
<del> normalModule = new NormalModule(
<del> request,
<del> userRequest,
<del> rawRequest,
<del> loaders,
<del> resource,
<del> parser
<del> );
<del> });
<del> afterEach(function() {
<del> path.sep = sep;
<del> });
<del> it("contextifies every path in the userRequest", function() {
<del> normalModule.libIdent({
<del> context: "some/context"
<del> }).should.eql("../../some/userRequest!../../some/other/userRequest!../../some/thing/is/off/here");
<del> });
<del> });
<ide> });
<ide>
<ide> describe("#nameForCondition", function() { | 1 |
Python | Python | set version to v2.1.0a8 | 7d529ebdfb45fa0e624fe3f5dfd218e14c955c48 | <ide><path>spacy/about.py
<ide> # fmt: off
<ide>
<ide> __title__ = "spacy-nightly"
<del>__version__ = "2.1.0a8.dev1"
<add>__version__ = "2.1.0a8"
<ide> __summary__ = "Industrial-strength Natural Language Processing (NLP) with Python and Cython"
<ide> __uri__ = "https://spacy.io"
<ide> __author__ = "Explosion AI"
<ide> __email__ = "[email protected]"
<ide> __license__ = "MIT"
<del>__release__ = False
<add>__release__ = True
<ide>
<ide> __download_url__ = "https://github.com/explosion/spacy-models/releases/download"
<ide> __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json" | 1 |
Python | Python | fix tokenizer exceptions | 615dba9d99df0cd25fbecd8d58b19371da59a719 | <ide><path>spacy/lang/ky/tokenizer_exceptions.py
<ide> from ..tokenizer_exceptions import BASE_EXCEPTIONS
<del>from ...symbols import ORTH, LEMMA, NORM
<add>from ...symbols import ORTH, NORM
<ide> from ...util import update_exc
<ide>
<ide> _exc = {}
<ide>
<ide> _abbrev_exc = [
<ide> # Weekdays abbreviations
<del> {ORTH: "дүй", LEMMA: "дүйшөмбү"},
<del> {ORTH: "шей", LEMMA: "шейшемби"},
<del> {ORTH: "шар", LEMMA: "шаршемби"},
<del> {ORTH: "бей", LEMMA: "бейшемби"},
<del> {ORTH: "жум", LEMMA: "жума"},
<del> {ORTH: "ишм", LEMMA: "ишемби"},
<del> {ORTH: "жек", LEMMA: "жекшемби"},
<add> {ORTH: "дүй", NORM: "дүйшөмбү"},
<add> {ORTH: "шей", NORM: "шейшемби"},
<add> {ORTH: "шар", NORM: "шаршемби"},
<add> {ORTH: "бей", NORM: "бейшемби"},
<add> {ORTH: "жум", NORM: "жума"},
<add> {ORTH: "ишм", NORM: "ишемби"},
<add> {ORTH: "жек", NORM: "жекшемби"},
<ide> # Months abbreviations
<del> {ORTH: "янв", LEMMA: "январь"},
<del> {ORTH: "фев", LEMMA: "февраль"},
<del> {ORTH: "мар", LEMMA: "март"},
<del> {ORTH: "апр", LEMMA: "апрель"},
<del> {ORTH: "июн", LEMMA: "июнь"},
<del> {ORTH: "июл", LEMMA: "июль"},
<del> {ORTH: "авг", LEMMA: "август"},
<del> {ORTH: "сен", LEMMA: "сентябрь"},
<del> {ORTH: "окт", LEMMA: "октябрь"},
<del> {ORTH: "ноя", LEMMA: "ноябрь"},
<del> {ORTH: "дек", LEMMA: "декабрь"},
<add> {ORTH: "янв", NORM: "январь"},
<add> {ORTH: "фев", NORM: "февраль"},
<add> {ORTH: "мар", NORM: "март"},
<add> {ORTH: "апр", NORM: "апрель"},
<add> {ORTH: "июн", NORM: "июнь"},
<add> {ORTH: "июл", NORM: "июль"},
<add> {ORTH: "авг", NORM: "август"},
<add> {ORTH: "сен", NORM: "сентябрь"},
<add> {ORTH: "окт", NORM: "октябрь"},
<add> {ORTH: "ноя", NORM: "ноябрь"},
<add> {ORTH: "дек", NORM: "декабрь"},
<ide> # Number abbreviations
<del> {ORTH: "млрд", LEMMA: "миллиард"},
<del> {ORTH: "млн", LEMMA: "миллион"},
<add> {ORTH: "млрд", NORM: "миллиард"},
<add> {ORTH: "млн", NORM: "миллион"},
<ide> ]
<ide>
<ide> for abbr in _abbrev_exc:
<ide> for orth in (abbr[ORTH], abbr[ORTH].capitalize(), abbr[ORTH].upper()):
<del> _exc[orth] = [{ORTH: orth, LEMMA: abbr[LEMMA], NORM: abbr[LEMMA]}]
<del> _exc[orth + "."] = [{ORTH: orth + ".", LEMMA: abbr[LEMMA], NORM: abbr[LEMMA]}]
<add> _exc[orth] = [{ORTH: orth, NORM: abbr[NORM]}]
<add> _exc[orth + "."] = [{ORTH: orth + ".", NORM: abbr[NORM]}]
<ide>
<ide> for exc_data in [ # "etc." abbreviations
<ide> {ORTH: "ж.б.у.с.", NORM: "жана башка ушул сыяктуу"},
<ide> {ORTH: "көч.", NORM: "көчөсү"},
<ide> {ORTH: "м-н", NORM: "менен"},
<ide> {ORTH: "б-ча", NORM: "боюнча"},
<del>]:
<del> exc_data[LEMMA] = exc_data[NORM]
<del> _exc[exc_data[ORTH]] = [exc_data]
<add>]: _exc[exc_data[ORTH]] = [exc_data]
<ide>
<ide> TOKENIZER_EXCEPTIONS = update_exc(BASE_EXCEPTIONS, _exc) | 1 |
Python | Python | fix tf-idf again | 936360020cbd9e9e174c47554c49bfc9c96898f3 | <ide><path>keras/preprocessing/text.py
<ide> def sequences_to_matrix(self, sequences, mode='binary'):
<ide> # Use weighting scheme 2 in
<ide> # https://en.wikipedia.org/wiki/Tf%E2%80%93idf
<ide> tf = 1 + np.log(c)
<del> df = np.log(1 + self.index_docs.get(j, 0) / (1 + self.document_count))
<del> X[i][j] = tf / df
<add> idf = np.log(1 + self.document_count / (1 + self.index_docs.get(j, 0)))
<add> X[i][j] = tf * idf
<ide> else:
<ide> raise Exception('Unknown vectorization mode: ' + str(mode))
<ide> return X | 1 |
Javascript | Javascript | add thai language support | dff274ffb5db889164db04df24dc12b4ec85ab8c | <ide><path>lang/th.js
<add>// moment.js language configuration
<add>// language : thai (th)
<add>// author : Kridsada Thanabulpong : https://github.com/sirn
<add>(function () {
<add> var lang = {
<add> months : "มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),
<add> monthsShort : "มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),
<add> weekdays : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),
<add> weekdaysShort : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"), // yes, three characters difference
<add> weekdaysMin : "อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),
<add> longDateFormat : {
<add> LT : "H นาฬิกา m นาที",
<add> L : "YYYY/MM/DD",
<add> LL : "D MMMM YYYY",
<add> LLL : "D MMMM YYYY เวลา LT",
<add> LLLL : "วันddddที่ D MMMM YYYY เวลา LT"
<add> },
<add> meridiem : function (hour, minute, isLower) {
<add> if (hour < 12) {
<add> return "ก่อนเที่ยง";
<add> } else {
<add> return "หลังเที่ยง";
<add> }
<add> },
<add> calendar : {
<add> sameDay : '[วันนี้ เวลา] LT',
<add> nextDay : '[พรุ่งนี้ เวลา] LT',
<add> nextWeek : 'dddd[หน้า เวลา] LT',
<add> lastDay : '[เมื่อวานนี้ เวลา] LT',
<add> lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT',
<add> sameElse : 'L'
<add> },
<add> relativeTime : {
<add> future : "อีก %s",
<add> past : "%sที่ผ่านมา",
<add> s : "ไม่กี่วินาที",
<add> m : "1 นาที",
<add> mm : "%d นาที",
<add> h : "1 ชั่วโมง",
<add> hh : "%d ชั่วโมง",
<add> d : "1 วัน",
<add> dd : "%d วัน",
<add> M : "1 เดือน",
<add> MM : "%d เดือน",
<add> y : "1 ปี",
<add> yy : "%d ปี"
<add> },
<add> ordinal : function (number) {
<add> return '';
<add> }
<add> };
<add>
<add> // Node
<add> if (typeof module !== 'undefined' && module.exports) {
<add> module.exports = lang;
<add> }
<add> // Browser
<add> if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
<add> this.moment.lang('th', lang);
<add> }
<add>}());
<ide><path>test/lang/th.js
<add>var moment = require("../../moment");
<add>
<add>
<add> /**************************************************
<add> Thai
<add> *************************************************/
<add>
<add>exports["lang:th"] = {
<add> setUp : function (cb) {
<add> moment.lang('th');
<add> cb();
<add> },
<add>
<add> tearDown : function (cb) {
<add> moment.lang('en');
<add> cb();
<add> },
<add>
<add> "parse" : function(test) {
<add> test.expect(96);
<add>
<add> var tests = 'มกราคม มกรา_กุมภาพันธ์ กุมภา_มีนาคม มีนา_เมษายน เมษา_พฤษภาคม พฤษภา_มิถุนายน มิถุนา_กรกฎาคม กรกฎา_สิงหาคม สิงหา_กันยายน กันยา_ตุลาคม ตุลา_พฤศจิกายน พฤศจิกา_ธันวาคม ธันวา'.split("_");
<add> var i;
<add> function equalTest(input, mmm, i) {
<add> test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
<add> }
<add> for (i = 0; i < 12; i++) {
<add> tests[i] = tests[i].split(' ');
<add> equalTest(tests[i][0], 'MMM', i);
<add> equalTest(tests[i][1], 'MMM', i);
<add> equalTest(tests[i][0], 'MMMM', i);
<add> equalTest(tests[i][1], 'MMMM', i);
<add> equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
<add> equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
<add> equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
<add> equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
<add> }
<add> test.done();
<add> },
<add>
<add> "format" : function(test) {
<add> test.expect(18);
<add>
<add> var a = [
<add> ['dddd, Do MMMM YYYY, h:mm:ss a', 'อาทิตย์, 14 กุมภาพันธ์ 2010, 3:25:50 หลังเที่ยง'],
<add> ['ddd, h A', 'อาทิตย์, 3 หลังเที่ยง'],
<add> ['M Mo MM MMMM MMM', '2 2 02 กุมภาพันธ์ กุมภา'],
<add> ['YYYY YY', '2010 10'],
<add> ['D Do DD', '14 14 14'],
<add> ['d do dddd ddd dd', '0 0 อาทิตย์ อาทิตย์ อา.'],
<add> ['DDD DDDo DDDD', '45 45 045'],
<add> ['w wo ww', '8 8 08'],
<add> ['h hh', '3 03'],
<add> ['H HH', '15 15'],
<add> ['m mm', '25 25'],
<add> ['s ss', '50 50'],
<add> ['a A', 'หลังเที่ยง หลังเที่ยง'],
<add> ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45 day of the year'],
<add> ['L', '2010/02/14'],
<add> ['LL', '14 กุมภาพันธ์ 2010'],
<add> ['LLL', '14 กุมภาพันธ์ 2010 เวลา 15 นาฬิกา 25 นาที'],
<add> ['LLLL', 'วันอาทิตย์ที่ 14 กุมภาพันธ์ 2010 เวลา 15 นาฬิกา 25 นาที']
<add> ],
<add> b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
<add> i;
<add> for (i = 0; i < a.length; i++) {
<add> test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
<add> }
<add> test.done();
<add> },
<add>
<add> "format month" : function(test) {
<add> test.expect(12);
<add>
<add> var expected = 'มกราคม มกรา_กุมภาพันธ์ กุมภา_มีนาคม มีนา_เมษายน เมษา_พฤษภาคม พฤษภา_มิถุนายน มิถุนา_กรกฎาคม กรกฎา_สิงหาคม สิงหา_กันยายน กันยา_ตุลาคม ตุลา_พฤศจิกายน พฤศจิกา_ธันวาคม ธันวา'.split("_");
<add> var i;
<add> for (i = 0; i < expected.length; i++) {
<add> test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
<add> }
<add> test.done();
<add> },
<add>
<add> "format week" : function(test) {
<add> test.expect(7);
<add>
<add> var expected = 'อาทิตย์ อาทิตย์ อา._จันทร์ จันทร์ จ._อังคาร อังคาร อ._พุธ พุธ พ._พฤหัสบดี พฤหัส พฤ._ศุกร์ ศุกร์ ศ._เสาร์ เสาร์ ส.'.split("_");
<add> var i;
<add> for (i = 0; i < expected.length; i++) {
<add> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
<add> }
<add> test.done();
<add> },
<add>
<add> "from" : function(test) {
<add> test.expect(30);
<add>
<add> var start = moment([2007, 1, 28]);
<add> test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "ไม่กี่วินาที", "44 seconds = a few seconds");
<add> test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "1 นาที", "45 seconds = a minute");
<add> test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "1 นาที", "89 seconds = a minute");
<add> test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 นาที", "90 seconds = 2 minutes");
<add> test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 นาที", "44 minutes = 44 minutes");
<add> test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "1 ชั่วโมง", "45 minutes = an hour");
<add> test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "1 ชั่วโมง", "89 minutes = an hour");
<add> test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 ชั่วโมง", "90 minutes = 2 hours");
<add> test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 ชั่วโมง", "5 hours = 5 hours");
<add> test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 ชั่วโมง", "21 hours = 21 hours");
<add> test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "1 วัน", "22 hours = a day");
<add> test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "1 วัน", "35 hours = a day");
<add> test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 วัน", "36 hours = 2 days");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "1 วัน", "1 day = a day");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 วัน", "5 days = 5 days");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 วัน", "25 days = 25 days");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "1 เดือน", "26 days = a month");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "1 เดือน", "30 days = a month");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "1 เดือน", "45 days = a month");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 เดือน", "46 days = 2 months");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 เดือน", "75 days = 2 months");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 เดือน", "76 days = 3 months");
<add> test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "1 เดือน", "1 month = a month");
<add> test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 เดือน", "5 months = 5 months");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 เดือน", "344 days = 11 months");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "1 ปี", "345 days = a year");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "1 ปี", "547 days = a year");
<add> test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 ปี", "548 days = 2 years");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "1 ปี", "1 year = a year");
<add> test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 ปี", "5 years = 5 years");
<add> test.done();
<add> },
<add>
<add> "suffix" : function(test) {
<add> test.expect(2);
<add> test.equal(moment(30000).from(0), "อีก ไม่กี่วินาที", "prefix");
<add> test.equal(moment(0).from(30000), "ไม่กี่วินาทีที่ผ่านมา", "suffix");
<add> test.done();
<add> },
<add>
<add> "now from now" : function(test) {
<add> test.expect(1);
<add> test.equal(moment().fromNow(), "ไม่กี่วินาทีที่ผ่านมา", "now from now should display as in the past");
<add> test.done();
<add> },
<add>
<add> "fromNow" : function(test) {
<add> test.expect(2);
<add> test.equal(moment().add({s:30}).fromNow(), "อีก ไม่กี่วินาที", "in a few seconds");
<add> test.equal(moment().add({d:5}).fromNow(), "อีก 5 วัน", "in 5 days");
<add> test.done();
<add> },
<add>
<add> "calendar day" : function(test) {
<add> test.expect(6);
<add>
<add> var a = moment().hours(2).minutes(0).seconds(0);
<add>
<add> test.equal(moment(a).calendar(), "วันนี้ เวลา 2 นาฬิกา 0 นาที", "today at the same time");
<add> test.equal(moment(a).add({ m: 25 }).calendar(), "วันนี้ เวลา 2 นาฬิกา 25 นาที", "Now plus 25 min");
<add> test.equal(moment(a).add({ h: 1 }).calendar(), "วันนี้ เวลา 3 นาฬิกา 0 นาที", "Now plus 1 hour");
<add> test.equal(moment(a).add({ d: 1 }).calendar(), "พรุ่งนี้ เวลา 2 นาฬิกา 0 นาที", "tomorrow at the same time");
<add> test.equal(moment(a).subtract({ h: 1 }).calendar(), "วันนี้ เวลา 1 นาฬิกา 0 นาที", "Now minus 1 hour");
<add> test.equal(moment(a).subtract({ d: 1 }).calendar(), "เมื่อวานนี้ เวลา 2 นาฬิกา 0 นาที", "yesterday at the same time");
<add> test.done();
<add> },
<add>
<add> "calendar next week" : function(test) {
<add> test.expect(15);
<add>
<add> var i;
<add> var m;
<add>
<add> for (i = 2; i < 7; i++) {
<add> m = moment().add({ d: i });
<add> test.equal(m.calendar(), m.format('dddd[หน้า เวลา] LT'), "Today + " + i + " days current time");
<add> m.hours(0).minutes(0).seconds(0).milliseconds(0);
<add> test.equal(m.calendar(), m.format('dddd[หน้า เวลา] LT'), "Today + " + i + " days beginning of day");
<add> m.hours(23).minutes(59).seconds(59).milliseconds(999);
<add> test.equal(m.calendar(), m.format('dddd[หน้า เวลา] LT'), "Today + " + i + " days end of day");
<add> }
<add> test.done();
<add> },
<add>
<add> "calendar last week" : function(test) {
<add> test.expect(15);
<add>
<add> var i;
<add> var m;
<add>
<add> for (i = 2; i < 7; i++) {
<add> m = moment().subtract({ d: i });
<add> test.equal(m.calendar(), m.format('[วัน]dddd[ที่แล้ว เวลา] LT'), "Today - " + i + " days current time");
<add> m.hours(0).minutes(0).seconds(0).milliseconds(0);
<add> test.equal(m.calendar(), m.format('[วัน]dddd[ที่แล้ว เวลา] LT'), "Today - " + i + " days beginning of day");
<add> m.hours(23).minutes(59).seconds(59).milliseconds(999);
<add> test.equal(m.calendar(), m.format('[วัน]dddd[ที่แล้ว เวลา] LT'), "Today - " + i + " days end of day");
<add> }
<add> test.done();
<add> },
<add>
<add> "calendar all else" : function(test) {
<add> test.expect(4);
<add>
<add> var weeksAgo = moment().subtract({ w: 1 });
<add> var weeksFromNow = moment().add({ w: 1 });
<add>
<add> test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
<add> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
<add>
<add> weeksAgo = moment().subtract({ w: 2 });
<add> weeksFromNow = moment().add({ w: 2 });
<add>
<add> test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
<add> test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
<add> test.done();
<add> },
<add>
<add> // Sunday is the first day of the week.
<add> // The week that contains Jan 1st is the first week of the year.
<add>
<add> "weeks year starting sunday" : function(test) {
<add> test.expect(5);
<add>
<add> test.equal(moment([2012, 0, 1]).week(), 1, "Jan 1 2012 should be week 1");
<add> test.equal(moment([2012, 0, 7]).week(), 1, "Jan 7 2012 should be week 1");
<add> test.equal(moment([2012, 0, 8]).week(), 2, "Jan 8 2012 should be week 2");
<add> test.equal(moment([2012, 0, 14]).week(), 2, "Jan 14 2012 should be week 2");
<add> test.equal(moment([2012, 0, 15]).week(), 3, "Jan 15 2012 should be week 3");
<add>
<add> test.done();
<add> },
<add>
<add> "weeks year starting monday" : function(test) {
<add> test.expect(6);
<add>
<add> test.equal(moment([2006, 11, 31]).week(), 1, "Dec 31 2006 should be week 1");
<add> test.equal(moment([2007, 0, 1]).week(), 1, "Jan 1 2007 should be week 1");
<add> test.equal(moment([2007, 0, 6]).week(), 1, "Jan 6 2007 should be week 1");
<add> test.equal(moment([2007, 0, 7]).week(), 2, "Jan 7 2007 should be week 2");
<add> test.equal(moment([2007, 0, 13]).week(), 2, "Jan 13 2007 should be week 2");
<add> test.equal(moment([2007, 0, 14]).week(), 3, "Jan 14 2007 should be week 3");
<add>
<add> test.done();
<add> },
<add>
<add> "weeks year starting tuesday" : function(test) {
<add> test.expect(6);
<add>
<add> test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
<add> test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");
<add> test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");
<add> test.equal(moment([2008, 0, 6]).week(), 2, "Jan 6 2008 should be week 2");
<add> test.equal(moment([2008, 0, 12]).week(), 2, "Jan 12 2008 should be week 2");
<add> test.equal(moment([2008, 0, 13]).week(), 3, "Jan 13 2008 should be week 3");
<add>
<add> test.done();
<add> },
<add>
<add> "weeks year starting wednesday" : function(test) {
<add> test.expect(6);
<add>
<add> test.equal(moment([2002, 11, 29]).week(), 1, "Dec 29 2002 should be week 1");
<add> test.equal(moment([2003, 0, 1]).week(), 1, "Jan 1 2003 should be week 1");
<add> test.equal(moment([2003, 0, 4]).week(), 1, "Jan 4 2003 should be week 1");
<add> test.equal(moment([2003, 0, 5]).week(), 2, "Jan 5 2003 should be week 2");
<add> test.equal(moment([2003, 0, 11]).week(), 2, "Jan 11 2003 should be week 2");
<add> test.equal(moment([2003, 0, 12]).week(), 3, "Jan 12 2003 should be week 3");
<add>
<add> test.done();
<add> },
<add>
<add> "weeks year starting thursday" : function(test) {
<add> test.expect(6);
<add>
<add> test.equal(moment([2008, 11, 28]).week(), 1, "Dec 28 2008 should be week 1");
<add> test.equal(moment([2009, 0, 1]).week(), 1, "Jan 1 2009 should be week 1");
<add> test.equal(moment([2009, 0, 3]).week(), 1, "Jan 3 2009 should be week 1");
<add> test.equal(moment([2009, 0, 4]).week(), 2, "Jan 4 2009 should be week 2");
<add> test.equal(moment([2009, 0, 10]).week(), 2, "Jan 10 2009 should be week 2");
<add> test.equal(moment([2009, 0, 11]).week(), 3, "Jan 11 2009 should be week 3");
<add>
<add> test.done();
<add> },
<add>
<add> "weeks year starting friday" : function(test) {
<add> test.expect(6);
<add>
<add> test.equal(moment([2009, 11, 27]).week(), 1, "Dec 27 2009 should be week 1");
<add> test.equal(moment([2010, 0, 1]).week(), 1, "Jan 1 2010 should be week 1");
<add> test.equal(moment([2010, 0, 2]).week(), 1, "Jan 2 2010 should be week 1");
<add> test.equal(moment([2010, 0, 3]).week(), 2, "Jan 3 2010 should be week 2");
<add> test.equal(moment([2010, 0, 9]).week(), 2, "Jan 9 2010 should be week 2");
<add> test.equal(moment([2010, 0, 10]).week(), 3, "Jan 10 2010 should be week 3");
<add>
<add> test.done();
<add> },
<add>
<add> "weeks year starting saturday" : function(test) {
<add> test.expect(5);
<add>
<add> test.equal(moment([2010, 11, 26]).week(), 1, "Dec 26 2010 should be week 1");
<add> test.equal(moment([2011, 0, 1]).week(), 1, "Jan 1 2011 should be week 1");
<add> test.equal(moment([2011, 0, 2]).week(), 2, "Jan 2 2011 should be week 2");
<add> test.equal(moment([2011, 0, 8]).week(), 2, "Jan 8 2011 should be week 2");
<add> test.equal(moment([2011, 0, 9]).week(), 3, "Jan 9 2011 should be week 3");
<add>
<add> test.done();
<add> },
<add>
<add> "weeks year starting sunday format" : function(test) {
<add> test.expect(5);
<add>
<add> test.equal(moment([2012, 0, 1]).format('w ww wo'), '1 01 1', "Jan 1 2012 should be week 1");
<add> test.equal(moment([2012, 0, 7]).format('w ww wo'), '1 01 1', "Jan 7 2012 should be week 1");
<add> test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2', "Jan 8 2012 should be week 2");
<add> test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2', "Jan 14 2012 should be week 2");
<add> test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3', "Jan 15 2012 should be week 3");
<add>
<add> test.done();
<add> }
<add>}; | 2 |
Javascript | Javascript | fix promise.wait() for fired promises | 490cac0d7e9b455de74eb6038e555a60a2fafe13 | <ide><path>src/node.js
<ide> var eventsModule = createInternalModule('events', function (exports) {
<ide> var ret;
<ide> var hadError = false;
<ide>
<add> if (this.hasFired) {
<add> ret = (this._values.length == 1)
<add> ? this._values[0]
<add> : this.values;
<add>
<add> if (this.hasFired == 'success') {
<add> return ret;
<add> } else if (this.hasFired == 'error') {
<add> throw ret;
<add> }
<add> }
<add>
<ide> self.addCallback(function () {
<ide> if (arguments.length == 1) {
<ide> ret = arguments[0]; | 1 |
Text | Text | add note for wikisplit | f3312515b7cf66de65b71b623a4cb719517d4fc0 | <ide><path>model_cards/google/roberta2roberta_L-24_wikisplit/README.md
<ide> Disclaimer: The model card has been written by the Hugging Face team.
<ide>
<ide> You can use this model for sentence splitting, *e.g.*
<ide>
<add>**IMPORTANT**: The model was not trained on the `"` (double quotation mark) character -> so the before tokenizing the text,
<add>it is advised to replace all `"` (double quotation marks) with two single `'` (single quotation mark).
<add>
<ide> ```python
<ide> from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
<ide> | 1 |
Python | Python | use simple git clone call if not sparse | a0fb5e50dbb1e24901f7b1470ee53cc6bce7a4d6 | <ide><path>spacy/cli/_util.py
<ide> def git_checkout(
<ide> msg.fail("Destination of checkout must not exist", exits=1)
<ide> if not dest.parent.exists():
<ide> raise IOError("Parent of destination of checkout must exist")
<add>
<add> if sparse and git_version >= (2, 22):
<add> return git_sparse_checkout(repo, subpath, dest, branch)
<add> elif sparse:
<add> # Only show warnings if the user explicitly wants sparse checkout but
<add> # the Git version doesn't support it
<add> err_old = (
<add> f"You're running an old version of Git (v{git_version[0]}.{git_version[1]}) "
<add> f"that doesn't fully support sparse checkout yet."
<add> )
<add> err_unk = "You're running an unknown version of Git, so sparse checkout has been disabled."
<add> msg.warn(
<add> f"{err_unk if git_version == (0, 0) else err_old} "
<add> f"This means that more files than necessary may be downloaded "
<add> f"temporarily. To only download the files needed, make sure "
<add> f"you're using Git v2.22 or above."
<add> )
<add> with make_tempdir() as tmp_dir:
<add> cmd = f"git -C {tmp_dir} clone {repo} . -b {branch}"
<add> ret = run_command(cmd, capture=True)
<add> # We need Path(name) to make sure we also support subdirectories
<add> shutil.copytree(str(tmp_dir / Path(subpath)), str(dest))
<add>
<add>
<add>def git_sparse_checkout(repo, subpath, dest, branch):
<ide> # We're using Git, partial clone and sparse checkout to
<ide> # only clone the files we need
<ide> # This ends up being RIDICULOUS. omg.
<ide> def git_checkout(
<ide> # *that* we can do by path.
<ide> # We're using Git and sparse checkout to only clone the files we need
<ide> with make_tempdir() as tmp_dir:
<del> supports_sparse = git_version >= (2, 22)
<del> use_sparse = supports_sparse and sparse
<ide> # This is the "clone, but don't download anything" part.
<del> cmd = f"git clone {repo} {tmp_dir} --no-checkout --depth 1 " f"-b {branch} "
<del> if use_sparse:
<del> cmd += f"--filter=blob:none" # <-- The key bit
<del> # Only show warnings if the user explicitly wants sparse checkout but
<del> # the Git version doesn't support it
<del> elif sparse:
<del> err_old = (
<del> f"You're running an old version of Git (v{git_version[0]}.{git_version[1]}) "
<del> f"that doesn't fully support sparse checkout yet."
<del> )
<del> err_unk = "You're running an unknown version of Git, so sparse checkout has been disabled."
<del> msg.warn(
<del> f"{err_unk if git_version == (0, 0) else err_old} "
<del> f"This means that more files than necessary may be downloaded "
<del> f"temporarily. To only download the files needed, make sure "
<del> f"you're using Git v2.22 or above."
<del> )
<del> try_run_command(cmd)
<add> cmd = f"git clone {repo} {tmp_dir} --no-checkout --depth 1 " f"-b {branch} --filter=blob:none"
<add> run_command(cmd)
<ide> # Now we need to find the missing filenames for the subpath we want.
<ide> # Looking for this 'rev-list' command in the git --help? Hah.
<ide> cmd = f"git -C {tmp_dir} rev-list --objects --all {'--missing=print ' if use_sparse else ''} -- {subpath}"
<del> ret = try_run_command(cmd)
<add> ret = run_command(cmd, capture=True)
<ide> git_repo = _from_http_to_git(repo)
<ide> # Now pass those missings into another bit of git internals
<ide> missings = " ".join([x[1:] for x in ret.stdout.split() if x.startswith("?")])
<del> if use_sparse and not missings:
<add> if not missings:
<ide> err = (
<ide> f"Could not find any relevant files for '{subpath}'. "
<ide> f"Did you specify a correct and complete path within repo '{repo}' "
<ide> f"and branch {branch}?"
<ide> )
<ide> msg.fail(err, exits=1)
<del> if use_sparse:
<del> cmd = f"git -C {tmp_dir} fetch-pack {git_repo} {missings}"
<del> try_run_command(cmd)
<add> cmd = f"git -C {tmp_dir} fetch-pack {git_repo} {missings}"
<add> run_command(cmd, capture=True)
<ide> # And finally, we can checkout our subpath
<ide> cmd = f"git -C {tmp_dir} checkout {branch} {subpath}"
<del> try_run_command(cmd)
<add> run_command(cmd, capture=True)
<ide> # We need Path(name) to make sure we also support subdirectories
<ide> shutil.move(str(tmp_dir / Path(subpath)), str(dest))
<ide>
<ide> def get_git_version(
<ide> RETURNS (Tuple[int, int]): The version as a (major, minor) tuple. Returns
<ide> (0, 0) if the version couldn't be determined.
<ide> """
<del> ret = try_run_command(["git", "--version"], error=error)
<add> ret = run_command("git --version", capture=True)
<ide> stdout = ret.stdout.strip()
<ide> if not stdout or not stdout.startswith("git version"):
<ide> return (0, 0)
<ide> version = stdout[11:].strip().split(".")
<ide> return (int(version[0]), int(version[1]))
<ide>
<ide>
<del>def try_run_command(
<del> cmd: Union[str, List[str]], error: str = "Could not run command"
<del>) -> subprocess.CompletedProcess:
<del> """Try running a command and raise an error if it fails.
<del>
<del> cmd (Union[str, List[str]]): The command to run.
<del> error (str): The error message.
<del> RETURNS (CompletedProcess): The completed process if the command ran.
<del> """
<del> try:
<del> return run_command(cmd, capture=True)
<del> except subprocess.CalledProcessError as e:
<del> msg.fail(error)
<del> print(cmd)
<del> sys.exit(1)
<del>
<del>
<ide> def _from_http_to_git(repo: str) -> str:
<ide> if repo.startswith("http://"):
<ide> repo = repo.replace(r"http://", r"https://") | 1 |
Java | Java | remove trailing whitespace in java source code | b6c0e7cba3de036b96fb84c8893cdd0ac316194e | <ide><path>spring-core/src/test/java/org/springframework/util/AntPathMatcherTests.java
<ide> public void patternComparator() {
<ide>
<ide> // longer is better
<ide> assertEquals(1, comparator.compare("/hotels", "/hotels2"));
<del>
<add>
<ide> //SPR-13139
<ide> assertEquals(-1, comparator.compare("*", "*/**"));
<ide> assertEquals(1, comparator.compare("*/**", "*"));
<ide><path>spring-expression/src/test/java/org/springframework/expression/spel/SpelCompilationCoverageTests.java
<ide> public void failsWhenSettingContextForExpression_SPR12326() {
<ide> context.setVariable("it", person);
<ide> expression.setEvaluationContext(context);
<ide> assertTrue(expression.getValue(Boolean.class));
<del> assertTrue(expression.getValue(Boolean.class));
<add> assertTrue(expression.getValue(Boolean.class));
<ide> assertCanCompile(expression);
<ide> assertTrue(expression.getValue(Boolean.class));
<ide> }
<ide> public void fourteen(String a, String[]... vargs) {
<ide> for (String[] varg: vargs) {
<ide> s+="{";
<ide> for (String v: varg) {
<del> s+=v;
<add> s+=v;
<ide> }
<ide> s+="}";
<ide> }
<ide> public void fifteen(String a, int[]... vargs) {
<ide> for (int[] varg: vargs) {
<ide> s+="{";
<ide> for (int v: varg) {
<del> s+=Integer.toString(v);
<add> s+=Integer.toString(v);
<ide> }
<ide> s+="}";
<ide> }
<ide> public Obj3(int... params) {
<ide> }
<ide> output = b.toString();
<ide> }
<del>
<add>
<ide> public Obj3(String s, Float f, int... ints) {
<ide> StringBuilder b = new StringBuilder();
<ide> b.append(s);
<ide> public Obj3(String s, Float f, int... ints) {
<ide> }
<ide>
<ide> public static class Obj4 {
<del>
<add>
<ide> public final String output;
<ide>
<ide> public Obj4(int[] params) {
<ide><path>spring-web/src/test/java/org/springframework/http/client/OkHttpAsyncClientHttpRequestFactoryTests.java
<ide> * @author Luciano Leggieri
<ide> */
<ide> public class OkHttpAsyncClientHttpRequestFactoryTests extends AbstractAsyncHttpRequestFactoryTestCase {
<del>
<add>
<ide> @Override
<ide> protected AsyncClientHttpRequestFactory createRequestFactory() {
<ide> return new OkHttpClientHttpRequestFactory();
<ide><path>spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorTests.java
<ide> public List<ParentClass> handleList() {
<ide> return list;
<ide> }
<ide> }
<del>
<add>
<ide> private static class EmptyRequestBodyAdvice implements RequestBodyAdvice {
<ide>
<ide> @Override | 4 |
Python | Python | add test to catch imports at flask instantiation | 26a9c2079d77aba93dde6f95472f3d89d2d9783d | <ide><path>flask/testsuite/helpers.py
<ide> def post(self):
<ide> '/myview/create')
<ide>
<ide>
<add>class NoImportsTestCase(FlaskTestCase):
<add> "Test Flasks are created without __import__."
<add>
<add> def test_name_with_import_error(self):
<add> try:
<add> flask.Flask('importerror')
<add> except NotImplementedError:
<add> self.fail('Flask(import_name) is importing import_name.')
<add>
<add>
<ide> def suite():
<ide> suite = unittest.TestSuite()
<ide> if flask.json_available:
<ide> suite.addTest(unittest.makeSuite(JSONTestCase))
<ide> suite.addTest(unittest.makeSuite(SendfileTestCase))
<ide> suite.addTest(unittest.makeSuite(LoggingTestCase))
<add> suite.addTest(unittest.makeSuite(NoImportsTestCase))
<ide> return suite
<ide><path>flask/testsuite/test_apps/importerror.py
<add># NoImportsTestCase
<add>raise NotImplementedError | 2 |
Javascript | Javascript | use strict equalities in src/core/jbig2.js | 4899e9e54fb8af24d25367d283662afcfcf215f5 | <ide><path>src/core/jbig2.js
<ide> var Jbig2Image = (function Jbig2ImageClosure() {
<ide> firstS += deltaFirstS;
<ide> var currentS = firstS;
<ide> do {
<del> var currentT = (stripSize == 1 ? 0 :
<add> var currentT = (stripSize === 1 ? 0 :
<ide> decodeInteger(contextCache, 'IAIT', decoder)); // 6.4.9
<ide> var t = stripSize * stripT + currentT;
<ide> var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength);
<ide> var Jbig2Image = (function Jbig2ImageClosure() {
<ide> var referredToCount = (referredFlags >> 5) & 7;
<ide> var retainBits = [referredFlags & 31];
<ide> var position = start + 6;
<del> if (referredFlags == 7) {
<add> if (referredFlags === 7) {
<ide> referredToCount = readUint32(data, position - 1) & 0x1FFFFFFF;
<ide> position += 3;
<ide> var bytes = (referredToCount + 7) >> 3;
<ide> retainBits[0] = data[position++];
<ide> while (--bytes > 0) {
<ide> retainBits.push(data[position++]);
<ide> }
<del> } else if (referredFlags == 5 || referredFlags == 6) {
<add> } else if (referredFlags === 5 || referredFlags === 6) {
<ide> error('JBIG2 error: invalid referred-to flags');
<ide> }
<ide>
<ide> var Jbig2Image = (function Jbig2ImageClosure() {
<ide> var referredTo = [];
<ide> var i, ii;
<ide> for (i = 0; i < referredToCount; i++) {
<del> var number = (referredToSegmentNumberSize == 1 ? data[position] :
<del> (referredToSegmentNumberSize == 2 ? readUint16(data, position) :
<add> var number = (referredToSegmentNumberSize === 1 ? data[position] :
<add> (referredToSegmentNumberSize === 2 ? readUint16(data, position) :
<ide> readUint32(data, position)));
<ide> referredTo.push(number);
<ide> position += referredToSegmentNumberSize;
<ide> var Jbig2Image = (function Jbig2ImageClosure() {
<ide> segmentHeader.length = readUint32(data, position);
<ide> position += 4;
<ide>
<del> if (segmentHeader.length == 0xFFFFFFFF) {
<add> if (segmentHeader.length === 0xFFFFFFFF) {
<ide> // 7.2.7 Segment data length, unknown segment length
<ide> if (segmentType === 38) { // ImmediateGenericRegion
<ide> var genericRegionInfo = readRegionSegmentInformation(data, position);
<ide> var Jbig2Image = (function Jbig2ImageClosure() {
<ide> while (j < searchPatternLength && searchPattern[j] === data[i + j]) {
<ide> j++;
<ide> }
<del> if (j == searchPatternLength) {
<add> if (j === searchPatternLength) {
<ide> segmentHeader.length = i + searchPatternLength;
<ide> break;
<ide> }
<ide> }
<del> if (segmentHeader.length == 0xFFFFFFFF) {
<add> if (segmentHeader.length === 0xFFFFFFFF) {
<ide> error('JBIG2 error: segment end was not found');
<ide> }
<ide> } else {
<ide> var Jbig2Image = (function Jbig2ImageClosure() {
<ide> segment.end = position;
<ide> }
<ide> segments.push(segment);
<del> if (segmentHeader.type == 51) {
<add> if (segmentHeader.type === 51) {
<ide> break; // end of file is found
<ide> }
<ide> }
<ide> var Jbig2Image = (function Jbig2ImageClosure() {
<ide> resolutionX: readUint32(data, position + 8),
<ide> resolutionY: readUint32(data, position + 12)
<ide> };
<del> if (pageInfo.height == 0xFFFFFFFF) {
<add> if (pageInfo.height === 0xFFFFFFFF) {
<ide> delete pageInfo.height;
<ide> }
<ide> var pageSegmentFlags = data[position + 16];
<ide> var Jbig2Image = (function Jbig2ImageClosure() {
<ide>
<ide> function parseJbig2(data, start, end) {
<ide> var position = start;
<del> if (data[position] != 0x97 || data[position + 1] != 0x4A ||
<del> data[position + 2] != 0x42 || data[position + 3] != 0x32 ||
<del> data[position + 4] != 0x0D || data[position + 5] != 0x0A ||
<del> data[position + 6] != 0x1A || data[position + 7] != 0x0A) {
<add> if (data[position] !== 0x97 || data[position + 1] !== 0x4A ||
<add> data[position + 2] !== 0x42 || data[position + 3] !== 0x32 ||
<add> data[position + 4] !== 0x0D || data[position + 5] !== 0x0A ||
<add> data[position + 6] !== 0x1A || data[position + 7] !== 0x0A) {
<ide> error('JBIG2 error: invalid header');
<ide> }
<ide> var header = {}; | 1 |
Javascript | Javascript | add fixer for no-let-in-for-declaration | 04ffa36e2307ede5a5d94afc3cca659b70fb4011 | <ide><path>test/parallel/test-eslint-no-let-in-for-declaration.js
<ide> ruleTester.run('no-let-in-for-declaration', rule, {
<ide> invalid: [
<ide> {
<ide> code: 'for (let foo = 1;;);',
<add> output: 'for (var foo = 1;;);',
<ide> errors: [{ message }]
<ide> },
<ide> {
<ide> code: 'for (let foo in bar);',
<add> output: 'for (var foo in bar);',
<ide> errors: [{ message }]
<ide> },
<ide> {
<ide> code: 'for (let foo of bar);',
<add> output: 'for (var foo of bar);',
<ide> errors: [{ message }]
<ide> }
<ide> ]
<ide><path>tools/eslint-rules/no-let-in-for-declaration.js
<ide>
<ide> module.exports = {
<ide> create(context) {
<del>
<add> const sourceCode = context.getSourceCode();
<ide> const msg = 'Use of `let` as the loop variable in a for-loop is ' +
<ide> 'not recommended. Please use `var` instead.';
<ide>
<ide> module.exports = {
<ide> */
<ide> function testForLoop(node) {
<ide> if (node.init && node.init.kind === 'let') {
<del> context.report(node.init, msg);
<add> context.report({
<add> node: node.init,
<add> message: msg,
<add> fix: (fixer) =>
<add> fixer.replaceText(sourceCode.getFirstToken(node.init), 'var')
<add> });
<ide> }
<ide> }
<ide>
<ide> module.exports = {
<ide> */
<ide> function testForInOfLoop(node) {
<ide> if (node.left && node.left.kind === 'let') {
<del> context.report(node.left, msg);
<add> context.report({
<add> node: node.left,
<add> message: msg,
<add> fix: (fixer) =>
<add> fixer.replaceText(sourceCode.getFirstToken(node.left), 'var')
<add> });
<ide> }
<ide> }
<ide> | 2 |
Python | Python | fix paramiko tests on python 2.7 | 987a22d7c384c8fff4a0a02ec4d1f6f93d043e7d | <ide><path>libcloud/__init__.py
<ide>
<ide> :var __version__: Current version of libcloud
<ide> """
<add>import logging
<ide> import os
<ide> import codecs
<ide>
<ide> def _init_once():
<ide> enable_debug(fo)
<ide>
<ide> if have_paramiko:
<del> paramiko.common.logging.basicConfig(level=paramiko.common.DEBUG)
<add> paramiko_logger = paramiko.util.logging.getLogger()
<add> paramiko_logger.setLevel(logging.DEBUG)
<ide>
<ide> _init_once()
<ide><path>libcloud/test/test_init.py
<ide> def test_init_once_and_debug_mode(self):
<ide> if have_paramiko:
<ide> logger = paramiko.util.logging.getLogger()
<ide> paramiko_log_level = logger.getEffectiveLevel()
<del> self.assertEqual(paramiko_log_level, logging.WARNING)
<add> self.assertEqual(paramiko_log_level, logging.NOTSET)
<ide>
<ide> # Enable debug mode
<ide> os.environ['LIBCLOUD_DEBUG'] = '/dev/null' | 2 |
Python | Python | fix syntaxerror on 2.5 in call to print_exception | 1f2113c2c3677fd3eed2b8eb2c08c7e7271cd09a | <ide><path>celery/utils/threads.py
<ide> def body(self):
<ide>
<ide> def on_crash(self, exc_info, msg, *fmt, **kwargs):
<ide> sys.stderr.write((msg + "\n") % fmt)
<del> traceback.print_exception(*exc_info, file=sys.stderr)
<add> traceback.print_exception(exc_info[0],
<add> exc_info[1],
<add> exc_info[2],
<add> None, sys.__stderr__)
<ide>
<ide> def run(self):
<ide> shutdown = self._is_shutdown
<ide><path>celery/utils/timer2.py
<ide> def apply_entry(self, entry):
<ide> if not self.schedule.handle_error(exc_info):
<ide> warnings.warn(TimedFunctionFailed(repr(exc))),
<ide> sys.stderr.write("Error in timer: %r\n" % (exc, ))
<del> traceback.print_exception(*exc_info, file=sys.stderr)
<add> traceback.print_exception(exc_info[0],
<add> exc_info[1],
<add> exc_info[2],
<add> None, sys.__stderr__)
<ide> finally:
<ide> del(exc_info)
<ide> | 2 |
Text | Text | add faq about guide articles | 7deecf8245148dca8703953955462b58ff90e1d3 | <ide><path>CONTRIBUTING.md
<ide> Essentially, we expect basic familiarity with some of the aforementioned technol
<ide>
<ide> ## Frequently Asked Questions
<ide>
<add>### Where are the Guide articles (guide.freecodecamp.org)? How can I contribute to them?
<add>
<add>We will not have the general guide articles anymore. Instead we intend to publish these as tutorials that are curated by the editorial team. These would then be published by them on the Developer News.
<add>
<add>The challenge hints and articles will still be available on the forum which we have already migrated.
<add>
<ide> ### Can I translate freeCodeCamp's curriculum?
<ide>
<ide> We do intend to make the curriculum available in more languages, right now we do not have a timeline for this. | 1 |
PHP | PHP | fix auth class comments | b8e534a117596c078b46a8c14d5f3226f62420ee | <ide><path>system/auth.php
<ide> public static function user()
<ide> * by the Hash class when authenticating.
<ide> *
<ide> * <code>
<del> * if (Auth::login('[email protected]', 'secret'))
<add> * if (Auth::attempt('[email protected]', 'secret'))
<ide> * {
<ide> * // The credentials are valid...
<ide> * } | 1 |
Ruby | Ruby | write the code in a more natural way | 2c89d1dda4077b2a99ddcced59bdd7a9a21b39a0 | <ide><path>actionpack/lib/action_dispatch/journey/nodes/node.rb
<ide> def to_sym
<ide> end
<ide>
<ide> def name
<del> -(left.tr "*:", "")
<add> -left.tr("*:", "")
<ide> end
<ide>
<ide> def type
<ide> class Symbol < Terminal # :nodoc:
<ide> def initialize(left)
<ide> super
<ide> @regexp = DEFAULT_EXP
<del> @name = -(left.tr "*:", "")
<add> @name = -left.tr("*:", "")
<ide> end
<ide>
<ide> def default_regexp? | 1 |
Javascript | Javascript | improve zlib errors | da886d9a4cd923bd5fc33eff7df22ff7d855a00b | <ide><path>lib/zlib.js
<ide> function flushCallback(level, strategy, callback) {
<ide> }
<ide> }
<ide>
<add>// 1. Returns false for undefined and NaN
<add>// 2. Returns true for finite numbers
<add>// 3. Throws ERR_INVALID_ARG_TYPE for non-numbers
<add>// 4. Throws ERR_OUT_OF_RANGE for infinite numbers
<add>function checkFiniteNumber(number, name) {
<add> // Common case
<add> if (number === undefined || Number.isNaN(number)) {
<add> return false;
<add> }
<add>
<add> if (Number.isFinite(number)) {
<add> return true; // is a valid number
<add> }
<add>
<add> // Other non-numbers
<add> if (typeof number !== 'number') {
<add> const err = new errors.TypeError('ERR_INVALID_ARG_TYPE', name,
<add> 'number', number);
<add> Error.captureStackTrace(err, checkFiniteNumber);
<add> throw err;
<add> }
<add>
<add> // Infinite numbers
<add> const err = new errors.RangeError('ERR_OUT_OF_RANGE', name,
<add> 'a finite number', number);
<add> Error.captureStackTrace(err, checkFiniteNumber);
<add> throw err;
<add>}
<add>
<add>// 1. Returns def for undefined and NaN
<add>// 2. Returns number for finite numbers >= lower and <= upper
<add>// 3. Throws ERR_INVALID_ARG_TYPE for non-numbers
<add>// 4. Throws ERR_OUT_OF_RANGE for infinite numbers or numbers > upper or < lower
<add>function checkRangesOrGetDefault(number, name, lower, upper, def) {
<add> if (!checkFiniteNumber(number, name, lower, upper)) {
<add> return def;
<add> }
<add> if (number < lower || number > upper) {
<add> const err = new errors.RangeError('ERR_OUT_OF_RANGE', name,
<add> `>= ${lower} and <= ${upper}`, number);
<add> Error.captureStackTrace(err, checkRangesOrGetDefault);
<add> throw err;
<add> }
<add> return number;
<add>}
<add>
<ide> // the Zlib class they all inherit from
<ide> // This thing manages the queue of requests, and returns
<ide> // true or false if there is anything in the queue when
<ide> function Zlib(opts, mode) {
<ide> var strategy = Z_DEFAULT_STRATEGY;
<ide> var dictionary;
<ide>
<del> if (typeof mode !== 'number')
<del> throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'mode', 'number');
<del> if (mode < DEFLATE || mode > UNZIP)
<del> throw new errors.RangeError('ERR_OUT_OF_RANGE', 'mode');
<add> // The Zlib class is not exported to user land, the mode should only be
<add> // passed in by us.
<add> assert(typeof mode === 'number');
<add> assert(mode >= DEFLATE && mode <= UNZIP);
<ide>
<ide> if (opts) {
<ide> chunkSize = opts.chunkSize;
<del> if (chunkSize !== undefined && !Number.isNaN(chunkSize)) {
<del> if (chunkSize < Z_MIN_CHUNK || !Number.isFinite(chunkSize))
<del> throw new errors.RangeError('ERR_INVALID_OPT_VALUE',
<del> 'chunkSize',
<del> chunkSize);
<del> } else {
<add> if (!checkFiniteNumber(chunkSize, 'options.chunkSize')) {
<ide> chunkSize = Z_DEFAULT_CHUNK;
<add> } else if (chunkSize < Z_MIN_CHUNK) {
<add> throw new errors.RangeError('ERR_OUT_OF_RANGE', 'options.chunkSize',
<add> `>= ${Z_MIN_CHUNK}`, chunkSize);
<ide> }
<ide>
<del> flush = opts.flush;
<del> if (flush !== undefined && !Number.isNaN(flush)) {
<del> if (flush < Z_NO_FLUSH || flush > Z_BLOCK || !Number.isFinite(flush))
<del> throw new errors.RangeError('ERR_INVALID_OPT_VALUE', 'flush', flush);
<del> } else {
<del> flush = Z_NO_FLUSH;
<del> }
<add> flush = checkRangesOrGetDefault(
<add> opts.flush, 'options.flush',
<add> Z_NO_FLUSH, Z_BLOCK, Z_NO_FLUSH);
<ide>
<del> finishFlush = opts.finishFlush;
<del> if (finishFlush !== undefined && !Number.isNaN(finishFlush)) {
<del> if (finishFlush < Z_NO_FLUSH || finishFlush > Z_BLOCK ||
<del> !Number.isFinite(finishFlush)) {
<del> throw new errors.RangeError('ERR_INVALID_OPT_VALUE',
<del> 'finishFlush',
<del> finishFlush);
<del> }
<del> } else {
<del> finishFlush = Z_FINISH;
<del> }
<add> finishFlush = checkRangesOrGetDefault(
<add> opts.finishFlush, 'options.finishFlush',
<add> Z_NO_FLUSH, Z_BLOCK, Z_FINISH);
<ide>
<del> windowBits = opts.windowBits;
<del> if (windowBits !== undefined && !Number.isNaN(windowBits)) {
<del> if (windowBits < Z_MIN_WINDOWBITS || windowBits > Z_MAX_WINDOWBITS ||
<del> !Number.isFinite(windowBits)) {
<del> throw new errors.RangeError('ERR_INVALID_OPT_VALUE',
<del> 'windowBits',
<del> windowBits);
<del> }
<del> } else {
<del> windowBits = Z_DEFAULT_WINDOWBITS;
<del> }
<add> windowBits = checkRangesOrGetDefault(
<add> opts.windowBits, 'options.windowBits',
<add> Z_MIN_WINDOWBITS, Z_MAX_WINDOWBITS, Z_DEFAULT_WINDOWBITS);
<ide>
<del> level = opts.level;
<del> if (level !== undefined && !Number.isNaN(level)) {
<del> if (level < Z_MIN_LEVEL || level > Z_MAX_LEVEL ||
<del> !Number.isFinite(level)) {
<del> throw new errors.RangeError('ERR_INVALID_OPT_VALUE',
<del> 'level', level);
<del> }
<del> } else {
<del> level = Z_DEFAULT_COMPRESSION;
<del> }
<add> level = checkRangesOrGetDefault(
<add> opts.level, 'options.level',
<add> Z_MIN_LEVEL, Z_MAX_LEVEL, Z_DEFAULT_COMPRESSION);
<ide>
<del> memLevel = opts.memLevel;
<del> if (memLevel !== undefined && !Number.isNaN(memLevel)) {
<del> if (memLevel < Z_MIN_MEMLEVEL || memLevel > Z_MAX_MEMLEVEL ||
<del> !Number.isFinite(memLevel)) {
<del> throw new errors.RangeError('ERR_INVALID_OPT_VALUE',
<del> 'memLevel', memLevel);
<del> }
<del> } else {
<del> memLevel = Z_DEFAULT_MEMLEVEL;
<del> }
<add> memLevel = checkRangesOrGetDefault(
<add> opts.memLevel, 'options.memLevel',
<add> Z_MIN_MEMLEVEL, Z_MAX_MEMLEVEL, Z_DEFAULT_MEMLEVEL);
<ide>
<del> strategy = opts.strategy;
<del> if (strategy !== undefined && !Number.isNaN(strategy)) {
<del> if (strategy < Z_DEFAULT_STRATEGY || strategy > Z_FIXED ||
<del> !Number.isFinite(strategy)) {
<del> throw new errors.TypeError('ERR_INVALID_OPT_VALUE',
<del> 'strategy', strategy);
<del> }
<del> } else {
<del> strategy = Z_DEFAULT_STRATEGY;
<del> }
<add> strategy = checkRangesOrGetDefault(
<add> opts.strategy, 'options.strategy',
<add> Z_DEFAULT_STRATEGY, Z_FIXED, Z_DEFAULT_STRATEGY);
<ide>
<ide> dictionary = opts.dictionary;
<ide> if (dictionary !== undefined && !isArrayBufferView(dictionary)) {
<ide> if (isAnyArrayBuffer(dictionary)) {
<ide> dictionary = Buffer.from(dictionary);
<ide> } else {
<del> throw new errors.TypeError('ERR_INVALID_OPT_VALUE',
<del> 'dictionary',
<del> dictionary);
<add> throw new errors.TypeError(
<add> 'ERR_INVALID_ARG_TYPE', 'options.dictionary',
<add> ['Buffer', 'TypedArray', 'DataView', 'ArrayBuffer'],
<add> dictionary);
<ide> }
<ide> }
<ide>
<ide> Object.defineProperty(Zlib.prototype, '_closed', {
<ide> });
<ide>
<ide> Zlib.prototype.params = function params(level, strategy, callback) {
<del> if (level < Z_MIN_LEVEL || level > Z_MAX_LEVEL)
<del> throw new errors.RangeError('ERR_INVALID_ARG_VALUE', 'level', level);
<del>
<del> if (strategy !== undefined &&
<del> (strategy < Z_DEFAULT_STRATEGY || strategy > Z_FIXED ||
<del> !Number.isFinite(strategy))) {
<del> throw new errors.TypeError('ERR_INVALID_ARG_VALUE', 'strategy', strategy);
<del> }
<add> checkRangesOrGetDefault(level, 'level', Z_MIN_LEVEL, Z_MAX_LEVEL);
<add> checkRangesOrGetDefault(strategy, 'strategy', Z_DEFAULT_STRATEGY, Z_FIXED);
<ide>
<ide> if (this._level !== level || this._strategy !== strategy) {
<ide> this.flush(Z_SYNC_FLUSH,
<ide><path>test/parallel/test-zlib-deflate-constructors.js
<ide> assert.ok(new zlib.Deflate() instanceof zlib.Deflate);
<ide> assert.ok(zlib.DeflateRaw() instanceof zlib.DeflateRaw);
<ide> assert.ok(new zlib.DeflateRaw() instanceof zlib.DeflateRaw);
<ide>
<del>// Throws if `opts.chunkSize` is invalid
<add>// Throws if `options.chunkSize` is invalid
<add>common.expectsError(
<add> () => new zlib.Deflate({ chunkSize: 'test' }),
<add> {
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "options.chunkSize" property must be of type number. ' +
<add> 'Received type string'
<add> }
<add>);
<add>
<ide> common.expectsError(
<ide> () => new zlib.Deflate({ chunkSize: -Infinity }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.chunkSize" is out of range. It must ' +
<add> 'be a finite number. Received -Infinity'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate({ chunkSize: 0 }),
<add> {
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.chunkSize" is out of range. It must ' +
<add> 'be >= 64. Received 0'
<ide> }
<ide> );
<ide>
<ide> // Confirm that maximum chunk size cannot be exceeded because it is `Infinity`.
<ide> assert.strictEqual(zlib.constants.Z_MAX_CHUNK, Infinity);
<ide>
<del>// Throws if `opts.windowBits` is invalid
<add>// Throws if `options.windowBits` is invalid
<add>common.expectsError(
<add> () => new zlib.Deflate({ windowBits: 'test' }),
<add> {
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "options.windowBits" property must be of type number. ' +
<add> 'Received type string'
<add> }
<add>);
<add>
<ide> common.expectsError(
<ide> () => new zlib.Deflate({ windowBits: -Infinity }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.windowBits" is out of range. It must ' +
<add> 'be a finite number. Received -Infinity'
<ide> }
<ide> );
<ide>
<ide> common.expectsError(
<ide> () => new zlib.Deflate({ windowBits: Infinity }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.windowBits" is out of range. It must ' +
<add> 'be a finite number. Received Infinity'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate({ windowBits: 0 }),
<add> {
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.windowBits" is out of range. It must ' +
<add> 'be >= 8 and <= 15. Received 0'
<add> }
<add>);
<add>
<add>// Throws if `options.level` is invalid
<add>common.expectsError(
<add> () => new zlib.Deflate({ level: 'test' }),
<add> {
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "options.level" property must be of type number. ' +
<add> 'Received type string'
<ide> }
<ide> );
<ide>
<del>// Throws if `opts.level` is invalid
<ide> common.expectsError(
<ide> () => new zlib.Deflate({ level: -Infinity }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.level" is out of range. It must ' +
<add> 'be a finite number. Received -Infinity'
<ide> }
<ide> );
<ide>
<ide> common.expectsError(
<ide> () => new zlib.Deflate({ level: Infinity }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.level" is out of range. It must ' +
<add> 'be a finite number. Received Infinity'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate({ level: -2 }),
<add> {
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.level" is out of range. It must ' +
<add> 'be >= -1 and <= 9. Received -2'
<add> }
<add>);
<add>
<add>// Throws if `level` invalid in `Deflate.prototype.params()`
<add>common.expectsError(
<add> () => new zlib.Deflate().params('test'),
<add> {
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "level" argument must be of type number. ' +
<add> 'Received type string'
<ide> }
<ide> );
<ide>
<del>// Throws a RangeError if `level` invalid in `Deflate.prototype.params()`
<ide> common.expectsError(
<ide> () => new zlib.Deflate().params(-Infinity),
<ide> {
<del> code: 'ERR_INVALID_ARG_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "level" is out of range. It must ' +
<add> 'be a finite number. Received -Infinity'
<ide> }
<ide> );
<ide>
<ide> common.expectsError(
<ide> () => new zlib.Deflate().params(Infinity),
<ide> {
<del> code: 'ERR_INVALID_ARG_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "level" is out of range. It must ' +
<add> 'be a finite number. Received Infinity'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate().params(-2),
<add> {
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "level" is out of range. It must ' +
<add> 'be >= -1 and <= 9. Received -2'
<add> }
<add>);
<add>
<add>// Throws if options.memLevel is invalid
<add>common.expectsError(
<add> () => new zlib.Deflate({ memLevel: 'test' }),
<add> {
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "options.memLevel" property must be of type number. ' +
<add> 'Received type string'
<ide> }
<ide> );
<ide>
<del>// Throws if `opts.memLevel` is invalid
<ide> common.expectsError(
<ide> () => new zlib.Deflate({ memLevel: -Infinity }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.memLevel" is out of range. It must ' +
<add> 'be a finite number. Received -Infinity'
<ide> }
<ide> );
<ide>
<ide> common.expectsError(
<ide> () => new zlib.Deflate({ memLevel: Infinity }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.memLevel" is out of range. It must ' +
<add> 'be a finite number. Received Infinity'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate({ memLevel: -2 }),
<add> {
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.memLevel" is out of range. It must ' +
<add> 'be >= 1 and <= 9. Received -2'
<ide> }
<ide> );
<ide>
<ide> new zlib.Deflate({ strategy: zlib.constants.Z_RLE });
<ide> new zlib.Deflate({ strategy: zlib.constants.Z_FIXED });
<ide> new zlib.Deflate({ strategy: zlib.constants.Z_DEFAULT_STRATEGY });
<ide>
<del>// Throws if opt.strategy is the wrong type.
<add>// Throws if options.strategy is invalid
<ide> common.expectsError(
<del> () => new zlib.Deflate({ strategy: String(zlib.constants.Z_RLE) }),
<add> () => new zlib.Deflate({ strategy: 'test' }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: TypeError
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "options.strategy" property must be of type number. ' +
<add> 'Received type string'
<ide> }
<ide> );
<ide>
<del>// Throws if opts.strategy is invalid
<ide> common.expectsError(
<del> () => new zlib.Deflate({ strategy: 'this is a bogus strategy' }),
<add> () => new zlib.Deflate({ strategy: -Infinity }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: TypeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.strategy" is out of range. It must ' +
<add> 'be a finite number. Received -Infinity'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate({ strategy: Infinity }),
<add> {
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.strategy" is out of range. It must ' +
<add> 'be a finite number. Received Infinity'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate({ strategy: -2 }),
<add> {
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.strategy" is out of range. It must ' +
<add> 'be >= 0 and <= 4. Received -2'
<ide> }
<ide> );
<ide>
<ide> // Throws TypeError if `strategy` is invalid in `Deflate.prototype.params()`
<ide> common.expectsError(
<del> () => new zlib.Deflate().params(0, 'I am an invalid strategy'),
<add> () => new zlib.Deflate().params(0, 'test'),
<add> {
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "strategy" argument must be of type number. ' +
<add> 'Received type string'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate().params(0, -Infinity),
<add> {
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "strategy" is out of range. It must ' +
<add> 'be a finite number. Received -Infinity'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate().params(0, Infinity),
<add> {
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "strategy" is out of range. It must ' +
<add> 'be a finite number. Received Infinity'
<add> }
<add>);
<add>
<add>common.expectsError(
<add> () => new zlib.Deflate().params(0, -2),
<ide> {
<del> code: 'ERR_INVALID_ARG_VALUE',
<del> type: TypeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "strategy" is out of range. It must ' +
<add> 'be >= 0 and <= 4. Received -2'
<ide> }
<ide> );
<ide>
<ide> // Throws if opts.dictionary is not a Buffer
<ide> common.expectsError(
<ide> () => new zlib.Deflate({ dictionary: 'not a buffer' }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: TypeError
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "options.dictionary" property must be one of type Buffer, ' +
<add> 'TypedArray, DataView, or ArrayBuffer. Received type string'
<ide> }
<ide> );
<ide><path>test/parallel/test-zlib-failed-init.js
<ide> const zlib = require('zlib');
<ide> common.expectsError(
<ide> () => zlib.createGzip({ chunkSize: 0 }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.chunkSize" is out of range. It must ' +
<add> 'be >= 64. Received 0'
<ide> }
<ide> );
<ide>
<ide> common.expectsError(
<ide> () => zlib.createGzip({ windowBits: 0 }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.windowBits" is out of range. It must ' +
<add> 'be >= 8 and <= 15. Received 0'
<ide> }
<ide> );
<ide>
<ide> common.expectsError(
<ide> () => zlib.createGzip({ memLevel: 0 }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.memLevel" is out of range. It must ' +
<add> 'be >= 1 and <= 9. Received 0'
<ide> }
<ide> );
<ide>
<ide><path>test/parallel/test-zlib-flush-flags.js
<ide> zlib.createGzip({ flush: zlib.constants.Z_SYNC_FLUSH });
<ide> common.expectsError(
<ide> () => zlib.createGzip({ flush: 'foobar' }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "options.flush" property must be of type number. ' +
<add> 'Received type string'
<ide> }
<ide> );
<ide>
<ide> common.expectsError(
<ide> () => zlib.createGzip({ flush: 10000 }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.flush" is out of range. It must ' +
<add> 'be >= 0 and <= 5. Received 10000'
<ide> }
<ide> );
<ide>
<ide> zlib.createGzip({ finishFlush: zlib.constants.Z_SYNC_FLUSH });
<ide> common.expectsError(
<ide> () => zlib.createGzip({ finishFlush: 'foobar' }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_INVALID_ARG_TYPE',
<add> type: TypeError,
<add> message: 'The "options.finishFlush" property must be of type number. ' +
<add> 'Received type string'
<ide> }
<ide> );
<ide>
<ide> common.expectsError(
<ide> () => zlib.createGzip({ finishFlush: 10000 }),
<ide> {
<del> code: 'ERR_INVALID_OPT_VALUE',
<del> type: RangeError
<add> code: 'ERR_OUT_OF_RANGE',
<add> type: RangeError,
<add> message: 'The value of "options.finishFlush" is out of range. It must ' +
<add> 'be >= 0 and <= 5. Received 10000'
<ide> }
<ide> ); | 4 |
Javascript | Javascript | remove the use of fs.access (#625) | 6d6ef1ca9fc4f0fb0dc400619232f51b53df9901 | <ide><path>server/render.js
<ide> import { join } from 'path'
<ide> import { createElement } from 'react'
<ide> import { renderToString, renderToStaticMarkup } from 'react-dom/server'
<del>import fs from 'mz/fs'
<ide> import send from 'send'
<ide> import accepts from 'accepts'
<ide> import requireModule from './require'
<ide> export async function serveStaticWithGzip (req, res, path) {
<ide>
<ide> try {
<ide> const gzipPath = `${path}.gz`
<del> // fs.access before a file read is not recommeded due to race conditions.
<del> // But in this case, this is totally fine because we know
<del> // it's impossible to have a race condition like that.
<del> // (Since we gzip AOT when called `next build`)
<del> await fs.access(gzipPath, fs.constants.R_OK)
<del>
<ide> res.setHeader('Content-Encoding', 'gzip')
<del> return serveStatic(req, res, gzipPath)
<add> await serveStatic(req, res, gzipPath)
<ide> } catch (ex) {
<ide> if (ex.code === 'ENOENT') {
<add> res.removeHeader('Content-Encoding')
<ide> return serveStatic(req, res, path)
<ide> }
<ide> throw ex | 1 |
Javascript | Javascript | fix util.inspect with proxied function | 6c7c77ef05a04ffa5532056f8a1ea44a946c2014 | <ide><path>lib/internal/util/inspect.js
<ide> function formatRaw(ctx, value, recurseTimes) {
<ide> }
<ide> } else if (typeof value === 'function') {
<ide> const type = constructor || tag || 'Function';
<del> const name = `${type}${value.name ? `: ${value.name}` : ''}`;
<add> let name = `${type}`;
<add> if (value.name && typeof value.name === 'string') {
<add> name += `: ${value.name}`;
<add> }
<ide> if (keys.length === 0)
<ide> return ctx.stylize(`[${name}]`, 'special');
<ide> base = `[${name}]`;
<ide><path>test/parallel/test-util-inspect-proxy.js
<ide> assert.strictEqual(util.inspect(proxy8, opts), expected8);
<ide> assert.strictEqual(util.inspect(proxy9, opts), expected9);
<ide> assert.strictEqual(util.inspect(proxy8), '[Function: Date]');
<ide> assert.strictEqual(util.inspect(proxy9), '[Function: Date]');
<add>
<add>const proxy10 = new Proxy(() => {}, {});
<add>const proxy11 = new Proxy(() => {}, {
<add> get() {
<add> return proxy11;
<add> },
<add> apply() {
<add> return proxy11;
<add> }
<add>});
<add>const expected10 = '[Function]';
<add>const expected11 = '[Function]';
<add>assert.strictEqual(util.inspect(proxy10), expected10);
<add>assert.strictEqual(util.inspect(proxy11), expected11); | 2 |
Javascript | Javascript | fix eslint issues | c987968dd9796ea90462f9d54e0d3cf81e981920 | <ide><path>node-tests/blueprints/acceptance-test-test.js
<ide> describe('Blueprint: acceptance-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide> describe('Blueprint: acceptance-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide><path>node-tests/blueprints/component-test-test.js
<ide> describe('Blueprint: component-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide> describe('Blueprint: component-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide> describe('Blueprint: component-test', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: component-test', function() {
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/component-test.js
<ide> describe('Blueprint: component', function() {
<ide> describe('in app', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: component', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: component', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: component', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: component', function() {
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: component', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/controller-test-test.js
<ide> describe('Blueprint: controller-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide> describe('Blueprint: controller-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide> describe('Blueprint: controller-test', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: controller-test', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/controller-test.js
<ide> describe('Blueprint: controller', function() {
<ide> describe('in app', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: controller', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: controller', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: controller', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: controller', function() {
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/helper-test-test.js
<ide> describe('Blueprint: helper-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide> describe('Blueprint: helper-test', function() {
<ide> });
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide> describe('Blueprint: helper-test', function() {
<ide>
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<del> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<add> return emberNew({ target: 'addon' }).then(() =>
<add> modifyPackages([
<ide> { name: 'ember-qunit', delete: true },
<ide> { name: 'ember-cli-qunit', dev: true },
<del> ]));
<add> ])
<add> );
<ide> });
<ide>
<ide> it('helper-test foo/bar-baz', function() {
<ide> describe('Blueprint: helper-test', function() {
<ide>
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => fs.ensureDirSync('src'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/helper-test.js
<ide> describe('Blueprint: helper', function() {
<ide>
<ide> describe('in app', function() {
<ide> beforeEach(function() {
<del> return emberNew()
<del> .then(() => modifyPackages([
<add> return emberNew().then(() =>
<add> modifyPackages([
<ide> { name: 'ember-qunit', delete: true },
<ide> { name: 'ember-cli-qunit', dev: true },
<del> ]));
<add> ])
<add> );
<ide> });
<ide>
<ide> it('helper foo/bar-baz', function() {
<ide> describe('Blueprint: helper', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]));
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> );
<ide> });
<ide>
<ide> it('helper foo/bar-baz', function() {
<ide> describe('Blueprint: helper', function() {
<ide>
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<del> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<add> return emberNew({ target: 'addon' }).then(() =>
<add> modifyPackages([
<ide> { name: 'ember-qunit', delete: true },
<ide> { name: 'ember-cli-qunit', dev: true },
<del> ]));
<add> ])
<add> );
<ide> });
<ide>
<ide> it('helper foo/bar-baz', function() {
<ide> describe('Blueprint: helper', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]));
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> );
<ide> });
<ide>
<ide> it('helper foo/bar-baz', function() {
<ide> describe('Blueprint: helper', function() {
<ide>
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<del> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<add> return emberNew({ target: 'in-repo-addon' }).then(() =>
<add> modifyPackages([
<ide> { name: 'ember-qunit', delete: true },
<ide> { name: 'ember-cli-qunit', dev: true },
<del> ]));
<add> ])
<add> );
<ide> });
<ide>
<ide> it('helper foo/bar-baz --in-repo-addon=my-addon', function() {
<ide> describe('Blueprint: helper', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]));
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> );
<ide> });
<ide>
<ide> it('helper foo/bar-baz --in-repo-addon=my-addon', function() {
<ide><path>node-tests/blueprints/initializer-test.js
<ide> describe('Blueprint: initializer', function() {
<ide> describe('in app', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: initializer', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: initializer', function() {
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: initializer', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: initializer', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/instance-initializer-test.js
<ide> describe('Blueprint: instance-initializer', function() {
<ide> describe('in app', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: instance-initializer', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: instance-initializer', function() {
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: instance-initializer', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: instance-initializer', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/mixin-test-test.js
<ide> describe('Blueprint: mixin-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide> describe('Blueprint: mixin-test', function() {
<ide>
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<del> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<add> return emberNew({ target: 'addon' }).then(() =>
<add> modifyPackages([
<ide> { name: 'ember-qunit', delete: true },
<ide> { name: 'ember-cli-qunit', dev: true },
<del> ]));
<add> ])
<add> );
<ide> });
<ide>
<ide> it('mixin-test foo', function() {
<ide> describe('Blueprint: mixin-test', function() {
<ide>
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => fs.ensureDirSync('src'));
<ide> });
<ide>
<ide> describe('Blueprint: mixin-test', function() {
<ide>
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<del> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<add> return emberNew({ target: 'in-repo-addon' }).then(() =>
<add> modifyPackages([
<ide> { name: 'ember-qunit', delete: true },
<ide> { name: 'ember-cli-qunit', dev: true },
<del> ]));
<add> ])
<add> );
<ide> });
<ide>
<ide> it('mixin-test foo --in-repo-addon=my-addon', function() {
<ide><path>node-tests/blueprints/route-test-test.js
<ide> describe('Blueprint: route-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide> describe('Blueprint: route-test', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/route-test.js
<ide> describe('Blueprint: route', function() {
<ide> describe('in app', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: route', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: route', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: route', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: route', function() {
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/service-test-test.js
<ide> describe('Blueprint: service-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide><path>node-tests/blueprints/service-test.js
<ide> describe('Blueprint: service', function() {
<ide> describe('in app', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: service', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: service', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: service', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: service', function() {
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide><path>node-tests/blueprints/util-test-test.js
<ide> describe('Blueprint: util-test', function() {
<ide>
<ide> describe('with [email protected]', function() {
<ide> beforeEach(function() {
<del> modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-mocha', dev: true },
<del> ]);
<add> modifyPackages([{ name: 'ember-qunit', delete: true }, { name: 'ember-mocha', dev: true }]);
<ide> generateFakePackageManifest('ember-mocha', '0.14.0');
<ide> });
<ide>
<ide><path>node-tests/blueprints/util-test.js
<ide> describe('Blueprint: util', function() {
<ide> describe('in app', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: util', function() {
<ide> beforeEach(function() {
<ide> return emberNew()
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: util', function() {
<ide> describe('in addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: util', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'addon' })
<ide> .then(() => fs.ensureDirSync('src'))
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide>
<ide> describe('Blueprint: util', function() {
<ide> describe('in in-repo-addon', function() {
<ide> beforeEach(function() {
<ide> return emberNew({ target: 'in-repo-addon' })
<del> .then(() => modifyPackages([
<del> { name: 'ember-qunit', delete: true },
<del> { name: 'ember-cli-qunit', dev: true },
<del> ]))
<add> .then(() =>
<add> modifyPackages([
<add> { name: 'ember-qunit', delete: true },
<add> { name: 'ember-cli-qunit', dev: true },
<add> ])
<add> )
<ide> .then(() => generateFakePackageManifest('ember-cli-qunit', '4.1.0'));
<ide> });
<ide> | 16 |
Text | Text | add article for javascript string.tostring() | e40c55b02a6fea72c55a080953f145f076ae7d15 | <ide><path>guide/english/javascript/standard-objects/string/string-prototype-tostring/index.md
<ide> title: String.prototype.toString
<ide> ---
<ide> ## String.prototype.toString
<ide>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/javascript/standard-objects/string/string-prototype-tostring/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<add>The `toString()` method returns a primitive string representing the given String object.
<ide>
<del><a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<add>**Example**
<add>```js
<add>var x = new String("hi");
<add>console.log(x); // String {"hi"}
<add>console.log(typeof x); // object
<add>console.log(x.toString()); // hi
<add>console.log(typeof x.toString()); // string
<add>```
<ide>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<add>*Note*: for String objects, `toString()` and `valueOf()` return the same thing.
<ide>
<ide> #### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>
<add>- [String.prototype.toString() on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toString) | 1 |
Javascript | Javascript | avoid dynamic dispatch for scheduler calls | 02404d793b84c057e0f3f712f8ce565f81d4b7ab | <ide><path>packages/react-art/src/ReactARTHostConfig.js
<ide> * LICENSE file in the root directory of this source tree.
<ide> */
<ide>
<del>import {
<del> unstable_scheduleCallback as scheduleDeferredCallback,
<del> unstable_cancelCallback as cancelDeferredCallback,
<del>} from 'scheduler';
<del>export {
<del> unstable_now as now,
<del> unstable_scheduleCallback as scheduleDeferredCallback,
<del> unstable_shouldYield as shouldYield,
<del> unstable_cancelCallback as cancelDeferredCallback,
<del>} from 'scheduler';
<ide> import Transform from 'art/core/transform';
<ide> import Mode from 'art/modes/current';
<add>import * as Scheduler from 'scheduler';
<ide> import invariant from 'shared/invariant';
<ide>
<ide> import {TYPES, EVENT_TYPES, childrenAsString} from './ReactARTInternals';
<ide>
<add>// Intentionally not named imports because Rollup would
<add>// use dynamic dispatch for CommonJS interop named imports.
<add>const {
<add> unstable_now: now,
<add> unstable_scheduleCallback: scheduleDeferredCallback,
<add> unstable_shouldYield: shouldYield,
<add> unstable_cancelCallback: cancelDeferredCallback,
<add>} = Scheduler;
<add>
<add>export {now, scheduleDeferredCallback, shouldYield, cancelDeferredCallback};
<add>
<ide> const pooledTransform = new Transform();
<ide>
<ide> const NO_CONTEXT = {};
<ide><path>packages/react-cache/src/LRU.js
<ide> * @flow
<ide> */
<ide>
<del>import {unstable_scheduleCallback as scheduleCallback} from 'scheduler';
<add>import * as Scheduler from 'scheduler';
<add>
<add>// Intentionally not named imports because Rollup would
<add>// use dynamic dispatch for CommonJS interop named imports.
<add>const {unstable_scheduleCallback: scheduleCallback} = Scheduler;
<ide>
<ide> type Entry<T> = {|
<ide> value: T,
<ide><path>packages/react-dom/src/client/ReactDOMHostConfig.js
<ide> * @flow
<ide> */
<ide>
<add>import * as Scheduler from 'scheduler';
<add>
<ide> import {precacheFiberNode, updateFiberProps} from './ReactDOMComponentTree';
<ide> import {
<ide> createElement,
<ide> export type ChildSet = void; // Unused
<ide> export type TimeoutHandle = TimeoutID;
<ide> export type NoTimeout = -1;
<ide>
<del>import {
<del> unstable_scheduleCallback as scheduleDeferredCallback,
<del> unstable_cancelCallback as cancelDeferredCallback,
<del>} from 'scheduler';
<ide> import {enableSuspenseServerRenderer} from 'shared/ReactFeatureFlags';
<del>export {
<del> unstable_now as now,
<del> unstable_scheduleCallback as scheduleDeferredCallback,
<del> unstable_shouldYield as shouldYield,
<del> unstable_cancelCallback as cancelDeferredCallback,
<del>} from 'scheduler';
<add>
<add>// Intentionally not named imports because Rollup would
<add>// use dynamic dispatch for CommonJS interop named imports.
<add>const {
<add> unstable_now: now,
<add> unstable_scheduleCallback: scheduleDeferredCallback,
<add> unstable_shouldYield: shouldYield,
<add> unstable_cancelCallback: cancelDeferredCallback,
<add>} = Scheduler;
<add>
<add>export {now, scheduleDeferredCallback, shouldYield, cancelDeferredCallback};
<ide>
<ide> let SUPPRESS_HYDRATION_WARNING;
<ide> if (__DEV__) {
<ide><path>packages/react-reconciler/src/ReactFiberScheduler.js
<ide> import {
<ide> __subscriberRef,
<ide> unstable_wrap as Scheduler_tracing_wrap,
<ide> } from 'scheduler/tracing';
<del>import {
<del> unstable_next as Scheduler_next,
<del> unstable_getCurrentPriorityLevel as getCurrentPriorityLevel,
<del> unstable_runWithPriority as runWithPriority,
<del> unstable_ImmediatePriority as ImmediatePriority,
<del> unstable_UserBlockingPriority as UserBlockingPriority,
<del> unstable_NormalPriority as NormalPriority,
<del> unstable_LowPriority as LowPriority,
<del> unstable_IdlePriority as IdlePriority,
<del>} from 'scheduler';
<add>import * as Scheduler from 'scheduler';
<ide> import {
<ide> invokeGuardedCallback,
<ide> hasCaughtError,
<ide> export type Thenable = {
<ide> then(resolve: () => mixed, reject?: () => mixed): mixed,
<ide> };
<ide>
<add>// Intentionally not named imports because Rollup would
<add>// use dynamic dispatch for CommonJS interop named imports.
<add>const {
<add> unstable_next: Scheduler_next,
<add> unstable_getCurrentPriorityLevel: getCurrentPriorityLevel,
<add> unstable_runWithPriority: runWithPriority,
<add> unstable_ImmediatePriority: ImmediatePriority,
<add> unstable_UserBlockingPriority: UserBlockingPriority,
<add> unstable_NormalPriority: NormalPriority,
<add> unstable_LowPriority: LowPriority,
<add> unstable_IdlePriority: IdlePriority,
<add>} = Scheduler;
<add>
<ide> const {ReactCurrentDispatcher, ReactCurrentOwner} = ReactSharedInternals;
<ide>
<ide> let didWarnAboutStateTransition;
<ide><path>packages/react/src/ReactSharedInternals.js
<ide> */
<ide>
<ide> import assign from 'object-assign';
<del>import {
<del> unstable_cancelCallback,
<del> unstable_shouldYield,
<del> unstable_now,
<del> unstable_scheduleCallback,
<del> unstable_runWithPriority,
<del> unstable_next,
<del> unstable_getFirstCallbackNode,
<del> unstable_pauseExecution,
<del> unstable_continueExecution,
<del> unstable_wrapCallback,
<del> unstable_getCurrentPriorityLevel,
<del> unstable_IdlePriority,
<del> unstable_ImmediatePriority,
<del> unstable_LowPriority,
<del> unstable_NormalPriority,
<del> unstable_UserBlockingPriority,
<del>} from 'scheduler';
<del>import {
<del> __interactionsRef,
<del> __subscriberRef,
<del> unstable_clear,
<del> unstable_getCurrent,
<del> unstable_getThreadID,
<del> unstable_subscribe,
<del> unstable_trace,
<del> unstable_unsubscribe,
<del> unstable_wrap,
<del>} from 'scheduler/tracing';
<add>import * as Scheduler from 'scheduler';
<add>import * as SchedulerTracing from 'scheduler/tracing';
<ide> import ReactCurrentDispatcher from './ReactCurrentDispatcher';
<ide> import ReactCurrentOwner from './ReactCurrentOwner';
<ide> import ReactDebugCurrentFrame from './ReactDebugCurrentFrame';
<ide> if (__UMD__) {
<ide> // This re-export is only required for UMD bundles;
<ide> // CJS bundles use the shared NPM package.
<ide> Object.assign(ReactSharedInternals, {
<del> Scheduler: {
<del> unstable_cancelCallback,
<del> unstable_shouldYield,
<del> unstable_now,
<del> unstable_scheduleCallback,
<del> unstable_runWithPriority,
<del> unstable_next,
<del> unstable_wrapCallback,
<del> unstable_getFirstCallbackNode,
<del> unstable_pauseExecution,
<del> unstable_continueExecution,
<del> unstable_getCurrentPriorityLevel,
<del> unstable_IdlePriority,
<del> unstable_ImmediatePriority,
<del> unstable_LowPriority,
<del> unstable_NormalPriority,
<del> unstable_UserBlockingPriority,
<del> },
<del> SchedulerTracing: {
<del> __interactionsRef,
<del> __subscriberRef,
<del> unstable_clear,
<del> unstable_getCurrent,
<del> unstable_getThreadID,
<del> unstable_subscribe,
<del> unstable_trace,
<del> unstable_unsubscribe,
<del> unstable_wrap,
<del> },
<add> Scheduler,
<add> SchedulerTracing,
<ide> });
<ide> }
<ide> | 5 |
Ruby | Ruby | handle homebrew_no_github_api case | cbb91c5516ac6d2a673670edf5b7d509abe6df56 | <ide><path>Library/Homebrew/exceptions.rb
<ide> def dump
<ide> end
<ide> end
<ide> puts
<del> unless RUBY_VERSION < "1.8.7" || issues.empty?
<add> if RUBY_VERSION >= "1.8.7" && issues && issues.any?
<ide> puts "These open issues may also help:"
<ide> puts issues.map { |i| "#{i["title"]} #{i["html_url"]}" }.join("\n")
<ide> end | 1 |
PHP | PHP | fix bug and add regression test | 2704bace3a7187205db03d55f6e8304743eb8396 | <ide><path>src/Illuminate/Http/JsonResponse.php
<ide>
<ide> class JsonResponse extends \Symfony\Component\HttpFoundation\JsonResponse {
<ide>
<del> /**
<del> * The json encoding options.
<del> *
<del> * @var int
<del> */
<del> protected $jsonOptions;
<del>
<ide> /**
<ide> * Constructor.
<ide> *
<ide> public function __construct($data = null, $status = 200, $headers = array(), $op
<ide> *
<ide> * @param bool $assoc
<ide> * @param int $depth
<del> * @param int $options
<ide> * @return mixed
<ide> */
<del> public function getData($assoc = false, $depth = 512, $options = null)
<add> public function getData($assoc = false, $depth = 512)
<ide> {
<del> $options = $options ?: $this->jsonOptions;
<del>
<del> return json_decode($this->data, $assoc, $depth, $options);
<add> return json_decode($this->data, $assoc, $depth);
<ide> }
<ide>
<ide> /**
<ide><path>tests/Http/HttpJsonResponseTest.php
<add><?php
<add>
<add>class HttpJsonResponseTest extends PHPUnit_Framework_TestCase {
<add>
<add> public function testSetAndRetrieveData()
<add> {
<add> $response = new Illuminate\Http\JsonResponse(array('foo' => 'bar'));
<add> $data = $response->getData();
<add> $this->assertInstanceOf('StdClass', $data);
<add> $this->assertEquals('bar', $data->foo);
<add> }
<add>
<add>} | 2 |
Javascript | Javascript | fix priority inference of next level of work | ce126fbb231f9110151b4c93cff765fd882a9f64 | <ide><path>packages/react-reconciler/src/ReactFiberExpirationTime.js
<ide> export function inferPriorityFromExpirationTime(
<ide> return IdlePriority;
<ide> }
<ide> const msUntil =
<del> msToExpirationTime(expirationTime) - msToExpirationTime(currentTime);
<add> expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);
<ide> if (msUntil <= 0) {
<ide> return ImmediatePriority;
<ide> }
<del> if (msUntil <= HIGH_PRIORITY_EXPIRATION) {
<add> if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {
<ide> return UserBlockingPriority;
<ide> }
<del> if (msUntil <= LOW_PRIORITY_EXPIRATION) {
<add> if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {
<ide> return NormalPriority;
<ide> }
<ide>
<ide><path>packages/react-reconciler/src/__tests__/ReactSchedulerIntegration-test.internal.js
<ide> describe('ReactSchedulerIntegration', () => {
<ide> ]);
<ide> });
<ide>
<add> it('after completing a level of work, infers priority of the next batch based on its expiration time', () => {
<add> function App({label}) {
<add> Scheduler.yieldValue(`${label} [${getCurrentPriorityAsString()}]`);
<add> return label;
<add> }
<add>
<add> // Schedule two separate updates at different priorities
<add> runWithPriority(UserBlockingPriority, () => {
<add> ReactNoop.render(<App label="A" />);
<add> });
<add> ReactNoop.render(<App label="B" />);
<add>
<add> // The second update should run at normal priority
<add> expect(Scheduler).toFlushAndYield(['A [UserBlocking]', 'B [Normal]']);
<add> });
<add>
<ide> // TODO
<ide> it.skip('passive effects have render priority even if they are flushed early', () => {});
<ide> }); | 2 |
PHP | PHP | fix style issue | 2bcdbb0d13e3d9d7bcbc5ba20c4ddead67cf77fc | <ide><path>src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
<ide> protected function compileAnsiOffset(Builder $query, $components)
<ide> // As this moves the order statement to be part of the "select" statement, we need to
<ide> // move the bindings to the right position: right after "select".
<ide> $preferredBindingOrder = ['select', 'order', 'from', 'join', 'where', 'groupBy', 'having', 'union', 'unionOrder'];
<del> $sortedBindings = Arr::sort($query->bindings, fn($bindings, $key) => array_search($key, $preferredBindingOrder));
<add> $sortedBindings = Arr::sort($query->bindings, fn ($bindings, $key) => array_search($key, $preferredBindingOrder));
<ide> $query->bindings = $sortedBindings;
<ide>
<ide> // Next we need to calculate the constraints that should be placed on the query | 1 |
Javascript | Javascript | add maintemplateplugin tests | ecb63b9742c218ee01dfad2f43ef19e873af43cb | <ide><path>test/AmdMainTemplatePlugin.test.js
<add>var should = require("should");
<add>var sinon = require("sinon");
<add>var TemplatePluginEnvironment = require("./helpers/TemplatePluginEnvironment");
<add>var ConcatSource = require("webpack-sources").ConcatSource;
<add>var AmdMainTemplatePlugin = require("../lib/AmdMainTemplatePlugin");
<add>
<add>describe("AmdMainTemplatePlugin", function() {
<add> var env;
<add>
<add> var applyTemplatePluginWithOptions = function(Plugin, name) {
<add> var plugin = new Plugin(name);
<add> var templatePluginEnvironment = new TemplatePluginEnvironment();
<add> var environment = templatePluginEnvironment.getEnvironmentStub();
<add> environment.mainTemplate.applyPluginsWaterfall = () => "templateName";
<add> plugin.apply(environment);
<add> return templatePluginEnvironment
<add> };
<add>
<add> var setupPluginAndGetEventBinding = function(name) {
<add> var templatePlugin = applyTemplatePluginWithOptions(AmdMainTemplatePlugin, name);
<add> var eventBindings = templatePlugin.getEventBindings();
<add> return eventBindings[0];
<add> };
<add>
<add> beforeEach(function() {
<add> env = {
<add> modulesListWithExternals: [{
<add> id: "module-1",
<add> external: true,
<add> request: {
<add> amd: "external-amd-module"
<add> }
<add> },
<add> {
<add> id: "module-2",
<add> external: true,
<add> request: "external-non-amd-module"
<add> },
<add> {
<add> id: "module-3",
<add> external: true
<add> },
<add> {
<add> id: "module-4",
<add> external: false
<add> }
<add> ]
<add> };
<add> });
<add>
<add> it("has apply function", function() {
<add> (new AmdMainTemplatePlugin()).apply.should.be.a.Function();
<add> });
<add>
<add> describe("when applied", function() {
<add> beforeEach(function() {
<add> env.templatePlugin = applyTemplatePluginWithOptions(AmdMainTemplatePlugin, "foo");
<add> });
<add>
<add> describe("event handlers", function() {
<add> beforeEach(function() {
<add> env.eventBindings = env.templatePlugin.getEventBindings();
<add> });
<add>
<add> it("binds one handlers", function() {
<add> env.eventBindings.length.should.be.exactly(1);
<add> });
<add>
<add> describe("render-with-entry handler", function() {
<add> beforeEach(function() {
<add> env.eventBinding = env.eventBindings[0];
<add> });
<add>
<add> it("binds to render-with-entry event", function() {
<add> env.eventBinding.name.should.be.exactly("render-with-entry");
<add> });
<add>
<add> describe("with name", function() {
<add> beforeEach(function() {
<add> env.chunk = {
<add> modules: env.modulesListWithExternals
<add> };
<add> env.eventBinding = setupPluginAndGetEventBinding("foo");
<add> });
<add>
<add> it("creates source wrapper with module name and external dependencies", function() {
<add> var source = env.eventBinding.handler("moduleSource()", env.chunk, "bar");
<add> source.should.be.instanceof(ConcatSource);
<add> source.source().should.be.exactly('define("templateName", ["external-amd-module","external-non-amd-module",null], function(__WEBPACK_EXTERNAL_MODULE_module-1__, __WEBPACK_EXTERNAL_MODULE_module-2__, __WEBPACK_EXTERNAL_MODULE_module-3__) { return moduleSource()});');
<add> });
<add> });
<add>
<add> describe("with external dependencies", function() {
<add> beforeEach(function() {
<add> env.chunk = {
<add> modules: env.modulesListWithExternals
<add> };
<add> env.eventBinding = setupPluginAndGetEventBinding();
<add> });
<add>
<add> it("creates source wrapper with external dependencies", function() {
<add> var source = env.eventBinding.handler("moduleSource()", env.chunk, "bar");
<add> source.should.be.instanceof(ConcatSource);
<add> source.source().should.be.exactly('define(["external-amd-module","external-non-amd-module",null], function(__WEBPACK_EXTERNAL_MODULE_module-1__, __WEBPACK_EXTERNAL_MODULE_module-2__, __WEBPACK_EXTERNAL_MODULE_module-3__) { return moduleSource()});');
<add> });
<add> });
<add>
<add> describe("with only local dependencies", function() {
<add> beforeEach(function() {
<add> var externalFlag = {
<add> external: false
<add> };
<add> var noExternals = env.modulesListWithExternals.map((module) => Object.assign(module, externalFlag));
<add> env.chunk = {
<add> modules: noExternals
<add> };
<add> env.eventBinding = setupPluginAndGetEventBinding();
<add> });
<add>
<add> it("creates source wrapper with callback only", function() {
<add> var source = env.eventBinding.handler("moduleSource()", env.chunk, "bar");
<add> source.should.be.instanceof(ConcatSource);
<add> source.source().should.be.exactly('define(function() { return moduleSource()});');
<add> });
<add> });
<add> });
<add> });
<add>
<add> describe("main template event handlers", function() {
<add> beforeEach(function() {
<add> env.mainTemplateBindings = env.templatePlugin.getMainTemplateBindings();
<add> });
<add>
<add> it("binds two handlers", function() {
<add> env.mainTemplateBindings.length.should.be.exactly(2);
<add> });
<add>
<add> describe("global-hash-paths handler", function() {
<add> beforeEach(function() {
<add> env.mainTemplateBinding = env.mainTemplateBindings[0];
<add> });
<add>
<add> it("binds to global-hash-paths event", function() {
<add> env.mainTemplateBinding.name.should.be.exactly("global-hash-paths");
<add> });
<add>
<add> it("adds name to path array", function() {
<add> env.mainTemplateBinding.handler([]).should.deepEqual(["foo"]);
<add> });
<add> });
<add>
<add> describe("hash handler", function() {
<add> beforeEach(function() {
<add> env.mainTemplateBinding = env.mainTemplateBindings[1];
<add> });
<add>
<add> it("binds to hash event", function() {
<add> env.mainTemplateBinding.name.should.be.exactly("hash");
<add> });
<add>
<add> it("updates hash", function() {
<add> var hash = {
<add> update: sinon.spy()
<add> };
<add> env.mainTemplateBinding.handler(hash);
<add>
<add> hash.update.callCount.should.be.exactly(2);
<add> hash.update.firstCall.args[0].should.be.exactly("exports amd");
<add> hash.update.secondCall.args[0].should.be.exactly("foo");
<add> });
<add> });
<add> })
<add> });
<add>});
<ide><path>test/JsonpExportMainTemplatePlugin.test.js
<add>var should = require("should");
<add>var sinon = require("sinon");
<add>var TemplatePluginEnvironment = require("./helpers/TemplatePluginEnvironment");
<add>var ConcatSource = require("webpack-sources").ConcatSource;
<add>var JsonpExportMainTemplatePlugin = require("../lib/JsonpExportMainTemplatePlugin");
<add>
<add>describe("JsonpExportMainTemplatePlugin", function() {
<add> var env;
<add>
<add> var applyTemplatePluginWithOptions = function(Plugin, name) {
<add> var plugin = new Plugin(name);
<add> var templatePluginEnvironment = new TemplatePluginEnvironment();
<add> var environment = templatePluginEnvironment.getEnvironmentStub();
<add> environment.mainTemplate.applyPluginsWaterfall = () => "templateName";
<add> plugin.apply(environment);
<add> return templatePluginEnvironment
<add> };
<add>
<add> beforeEach(function() {
<add> env = {}
<add> });
<add>
<add> it("has apply function", function() {
<add> (new JsonpExportMainTemplatePlugin()).apply.should.be.a.Function();
<add> });
<add>
<add> describe("when applied", function() {
<add> beforeEach(function() {
<add> env.templatePlugin = applyTemplatePluginWithOptions(JsonpExportMainTemplatePlugin, "foo");
<add> });
<add>
<add> describe("event handlers", function() {
<add> beforeEach(function() {
<add> env.eventBindings = env.templatePlugin.getEventBindings();
<add> });
<add>
<add> it("binds one handlers", function() {
<add> env.eventBindings.length.should.be.exactly(1);
<add> });
<add>
<add> describe("render-with-entry handler", function() {
<add> beforeEach(function() {
<add> env.eventBinding = env.eventBindings[0];
<add> });
<add>
<add> it("binds to render-with-entry event", function() {
<add> env.eventBinding.name.should.be.exactly("render-with-entry");
<add> });
<add>
<add> it("creates source wrapper calling JSONP global callback", function() {
<add> var source = env.eventBinding.handler("moduleSource()", env.chunk, "bar");
<add> source.should.be.instanceof(ConcatSource);
<add> source.source().should.be.exactly('templateName(moduleSource());');
<add> });
<add> });
<add> });
<add>
<add> describe("main template event handlers", function() {
<add> beforeEach(function() {
<add> env.mainTemplateBindings = env.templatePlugin.getMainTemplateBindings();
<add> });
<add>
<add> it("binds two handlers", function() {
<add> env.mainTemplateBindings.length.should.be.exactly(2);
<add> });
<add>
<add> describe("global-hash-paths handler", function() {
<add> beforeEach(function() {
<add> env.mainTemplateBinding = env.mainTemplateBindings[0];
<add> });
<add>
<add> it("binds to global-hash-paths event", function() {
<add> env.mainTemplateBinding.name.should.be.exactly("global-hash-paths");
<add> });
<add>
<add> it("adds name to path array", function() {
<add> env.mainTemplateBinding.handler([]).should.deepEqual(["foo"]);
<add> });
<add> });
<add>
<add> describe("hash handler", function() {
<add> beforeEach(function() {
<add> env.mainTemplateBinding = env.mainTemplateBindings[1];
<add> });
<add>
<add> it("binds to hash event", function() {
<add> env.mainTemplateBinding.name.should.be.exactly("hash");
<add> });
<add>
<add> it("updates hash", function() {
<add> var hash = {
<add> update: sinon.spy()
<add> };
<add> env.mainTemplateBinding.handler(hash);
<add>
<add> hash.update.callCount.should.be.exactly(2);
<add> hash.update.firstCall.args[0].should.be.exactly("jsonp export");
<add> hash.update.secondCall.args[0].should.be.exactly("foo");
<add> });
<add> });
<add> })
<add> });
<add>});
<ide><path>test/helpers/TemplatePluginEnvironment.js
<add>var PluginEnvironment = require('./PluginEnvironment');
<add>
<add>module.exports = function TemplatePluginEnvironment() {
<add> var events = [];
<add> var mainTemplatePluginEnvironment = new PluginEnvironment();
<add>
<add> this.getEnvironmentStub = function() {
<add> return {
<add> mainTemplate: mainTemplatePluginEnvironment.getEnvironmentStub(),
<add> templatesPlugin: function(name, handler) {
<add> events.push({
<add> name,
<add> handler
<add> });
<add> }
<add> };
<add> };
<add>
<add> this.getEventBindings = function() {
<add> return events;
<add> };
<add>
<add> this.getMainTemplateBindings = function() {
<add> return mainTemplatePluginEnvironment.getEventBindings();
<add> };
<add>}; | 3 |
Go | Go | enable docker run -it | 3839e3a0f63c8acc4cb11a87b862f159e5b2aedc | <ide><path>pkg/mflag/example/example.go
<ide> func main() {
<ide> fmt.Printf("b: %b\n", b)
<ide> fmt.Printf("-bool: %b\n", b2)
<ide> fmt.Printf("s/#hidden/-string(via lookup): %s\n", flag.Lookup("s").Value.String())
<add> fmt.Printf("ARGS: %v\n", flag.Args())
<ide> }
<ide><path>pkg/mflag/flag.go
<ide> import (
<ide> // ErrHelp is the error returned if the flag -help is invoked but no such flag is defined.
<ide> var ErrHelp = errors.New("flag: help requested")
<ide>
<add>// ErrRetry is the error returned if you need to try letter by letter
<add>var ErrRetry = errors.New("flag: retry")
<add>
<ide> // -- bool Value
<ide> type boolValue bool
<ide>
<ide> func (f *FlagSet) usage() {
<ide> }
<ide>
<ide> // parseOne parses one flag. It reports whether a flag was seen.
<del>func (f *FlagSet) parseOne() (bool, error) {
<add>func (f *FlagSet) parseOne() (bool, string, error) {
<ide> if len(f.args) == 0 {
<del> return false, nil
<add> return false, "", nil
<ide> }
<ide> s := f.args[0]
<ide> if len(s) == 0 || s[0] != '-' || len(s) == 1 {
<del> return false, nil
<add> return false, "", nil
<ide> }
<ide> if s[1] == '-' && len(s) == 2 { // "--" terminates the flags
<ide> f.args = f.args[1:]
<del> return false, nil
<add> return false, "", nil
<ide> }
<ide> name := s[1:]
<ide> if len(name) == 0 || name[0] == '=' {
<del> return false, f.failf("bad flag syntax: %s", s)
<add> return false, "", f.failf("bad flag syntax: %s", s)
<ide> }
<ide>
<ide> // it's a flag. does it have an argument?
<ide> func (f *FlagSet) parseOne() (bool, error) {
<ide> if !alreadythere {
<ide> if name == "-help" || name == "help" || name == "h" { // special case for nice help message.
<ide> f.usage()
<del> return false, ErrHelp
<add> return false, "", ErrHelp
<ide> }
<del> return false, f.failf("flag provided but not defined: -%s", name)
<add> return false, name, ErrRetry
<ide> }
<ide> if fv, ok := flag.Value.(boolFlag); ok && fv.IsBoolFlag() { // special case: doesn't need an arg
<ide> if has_value {
<ide> if err := fv.Set(value); err != nil {
<del> return false, f.failf("invalid boolean value %q for -%s: %v", value, name, err)
<add> return false, "", f.failf("invalid boolean value %q for -%s: %v", value, name, err)
<ide> }
<ide> } else {
<ide> fv.Set("true")
<ide> func (f *FlagSet) parseOne() (bool, error) {
<ide> value, f.args = f.args[0], f.args[1:]
<ide> }
<ide> if !has_value {
<del> return false, f.failf("flag needs an argument: -%s", name)
<add> return false, "", f.failf("flag needs an argument: -%s", name)
<ide> }
<ide> if err := flag.Value.Set(value); err != nil {
<del> return false, f.failf("invalid value %q for flag -%s: %v", value, name, err)
<add> return false, "", f.failf("invalid value %q for flag -%s: %v", value, name, err)
<ide> }
<ide> }
<ide> if f.actual == nil {
<ide> f.actual = make(map[string]*Flag)
<ide> }
<ide> f.actual[name] = flag
<del> return true, nil
<add> return true, "", nil
<ide> }
<ide>
<ide> // Parse parses flag definitions from the argument list, which should not
<ide> func (f *FlagSet) Parse(arguments []string) error {
<ide> f.parsed = true
<ide> f.args = arguments
<ide> for {
<del> seen, err := f.parseOne()
<add> seen, name, err := f.parseOne()
<ide> if seen {
<ide> continue
<ide> }
<ide> if err == nil {
<ide> break
<ide> }
<add> if err == ErrRetry {
<add> if len(name) > 1 {
<add> err = nil
<add> for _, letter := range strings.Split(name, "") {
<add> f.args = append([]string{"-" + letter}, f.args...)
<add> seen2, _, err2 := f.parseOne()
<add> if seen2 {
<add> continue
<add> }
<add> if err2 != nil {
<add> err = f.failf("flag provided but not defined: -%s", name)
<add> break
<add> }
<add> }
<add> if err == nil {
<add> continue
<add> }
<add> } else {
<add> err = f.failf("flag provided but not defined: -%s", name)
<add> }
<add> }
<ide> switch f.errorHandling {
<ide> case ContinueOnError:
<ide> return err | 2 |
PHP | PHP | pass status when redirecting to route | 0b3ecf8973acc1fe8d0e409458b97b0f38a4ba8b | <ide><path>laravel/redirect.php
<ide> public static function __callStatic($method, $parameters)
<ide> {
<ide> $parameters = (isset($parameters[0])) ? $parameters[0] : array();
<ide>
<add> $status = (isset($parameters[1])) ? $parameters[1] : 302;
<add>
<ide> if (strpos($method, 'to_secure_') === 0)
<ide> {
<del> return static::to(URL::to_route(substr($method, 10), $parameters, true));
<add> return static::to(URL::to_route(substr($method, 10), $parameters, true), $status);
<ide> }
<ide>
<ide> if (strpos($method, 'to_') === 0)
<ide> {
<del> return static::to(URL::to_route(substr($method, 3), $parameters));
<add> return static::to(URL::to_route(substr($method, 3), $parameters), $status);
<ide> }
<ide>
<ide> throw new \Exception("Method [$method] is not defined on the Redirect class."); | 1 |
Text | Text | remove leading slash from path | 1b9e2bc5aa10813bc91c621aef5d1f5c62495123 | <ide><path>guides/source/engines.md
<ide> However, because you are developing the `blorgh` engine on your local machine,
<ide> you will need to specify the `:path` option in your `Gemfile`:
<ide>
<ide> ```ruby
<del>gem 'blorgh', path: "/path/to/blorgh"
<add>gem 'blorgh', path: "path/to/blorgh"
<ide> ```
<ide>
<ide> Then run `bundle` to install the gem. | 1 |
Javascript | Javascript | add test case for delegatedmodule#updatehash | 5cb7bfa81f100953e520d195ee54eac644b1bc3c | <ide><path>test/DelegatedModule.test.js
<add>/* globals describe, it, beforeEach */
<add>"use strict";
<add>require("should");
<add>const DelegatedModule = require("../lib/DelegatedModule");
<add>
<add>describe("DelegatedModule", function() {
<add> describe("#updateHash", function() {
<add> const sourceRequest = "dll-reference dll_e54c0fb67f8152792ad2";
<add> const data = {
<add> id: "/xg9"
<add> };
<add> const type = "require";
<add> const userRequest = "./library.js";
<add> let hashedText;
<add> let hash;
<add> beforeEach(function() {
<add> hashedText = "";
<add> hash = {
<add> update: (text) => {
<add> hashedText += text;
<add> }
<add> };
<add> const delegatedModule = new DelegatedModule(sourceRequest, data, type, userRequest);
<add> delegatedModule.updateHash(hash);
<add> });
<add> it("calls hash function with delegated module ID", function() {
<add> hashedText.should.containEql("/xg9");
<add> });
<add> });
<add>}); | 1 |
Mixed | Ruby | add where.associated to check association presence | ccdf6b8d42b2d32e0618870c87b1de83c06542c7 | <ide><path>activerecord/CHANGELOG.md
<add>* Add `where.associated` to check for the presence of an association.
<add>
<add> ```ruby
<add> # Before:
<add> account.users.joins(:contact).where.not(contact_id: nil)
<add>
<add> # After:
<add> account.users.where.associated(:contact)
<add> ```
<add>
<add> Also mirrors `where.missing`.
<add>
<add> *Kasper Timm Hansen*
<add>
<ide> * Fix odd behavior of inverse_of with multiple belongs_to to same class.
<ide>
<ide> Fixes #35204.
<ide><path>activerecord/lib/active_record/relation/query_methods.rb
<ide> def not(opts, *rest)
<ide> @scope
<ide> end
<ide>
<add> # Returns a new relation with joins and where clause to identify
<add> # associated relations.
<add> #
<add> # For example, posts that are associated to a related author:
<add> #
<add> # Post.where.associated(:author)
<add> # # SELECT "posts".* FROM "posts"
<add> # # INNER JOIN "authors" ON "authors"."id" = "posts"."author_id"
<add> # # WHERE "authors"."id" IS NOT NULL
<add> #
<add> # Additionally, multiple relations can be combined. This will return posts
<add> # associated to both an author and any comments:
<add> #
<add> # Post.where.associated(:author, :comments)
<add> # # SELECT "posts".* FROM "posts"
<add> # # INNER JOIN "authors" ON "authors"."id" = "posts"."author_id"
<add> # # INNER JOIN "comments" ON "comments"."post_id" = "posts"."id"
<add> # # WHERE "authors"."id" IS NOT NULL AND "comments"."id" IS NOT NULL
<add> def associated(*associations)
<add> associations.each do |association|
<add> reflection = @scope.klass._reflect_on_association(association)
<add> @scope.joins!(association)
<add> self.not(reflection.table_name => { reflection.association_primary_key => nil })
<add> end
<add>
<add> @scope
<add> end
<add>
<ide> # Returns a new relation with left outer joins and where clause to identify
<ide> # missing relations.
<ide> #
<ide><path>activerecord/test/cases/relation/where_chain_test.rb
<ide> module ActiveRecord
<ide> class WhereChainTest < ActiveRecord::TestCase
<ide> fixtures :posts, :comments, :authors, :humans, :essays
<ide>
<add> def test_associated_with_association
<add> Post.where.associated(:author).tap do |relation|
<add> assert_includes relation, posts(:welcome)
<add> assert_includes relation, posts(:sti_habtm)
<add> assert_not_includes relation, posts(:authorless)
<add> end
<add> end
<add>
<add> def test_associated_with_multiple_associations
<add> Post.where.associated(:author, :comments).tap do |relation|
<add> assert_includes relation, posts(:welcome)
<add> assert_not_includes relation, posts(:sti_habtm)
<add> assert_not_includes relation, posts(:authorless)
<add> end
<add> end
<add>
<ide> def test_missing_with_association
<ide> assert posts(:authorless).author.blank?
<ide> assert_equal [posts(:authorless)], Post.where.missing(:author).to_a | 3 |
Text | Text | add the word "programming" in the article | 12da60565a8b56864df4be08e7e3bf8029bef7fd | <ide><path>guide/english/python/if-elif-else-statements/index.md
<ide> title: If / Elif / Else Statements
<ide> ## If / Elif / Else Statements
<ide>
<ide> The `if`/`elif`/`else` structure is a common way to control the flow of a program, allowing you to execute specific blocks of code depending on the value of some data. If the condition following the keyword `if` evaluates as `True`, the block of code will execute.
<del>Note: that parenthesis is not used before and after the condition check as in other languages.
<add>Note: that parenthesis is not used before and after the condition check as in other programming languages.
<ide> ```python
<ide> if True:
<ide> print('If block will execute!') | 1 |
Javascript | Javascript | ignore duplicate welcome "message" events | ba0aee5d71874202ebf8760a802bb1d6f2f61a5e | <ide><path>packages/react-devtools-extensions/src/backend.js
<ide>
<ide> 'use strict';
<ide>
<add>let welcomeHasInitialized = false;
<add>
<ide> function welcome(event) {
<ide> if (
<ide> event.source !== window ||
<ide> function welcome(event) {
<ide> return;
<ide> }
<ide>
<add> // In some circumstances, this method is called more than once for a single welcome message.
<add> // The exact circumstances of this are unclear, though it seems related to 3rd party event batching code.
<add> //
<add> // Regardless, call this method multiple times can cause DevTools to add duplicate elements to the Store
<add> // (and throw an error) or worse yet, choke up entirely and freeze the browser.
<add> //
<add> // The simplest solution is to ignore the duplicate events.
<add> // To be clear, this SHOULD NOT BE NECESSARY, since we remove the event handler below.
<add> //
<add> // See https://github.com/facebook/react/issues/24162
<add> if (welcomeHasInitialized) {
<add> console.warn(
<add> 'React DevTools detected duplicate welcome "message" events from the content script.',
<add> );
<add> return;
<add> }
<add>
<add> welcomeHasInitialized = true;
<add>
<ide> window.removeEventListener('message', welcome);
<ide>
<ide> setup(window.__REACT_DEVTOOLS_GLOBAL_HOOK__);
<ide><path>packages/react-devtools-extensions/src/contentScript.js
<ide> function handleMessageFromDevtools(message) {
<ide> );
<ide> }
<ide>
<del>function handleMessageFromPage(evt) {
<add>function handleMessageFromPage(event) {
<ide> if (
<del> evt.source === window &&
<del> evt.data &&
<del> evt.data.source === 'react-devtools-bridge'
<add> event.source === window &&
<add> event.data &&
<add> event.data.source === 'react-devtools-bridge'
<ide> ) {
<ide> backendInitialized = true;
<ide>
<del> port.postMessage(evt.data.payload);
<add> port.postMessage(event.data.payload);
<ide> }
<ide> }
<ide> | 2 |
Python | Python | fix windows failure to remove temp file | ffca68fc86718b133668f341ddd8c2635d7e29ec | <ide><path>examples/flaskr/tests/test_flaskr.py
<ide>
<ide>
<ide> @pytest.fixture
<del>def app(request):
<del>
<del> db_fd, temp_db_location = tempfile.mkstemp()
<add>def app():
<add> db_fd, db_path = tempfile.mkstemp()
<ide> config = {
<del> 'DATABASE': temp_db_location,
<add> 'DATABASE': db_path,
<ide> 'TESTING': True,
<del> 'DB_FD': db_fd
<ide> }
<del>
<ide> app = create_app(config=config)
<ide>
<ide> with app.app_context():
<ide> init_db()
<ide> yield app
<ide>
<add> os.close(db_fd)
<add> os.unlink(db_path)
<ide>
<del>@pytest.fixture
<del>def client(request, app):
<del>
<del> client = app.test_client()
<del>
<del> def teardown():
<del> os.close(app.config['DB_FD'])
<del> os.unlink(app.config['DATABASE'])
<del> request.addfinalizer(teardown)
<ide>
<del> return client
<add>@pytest.fixture
<add>def client(app):
<add> return app.test_client()
<ide>
<ide>
<ide> def login(client, username, password): | 1 |
Python | Python | increase test coverage | bbbd585f25c25ee6c0ab95af474c40a3bc427ddd | <ide><path>keras/backend/cntk_backend.py
<ide> def permute_dimensions(x, pattern):
<ide> return C.transpose(x, axis)
<ide>
<ide>
<del>def resize_images(X, height_factor, width_factor, data_format):
<add>def resize_images(x, height_factor, width_factor, data_format):
<ide> if data_format == 'channels_first':
<del> output = repeat_elements(X, height_factor, axis=2)
<add> output = repeat_elements(x, height_factor, axis=2)
<ide> output = repeat_elements(output, width_factor, axis=3)
<ide> return output
<ide> elif data_format == 'channels_last':
<del> output = repeat_elements(X, height_factor, axis=1)
<add> output = repeat_elements(x, height_factor, axis=1)
<ide> output = repeat_elements(output, width_factor, axis=2)
<ide> return output
<ide> else:
<del> raise ValueError('CNTK Backend: Invalid dim_ordering:', data_format)
<add> raise ValueError('CNTK Backend: Invalid data_format:', data_format)
<add>
<add>
<add>def resize_volumes(x, depth_factor, height_factor, width_factor, data_format):
<add> if data_format == 'channels_first':
<add> output = repeat_elements(x, depth_factor, axis=2)
<add> output = repeat_elements(output, height_factor, axis=3)
<add> output = repeat_elements(output, width_factor, axis=4)
<add> return output
<add> elif data_format == 'channels_last':
<add> output = repeat_elements(x, depth_factor, axis=1)
<add> output = repeat_elements(output, height_factor, axis=2)
<add> output = repeat_elements(output, width_factor, axis=3)
<add> return output
<add> else:
<add> raise ValueError('CNTK Backend: Invalid data_format:', data_format)
<ide>
<ide>
<ide> def repeat_elements(x, rep, axis):
<ide><path>keras/backend/theano_backend.py
<ide> def repeat_elements(x, rep, axis):
<ide> return y
<ide>
<ide>
<del>def resize_images(X, height_factor, width_factor, data_format):
<add>def resize_images(x, height_factor, width_factor, data_format):
<ide> """Resize the images contained in a 4D tensor of shape
<ide> - [batch, channels, height, width] (for 'channels_first' data_format)
<ide> - [batch, height, width, channels] (for 'channels_last' data_format)
<ide> by a factor of (height_factor, width_factor). Both factors should be
<ide> positive integers.
<ide> """
<ide> if data_format == 'channels_first':
<del> output = repeat_elements(X, height_factor, axis=2)
<add> output = repeat_elements(x, height_factor, axis=2)
<ide> output = repeat_elements(output, width_factor, axis=3)
<ide> return output
<ide> elif data_format == 'channels_last':
<del> output = repeat_elements(X, height_factor, axis=1)
<add> output = repeat_elements(x, height_factor, axis=1)
<ide> output = repeat_elements(output, width_factor, axis=2)
<ide> return output
<ide> else:
<ide> raise ValueError('Invalid data_format:', data_format)
<ide>
<ide>
<del>def resize_volumes(X, depth_factor, height_factor, width_factor, data_format):
<add>def resize_volumes(x, depth_factor, height_factor, width_factor, data_format):
<ide> """Resize the volume contained in a 5D tensor of shape
<ide> - [batch, channels, depth, height, width] (for 'channels_first' data_format)
<ide> - [batch, depth, height, width, channels] (for 'channels_last' data_format)
<ide> by a factor of (depth_factor, height_factor, width_factor).
<ide> Both factors should be positive integers.
<ide> """
<ide> if data_format == 'channels_first':
<del> output = repeat_elements(X, depth_factor, axis=2)
<add> output = repeat_elements(x, depth_factor, axis=2)
<ide> output = repeat_elements(output, height_factor, axis=3)
<ide> output = repeat_elements(output, width_factor, axis=4)
<ide> return output
<ide> elif data_format == 'channels_last':
<del> output = repeat_elements(X, depth_factor, axis=1)
<add> output = repeat_elements(x, depth_factor, axis=1)
<ide> output = repeat_elements(output, height_factor, axis=2)
<ide> output = repeat_elements(output, width_factor, axis=3)
<ide> return output
<ide><path>tests/keras/backend/backend_test.py
<ide> def step_function(x, states):
<ide> (np.array([[1.1, 1.2, 1.3], [0.9, 0.7, 1.4]]), 1, False),
<ide> (np.array([[1.1, 1.2, 1.3], [0.9, 0.7, 1.4]]), -1, False),
<ide> ])
<del> @pytest.mark.parametrize('K', [KTH, KTF], ids=["KTH", "KTF"])
<del> def test_logsumexp(self, x_np, axis, keepdims, K):
<add> def test_logsumexp(self, x_np, axis, keepdims):
<ide> '''
<ide> Check if K.logsumexp works properly for values close to one.
<ide> '''
<del> x = K.variable(x_np)
<del> assert_allclose(K.eval(K.logsumexp(x, axis=axis, keepdims=keepdims)),
<del> np.log(np.sum(np.exp(x_np), axis=axis, keepdims=keepdims)),
<del> rtol=1e-5)
<add> for k in BACKENDS:
<add> x = k.variable(x_np)
<add> assert_allclose(k.eval(k.logsumexp(x, axis=axis, keepdims=keepdims)),
<add> np.log(np.sum(np.exp(x_np), axis=axis, keepdims=keepdims)),
<add> rtol=1e-5)
<ide>
<del> @pytest.mark.parametrize('K', [KTF], ids=["KTF"])
<del> def test_logsumexp_optim(self, K):
<add> def test_logsumexp_optim(self):
<ide> '''
<ide> Check if optimization works.
<ide> '''
<del> x_np = np.array([1e+4, 1e-4])
<del> assert_allclose(K.eval(K.logsumexp(K.variable(x_np), axis=0)),
<del> 1e4,
<del> rtol=1e-5)
<add> for k in [KTF]:
<add> x_np = np.array([1e+4, 1e-4])
<add> assert_allclose(k.eval(k.logsumexp(k.variable(x_np), axis=0)),
<add> 1e4,
<add> rtol=1e-5)
<ide>
<ide> def test_switch(self):
<ide> val = np.random.random()
<ide> def test_dropout(self):
<ide>
<ide> z_list = [k.eval(k.dropout(k.variable(val), level=0.2,
<ide> noise_shape=list(val.shape)))
<del> for k in [KTF, KTH]]
<add> for k in BACKENDS]
<ide> assert_list_pairwise(z_list, allclose=False)
<ide> # dropout patterns are different, only check mean
<del> assert np.abs(z_list[0].mean() - z_list[1].mean()) < 0.05
<add> for i in range(len(z_list) - 1):
<add> assert np.abs(z_list[i].mean() - z_list[i + 1].mean()) < 0.05
<ide>
<ide> # Test invalid use cases
<ide> for k in BACKENDS:
<ide> def test_internal_conv_utils(self):
<ide> assert ztf.shape == (6, 2, 5, 4, 3)
<ide>
<ide> def test_pooling_invalid_use(self):
<del> for (input_shape, pool_size) in ([(5, 10, 12, 3), (5, 10, 12, 6, 3)], [(2, 2), (2, 2, 2)]):
<add> for (input_shape, pool_size) in zip([(5, 10, 12, 3), (5, 10, 12, 6, 3)], [(2, 2), (2, 2, 2)]):
<ide> for k in BACKENDS:
<ide> x = k.variable(np.random.random(input_shape))
<ide> if len(pool_size) == 2:
<ide> def test_pooling_invalid_use(self):
<ide> with pytest.raises(ValueError):
<ide> k.pool3d(x, pool_size=pool_size, padding='twice')
<ide> with pytest.raises(ValueError):
<del> # In the current CNTK backend,
<del> # `_preprocess_conv3d_input` is misimplemented.
<del> if k == KC:
<del> raise ValueError
<del> else:
<del> k.pool3d(x, pool_size=pool_size, pool_mode='median')
<add> k.pool3d(x, pool_size=pool_size, pool_mode='median')
<ide>
<ide> def test_resize_images(self):
<ide> for data_format in ['channels_first', 'channels_last']:
<ide> def test_resize_volumes(self):
<ide> elif data_format == 'channels_last':
<ide> x_shape = (2,) + shape + (3,)
<ide> check_single_tensor_operation('resize_volumes', x_shape,
<del> [KTH, KTF],
<add> BACKENDS, cntk_dynamicity=True,
<ide> depth_factor=2,
<ide> height_factor=2,
<ide> width_factor=2,
<ide> data_format=data_format)
<ide>
<ide> # Test invalid use cases
<ide> xval = np.random.random(x_shape)
<del> for k in (KTH, KTF):
<add> for k in BACKENDS:
<ide> with pytest.raises(ValueError):
<ide> k.resize_volumes(k.variable(xval), 2, 2, 2,
<ide> data_format='channels_middle') | 3 |
Text | Text | fix reference to basicauthentication in settings | 4df1172665f6df3d4c4df53b4836e2c6ed462da5 | <ide><path>docs/api-guide/settings.md
<ide> Default:
<ide>
<ide> (
<ide> 'rest_framework.authentication.SessionAuthentication',
<del> 'rest_framework.authentication.UserBasicAuthentication'
<add> 'rest_framework.authentication.BasicAuthentication'
<ide> )
<ide>
<ide> ## DEFAULT_PERMISSION_CLASSES | 1 |
Javascript | Javascript | use primordials in domexception.js | 914d6c9ab8cd7154c075867f3894bd90b8e252ea | <ide><path>lib/internal/per_context/domexception.js
<ide> 'use strict';
<ide>
<del>// `per_context` scripts are executed before creating the primordials so we
<del>// cannot use them here.
<del>/* eslint-disable no-restricted-globals */
<add>const {
<add> SafeWeakMap,
<add> SafeMap,
<add> Object,
<add> Symbol
<add>} = primordials;
<ide>
<ide> class ERR_INVALID_THIS extends TypeError {
<ide> constructor(type) {
<ide> class ERR_INVALID_THIS extends TypeError {
<ide> get code() { return 'ERR_INVALID_THIS'; }
<ide> }
<ide>
<del>const internalsMap = new WeakMap();
<add>const internalsMap = new SafeWeakMap();
<ide>
<del>const nameToCodeMap = new Map();
<add>const nameToCodeMap = new SafeMap();
<ide>
<ide> class DOMException extends Error {
<ide> constructor(message = '', name = 'Error') { | 1 |
Text | Text | use path where extensions are defined, not used | 9efab213d29adcc708cc08e8f45933223900fc70 | <ide><path>guides/source/active_support_core_extensions.md
<ide> NOTE: Defined in `active_support/core_ext/hash/indifferent_access.rb`.
<ide>
<ide> ### Compacting
<ide>
<del>The methods `compact` and `compact!` return a Hash without items with `nil` value.
<add>The methods `compact` and `compact!` return a Hash without items with `nil` value.
<ide>
<ide> ```ruby
<ide> {a: 1, b: 2, c: nil}.compact # => {a: 1, b: 2}
<ide> rescue NameError => e
<ide> end
<ide> ```
<ide>
<del>NOTE: Defined in `actionpack/lib/abstract_controller/helpers.rb`.
<add>NOTE: Defined in `active_support/core_ext/name_error.rb`.
<ide>
<ide> Extensions to `LoadError`
<ide> -------------------------
<ide> rescue NameError => e
<ide> end
<ide> ```
<ide>
<del>NOTE: Defined in `actionpack/lib/abstract_controller/helpers.rb`.
<add>NOTE: Defined in `active_support/core_ext/load_error.rb`. | 1 |
PHP | PHP | avoid php bug | cdd314ebdcf079ff5d2fd700d1670f0386b3f500 | <ide><path>src/I18n/Number.php
<ide> public static function formatter(array $options = []): NumberFormatter
<ide> /** @var \NumberFormatter $formatter */
<ide> $formatter = static::$_formatters[$locale][$type];
<ide>
<del> $options = array_intersect_key($options, [
<del> 'places' => null,
<del> 'precision' => null,
<del> 'pattern' => null,
<del> 'useIntlCode' => null,
<del> ]);
<del> if (empty($options)) {
<del> return $formatter;
<add> // PHP 8.0.0 - 8.0.6 throws an exception when cloning NumberFormatter after a failed parse
<add> if (version_compare(PHP_VERSION, '8.0.6', '>') || version_compare(PHP_VERSION, '8.0.0', '<')) {
<add> $options = array_intersect_key($options, [
<add> 'places' => null,
<add> 'precision' => null,
<add> 'pattern' => null,
<add> 'useIntlCode' => null,
<add> ]);
<add> if (empty($options)) {
<add> return $formatter;
<add> }
<ide> }
<ide>
<ide> $formatter = clone $formatter; | 1 |
Python | Python | simplify lstm example | 8c73c6f218abc2b7345bab8928e5c5bcf192f4d1 | <ide><path>examples/imdb_lstm.py
<ide> - LSTM loss decrease patterns during training can be quite different
<ide> from what you see with CNNs/MLPs/etc.
<ide> '''
<del>
<ide> from __future__ import print_function
<ide> import numpy as np
<ide> np.random.seed(1337) # for reproducibility
<ide>
<ide> print('Build model...')
<ide> model = Sequential()
<del>model.add(Embedding(max_features, 128, input_length=maxlen, dropout=0.5))
<del>model.add(LSTM(128, dropout_W=0.5, dropout_U=0.5)) # try using a GRU instead, for fun
<del>model.add(Dropout(0.5))
<add>model.add(Embedding(max_features, 128, input_length=maxlen, dropout=0.2))
<add>model.add(LSTM(128, dropout_W=0.2, dropout_U=0.2)) # try using a GRU instead, for fun
<ide> model.add(Dense(1))
<ide> model.add(Activation('sigmoid'))
<ide> | 1 |
PHP | PHP | add missing onlastpage to cursorpaginator | dc724350ac1e9bf5491c6cc1e436b38f6f0973df | <ide><path>src/Illuminate/Pagination/CursorPaginator.php
<ide> public function onFirstPage()
<ide> return is_null($this->cursor) || ($this->cursor->pointsToPreviousItems() && ! $this->hasMore);
<ide> }
<ide>
<add> /**
<add> * Determine if the paginator is on the last page.
<add> *
<add> * @return bool
<add> */
<add> public function onLastPage()
<add> {
<add> return ! $this->hasMorePages();
<add> }
<add>
<ide> /**
<ide> * Get the instance as an array.
<ide> *
<ide><path>tests/Pagination/CursorPaginatorTest.php
<ide> public function testCanTransformPaginatorItems()
<ide> $this->assertSame([['id' => 6], ['id' => 7]], $p->items());
<ide> }
<ide>
<add> public function testLengthAwarePaginatorisOnFirstAndLastPage()
<add> {
<add> $paginator = new CursorPaginator([['id' => 1], ['id' => 2], ['id' => 3], ['id' => 4]], 2, null, [
<add> 'parameters' => ['id'],
<add> ]);
<add>
<add> $this->assertTrue($paginator->onFirstPage());
<add> $this->assertFalse($paginator->onLastPage());
<add>
<add> $cursor = new Cursor(['id' => 3]);
<add> $paginator = new CursorPaginator([['id' => 3], ['id' => 4]], 2, $cursor, [
<add> 'parameters' => ['id'],
<add> ]);
<add>
<add> $this->assertFalse($paginator->onFirstPage());
<add> $this->assertTrue($paginator->onLastPage());
<add> }
<add>
<ide> protected function getCursor($params, $isNext = true)
<ide> {
<ide> return (new Cursor($params, $isNext))->encode(); | 2 |
Javascript | Javascript | upgrade commonschunkplugin to es6 | 9215b6affd5d4ea485fa3f28eaa4ef6eae894172 | <ide><path>lib/optimize/CommonsChunkPlugin.js
<ide> MIT License http://www.opensource.org/licenses/mit-license.php
<ide> Author Tobias Koppers @sokra
<ide> */
<del>var nextIdent = 0;
<add>"use strict";
<add>let nextIdent = 0;
<ide>
<del>function CommonsChunkPlugin(options) {
<del> if(arguments.length > 1) {
<del> throw new Error("Deprecation notice: CommonsChunkPlugin now only takes a single argument. Either an options " +
<del> "object *or* the name of the chunk.\n" +
<del> "Example: if your old code looked like this:\n" +
<del> " new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.bundle.js')\n\n" +
<del> "You would change it to:\n" +
<del> " new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: 'vendor.bundle.js' })\n\n" +
<del> "The available options are:\n" +
<del> " name: string\n" +
<del> " names: string[]\n" +
<del> " filename: string\n" +
<del> " minChunks: number\n" +
<del> " chunks: string[]\n" +
<del> " children: boolean\n" +
<del> " async: boolean\n" +
<del> " minSize: number\n");
<add>class CommonsChunkPlugin {
<add> constructor(options) {
<add> if(arguments.length > 1) {
<add> throw new Error("Deprecation notice: CommonsChunkPlugin now only takes a single argument. Either an options " +
<add> "object *or* the name of the chunk.\n" +
<add> "Example: if your old code looked like this:\n" +
<add> " new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.bundle.js')\n\n" +
<add> "You would change it to:\n" +
<add> " new webpack.optimize.CommonsChunkPlugin({ name: 'vendor', filename: 'vendor.bundle.js' })\n\n" +
<add> "The available options are:\n" +
<add> " name: string\n" +
<add> " names: string[]\n" +
<add> " filename: string\n" +
<add> " minChunks: number\n" +
<add> " chunks: string[]\n" +
<add> " children: boolean\n" +
<add> " async: boolean\n" +
<add> " minSize: number\n");
<add> }
<add> if(Array.isArray(options) || typeof options === "string") {
<add> options = {
<add> name: options
<add> };
<add> }
<add> this.chunkNames = options.name || options.names;
<add> this.filenameTemplate = options.filename;
<add> this.minChunks = options.minChunks;
<add> this.selectedChunks = options.chunks;
<add> if(options.children) this.selectedChunks = false;
<add> this.async = options.async;
<add> this.minSize = options.minSize;
<add> this.ident = __filename + (nextIdent++);
<ide> }
<del> if(Array.isArray(options) || typeof options === "string") {
<del> options = {
<del> name: options
<del> };
<del> }
<del> this.chunkNames = options.name || options.names;
<del> this.filenameTemplate = options.filename;
<del> this.minChunks = options.minChunks;
<del> this.selectedChunks = options.chunks;
<del> if(options.children) this.selectedChunks = false;
<del> this.async = options.async;
<del> this.minSize = options.minSize;
<del> this.ident = __filename + (nextIdent++);
<del>}
<del>
<del>module.exports = CommonsChunkPlugin;
<del>CommonsChunkPlugin.prototype.apply = function(compiler) {
<del> var chunkNames = this.chunkNames;
<del> var filenameTemplate = this.filenameTemplate;
<del> var minChunks = this.minChunks;
<del> var selectedChunks = this.selectedChunks;
<del> var asyncOption = this.async;
<del> var minSize = this.minSize;
<del> var ident = this.ident;
<del> compiler.plugin("this-compilation", function(compilation) {
<del> compilation.plugin(["optimize-chunks", "optimize-extracted-chunks"], function(chunks) {
<del> // only optimize once
<del> if(compilation[ident]) return;
<del> compilation[ident] = true;
<add> apply(compiler) {
<add> const chunkNames = this.chunkNames;
<add> const filenameTemplate = this.filenameTemplate;
<add> const minChunks = this.minChunks;
<add> const selectedChunks = this.selectedChunks;
<add> const asyncOption = this.async;
<add> const minSize = this.minSize;
<add> const ident = this.ident;
<add> compiler.plugin("this-compilation", (compilation) => {
<add> compilation.plugin(["optimize-chunks", "optimize-extracted-chunks"], function(chunks) {
<add> // only optimize once
<add> if(compilation[ident]) return;
<add> compilation[ident] = true;
<ide>
<del> var commonChunks;
<del> if(!chunkNames && (selectedChunks === false || asyncOption)) {
<del> commonChunks = chunks;
<del> } else if(Array.isArray(chunkNames) || typeof chunkNames === "string") {
<del> commonChunks = [].concat(chunkNames).map(function(chunkName) {
<del> var chunk = chunks.filter(function(chunk) {
<del> return chunk.name === chunkName;
<del> })[0];
<del> if(!chunk) {
<del> chunk = this.addChunk(chunkName);
<del> }
<del> return chunk;
<del> }, this);
<del> } else {
<del> throw new Error("Invalid chunkNames argument");
<del> }
<del> commonChunks.forEach(function processCommonChunk(commonChunk, idx) {
<del> var usedChunks;
<del> if(Array.isArray(selectedChunks)) {
<del> usedChunks = chunks.filter(function(chunk) {
<del> if(chunk === commonChunk) return false;
<del> return selectedChunks.indexOf(chunk.name) >= 0;
<del> });
<del> } else if(selectedChunks === false || asyncOption) {
<del> usedChunks = (commonChunk.chunks || []).filter(function(chunk) {
<del> // we can only move modules from this chunk if the "commonChunk" is the only parent
<del> return asyncOption || chunk.parents.length === 1;
<del> });
<add> let commonChunks;
<add> if(!chunkNames && (selectedChunks === false || asyncOption)) {
<add> commonChunks = chunks;
<add> } else if(Array.isArray(chunkNames) || typeof chunkNames === "string") {
<add> commonChunks = [].concat(chunkNames).map((chunkName) => {
<add> let chunk = chunks.filter(function(chunk) {
<add> return chunk.name === chunkName;
<add> })[0];
<add> if(!chunk) {
<add> chunk = this.addChunk(chunkName);
<add> }
<add> return chunk;
<add> }, this);
<ide> } else {
<del> if(commonChunk.parents.length > 0) {
<del> compilation.errors.push(new Error("CommonsChunkPlugin: While running in normal mode it's not allowed to use a non-entry chunk (" + commonChunk.name + ")"));
<del> return;
<del> }
<del> usedChunks = chunks.filter(function(chunk) {
<del> var found = commonChunks.indexOf(chunk);
<del> if(found >= idx) return false;
<del> return chunk.hasRuntime();
<del> });
<add> throw new Error("Invalid chunkNames argument");
<ide> }
<del> if(asyncOption) {
<del> var asyncChunk = this.addChunk(typeof asyncOption === "string" ? asyncOption : undefined);
<del> asyncChunk.chunkReason = "async commons chunk";
<del> asyncChunk.extraAsync = true;
<del> asyncChunk.addParent(commonChunk);
<del> commonChunk.addChunk(asyncChunk);
<del> commonChunk = asyncChunk;
<del> }
<del> var reallyUsedModules = [];
<del> if(minChunks !== Infinity) {
<del> var commonModulesCount = [];
<del> var commonModules = [];
<del> usedChunks.forEach(function(chunk) {
<del> chunk.modules.forEach(function(module) {
<del> var idx = commonModules.indexOf(module);
<del> if(idx < 0) {
<del> commonModules.push(module);
<del> commonModulesCount.push(1);
<del> } else {
<del> commonModulesCount[idx]++;
<del> }
<add> commonChunks.forEach(function processCommonChunk(commonChunk, idx) {
<add> let usedChunks;
<add> if(Array.isArray(selectedChunks)) {
<add> usedChunks = chunks.filter((chunk) => {
<add> if(chunk === commonChunk) return false;
<add> return selectedChunks.indexOf(chunk.name) >= 0;
<ide> });
<del> });
<del> var _minChunks = (minChunks || Math.max(2, usedChunks.length))
<del> commonModulesCount.forEach(function(count, idx) {
<del> var module = commonModules[idx];
<del> if(typeof minChunks === "function") {
<del> if(!minChunks(module, count))
<del> return;
<del> } else if(count < _minChunks) {
<del> return;
<del> }
<del> if(module.chunkCondition && !module.chunkCondition(commonChunk))
<add> } else if(selectedChunks === false || asyncOption) {
<add> usedChunks = (commonChunk.chunks || []).filter((chunk) => {
<add> // we can only move modules from this chunk if the "commonChunk" is the only parent
<add> return asyncOption || chunk.parents.length === 1;
<add> });
<add> } else {
<add> if(commonChunk.parents.length > 0) {
<add> compilation.errors.push(new Error("CommonsChunkPlugin: While running in normal mode it's not allowed to use a non-entry chunk (" + commonChunk.name + ")"));
<ide> return;
<del> reallyUsedModules.push(module);
<del> });
<del> }
<del> if(minSize) {
<del> var size = reallyUsedModules.reduce(function(a, b) {
<del> return a + b.size();
<del> }, 0);
<del> if(size < minSize)
<del> return;
<del> }
<del> var reallyUsedChunks = [];
<del> reallyUsedModules.forEach(function(module) {
<del> usedChunks.forEach(function(chunk) {
<del> if(module.removeChunk(chunk)) {
<del> if(reallyUsedChunks.indexOf(chunk) < 0)
<del> reallyUsedChunks.push(chunk);
<ide> }
<del> });
<del> commonChunk.addModule(module);
<del> module.addChunk(commonChunk);
<del> });
<del> if(asyncOption) {
<del> reallyUsedChunks.forEach(function(chunk) {
<del> if(chunk.isInitial())
<add> usedChunks = chunks.filter((chunk) => {
<add> const found = commonChunks.indexOf(chunk);
<add> if(found >= idx) return false;
<add> return chunk.hasRuntime();
<add> });
<add> }
<add> if(asyncOption) {
<add> var asyncChunk = this.addChunk(typeof asyncOption === "string" ? asyncOption : undefined);
<add> asyncChunk.chunkReason = "async commons chunk";
<add> asyncChunk.extraAsync = true;
<add> asyncChunk.addParent(commonChunk);
<add> commonChunk.addChunk(asyncChunk);
<add> commonChunk = asyncChunk;
<add> }
<add> const reallyUsedModules = [];
<add> if(minChunks !== Infinity) {
<add> const commonModulesCount = [];
<add> const commonModules = [];
<add> usedChunks.forEach(function(chunk) {
<add> chunk.modules.forEach(function(module) {
<add> const idx = commonModules.indexOf(module);
<add> if(idx < 0) {
<add> commonModules.push(module);
<add> commonModulesCount.push(1);
<add> } else {
<add> commonModulesCount[idx]++;
<add> }
<add> });
<add> });
<add> const _minChunks = (minChunks || Math.max(2, usedChunks.length))
<add> commonModulesCount.forEach((count, idx) => {
<add> const module = commonModules[idx];
<add> if(typeof minChunks === "function") {
<add> if(!minChunks(module, count))
<add> return;
<add> } else if(count < _minChunks) {
<add> return;
<add> }
<add> if(module.chunkCondition && !module.chunkCondition(commonChunk))
<add> return;
<add> reallyUsedModules.push(module);
<add> });
<add> }
<add> if(minSize) {
<add> const size = reallyUsedModules.reduce((a, b) => {
<add> return a + b.size();
<add> }, 0);
<add> if(size < minSize)
<ide> return;
<del> chunk.blocks.forEach(function(block) {
<del> block.chunks.unshift(commonChunk);
<del> commonChunk.addBlock(block);
<add> }
<add> const reallyUsedChunks = [];
<add> reallyUsedModules.forEach((module) => {
<add> usedChunks.forEach((chunk) => {
<add> if(module.removeChunk(chunk)) {
<add> if(reallyUsedChunks.indexOf(chunk) < 0)
<add> reallyUsedChunks.push(chunk);
<add> }
<ide> });
<add> commonChunk.addModule(module);
<add> module.addChunk(commonChunk);
<ide> });
<del> asyncChunk.origins = reallyUsedChunks.map(function(chunk) {
<del> return chunk.origins.map(function(origin) {
<del> var newOrigin = Object.create(origin);
<del> newOrigin.reasons = (origin.reasons || []).slice();
<del> newOrigin.reasons.push("async commons");
<del> return newOrigin;
<add> if(asyncOption) {
<add> reallyUsedChunks.forEach((chunk) => {
<add> if(chunk.isInitial())
<add> return;
<add> chunk.blocks.forEach((block) => {
<add> block.chunks.unshift(commonChunk);
<add> commonChunk.addBlock(block);
<add> });
<ide> });
<del> }).reduce(function(arr, a) {
<del> arr.push.apply(arr, a);
<del> return arr;
<del> }, []);
<del> } else {
<del> usedChunks.forEach(function(chunk) {
<del> chunk.parents = [commonChunk];
<del> chunk.entrypoints.forEach(function(ep) {
<del> ep.insertChunk(commonChunk, chunk);
<add> asyncChunk.origins = reallyUsedChunks.map((chunk) => {
<add> return chunk.origins.map(function(origin) {
<add> const newOrigin = Object.create(origin);
<add> newOrigin.reasons = (origin.reasons || []).slice();
<add> newOrigin.reasons.push("async commons");
<add> return newOrigin;
<add> });
<add> }).reduce((arr, a) => {
<add> arr.push.apply(arr, a);
<add> return arr;
<add> }, []);
<add> } else {
<add> usedChunks.forEach((chunk) => {
<add> chunk.parents = [commonChunk];
<add> chunk.entrypoints.forEach((ep) => {
<add> ep.insertChunk(commonChunk, chunk);
<add> });
<add> commonChunk.addChunk(chunk);
<ide> });
<del> commonChunk.addChunk(chunk);
<del> });
<del> }
<del> if(filenameTemplate)
<del> commonChunk.filenameTemplate = filenameTemplate;
<del> }, this);
<del> return true;
<add> }
<add> if(filenameTemplate)
<add> commonChunk.filenameTemplate = filenameTemplate;
<add> }, this);
<add> return true;
<add> });
<ide> });
<del> });
<del>};
<add> }
<add>}
<add>
<add>module.exports = CommonsChunkPlugin; | 1 |
Java | Java | add log message to bridge init | e55cefc476e720dd3c3b1726f21d2b63ee41a19c | <ide><path>ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java
<ide> private CatalystInstanceImpl(
<ide> final JavaScriptModulesConfig jsModulesConfig,
<ide> final JSBundleLoader jsBundleLoader,
<ide> NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler) {
<add> FLog.d(ReactConstants.TAG, "Initializing React Bridge.");
<ide> mReactQueueConfiguration = ReactQueueConfigurationImpl.create(
<ide> ReactQueueConfigurationSpec,
<ide> new NativeExceptionHandler()); | 1 |
Text | Text | add reference to nlp dataset | 0c55a384f86a41baad87b90faf865537f7844bf1 | <ide><path>model_cards/mrm8488/t5-base-finetuned-squadv2/README.md
<ide> ---
<ide> language: english
<del>thumbnail:
<add>datasets:
<add>- squad_v2
<ide> ---
<ide>
<ide> # T5-base fine-tuned on SQuAD v2
<ide> Transfer learning, where a model is first pre-trained on a data-rich task before
<ide>
<ide> ## Details of the downstream task (Q&A) - Dataset 📚 🧐 ❓
<ide>
<del>[SQuAD v2](https://rajpurkar.github.io/SQuAD-explorer/) combines the 100,000 questions in SQuAD1.1 with over 50,000 unanswerable questions written adversarially by crowdworkers to look similar to answerable ones. To do well on SQuAD2.0, systems must not only answer questions when possible, but also determine when no answer is supported by the paragraph and abstain from answering.
<del>
<add>Dataset ID: ```squad_v2``` from [HugginFace/NLP](https://github.com/huggingface/nlp)
<ide> | Dataset | Split | # samples |
<ide> | -------- | ----- | --------- |
<del>| SQuAD2.0 | train | 130k |
<del>| SQuAD2.0 | eval | 12.3k |
<add>| squad_v2 | train | 130319 |
<add>| squad_v2 | valid | 11873 |
<add>
<add>How to load it from [nlp](https://github.com/huggingface/nlp)
<ide>
<add>```python
<add>train_dataset = nlp.load_dataset('squad_v2', split=nlp.Split.TRAIN)
<add>valid_dataset = nlp.load_dataset('squad_v2', split=nlp.Split.VALIDATION)
<add>```
<add>Check out more about this dataset and others in [NLP Viewer](https://huggingface.co/nlp/viewer/)
<ide>
<ide>
<ide> ## Model fine-tuning 🏋️ | 1 |
Javascript | Javascript | enable experimental cache api in www testrenderer | 61455a25b7d5783f398b0a463f45b9b8d14a6ed6 | <ide><path>packages/shared/forks/ReactFeatureFlags.testing.www.js
<ide> export const enableUpdaterTracking = false;
<ide> export const enableSuspenseServerRenderer = true;
<ide> export const enableSelectiveHydration = true;
<ide> export const enableLazyElements = false;
<del>export const enableCache = false;
<add>export const enableCache = true;
<ide> export const disableJavaScriptURLs = true;
<ide> export const disableInputAttributeSyncing = false;
<ide> export const enableSchedulerDebugging = false; | 1 |
Javascript | Javascript | fix french weekdaysmin | 9f9287508321647ae2897f48bf4e4a1a7275fe23 | <ide><path>lang/fr.js
<ide> monthsShort : "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),
<ide> weekdays : "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),
<ide> weekdaysShort : "dim._lun._mar._mer._jeu._ven._sam.".split("_"),
<del> weekdaysMin : "D_L_Ma_Me_J_V_S".split("_"),
<add> weekdaysMin : "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),
<ide> longDateFormat : {
<ide> LT : "HH:mm",
<ide> L : "DD/MM/YYYY",
<ide><path>min/lang-all.min.js
<ide> // moment.js language configuration
<ide> // language : catalan (ca)
<ide> // author : Juan G. Hurtado : https://github.com/juanghurtado
<del>(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})(),function(){var a={months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ",LLL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT",LLLL:"dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:"%sран",past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:function(a){return"-мĕш"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("cv",a)}(),function(){var a={months:"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),weekdays:"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),weekdaysShort:"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd D. MMMM, YYYY h:mm A"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"minut",mm:"%d minutter",h:"time",hh:"%d timer",d:"dag",dd:"%d dage",M:"månede",MM:"%d måneder",y:"år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("da",a)}(),function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)}(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)}(),function(){function c(a,b,c,e){var f="";switch(c){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"päivän":"päivä";case"dd":f=e?"päivän":"päivää";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=d(a,e)+" "+f,f}function d(c,d){return c<10?d?b[c]:a[c]:c}var a=["nolla","yksi","kaksi","kolme","neljä","viisi","kuusi","seitsemän","kahdeksan","yhdeksän"],b=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]],e={months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMMt\\a YYYY",LLL:"Do MMMMt\\a YYYY, klo LT",LLLL:"dddd, Do MMMMt\\a YYYY, klo LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=e),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fi",e)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"D_L_Ma_Me_J_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)}(),function(){var a=function(a){return a%100==11?!0:a%10==1?!1:!0},b=function(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return c?"mínúta":"mínútu";case"mm":return a(b)?f+(c||e?"mínútur":"mínútum"):c?f+"mínúta":f+"mínútu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return a(b)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return a(b)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}},c={months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY kl. LT",LLLL:"dddd, D. MMMM YYYY kl. LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:b,m:b,mm:b,h:"klukkustund",hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("is",c)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah:mm",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 LT",LLLL:"YYYY年M月D日 dddd LT"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("jp",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a=[function(a){return a%10===1&&a%100!==11},function(a){return a%10>=2&&a%10<=4&&a%10%1===0&&(a%100<12||a%100>14)},function(a){return a%10===0||a%10>=5&&a%10<=9&&a%10%1===0||a%100>=11&&a%100<=14&&a%100%1===0},function(a){return!0}],b=function(b,c){var d=b.split("_"),e=Math.min(a.length,d.length),f=-1;while(++f<e)if(a[f](c))return d[f];return d[e-1]},c=function(a,c,d){var e={mm:"минута_минуты_минут_минуты",hh:"час_часа_часов_часа",dd:"день_дня_дней_дня",MM:"месяц_месяца_месяцев_месяца",yy:"год_года_лет_года"};return d==="m"?c?"минута":"минуту":a+" "+b(e[d],+a)},d={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:c,mm:c,h:"час",hh:c,d:"день",dd:c,M:"месяц",MM:c,y:"год",yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=d),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",d)}(),function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd[en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)}(),function(){var a={months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("tr",a)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-cn",a)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-tw",a)}();
<ide>\ No newline at end of file
<add>(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})(),function(){var a={months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ",LLL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT",LLLL:"dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:"%sран",past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:function(a){return"-мĕш"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("cv",a)}(),function(){var a={months:"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),weekdays:"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),weekdaysShort:"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd D. MMMM, YYYY h:mm A"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"minut",mm:"%d minutter",h:"time",hh:"%d timer",d:"dag",dd:"%d dage",M:"månede",MM:"%d måneder",y:"år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("da",a)}(),function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)}(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)}(),function(){function c(a,b,c,e){var f="";switch(c){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"päivän":"päivä";case"dd":f=e?"päivän":"päivää";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=d(a,e)+" "+f,f}function d(c,d){return c<10?d?b[c]:a[c]:c}var a=["nolla","yksi","kaksi","kolme","neljä","viisi","kuusi","seitsemän","kahdeksan","yhdeksän"],b=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]],e={months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMMt\\a YYYY",LLL:"Do MMMMt\\a YYYY, klo LT",LLLL:"dddd, Do MMMMt\\a YYYY, klo LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=e),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fi",e)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)}(),function(){var a=function(a){return a%100==11?!0:a%10==1?!1:!0},b=function(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return c?"mínúta":"mínútu";case"mm":return a(b)?f+(c||e?"mínútur":"mínútum"):c?f+"mínúta":f+"mínútu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return a(b)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return a(b)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}},c={months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY kl. LT",LLLL:"dddd, D. MMMM YYYY kl. LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:b,m:b,mm:b,h:"klukkustund",hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("is",c)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah:mm",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 LT",LLLL:"YYYY年M月D日 dddd LT"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("jp",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a=[function(a){return a%10===1&&a%100!==11},function(a){return a%10>=2&&a%10<=4&&a%10%1===0&&(a%100<12||a%100>14)},function(a){return a%10===0||a%10>=5&&a%10<=9&&a%10%1===0||a%100>=11&&a%100<=14&&a%100%1===0},function(a){return!0}],b=function(b,c){var d=b.split("_"),e=Math.min(a.length,d.length),f=-1;while(++f<e)if(a[f](c))return d[f];return d[e-1]},c=function(a,c,d){var e={mm:"минута_минуты_минут_минуты",hh:"час_часа_часов_часа",dd:"день_дня_дней_дня",MM:"месяц_месяца_месяцев_месяца",yy:"год_года_лет_года"};return d==="m"?c?"минута":"минуту":a+" "+b(e[d],+a)},d={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return this.day()===2?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(){switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:c,mm:c,h:"час",hh:c,d:"день",dd:c,M:"месяц",MM:c,y:"год",yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=d),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",d)}(),function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Igår klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[Förra] dddd[en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)}(),function(){var a={months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("tr",a)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-cn",a)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-tw",a)}();
<ide>\ No newline at end of file
<ide><path>min/lang/fr.js
<ide> // moment.js language configuration
<ide> // language : french (fr)
<ide> // author : John Fischer : https://github.com/jfroffice
<del>(function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"D_L_Ma_Me_J_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})();
<ide>\ No newline at end of file
<add>(function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})();
<ide>\ No newline at end of file
<ide><path>test/lang/fr.js
<ide> exports["lang:fr"] = {
<ide> ['M Mo MM MMMM MMM', '2 2ème 02 février févr.'],
<ide> ['YYYY YY', '2010 10'],
<ide> ['D Do DD', '14 14ème 14'],
<del> ['d do dddd ddd dd', '0 0ème dimanche dim. D'],
<add> ['d do dddd ddd dd', '0 0ème dimanche dim. Di'],
<ide> ['DDD DDDo DDDD', '45 45ème 045'],
<ide> ['w wo ww', '8 8ème 08'],
<ide> ['h hh', '3 03'],
<ide> exports["lang:fr"] = {
<ide> "format week" : function(test) {
<ide> test.expect(7);
<ide> moment.lang('fr');
<del> var expected = 'dimanche dim. D_lundi lun. L_mardi mar. Ma_mercredi mer. Me_jeudi jeu. J_vendredi ven. V_samedi sam. S'.split("_");
<add> var expected = 'dimanche dim. Di_lundi lun. Lu_mardi mar. Ma_mercredi mer. Me_jeudi jeu. Je_vendredi ven. Ve_samedi sam. Sa'.split("_");
<ide> var i;
<ide> for (i = 0; i < expected.length; i++) {
<ide> test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); | 4 |
Javascript | Javascript | use array push chunk format for web workers too | e5ba0356f5c446c233a2274b7d33fea30cb88db0 | <ide><path>lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js
<ide> class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
<ide> const {
<ide> chunk,
<ide> compilation: {
<add> runtimeTemplate,
<ide> outputOptions: { globalObject, chunkLoadingGlobal, hotUpdateGlobal }
<ide> }
<ide> } = this;
<ide> class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
<ide> withLoading
<ide> ? Template.asString([
<ide> "// importScripts chunk loading",
<del> `${fn}.i = function(chunkId, promises) {`,
<del> Template.indent([
<add> `${globalObject}[${JSON.stringify(
<add> chunkLoadingGlobal
<add> )}] = { push: ${runtimeTemplate.basicFunction("data", [
<add> "var chunkIds = data[0];",
<add> "var moreModules = data[1];",
<add> "var runtime = data[2];",
<add> "for(var moduleId in moreModules) {",
<add> Template.indent([
<add> `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`,
<add> Template.indent(
<add> `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];`
<add> ),
<add> "}"
<add> ]),
<add> "}",
<add> "if(runtime) runtime(__webpack_require__);",
<add> "while(chunkIds.length)",
<add> Template.indent("installedChunks[chunkIds.pop()] = 1;")
<add> ])} };`,
<add> `${fn}.i = ${runtimeTemplate.basicFunction("chunkId, promises", [
<ide> '// "1" is the signal for "already loaded"',
<ide> "if(!installedChunks[chunkId]) {",
<ide> Template.indent([
<del> `${globalObject}[${JSON.stringify(
<del> chunkLoadingGlobal
<del> )}] = function webpackChunkCallback(chunkIds, moreModules, runtime) {`,
<del> Template.indent([
<del> "for(var moduleId in moreModules) {",
<del> Template.indent([
<del> `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`,
<del> Template.indent(
<del> `${RuntimeGlobals.moduleFactories}[moduleId] = moreModules[moduleId];`
<del> ),
<del> "}"
<del> ]),
<del> "}",
<del> "if(runtime) runtime(__webpack_require__);",
<del> "while(chunkIds.length)",
<del> Template.indent("installedChunks[chunkIds.pop()] = 1;")
<del> ]),
<del> "};",
<ide> `importScripts(${JSON.stringify(rootOutputDir)} + ${
<ide> RuntimeGlobals.getChunkScriptFilename
<ide> }(chunkId));`
<ide> ]),
<ide> "}"
<del> ]),
<del> "};"
<add> ])};`
<ide> ])
<ide> : "// no chunk loading",
<ide> "",
<ide> class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
<ide> "var success = false;",
<ide> `${globalObject}[${JSON.stringify(
<ide> hotUpdateGlobal
<del> )}] = function(moreModules, runtime) {`,
<del> Template.indent([
<add> )}] = ${runtimeTemplate.basicFunction("_, moreModules, runtime", [
<ide> "for(var moduleId in moreModules) {",
<ide> Template.indent([
<ide> `if(${RuntimeGlobals.hasOwnProperty}(moreModules, moduleId)) {`,
<ide> class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
<ide> "}",
<ide> "if(runtime) currentUpdateRuntime.push(runtime);",
<ide> "success = true;"
<del> ]),
<del> "};",
<add> ])};`,
<ide> "// start update chunk loading",
<ide> `importScripts(${JSON.stringify(rootOutputDir)} + ${
<ide> RuntimeGlobals.getChunkUpdateScriptFilename
<ide> class ImportScriptsChunkLoadingRuntimeModule extends RuntimeModule {
<ide> "",
<ide> withHmrManifest
<ide> ? Template.asString([
<del> `${RuntimeGlobals.hmrDownloadManifest} = function() {`,
<del> Template.indent([
<add> `${
<add> RuntimeGlobals.hmrDownloadManifest
<add> } = ${runtimeTemplate.basicFunction("", [
<ide> 'if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");',
<del> `return fetch(${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getUpdateManifestFilename}()).then(function(response) {`,
<del> Template.indent([
<add> `return fetch(${RuntimeGlobals.publicPath} + ${
<add> RuntimeGlobals.getUpdateManifestFilename
<add> }()).then(${runtimeTemplate.basicFunction("response", [
<ide> "if(response.status === 404) return; // no update available",
<ide> 'if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText);',
<ide> "return response.json();"
<del> ]),
<del> "});"
<del> ]),
<del> "};"
<add> ])});`
<add> ])};`
<ide> ])
<ide> : "// no HMR manifest"
<ide> ]);
<ide><path>lib/webworker/WebWorkerTemplatePlugin.js
<ide>
<ide> "use strict";
<ide>
<del>const { ConcatSource } = require("webpack-sources");
<del>const HotUpdateChunk = require("../HotUpdateChunk");
<ide> const RuntimeGlobals = require("../RuntimeGlobals");
<del>const Template = require("../Template");
<del>const JavascriptModulesPlugin = require("../javascript/JavascriptModulesPlugin");
<add>const ArrayPushCallbackChunkFormatPlugin = require("../javascript/ArrayPushCallbackChunkFormatPlugin");
<ide> const StartupChunkDependenciesPlugin = require("../runtime/StartupChunkDependenciesPlugin");
<ide> const ImportScriptsChunkLoadingRuntimeModule = require("./ImportScriptsChunkLoadingRuntimeModule");
<ide>
<ide> class WebWorkerTemplatePlugin {
<ide> new StartupChunkDependenciesPlugin({
<ide> asyncChunkLoading: true
<ide> }).apply(compiler);
<add> new ArrayPushCallbackChunkFormatPlugin().apply(compiler);
<ide> compiler.hooks.thisCompilation.tap(
<ide> "WebWorkerTemplatePlugin",
<ide> compilation => {
<del> const hooks = JavascriptModulesPlugin.getCompilationHooks(compilation);
<del> hooks.renderChunk.tap(
<del> "WebWorkerTemplatePlugin",
<del> (modules, renderContext) => {
<del> const { chunk, chunkGraph, runtimeTemplate } = renderContext;
<del> const hotUpdateChunk =
<del> chunk instanceof HotUpdateChunk ? chunk : null;
<del> const globalObject = runtimeTemplate.outputOptions.globalObject;
<del> const source = new ConcatSource();
<del> const runtimeModules = chunkGraph.getChunkRuntimeModulesInOrder(
<del> chunk
<del> );
<del> const runtimePart =
<del> runtimeModules.length > 0 &&
<del> Template.renderChunkRuntimeModules(runtimeModules, renderContext);
<del> if (hotUpdateChunk) {
<del> const hotUpdateGlobal =
<del> runtimeTemplate.outputOptions.hotUpdateGlobal;
<del> source.add(
<del> `${globalObject}[${JSON.stringify(hotUpdateGlobal)}](`
<del> );
<del> source.add(modules);
<del> if (runtimePart) {
<del> source.add(",\n");
<del> source.add(runtimePart);
<del> }
<del> source.add(")");
<del> } else {
<del> const chunkLoadingGlobal =
<del> runtimeTemplate.outputOptions.chunkLoadingGlobal;
<del> source.add(
<del> `${globalObject}[${JSON.stringify(chunkLoadingGlobal)}](`
<del> );
<del> source.add(`${JSON.stringify(chunk.ids)},`);
<del> source.add(modules);
<del> if (runtimePart) {
<del> source.add(",\n");
<del> source.add(runtimePart);
<del> }
<del> source.add(")");
<del> }
<del> return source;
<del> }
<del> );
<del> hooks.chunkHash.tap(
<del> "WebWorkerTemplatePlugin",
<del> (chunk, hash, { runtimeTemplate }) => {
<del> if (chunk.hasRuntime()) return;
<del> hash.update("webworker");
<del> hash.update("1");
<del> hash.update(`${runtimeTemplate.outputOptions.chunkLoadingGlobal}`);
<del> hash.update(`${runtimeTemplate.outputOptions.hotUpdateGlobal}`);
<del> hash.update(`${runtimeTemplate.outputOptions.globalObject}`);
<del> }
<del> );
<del>
<ide> const onceForChunkSet = new WeakSet();
<ide> const handler = (chunk, set) => {
<ide> if (onceForChunkSet.has(chunk)) return; | 2 |
Python | Python | remove dag parsing from db init command | 8079b4cb69eff3d04a00d897a76e182b575c754c | <ide><path>airflow/utils/db.py
<ide> def initdb(session: Session = NEW_SESSION):
<ide>
<ide> with create_global_lock(session=session, lock=DBLocks.MIGRATIONS):
<ide>
<del> dagbag = DagBag()
<del> # Save DAGs in the ORM
<del> dagbag.sync_to_db(session=session)
<del>
<del> # Deactivate the unknown ones
<del> DAG.deactivate_unknown_dags(dagbag.dags.keys(), session=session)
<del>
<ide> from flask_appbuilder.models.sqla import Base
<ide>
<ide> Base.metadata.create_all(settings.engine)
<ide> def resetdb(session: Session = NEW_SESSION):
<ide> initdb(session=session)
<ide>
<ide>
<add>@provide_session
<add>def bootstrap_dagbag(session: Session = NEW_SESSION):
<add>
<add> dagbag = DagBag()
<add> # Save DAGs in the ORM
<add> dagbag.sync_to_db(session=session)
<add>
<add> # Deactivate the unknown ones
<add> DAG.deactivate_unknown_dags(dagbag.dags.keys(), session=session)
<add>
<add>
<ide> @provide_session
<ide> def downgrade(*, to_revision, from_revision=None, show_sql_only=False, session: Session = NEW_SESSION):
<ide> """
<ide><path>tests/conftest.py
<ide> def initial_db_init():
<ide> from airflow.utils import db
<ide>
<ide> db.resetdb()
<add> db.bootstrap_dagbag()
<ide>
<ide>
<ide> @pytest.fixture(autouse=True, scope="session") | 2 |
Python | Python | fix math block in hermmulx, lagmulx | 927feff8788f27f29e76e803f187a4c041098ced | <ide><path>numpy/polynomial/hermite.py
<ide> def hermmulx(c):
<ide>
<ide> .. math::
<ide>
<del> xP_i(x) = (P_{i + 1}(x)/2 + i*P_{i - 1}(x))
<add> xP_i(x) = (P_{i + 1}(x)/2 + i*P_{i - 1}(x))
<ide>
<ide> Examples
<ide> --------
<ide><path>numpy/polynomial/hermite_e.py
<ide> def hermemulx(c):
<ide>
<ide> .. math::
<ide>
<del> xP_i(x) = (P_{i + 1}(x) + iP_{i - 1}(x)))
<add> xP_i(x) = (P_{i + 1}(x) + iP_{i - 1}(x)))
<ide>
<ide> Examples
<ide> --------
<ide><path>numpy/polynomial/laguerre.py
<ide> def lagmulx(c):
<ide>
<ide> .. math::
<ide>
<del> xP_i(x) = (-(i + 1)*P_{i + 1}(x) + (2i + 1)P_{i}(x) - iP_{i - 1}(x))
<add> xP_i(x) = (-(i + 1)*P_{i + 1}(x) + (2i + 1)P_{i}(x) - iP_{i - 1}(x))
<ide>
<ide> Examples
<ide> -------- | 3 |
Go | Go | add resize endpoint to api | 70d2123efda0e92760b96b03ce27cb4f1fb61cb3 | <ide><path>api.go
<ide> func writeJson(w http.ResponseWriter, b []byte) {
<ide> w.Write(b)
<ide> }
<ide>
<add>// FIXME: Use stvconv.ParseBool() instead?
<ide> func getBoolParam(value string) (bool, error) {
<ide> if value == "1" || strings.ToLower(value) == "true" {
<ide> return true, nil
<ide> func postContainersWait(srv *Server, version float64, w http.ResponseWriter, r *
<ide> return nil
<ide> }
<ide>
<add>func postContainersResize(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
<add> if err := parseForm(r); err != nil {
<add> return err
<add> }
<add> height, err := strconv.Atoi(r.Form.Get("h"))
<add> if err != nil {
<add> return err
<add> }
<add> width, err := strconv.Atoi(r.Form.Get("w"))
<add> if err != nil {
<add> return err
<add> }
<add> if vars == nil {
<add> return fmt.Errorf("Missing parameter")
<add> }
<add> name := vars["name"]
<add> if err := srv.ContainerResize(name, height, width); err != nil {
<add> return err
<add> }
<add> return nil
<add>}
<add>
<ide> func postContainersAttach(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
<ide> if err := parseForm(r); err != nil {
<ide> return err
<ide> func ListenAndServe(addr string, srv *Server, logging bool) error {
<ide> "/containers/{name:.*}/start": postContainersStart,
<ide> "/containers/{name:.*}/stop": postContainersStop,
<ide> "/containers/{name:.*}/wait": postContainersWait,
<add> "/containers/{name:.*}/resize": postContainersResize,
<ide> "/containers/{name:.*}/attach": postContainersAttach,
<ide> },
<ide> "DELETE": {
<ide><path>container.go
<ide> func (container *Container) Wait() int {
<ide> return container.State.ExitCode
<ide> }
<ide>
<add>func (container *Container) Resize(h, w int) error {
<add> return fmt.Errorf("Resize not yet implemented")
<add>}
<add>
<ide> func (container *Container) ExportRw() (Archive, error) {
<ide> return Tar(container.rwPath(), Uncompressed)
<ide> }
<ide><path>server.go
<ide> func (srv *Server) ContainerWait(name string) (int, error) {
<ide> return 0, fmt.Errorf("No such container: %s", name)
<ide> }
<ide>
<add>func (srv *Server) ContainerResize(name string, h, w int) error {
<add> if container := srv.runtime.Get(name); container != nil {
<add> return container.Resize(h, w)
<add> }
<add> return fmt.Errorf("No such container: %s", name)
<add>}
<add>
<ide> func (srv *Server) ContainerAttach(name string, logs, stream, stdin, stdout, stderr bool, in io.ReadCloser, out io.Writer) error {
<ide> container := srv.runtime.Get(name)
<ide> if container == nil { | 3 |
Python | Python | fix bug with m2m in browseable api | aa72f8d63d2a7b33a2e74eaba216b56c803af70c | <ide><path>rest_framework/renderers.py
<ide> from rest_framework.utils import encoders
<ide> from rest_framework.utils.breadcrumbs import get_breadcrumbs
<ide> from rest_framework import VERSION, status
<del>from rest_framework import serializers, parsers
<add>from rest_framework import parsers
<ide>
<ide>
<ide> class BaseRenderer(object):
<ide><path>rest_framework/serializers.py
<ide> def get_fields(self):
<ide> for key in self.opts.exclude:
<ide> ret.pop(key, None)
<ide>
<add> for key, field in ret.items():
<add> field.initialize(parent=self, field_name=key)
<add>
<ide> return ret
<ide>
<ide> #####
<ide> def initialize(self, parent, field_name):
<ide> if parent.opts.depth:
<ide> self.opts.depth = parent.opts.depth - 1
<ide>
<del> # We need to call initialize here to ensure any nested
<del> # serializers that will have already called initialize on their
<del> # descendants get updated with *their* parent.
<del> # We could be a bit more smart about this, but it'll do for now.
<del> for key, field in self.fields.items():
<del> field.initialize(parent=self, field_name=key)
<del>
<ide> #####
<ide> # Methods to convert or revert from objects <--> primitive representations.
<ide>
<ide><path>rest_framework/tests/generics.py
<add>from django.db import models
<ide> from django.test import TestCase
<ide> from django.test.client import RequestFactory
<ide> from django.utils import simplejson as json
<ide> def test_create_model_with_auto_now_add_field(self):
<ide> self.assertEquals(response.status_code, status.HTTP_201_CREATED)
<ide> created = self.objects.get(id=1)
<ide> self.assertEquals(created.content, 'foobar')
<add>
<add>
<add># Test for particularly ugly reression with m2m in browseable API
<add>class ClassB(models.Model):
<add> name = models.CharField(max_length=255)
<add>
<add>
<add>class ClassA(models.Model):
<add> name = models.CharField(max_length=255)
<add> childs = models.ManyToManyField(ClassB, blank=True, null=True)
<add>
<add>
<add>class ClassASerializer(serializers.ModelSerializer):
<add> childs = serializers.ManyPrimaryKeyRelatedField(source='childs')
<add>
<add> class Meta:
<add> model = ClassA
<add>
<add>
<add>class ExampleView(generics.ListCreateAPIView):
<add> serializer_class = ClassASerializer
<add> model = ClassA
<add>
<add>
<add>class TestM2MBrowseableAPI(TestCase):
<add> def test_m2m_in_browseable_api(self):
<add> """
<add> Test for particularly ugly reression with m2m in browseable API
<add> """
<add> request = factory.get('/', HTTP_ACCEPT='text/html')
<add> view = ExampleView().as_view()
<add> response = view(request).render()
<add> self.assertEquals(response.status_code, status.HTTP_200_OK) | 3 |
PHP | PHP | fix failing test | fcb7714e2e8dfc355f2d0f78b6b9d38e6b8ebf2c | <ide><path>lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php
<ide> public function testMessageId() {
<ide> $this->assertTrue($this->Controller->EmailTest->send('This is the body of the message'));
<ide> $result = DebugCompTransport::$lastEmail;
<ide>
<del> $this->assertRegExp('/Message-ID: \<[a-f0-9]{8}[a-f0-9]{4}[a-f0-9]{4}[a-f0-9]{4}[a-f0-9]{12}@' . env('HTTP_HOST') . '\>\n/', $result);
<add> $host = env('HTTP_HOST') ? env('HTTP_HOST') : php_uname('n');
<add> $this->assertRegExp('/Message-ID: \<[a-f0-9]{8}[a-f0-9]{4}[a-f0-9]{4}[a-f0-9]{4}[a-f0-9]{12}@' . $host . '\>\n/', $result);
<ide>
<ide> $this->Controller->EmailTest->messageId = '<[email protected]>';
<ide> | 1 |
Ruby | Ruby | reword formula up to date message | 2d99bc39723aeece8533e5b4f4314165a548420a | <ide><path>Library/Homebrew/dev-cmd/bump.rb
<ide> def bump
<ide> end
<ide>
<ide> if requested_formula && outdated_repology_packages.nil?
<del> ohai "The requested formula, #{requested_formula}, is up-to-date."
<add> ohai "#{requested_formula} is up-to-date!"
<ide> puts "Current version: #{get_formula_details(requested_formula).version}"
<ide> return
<ide> end | 1 |
Ruby | Ruby | fix touch and update_column/s for readonly records | 0c508aeb61e746f0e8cd4fc492ee56b1c6048181 | <ide><path>activerecord/lib/active_record/persistence.rb
<ide> def update_column(name, value)
<ide> def update_columns(attributes)
<ide> raise ActiveRecordError, "cannot update a new record" if new_record?
<ide> raise ActiveRecordError, "cannot update a destroyed record" if destroyed?
<add> _raise_readonly_record_error if readonly?
<ide>
<ide> attributes = attributes.transform_keys do |key|
<ide> name = key.to_s
<ide> def reload(options = nil)
<ide> #
<ide> def touch(*names, time: nil)
<ide> _raise_record_not_touched_error unless persisted?
<add> _raise_readonly_record_error if readonly?
<ide>
<ide> attribute_names = timestamp_attributes_for_update_in_model
<ide> attribute_names |= names.map! do |name|
<ide><path>activerecord/test/cases/readonly_test.rb
<ide> def test_cant_save_readonly_record
<ide> assert_equal "Developer is marked as readonly", e.message
<ide> end
<ide>
<add> def test_cant_touch_readonly_record
<add> dev = Developer.find(1)
<add> assert_not_predicate dev, :readonly?
<add>
<add> dev.readonly!
<add> assert_predicate dev, :readonly?
<add>
<add> e = assert_raise(ActiveRecord::ReadOnlyRecord) { dev.touch }
<add> assert_equal "Developer is marked as readonly", e.message
<add> end
<add>
<add> def test_cant_update_column_readonly_record
<add> dev = Developer.find(1)
<add> assert_not_predicate dev, :readonly?
<add>
<add> dev.readonly!
<add> assert_predicate dev, :readonly?
<add>
<add> e = assert_raise(ActiveRecord::ReadOnlyRecord) { dev.update_column(:name, "New name") }
<add> assert_equal "Developer is marked as readonly", e.message
<add> end
<add>
<add> def test_cant_update_columns_readonly_record
<add> dev = Developer.find(1)
<add> assert_not_predicate dev, :readonly?
<add>
<add> dev.readonly!
<add> assert_predicate dev, :readonly?
<add>
<add> e = assert_raise(ActiveRecord::ReadOnlyRecord) { dev.update_columns(name: "New name") }
<add> assert_equal "Developer is marked as readonly", e.message
<add> end
<add>
<ide> def test_find_with_readonly_option
<ide> Developer.all.each { |d| assert_not d.readonly? }
<ide> Developer.readonly(false).each { |d| assert_not d.readonly? } | 2 |
PHP | PHP | add additional file tests | d2839b190ff589868a5d269146e974ccc07a4c86 | <ide><path>tests/TestCase/Http/ServerRequestTest.php
<ide> public function testFilesObject()
<ide> $this->assertSame(['avatar' => $file], $request->getUploadedFiles());
<ide> }
<ide>
<add> /**
<add> * Test passing an invalid data type for the files list.
<add> *
<add> * @return void
<add> */
<add> public function testFilesWithInvalidDataType()
<add> {
<add> $request = new ServerRequest([
<add> 'files' => 'invalid',
<add> ]);
<add>
<add> $this->assertEmpty($request->getData());
<add> $this->assertEmpty($request->getUploadedFiles());
<add> }
<add>
<add> /**
<add> * Test passing an empty files list.
<add> *
<add> * @return void
<add> */
<add> public function testFilesWithEmptyList()
<add> {
<add> $request = new ServerRequest([
<add> 'files' => [],
<add> ]);
<add>
<add> $this->assertEmpty($request->getData());
<add> $this->assertEmpty($request->getUploadedFiles());
<add> }
<add>
<add> /**
<add> * Test passing invalid files list structure.
<add> *
<add> * @return void
<add> */
<add> public function testFilesWithInvalidStructure()
<add> {
<add> $this->expectException(\InvalidArgumentException::class);
<add> $this->expectExceptionMessage('Invalid value in FILES "{"invalid":["data"]}"');
<add>
<add> new ServerRequest([
<add> 'files' => [
<add> [
<add> 'invalid' => [
<add> 'data'
<add> ]
<add> ]
<add> ],
<add> ]);
<add> }
<add>
<ide> /**
<ide> * Tests that file uploads are merged into the post data as objects instead of as arrays.
<ide> * | 1 |
PHP | PHP | fix calls to sortby revealed by hhvm tests | de713c4c907170b88334aaf110d99bca28fef502 | <ide><path>src/Illuminate/Support/Collection.php
<ide> public function sortBy(Closure $callback, $options = SORT_REGULAR, $descending =
<ide> return $this;
<ide> }
<ide>
<add> /**
<add> * Sort the collection in descending order using the given Closure.
<add> *
<add> * @param \Closure $callback
<add> * @param int $options
<add> * @return \Illuminate\Support\Collection
<add> */
<add> public function sortByDesc(Closure $callback, $options = SORT_REGULAR)
<add> {
<add> return $this->sortBy($callback, $options, true);
<add> }
<add>
<ide> /**
<ide> * Splice portion of the underlying collection array.
<ide> *
<ide><path>tests/Support/SupportCollectionTest.php
<ide> public function testSort()
<ide> public function testSortBy()
<ide> {
<ide> $data = new Collection(array('taylor', 'dayle'));
<del> $data->sortBy(function($x) { return $x; });
<add> $data = $data->sortBy(function($x) { return $x; });
<ide>
<ide> $this->assertEquals(array('dayle', 'taylor'), array_values($data->all()));
<ide>
<ide> $data = new Collection(array('dayle', 'taylor'));
<del> $data->sortBy(function($x) { return $x; }, true);
<add> $data->sortByDesc(function($x) { return $x; });
<ide>
<ide> $this->assertEquals(array('taylor', 'dayle'), array_values($data->all()));
<ide> } | 2 |
Python | Python | fix merge conflict | e846f57b57f70d93d7ff4d18e12bda32f921e9da | <ide><path>libcloud/common/dimensiondata.py
<ide> """
<ide> from base64 import b64encode
<ide> from time import sleep
<add>from distutils.version import LooseVersion, StrictVersion
<ide> from libcloud.utils.py3 import httplib
<ide> from libcloud.utils.py3 import b
<ide> from libcloud.common.base import ConnectionUserAndKey, XmlResponse, RawResponse
<ide> class DimensionDataConnection(ConnectionUserAndKey):
<ide> api_version_1 = 0.9
<ide>
<ide> # Earliest version supported
<del> oldest_api_version = 2.2
<add> oldest_api_version = '2.2'
<ide>
<ide> # Latest version supported
<del> latest_api_version = 2.4
<add> latest_api_version = '2.4'
<ide>
<ide> # Default api version
<del> active_api_version = 2.4
<add> active_api_version = '2.3'
<ide>
<ide> _orgId = None
<ide> responseCls = DimensionDataResponse
<ide> def __init__(self, user_id, key, secure=True, host=None, port=None,
<ide> self.host = conn_kwargs['region']['host']
<ide>
<ide> if api_version:
<del> if float(api_version) < self.oldest_api_version:
<add> if LooseVersion(api_version) < LooseVersion(
<add> self.oldest_api_version):
<ide> msg = 'API Version specified is too old. No longer ' \
<ide> 'supported. Please upgrade to the latest version {}' \
<ide> .format(self.active_api_version)
<ide>
<ide> raise DimensionDataAPIException(code=None,
<ide> msg=msg,
<ide> driver=self.driver)
<del> elif float(api_version) > self.latest_api_version:
<add> elif LooseVersion(api_version) > LooseVersion(
<add> self.latest_api_version):
<ide> msg = 'Unsupported API Version. The version specified is ' \
<ide> 'not release yet. Please use the latest supported ' \
<ide> 'version {}' \ | 1 |
Javascript | Javascript | remove `extern` option | 8fc3b48c65820f7a66d0154002c47014a69cef8a | <ide><path>packager/src/JSTransformer/worker/__tests__/worker-test.js
<ide> describe('code transformation worker:', () => {
<ide> }
<ide> );
<ide>
<del> it('does not extract requires if files are marked as "extern"', done => {
<del> const opts = {extern: true};
<del> transformCode(transformer, 'filename', 'code', opts, (error, data) => {
<del> expect(error).toBeNull();
<del> const {dependencies, dependencyOffsets} = data.result;
<del> expect(extractDependencies).not.toBeCalled();
<del> expect(dependencies).toEqual([]);
<del> expect(dependencyOffsets).toEqual([]);
<del> done();
<del> });
<del> });
<del>
<ide> it('does not extract requires of JSON files', done => {
<ide> const jsonStr = '{"arbitrary":"json"}';
<ide> transformCode(transformer, 'arbitrary.json', jsonStr, {}, (error, data) => {
<ide><path>packager/src/JSTransformer/worker/worker.js
<ide> type Transformer = {
<ide>
<ide> export type TransformOptions = {
<ide> +dev: boolean,
<del> generateSourceMaps: boolean,
<add> +generateSourceMaps: boolean,
<ide> +hot: boolean,
<ide> +inlineRequires: {+blacklist: {[string]: true}} | boolean,
<del> platform: string,
<del> preloadedModules?: Array<string> | false,
<del> projectRoots: Array<string>,
<del> ramGroups?: Array<string>,
<add> +platform: string,
<add> +preloadedModules?: Array<string> | false,
<add> +projectRoots: Array<string>,
<add> +ramGroups?: Array<string>,
<ide> } & BabelTransformOptions;
<ide>
<ide> export type Options = {
<ide> +dev: boolean,
<del> +extern?: boolean,
<ide> +minify: boolean,
<del> platform: string,
<del> transform: TransformOptions,
<add> +platform: string,
<add> +transform: TransformOptions,
<ide> };
<ide>
<ide> export type Data = {
<ide> function transformCode(
<ide> code = code.replace(/^#!.*/, '');
<ide> }
<ide>
<del> const depsResult = isJson || options.extern
<add> const depsResult = isJson
<ide> ? {dependencies: [], dependencyOffsets: []}
<ide> : extractDependencies(code);
<ide>
<ide> exports.transformAndExtractDependencies = (
<ide> ) => {
<ide> /* $FlowFixMe: impossible to type a dynamic require */
<ide> const transformModule = require(transform);
<del> transformCode(transformModule, filename, sourceCode, options || {}, callback);
<add> transformCode(transformModule, filename, sourceCode, options, callback);
<ide> };
<ide>
<ide> exports.minify = (
<ide><path>packager/src/lib/GlobalTransformCache.js
<ide> class OptionsHasher {
<ide> * cleanup will be necessary to enable rock-solid typing.
<ide> */
<ide> hashTransformWorkerOptions(hash: crypto$Hash, options: TransformWorkerOptions): crypto$Hash {
<del> const {dev, minify, platform, transform, extern, ...unknowns} = options;
<add> const {dev, minify, platform, transform, ...unknowns} = options;
<ide> const unknownKeys = Object.keys(unknowns);
<ide> if (unknownKeys.length > 0) {
<ide> const message = `these worker option fields are unknown: ${JSON.stringify(unknownKeys)}`;
<ide> throw new CannotHashOptionsError(message);
<ide> }
<ide> // eslint-disable-next-line no-undef, no-bitwise
<del> hash.update(new Buffer([+dev | +minify << 1 | +!!extern << 2]));
<add> hash.update(new Buffer([+dev | +minify << 1]));
<ide> hash.update(JSON.stringify(platform));
<ide> return this.hashTransformOptions(hash, transform);
<ide> }
<ide><path>packager/src/node-haste/Module.js
<ide> class Module {
<ide>
<ide> _getCacheProps(transformOptions: TransformOptions, transformOptionsKey: string) {
<ide> const sourceCode = this._readSourceCode();
<del> const moduleDocBlock = this._readDocBlock();
<ide> const getTransformCacheKey = this._getTransformCacheKey;
<del> // Ignore requires in JSON files or generated code. An example of this
<del> // is prebuilt files like the SourceMap library.
<del> const extern = this.isJSON() || 'extern' in moduleDocBlock;
<del> if (extern) {
<del> transformOptions = {...transformOptions, extern};
<del> }
<ide> return {
<ide> filePath: this.path,
<ide> sourceCode,
<ide><path>packager/src/node-haste/__tests__/Module-test.js
<ide> describe('Module', () => {
<ide> );
<ide> });
<ide>
<del> it('passes module and file contents if the file is annotated with @extern', () => {
<del> const module = createModule({transformCode});
<del> const customFileContents = `
<del> /**
<del> * @extern
<del> */
<del> `;
<del> mockIndexFile(customFileContents);
<del> return module.read().then(() => {
<del> expect(transformCode).toBeCalledWith(module, customFileContents, {extern: true});
<del> });
<del> });
<del>
<ide> it('passes the module and file contents to the transform for JSON files', () => {
<ide> mockPackageFile();
<ide> const module = createJSONModule({transformCode});
<ide> return module.read().then(() => {
<del> expect(transformCode).toBeCalledWith(module, packageJson, {extern: true});
<del> });
<del> });
<del>
<del> it('does not extend the passed options object if the file is annotated with @extern', () => {
<del> const module = createModule({transformCode});
<del> const customFileContents = `
<del> /**
<del> * @extern
<del> */
<del> `;
<del> mockIndexFile(customFileContents);
<del> const options = {arbitrary: 'foo'};
<del> return module.read(options).then(() => {
<del> expect(options).not.toEqual(jasmine.objectContaining({extern: true}));
<del> expect(transformCode)
<del> .toBeCalledWith(module, customFileContents, {...options, extern: true});
<add> expect(transformCode).toBeCalledWith(module, packageJson, undefined);
<ide> });
<ide> });
<ide>
<ide> describe('Module', () => {
<ide> const module = createJSONModule({transformCode});
<ide> const options = {arbitrary: 'foo'};
<ide> return module.read(options).then(() => {
<del> expect(options).not.toEqual(jasmine.objectContaining({extern: true}));
<del> expect(transformCode)
<del> .toBeCalledWith(module, packageJson, {...options, extern: true});
<add> expect(transformCode).toBeCalledWith(module, packageJson, options);
<ide> });
<ide> });
<ide> | 5 |
Ruby | Ruby | remove deprecated dispatch test | b8f3b262e091ad31f2aa2859e58bed541eeca8ec | <ide><path>railties/test/application/rackup_test.rb
<ide> def setup
<ide> assert_kind_of Rails::Application, Rails.application
<ide> end
<ide>
<del> # Passenger still uses AC::Dispatcher, so we need to
<del> # keep it working for now
<del> test "deprecated ActionController::Dispatcher still works" do
<del> rackup
<del> assert_kind_of Rails::Application, ActionController::Dispatcher.new
<del> end
<del>
<ide> test "the config object is available on the application object" do
<ide> rackup
<ide> assert_equal 'UTC', Rails.application.config.time_zone | 1 |
Ruby | Ruby | fix typo asser url [ci skip] | b0e17b9af4b98e279ca380d52f5daee2db5c6540 | <ide><path>actionview/lib/action_view/helpers/asset_url_helper.rb
<ide> def javascript_path(source, options = {})
<ide>
<ide> # Computes the full URL to a JavaScript asset in the public javascripts directory.
<ide> # This will use +javascript_path+ internally, so most of their behaviors will be the same.
<del> # Since +javascript_url+ is based on +asser_url+ method you can set :host options. If :host
<add> # Since +javascript_url+ is based on +asset_url+ method you can set :host options. If :host
<ide> # options is set, it overwrites global +config.action_controller.asset_host+ setting.
<ide> #
<ide> # javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/dir/xmlhr.js
<ide> def stylesheet_path(source, options = {})
<ide>
<ide> # Computes the full URL to a stylesheet asset in the public stylesheets directory.
<ide> # This will use +stylesheet_path+ internally, so most of their behaviors will be the same.
<del> # Since +stylesheet_url+ is based on +asser_url+ method you can set :host options. If :host
<add> # Since +stylesheet_url+ is based on +asset_url+ method you can set :host options. If :host
<ide> # options is set, it overwrites global +config.action_controller.asset_host+ setting.
<ide> #
<ide> # stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/css/style.css
<ide> def image_path(source, options = {})
<ide>
<ide> # Computes the full URL to an image asset.
<ide> # This will use +image_path+ internally, so most of their behaviors will be the same.
<del> # Since +image_url+ is based on +asser_url+ method you can set :host options. If :host
<add> # Since +image_url+ is based on +asset_url+ method you can set :host options. If :host
<ide> # options is set, it overwrites global +config.action_controller.asset_host+ setting.
<ide> #
<ide> # image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/edit.png
<ide> def video_path(source, options = {})
<ide>
<ide> # Computes the full URL to a video asset in the public videos directory.
<ide> # This will use +video_path+ internally, so most of their behaviors will be the same.
<del> # Since +video_url+ is based on +asser_url+ method you can set :host options. If :host
<add> # Since +video_url+ is based on +asset_url+ method you can set :host options. If :host
<ide> # options is set, it overwrites global +config.action_controller.asset_host+ setting.
<ide> #
<ide> # video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/hd.avi
<ide> def audio_path(source, options = {})
<ide>
<ide> # Computes the full URL to an audio asset in the public audios directory.
<ide> # This will use +audio_path+ internally, so most of their behaviors will be the same.
<del> # Since +audio_url+ is based on +asser_url+ method you can set :host options. If :host
<add> # Since +audio_url+ is based on +asset_url+ method you can set :host options. If :host
<ide> # options is set, it overwrites global +config.action_controller.asset_host+ setting.
<ide> #
<ide> # audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/horse.wav
<ide> def font_path(source, options = {})
<ide>
<ide> # Computes the full URL to a font asset.
<ide> # This will use +font_path+ internally, so most of their behaviors will be the same.
<del> # Since +font_url+ is based on +asser_url+ method you can set :host options. If :host
<add> # Since +font_url+ is based on +asset_url+ method you can set :host options. If :host
<ide> # options is set, it overwrites global +config.action_controller.asset_host+ setting.
<ide> #
<ide> # font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/font.ttf | 1 |
Javascript | Javascript | allow nested @media | b5c0c1964fbd71ac14061b481c0f65e156d1082c | <ide><path>lib/css/CssParser.js
<ide> class CssParser extends Parser {
<ide> },
<ide> atKeyword: (input, start, end) => {
<ide> const name = input.slice(start, end);
<del> if (mode !== CSS_MODE_TOP_LEVEL) {
<del> throw new Error(
<del> `Unexpected ${name} at ${start} during ${explainMode(mode)}`
<del> );
<del> }
<ide> if (name === "@namespace") {
<ide> throw new Error("@namespace is not supported in bundled CSS");
<ide> }
<ide> if (name === "@import") {
<add> if (mode !== CSS_MODE_TOP_LEVEL) {
<add> throw new Error(
<add> `Unexpected @import at ${start} during ${explainMode(mode)}`
<add> );
<add> }
<ide> mode = CSS_MODE_AT_IMPORT_EXPECT_URL;
<ide> modePos = end;
<ide> modeData = { | 1 |
Python | Python | use return dict for rag encoder | 5f7a07c0c867abedbb3ebf135915eeee56add24b | <ide><path>src/transformers/models/rag/modeling_rag.py
<ide> def generate(
<ide> batch_size = context_input_ids.shape[0] // n_docs
<ide>
<ide> encoder = self.rag.generator.get_encoder()
<del> encoder_outputs = encoder(input_ids=context_input_ids, attention_mask=context_attention_mask)
<add> encoder_outputs = encoder(input_ids=context_input_ids, attention_mask=context_attention_mask, return_dict=True)
<ide>
<ide> input_ids = torch.full(
<ide> (batch_size * num_beams, 1), | 1 |
Python | Python | apply suggestions from code review | 3a573b5c601bae21aa6c9a4fd0716b27320f69c9 | <ide><path>numpy/core/function_base.py
<ide> def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None,
<ide> _mult_inplace = _nx.isscalar(delta)
<ide> step = delta / div
<ide> any_step_zero = (
<del> step == 0 if _mult_inplace else _nx.asarray(step == 0).any())
<add> step == 0 if _mult_inplace else _nx.asanyarray(step == 0).any())
<ide> if any_step_zero:
<ide> # Special handling for denormal numbers, gh-5437
<ide> y /= div | 1 |
Text | Text | add a section about job testing [ci skip] | 98626e27c1bd4f55915dbf94a24868785638094d | <ide><path>guides/source/testing.md
<ide> end
<ide> Moreover, since the test class extends from `ActionView::TestCase`, you have
<ide> access to Rails' helper methods such as `link_to` or `pluralize`.
<ide>
<add>Testing Jobs
<add>------------
<add>
<add>Since your custom jobs can be queued at different levels inside your application,
<add>you'll need to test both jobs themselves (their behavior when they get enqueued)
<add>and that other entities correctly enqueue them.
<add>
<add>### A Basic Test Case
<add>
<add>By default, when you generate a job, an associated test will be generated as well
<add>under the `test/jobs` directory. Here's an example test with a billing job:
<add>
<add>```ruby
<add>require 'test_helper'
<add>
<add>class BillingJobTest < ActiveJob::TestCase
<add> test 'that account is charged' do
<add> BillingJob.perform_now(account, product)
<add> assert account.reload.charged_for?(product)
<add> end
<add>end
<add>```
<add>
<add>This test is pretty simple and only asserts that the job get the work done
<add>as expected.
<add>
<add>By default, `ActiveJob::TestCase` will set the queue adapter to `:test` so that
<add>your jobs are performed inline. It will also ensure that all previously performed
<add>and enqueued jobs are cleared before any test run so you can safely assume that
<add>no jobs have already been executed in the scope of each test.
<add>
<add>### Custom Assertions And Testing Jobs Inside Other Components
<add>
<add>Active Job ships with a bunch of custom assertions that can be used to lessen
<add>the verbosity of tests:
<add>
<add>| Assertion | Purpose |
<add>| -------------------------------------- | ------- |
<add>| `assert_enqueued_jobs(number)` | Asserts that the number of enqueued jobs matches the given number. |
<add>| `assert_performed_jobs(number)` | Asserts that the number of performed jobs matches the given number. |
<add>| `assert_no_enqueued_jobs { ... }` | Asserts that no jobs have been enqueued. |
<add>| `assert_no_performed_jobs { ... }` | Asserts that no jobs have been performed. |
<add>| `assert_enqueued_with([args]) { ... }` | Asserts that the job passed in the block has been enqueued with the given arguments. |
<add>| `assert_performed_with([args]) { ... }`| Asserts that the job passed in the block has been performed with the given arguments. |
<add>
<add>It's a good practice to ensure that your jobs correctly get enqueued or performed
<add>wherever you invoke them (e.g. inside your controllers). This is precisely where
<add>the custom assertions provided by Active Job are pretty useful. For instance,
<add>within a model:
<add>
<add>```ruby
<add>require 'test_helper'
<add>
<add>class ProductTest < ActiveSupport::TestCase
<add> test 'billing job scheduling' do
<add> assert_enqueued_with(job: BillingJob) do
<add> product.charge(account)
<add> end
<add> end
<add>end
<add>```
<add>
<ide> Other Testing Approaches
<ide> ------------------------
<ide> | 1 |
Java | Java | remove references to csslayoutdeprecated | 2030c783556e4338c0f64f85771a3725b3f6f84b | <ide><path>ReactAndroid/src/main/java/com/facebook/react/flat/FlatARTSurfaceViewManager.java
<ide>
<ide> import com.facebook.yoga.YogaMeasureMode;
<ide> import com.facebook.yoga.YogaMeasureFunction;
<del>import com.facebook.yoga.YogaNodeAPI;
<add>import com.facebook.yoga.YogaNode;
<ide> import com.facebook.react.uimanager.BaseViewManager;
<ide> import com.facebook.react.uimanager.ThemedReactContext;
<ide> import com.facebook.react.views.art.ARTSurfaceView;
<ide> public class FlatARTSurfaceViewManager extends
<ide> private static final YogaMeasureFunction MEASURE_FUNCTION = new YogaMeasureFunction() {
<ide> @Override
<ide> public long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/react/flat/RCTText.java
<ide> import com.facebook.yoga.YogaDirection;
<ide> import com.facebook.yoga.YogaMeasureMode;
<ide> import com.facebook.yoga.YogaMeasureFunction;
<del>import com.facebook.yoga.YogaNodeAPI;
<add>import com.facebook.yoga.YogaNode;
<ide> import com.facebook.yoga.YogaMeasureOutput;
<ide> import com.facebook.fbui.textlayoutbuilder.TextLayoutBuilder;
<ide> import com.facebook.fbui.textlayoutbuilder.glyphwarmer.GlyphWarmerImpl;
<ide> public boolean isVirtualAnchor() {
<ide>
<ide> @Override
<ide> public long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/react/flat/RCTTextInput.java
<ide>
<ide> import com.facebook.yoga.YogaMeasureMode;
<ide> import com.facebook.yoga.YogaMeasureFunction;
<del>import com.facebook.yoga.YogaNodeAPI;
<add>import com.facebook.yoga.YogaNode;
<ide> import com.facebook.yoga.YogaMeasureOutput;
<ide> import com.facebook.infer.annotation.Assertions;
<ide> import com.facebook.react.uimanager.PixelUtil;
<ide> public void setThemedContext(ThemedReactContext themedContext) {
<ide>
<ide> @Override
<ide> public long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/react/views/art/ARTSurfaceViewManager.java
<ide>
<ide> import com.facebook.yoga.YogaMeasureMode;
<ide> import com.facebook.yoga.YogaMeasureFunction;
<del>import com.facebook.yoga.YogaNodeAPI;
<add>import com.facebook.yoga.YogaNode;
<ide> import com.facebook.react.module.annotations.ReactModule;
<ide> import com.facebook.react.uimanager.BaseViewManager;
<ide> import com.facebook.react.uimanager.ThemedReactContext;
<ide> public class ARTSurfaceViewManager extends
<ide> private static final YogaMeasureFunction MEASURE_FUNCTION = new YogaMeasureFunction() {
<ide> @Override
<ide> public long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ProgressBarShadowNode.java
<ide>
<ide> import com.facebook.yoga.YogaMeasureMode;
<ide> import com.facebook.yoga.YogaMeasureFunction;
<del>import com.facebook.yoga.YogaNodeAPI;
<add>import com.facebook.yoga.YogaNode;
<ide> import com.facebook.yoga.YogaMeasureOutput;
<ide> import com.facebook.react.uimanager.LayoutShadowNode;
<ide> import com.facebook.react.uimanager.annotations.ReactProp;
<ide> public void setStyle(@Nullable String style) {
<ide>
<ide> @Override
<ide> public long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/react/views/slider/ReactSliderManager.java
<ide> import com.facebook.yoga.YogaMeasureFunction;
<ide> import com.facebook.yoga.YogaMeasureMode;
<ide> import com.facebook.yoga.YogaMeasureOutput;
<del>import com.facebook.yoga.YogaNodeAPI;
<add>import com.facebook.yoga.YogaNode;
<ide>
<ide> import java.util.Map;
<ide>
<ide> private ReactSliderShadowNode() {
<ide>
<ide> @Override
<ide> public long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/react/views/switchview/ReactSwitchManager.java
<ide>
<ide> import com.facebook.yoga.YogaMeasureMode;
<ide> import com.facebook.yoga.YogaMeasureFunction;
<del>import com.facebook.yoga.YogaNodeAPI;
<add>import com.facebook.yoga.YogaNode;
<ide> import com.facebook.yoga.YogaMeasureOutput;
<ide> import com.facebook.react.bridge.ReactContext;
<ide> import com.facebook.react.uimanager.LayoutShadowNode;
<ide> private ReactSwitchShadowNode() {
<ide>
<ide> @Override
<ide> public long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.java
<ide> import com.facebook.yoga.YogaConstants;
<ide> import com.facebook.yoga.YogaMeasureMode;
<ide> import com.facebook.yoga.YogaMeasureFunction;
<del>import com.facebook.yoga.YogaNodeAPI;
<add>import com.facebook.yoga.YogaNode;
<ide> import com.facebook.yoga.YogaMeasureOutput;
<ide> import com.facebook.infer.annotation.Assertions;
<ide> import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
<ide> protected static Spannable fromTextCSSNode(ReactTextShadowNode textCSSNode) {
<ide> new YogaMeasureFunction() {
<ide> @Override
<ide> public long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputShadowNode.java
<ide> import com.facebook.yoga.YogaDirection;
<ide> import com.facebook.yoga.YogaMeasureMode;
<ide> import com.facebook.yoga.YogaMeasureFunction;
<del>import com.facebook.yoga.YogaNodeAPI;
<add>import com.facebook.yoga.YogaNode;
<ide> import com.facebook.yoga.YogaMeasureOutput;
<ide> import com.facebook.infer.annotation.Assertions;
<ide> import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
<ide> public void setThemedContext(ThemedReactContext themedContext) {
<ide>
<ide> @Override
<ide> public long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/yoga/YogaBaselineFunction.java
<ide> public interface YogaBaselineFunction {
<ide> * default to the computed height of the node.
<ide> */
<ide> @DoNotStrip
<del> float baseline(YogaNodeAPI node, float width, float height);
<add> float baseline(YogaNode node, float width, float height);
<ide> }
<ide><path>ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureFunction.java
<ide> public interface YogaMeasureFunction {
<ide> */
<ide> @DoNotStrip
<ide> long measure(
<del> YogaNodeAPI node,
<add> YogaNode node,
<ide> float width,
<ide> YogaMeasureMode widthMode,
<ide> float height,
<ide><path>ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.java
<ide> import com.facebook.soloader.SoLoader;
<ide>
<ide> @DoNotStrip
<del>public class YogaNode implements YogaNodeAPI<YogaNode> {
<add>public class YogaNode {
<ide>
<ide> static {
<ide> SoLoader.loadLibrary("yoga");
<ide> public YogaNode(YogaConfig config) {
<ide> }
<ide>
<ide> private native void jni_YGNodeFree(long nativePointer);
<del> @Override
<ide> protected void finalize() throws Throwable {
<ide> try {
<ide> jni_YGNodeFree(mNativePointer);
<ide> protected void finalize() throws Throwable {
<ide> }
<ide>
<ide> private native void jni_YGNodeReset(long nativePointer);
<del> @Override
<ide> public void reset() {
<ide> mEdgeSetFlag = 0;
<ide> mHasSetPosition = false;
<ide> public void reset() {
<ide> jni_YGNodeReset(mNativePointer);
<ide> }
<ide>
<del> @Override
<ide> public int getChildCount() {
<ide> return mChildren == null ? 0 : mChildren.size();
<ide> }
<ide>
<del> @Override
<ide> public YogaNode getChildAt(int i) {
<ide> return mChildren.get(i);
<ide> }
<ide>
<ide> private native void jni_YGNodeInsertChild(long nativePointer, long childPointer, int index);
<del> @Override
<ide> public void addChildAt(YogaNode child, int i) {
<ide> if (child.mParent != null) {
<ide> throw new IllegalStateException("Child already has a parent, it must be removed first.");
<ide> public void addChildAt(YogaNode child, int i) {
<ide> }
<ide>
<ide> private native void jni_YGNodeRemoveChild(long nativePointer, long childPointer);
<del> @Override
<ide> public YogaNode removeChildAt(int i) {
<ide>
<ide> final YogaNode child = mChildren.remove(i);
<ide> public YogaNode removeChildAt(int i) {
<ide> return child;
<ide> }
<ide>
<del> @Override
<ide> public @Nullable
<ide> YogaNode getParent() {
<ide> return mParent;
<ide> }
<ide>
<del> @Override
<ide> public int indexOf(YogaNode child) {
<ide> return mChildren == null ? -1 : mChildren.indexOf(child);
<ide> }
<ide>
<ide> private native void jni_YGNodeCalculateLayout(long nativePointer, float width, float height);
<del> @Override
<ide> public void calculateLayout(float width, float height) {
<ide> jni_YGNodeCalculateLayout(mNativePointer, width, height);
<ide> }
<ide>
<del> @Override
<ide> public boolean hasNewLayout() {
<ide> return mHasNewLayout;
<ide> }
<ide>
<ide> private native void jni_YGNodeMarkDirty(long nativePointer);
<del> @Override
<ide> public void dirty() {
<ide> jni_YGNodeMarkDirty(mNativePointer);
<ide> }
<ide>
<ide> private native boolean jni_YGNodeIsDirty(long nativePointer);
<del> @Override
<ide> public boolean isDirty() {
<ide> return jni_YGNodeIsDirty(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeCopyStyle(long dstNativePointer, long srcNativePointer);
<del> @Override
<ide> public void copyStyle(YogaNode srcNode) {
<ide> jni_YGNodeCopyStyle(mNativePointer, srcNode.mNativePointer);
<ide> }
<ide>
<del> @Override
<ide> public void markLayoutSeen() {
<ide> mHasNewLayout = false;
<ide> }
<ide>
<ide> private native int jni_YGNodeStyleGetDirection(long nativePointer);
<del> @Override
<ide> public YogaDirection getStyleDirection() {
<ide> return YogaDirection.fromInt(jni_YGNodeStyleGetDirection(mNativePointer));
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetDirection(long nativePointer, int direction);
<del> @Override
<ide> public void setDirection(YogaDirection direction) {
<ide> jni_YGNodeStyleSetDirection(mNativePointer, direction.intValue());
<ide> }
<ide>
<ide> private native int jni_YGNodeStyleGetFlexDirection(long nativePointer);
<del> @Override
<ide> public YogaFlexDirection getFlexDirection() {
<ide> return YogaFlexDirection.fromInt(jni_YGNodeStyleGetFlexDirection(mNativePointer));
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetFlexDirection(long nativePointer, int flexDirection);
<del> @Override
<ide> public void setFlexDirection(YogaFlexDirection flexDirection) {
<ide> jni_YGNodeStyleSetFlexDirection(mNativePointer, flexDirection.intValue());
<ide> }
<ide>
<ide> private native int jni_YGNodeStyleGetJustifyContent(long nativePointer);
<del> @Override
<ide> public YogaJustify getJustifyContent() {
<ide> return YogaJustify.fromInt(jni_YGNodeStyleGetJustifyContent(mNativePointer));
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetJustifyContent(long nativePointer, int justifyContent);
<del> @Override
<ide> public void setJustifyContent(YogaJustify justifyContent) {
<ide> jni_YGNodeStyleSetJustifyContent(mNativePointer, justifyContent.intValue());
<ide> }
<ide>
<ide> private native int jni_YGNodeStyleGetAlignItems(long nativePointer);
<del> @Override
<ide> public YogaAlign getAlignItems() {
<ide> return YogaAlign.fromInt(jni_YGNodeStyleGetAlignItems(mNativePointer));
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetAlignItems(long nativePointer, int alignItems);
<del> @Override
<ide> public void setAlignItems(YogaAlign alignItems) {
<ide> jni_YGNodeStyleSetAlignItems(mNativePointer, alignItems.intValue());
<ide> }
<ide>
<ide> private native int jni_YGNodeStyleGetAlignSelf(long nativePointer);
<del> @Override
<ide> public YogaAlign getAlignSelf() {
<ide> return YogaAlign.fromInt(jni_YGNodeStyleGetAlignSelf(mNativePointer));
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetAlignSelf(long nativePointer, int alignSelf);
<del> @Override
<ide> public void setAlignSelf(YogaAlign alignSelf) {
<ide> jni_YGNodeStyleSetAlignSelf(mNativePointer, alignSelf.intValue());
<ide> }
<ide>
<ide> private native int jni_YGNodeStyleGetAlignContent(long nativePointer);
<del> @Override
<ide> public YogaAlign getAlignContent() {
<ide> return YogaAlign.fromInt(jni_YGNodeStyleGetAlignContent(mNativePointer));
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetAlignContent(long nativePointer, int alignContent);
<del> @Override
<ide> public void setAlignContent(YogaAlign alignContent) {
<ide> jni_YGNodeStyleSetAlignContent(mNativePointer, alignContent.intValue());
<ide> }
<ide>
<ide> private native int jni_YGNodeStyleGetPositionType(long nativePointer);
<del> @Override
<ide> public YogaPositionType getPositionType() {
<ide> return YogaPositionType.fromInt(jni_YGNodeStyleGetPositionType(mNativePointer));
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetPositionType(long nativePointer, int positionType);
<del> @Override
<ide> public void setPositionType(YogaPositionType positionType) {
<ide> jni_YGNodeStyleSetPositionType(mNativePointer, positionType.intValue());
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetFlexWrap(long nativePointer, int wrapType);
<del> @Override
<ide> public void setWrap(YogaWrap flexWrap) {
<ide> jni_YGNodeStyleSetFlexWrap(mNativePointer, flexWrap.intValue());
<ide> }
<ide>
<ide> private native int jni_YGNodeStyleGetOverflow(long nativePointer);
<del> @Override
<ide> public YogaOverflow getOverflow() {
<ide> return YogaOverflow.fromInt(jni_YGNodeStyleGetOverflow(mNativePointer));
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetOverflow(long nativePointer, int overflow);
<del> @Override
<ide> public void setOverflow(YogaOverflow overflow) {
<ide> jni_YGNodeStyleSetOverflow(mNativePointer, overflow.intValue());
<ide> }
<ide>
<ide> private native int jni_YGNodeStyleGetDisplay(long nativePointer);
<del> @Override
<ide> public YogaDisplay getDisplay() {
<ide> return YogaDisplay.fromInt(jni_YGNodeStyleGetDisplay(mNativePointer));
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetDisplay(long nativePointer, int display);
<del> @Override
<ide> public void setDisplay(YogaDisplay display) {
<ide> jni_YGNodeStyleSetDisplay(mNativePointer, display.intValue());
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetFlex(long nativePointer, float flex);
<del> @Override
<ide> public void setFlex(float flex) {
<ide> jni_YGNodeStyleSetFlex(mNativePointer, flex);
<ide> }
<ide>
<ide> private native float jni_YGNodeStyleGetFlexGrow(long nativePointer);
<del> @Override
<ide> public float getFlexGrow() {
<ide> return jni_YGNodeStyleGetFlexGrow(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetFlexGrow(long nativePointer, float flexGrow);
<del> @Override
<ide> public void setFlexGrow(float flexGrow) {
<ide> jni_YGNodeStyleSetFlexGrow(mNativePointer, flexGrow);
<ide> }
<ide>
<ide> private native float jni_YGNodeStyleGetFlexShrink(long nativePointer);
<del> @Override
<ide> public float getFlexShrink() {
<ide> return jni_YGNodeStyleGetFlexShrink(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetFlexShrink(long nativePointer, float flexShrink);
<del> @Override
<ide> public void setFlexShrink(float flexShrink) {
<ide> jni_YGNodeStyleSetFlexShrink(mNativePointer, flexShrink);
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetFlexBasis(long nativePointer);
<del> @Override
<ide> public YogaValue getFlexBasis() {
<ide> return (YogaValue) jni_YGNodeStyleGetFlexBasis(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetFlexBasis(long nativePointer, float flexBasis);
<del> @Override
<ide> public void setFlexBasis(float flexBasis) {
<ide> jni_YGNodeStyleSetFlexBasis(mNativePointer, flexBasis);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetFlexBasisPercent(long nativePointer, float percent);
<del> @Override
<ide> public void setFlexBasisPercent(float percent) {
<ide> jni_YGNodeStyleSetFlexBasisPercent(mNativePointer, percent);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetFlexBasisAuto(long nativePointer);
<del> @Override
<ide> public void setFlexBasisAuto() {
<ide> jni_YGNodeStyleSetFlexBasisAuto(mNativePointer);
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetMargin(long nativePointer, int edge);
<del> @Override
<ide> public YogaValue getMargin(YogaEdge edge) {
<ide> if (!((mEdgeSetFlag & MARGIN) == MARGIN)) {
<ide> return YogaValue.UNDEFINED;
<ide> public YogaValue getMargin(YogaEdge edge) {
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMargin(long nativePointer, int edge, float margin);
<del> @Override
<ide> public void setMargin(YogaEdge edge, float margin) {
<ide> mEdgeSetFlag |= MARGIN;
<ide> jni_YGNodeStyleSetMargin(mNativePointer, edge.intValue(), margin);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMarginPercent(long nativePointer, int edge, float percent);
<del> @Override
<ide> public void setMarginPercent(YogaEdge edge, float percent) {
<ide> mEdgeSetFlag |= MARGIN;
<ide> jni_YGNodeStyleSetMarginPercent(mNativePointer, edge.intValue(), percent);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMarginAuto(long nativePointer, int edge);
<del> @Override
<ide> public void setMarginAuto(YogaEdge edge) {
<ide> mEdgeSetFlag |= MARGIN;
<ide> jni_YGNodeStyleSetMarginAuto(mNativePointer, edge.intValue());
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetPadding(long nativePointer, int edge);
<del> @Override
<ide> public YogaValue getPadding(YogaEdge edge) {
<ide> if (!((mEdgeSetFlag & PADDING) == PADDING)) {
<ide> return YogaValue.UNDEFINED;
<ide> public YogaValue getPadding(YogaEdge edge) {
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetPadding(long nativePointer, int edge, float padding);
<del> @Override
<ide> public void setPadding(YogaEdge edge, float padding) {
<ide> mEdgeSetFlag |= PADDING;
<ide> jni_YGNodeStyleSetPadding(mNativePointer, edge.intValue(), padding);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetPaddingPercent(long nativePointer, int edge, float percent);
<del> @Override
<ide> public void setPaddingPercent(YogaEdge edge, float percent) {
<ide> mEdgeSetFlag |= PADDING;
<ide> jni_YGNodeStyleSetPaddingPercent(mNativePointer, edge.intValue(), percent);
<ide> }
<ide>
<ide> private native float jni_YGNodeStyleGetBorder(long nativePointer, int edge);
<del> @Override
<ide> public float getBorder(YogaEdge edge) {
<ide> if (!((mEdgeSetFlag & BORDER) == BORDER)) {
<ide> return YogaConstants.UNDEFINED;
<ide> public float getBorder(YogaEdge edge) {
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetBorder(long nativePointer, int edge, float border);
<del> @Override
<ide> public void setBorder(YogaEdge edge, float border) {
<ide> mEdgeSetFlag |= BORDER;
<ide> jni_YGNodeStyleSetBorder(mNativePointer, edge.intValue(), border);
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetPosition(long nativePointer, int edge);
<del> @Override
<ide> public YogaValue getPosition(YogaEdge edge) {
<ide> if (!mHasSetPosition) {
<ide> return YogaValue.UNDEFINED;
<ide> public YogaValue getPosition(YogaEdge edge) {
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetPosition(long nativePointer, int edge, float position);
<del> @Override
<ide> public void setPosition(YogaEdge edge, float position) {
<ide> mHasSetPosition = true;
<ide> jni_YGNodeStyleSetPosition(mNativePointer, edge.intValue(), position);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetPositionPercent(long nativePointer, int edge, float percent);
<del> @Override
<ide> public void setPositionPercent(YogaEdge edge, float percent) {
<ide> mHasSetPosition = true;
<ide> jni_YGNodeStyleSetPositionPercent(mNativePointer, edge.intValue(), percent);
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetWidth(long nativePointer);
<del> @Override
<ide> public YogaValue getWidth() {
<ide> return (YogaValue) jni_YGNodeStyleGetWidth(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetWidth(long nativePointer, float width);
<del> @Override
<ide> public void setWidth(float width) {
<ide> jni_YGNodeStyleSetWidth(mNativePointer, width);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetWidthPercent(long nativePointer, float percent);
<del> @Override
<ide> public void setWidthPercent(float percent) {
<ide> jni_YGNodeStyleSetWidthPercent(mNativePointer, percent);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetWidthAuto(long nativePointer);
<del> @Override
<ide> public void setWidthAuto() {
<ide> jni_YGNodeStyleSetWidthAuto(mNativePointer);
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetHeight(long nativePointer);
<del> @Override
<ide> public YogaValue getHeight() {
<ide> return (YogaValue) jni_YGNodeStyleGetHeight(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetHeight(long nativePointer, float height);
<del> @Override
<ide> public void setHeight(float height) {
<ide> jni_YGNodeStyleSetHeight(mNativePointer, height);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetHeightPercent(long nativePointer, float percent);
<del> @Override
<ide> public void setHeightPercent(float percent) {
<ide> jni_YGNodeStyleSetHeightPercent(mNativePointer, percent);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetHeightAuto(long nativePointer);
<del> @Override
<ide> public void setHeightAuto() {
<ide> jni_YGNodeStyleSetHeightAuto(mNativePointer);
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetMinWidth(long nativePointer);
<del> @Override
<ide> public YogaValue getMinWidth() {
<ide> return (YogaValue) jni_YGNodeStyleGetMinWidth(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMinWidth(long nativePointer, float minWidth);
<del> @Override
<ide> public void setMinWidth(float minWidth) {
<ide> jni_YGNodeStyleSetMinWidth(mNativePointer, minWidth);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMinWidthPercent(long nativePointer, float percent);
<del> @Override
<ide> public void setMinWidthPercent(float percent) {
<ide> jni_YGNodeStyleSetMinWidthPercent(mNativePointer, percent);
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetMinHeight(long nativePointer);
<del> @Override
<ide> public YogaValue getMinHeight() {
<ide> return (YogaValue) jni_YGNodeStyleGetMinHeight(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMinHeight(long nativePointer, float minHeight);
<del> @Override
<ide> public void setMinHeight(float minHeight) {
<ide> jni_YGNodeStyleSetMinHeight(mNativePointer, minHeight);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMinHeightPercent(long nativePointer, float percent);
<del> @Override
<ide> public void setMinHeightPercent(float percent) {
<ide> jni_YGNodeStyleSetMinHeightPercent(mNativePointer, percent);
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetMaxWidth(long nativePointer);
<del> @Override
<ide> public YogaValue getMaxWidth() {
<ide> return (YogaValue) jni_YGNodeStyleGetMaxWidth(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMaxWidth(long nativePointer, float maxWidth);
<del> @Override
<ide> public void setMaxWidth(float maxWidth) {
<ide> jni_YGNodeStyleSetMaxWidth(mNativePointer, maxWidth);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMaxWidthPercent(long nativePointer, float percent);
<del> @Override
<ide> public void setMaxWidthPercent(float percent) {
<ide> jni_YGNodeStyleSetMaxWidthPercent(mNativePointer, percent);
<ide> }
<ide>
<ide> private native Object jni_YGNodeStyleGetMaxHeight(long nativePointer);
<del> @Override
<ide> public YogaValue getMaxHeight() {
<ide> return (YogaValue) jni_YGNodeStyleGetMaxHeight(mNativePointer);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMaxHeight(long nativePointer, float maxheight);
<del> @Override
<ide> public void setMaxHeight(float maxheight) {
<ide> jni_YGNodeStyleSetMaxHeight(mNativePointer, maxheight);
<ide> }
<ide>
<ide> private native void jni_YGNodeStyleSetMaxHeightPercent(long nativePointer, float percent);
<del> @Override
<ide> public void setMaxHeightPercent(float percent) {
<ide> jni_YGNodeStyleSetMaxHeightPercent(mNativePointer, percent);
<ide> }
<ide> public void setAspectRatio(float aspectRatio) {
<ide> jni_YGNodeStyleSetAspectRatio(mNativePointer, aspectRatio);
<ide> }
<ide>
<del> @Override
<ide> public float getLayoutX() {
<ide> return mLeft;
<ide> }
<ide>
<del> @Override
<ide> public float getLayoutY() {
<ide> return mTop;
<ide> }
<ide>
<del> @Override
<ide> public float getLayoutWidth() {
<ide> return mWidth;
<ide> }
<ide>
<del> @Override
<ide> public float getLayoutHeight() {
<ide> return mHeight;
<ide> }
<ide>
<del> @Override
<ide> public float getLayoutMargin(YogaEdge edge) {
<ide> switch (edge) {
<ide> case LEFT:
<ide> public float getLayoutMargin(YogaEdge edge) {
<ide> }
<ide> }
<ide>
<del> @Override
<ide> public float getLayoutPadding(YogaEdge edge) {
<ide> switch (edge) {
<ide> case LEFT:
<ide> public float getLayoutPadding(YogaEdge edge) {
<ide> }
<ide> }
<ide>
<del> @Override
<ide> public float getLayoutBorder(YogaEdge edge) {
<ide> switch (edge) {
<ide> case LEFT:
<ide> public float getLayoutBorder(YogaEdge edge) {
<ide> }
<ide> }
<ide>
<del> @Override
<ide> public YogaDirection getLayoutDirection() {
<ide> return YogaDirection.fromInt(mLayoutDirection);
<ide> }
<ide>
<ide> private native void jni_YGNodeSetHasMeasureFunc(long nativePointer, boolean hasMeasureFunc);
<del> @Override
<ide> public void setMeasureFunction(YogaMeasureFunction measureFunction) {
<ide> mMeasureFunction = measureFunction;
<ide> jni_YGNodeSetHasMeasureFunc(mNativePointer, measureFunction != null);
<ide> public final long measure(float width, int widthMode, float height, int heightMo
<ide> }
<ide>
<ide> private native void jni_YGNodeSetHasBaselineFunc(long nativePointer, boolean hasMeasureFunc);
<del> @Override
<ide> public void setBaselineFunction(YogaBaselineFunction baselineFunction) {
<ide> mBaselineFunction = baselineFunction;
<ide> jni_YGNodeSetHasBaselineFunc(mNativePointer, baselineFunction != null);
<ide> public final float baseline(float width, float height) {
<ide> return mBaselineFunction.baseline(this, width, height);
<ide> }
<ide>
<del> @Override
<ide> public boolean isMeasureDefined() {
<ide> return mMeasureFunction != null;
<ide> }
<ide>
<del> @Override
<ide> public void setData(Object data) {
<ide> mData = data;
<ide> }
<ide>
<del> @Override
<ide> public Object getData() {
<ide> return mData;
<ide> }
<ide><path>ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeAPI.java
<del>/**
<del> * Copyright (c) 2014-present, Facebook, Inc.
<del> * All rights reserved.
<del> *
<del> * This source code is licensed under the BSD-style license found in the
<del> * LICENSE file in the root directory of this source tree. An additional grant
<del> * of patent rights can be found in the PATENTS file in the same directory.
<del> */
<del>
<del>package com.facebook.yoga;
<del>
<del>// This only exists for legacy reasons. It will be removed sometime in the near future.
<del>public interface YogaNodeAPI<YogaNodeType extends YogaNodeAPI> {
<del> int getChildCount();
<del> YogaNodeType getChildAt(int i);
<del> void addChildAt(YogaNodeType child, int i);
<del> YogaNodeType removeChildAt(int i);
<del> YogaNodeType getParent();
<del> int indexOf(YogaNodeType child);
<del> void setMeasureFunction(YogaMeasureFunction measureFunction);
<del> void setBaselineFunction(YogaBaselineFunction measureFunction);
<del> boolean isMeasureDefined();
<del> void calculateLayout(float width, float height);
<del> boolean isDirty();
<del> boolean hasNewLayout();
<del> void dirty();
<del> void markLayoutSeen();
<del> void copyStyle(YogaNodeType srcNode);
<del> YogaDirection getStyleDirection();
<del> void setDirection(YogaDirection direction);
<del> YogaFlexDirection getFlexDirection();
<del> void setFlexDirection(YogaFlexDirection flexDirection);
<del> YogaJustify getJustifyContent();
<del> void setJustifyContent(YogaJustify justifyContent);
<del> YogaAlign getAlignItems();
<del> void setAlignItems(YogaAlign alignItems);
<del> YogaAlign getAlignSelf();
<del> void setAlignSelf(YogaAlign alignSelf);
<del> YogaAlign getAlignContent();
<del> void setAlignContent(YogaAlign alignContent);
<del> YogaPositionType getPositionType();
<del> void setPositionType(YogaPositionType positionType);
<del> void setWrap(YogaWrap flexWrap);
<del> void setFlex(float flex);
<del> float getFlexGrow();
<del> void setFlexGrow(float flexGrow);
<del> float getFlexShrink();
<del> void setFlexShrink(float flexShrink);
<del> YogaValue getFlexBasis();
<del> void setFlexBasis(float flexBasis);
<del> void setFlexBasisPercent(float percent);
<del> void setFlexBasisAuto();
<del> YogaValue getMargin(YogaEdge edge);
<del> void setMargin(YogaEdge edge, float margin);
<del> void setMarginPercent(YogaEdge edge, float percent);
<del> void setMarginAuto(YogaEdge edge);
<del> YogaValue getPadding(YogaEdge edge);
<del> void setPadding(YogaEdge edge, float padding);
<del> void setPaddingPercent(YogaEdge edge, float percent);
<del> float getBorder(YogaEdge edge);
<del> void setBorder(YogaEdge edge, float border);
<del> YogaValue getPosition(YogaEdge edge);
<del> void setPosition(YogaEdge edge, float position);
<del> void setPositionPercent(YogaEdge edge, float percent);
<del> YogaValue getWidth();
<del> void setWidth(float width);
<del> void setWidthPercent(float percent);
<del> void setWidthAuto();
<del> YogaValue getHeight();
<del> void setHeight(float height);
<del> void setHeightPercent(float percent);
<del> void setHeightAuto();
<del> YogaValue getMaxWidth();
<del> void setMaxWidth(float maxWidth);
<del> void setMaxWidthPercent(float percent);
<del> YogaValue getMinWidth();
<del> void setMinWidth(float minWidth);
<del> void setMinWidthPercent(float percent);
<del> YogaValue getMaxHeight();
<del> void setMaxHeight(float maxHeight);
<del> void setMaxHeightPercent(float percent);
<del> YogaValue getMinHeight();
<del> void setMinHeight(float minHeight);
<del> void setMinHeightPercent(float percent);
<del> float getLayoutX();
<del> float getLayoutY();
<del> float getLayoutWidth();
<del> float getLayoutHeight();
<del> float getLayoutMargin(YogaEdge edge);
<del> float getLayoutPadding(YogaEdge edge);
<del> float getLayoutBorder(YogaEdge edge);
<del> YogaDirection getLayoutDirection();
<del> YogaOverflow getOverflow();
<del> void setOverflow(YogaOverflow overflow);
<del> YogaDisplay getDisplay();
<del> void setDisplay(YogaDisplay display);
<del> void setData(Object data);
<del> Object getData();
<del> void reset();
<del>} | 13 |
Javascript | Javascript | add ember.binding#isnull to mixin | a81d638f5ab5c4d174d2f05b239f09476f59395b | <ide><path>packages/ember-metal/lib/binding.js
<ide> mixinProperties(Binding,
<ide> return binding.not();
<ide> },
<ide>
<add> /**
<add> @see Ember.Binding.prototype.isNull
<add> */
<add> isNull: function(from) {
<add> var C = this, binding = new C(null, from);
<add> return binding.isNull();
<add> },
<add>
<ide> /**
<ide> Adds a transform that forwards the logical 'AND' of values at 'pathA' and
<ide> 'pathB' whenever either source changes. Note that the transform acts | 1 |
Javascript | Javascript | remove unused filterinternalstackframes param | 801814686d4745840743d45c54abb41940fb41e2 | <ide><path>lib/repl.js
<ide> function REPLServer(prompt,
<ide> self.writer.options = Object.assign({}, writer.options, { colors: true });
<ide> }
<ide>
<del> function filterInternalStackFrames(error, structuredStack) {
<add> function filterInternalStackFrames(structuredStack) {
<ide> // Search from the bottom of the call stack to
<ide> // find the first frame with a null function name
<ide> if (typeof structuredStack !== 'object')
<ide> function REPLServer(prompt,
<ide>
<ide> function prepareStackTrace(fn) {
<ide> return (error, stackFrames) => {
<del> const frames = filterInternalStackFrames(error, stackFrames);
<add> const frames = filterInternalStackFrames(stackFrames);
<ide> if (fn) {
<ide> return fn(error, frames);
<ide> } | 1 |
Javascript | Javascript | use unique file names in fs trace test | a7c9130e02ccf7e0627b068ef5ea488d4c422015 | <ide><path>test/parallel/test-trace-events-fs-sync.js
<ide> if (!common.isWindows) {
<ide> uid = process.getuid();
<ide> }
<ide>
<del>tests['fs.sync.access'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.accessSync("fs.txt");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.chmod'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.chmodSync("fs.txt",100);' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.chown'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> `fs.chownSync("fs.txt", ${uid}, ${gid});` +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.close'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.copyfile'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.copyFileSync("fs.txt","a.txt");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.fchmod'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'const fd = fs.openSync("fs.txt", "r+");' +
<add>tests['fs.sync.access'] = 'fs.writeFileSync("fs0.txt", "123", "utf8");' +
<add> 'fs.accessSync("fs0.txt");' +
<add> 'fs.unlinkSync("fs0.txt")';
<add>tests['fs.sync.chmod'] = 'fs.writeFileSync("fs1.txt", "123", "utf8");' +
<add> 'fs.chmodSync("fs1.txt",100);' +
<add> 'fs.unlinkSync("fs1.txt")';
<add>tests['fs.sync.chown'] = 'fs.writeFileSync("fs2.txt", "123", "utf8");' +
<add> `fs.chownSync("fs2.txt", ${uid}, ${gid});` +
<add> 'fs.unlinkSync("fs2.txt")';
<add>tests['fs.sync.close'] = 'fs.writeFileSync("fs3.txt", "123", "utf8");' +
<add> 'fs.unlinkSync("fs3.txt")';
<add>tests['fs.sync.copyfile'] = 'fs.writeFileSync("fs4.txt", "123", "utf8");' +
<add> 'fs.copyFileSync("fs4.txt","a.txt");' +
<add> 'fs.unlinkSync("fs4.txt")';
<add>tests['fs.sync.fchmod'] = 'fs.writeFileSync("fs5.txt", "123", "utf8");' +
<add> 'const fd = fs.openSync("fs5.txt", "r+");' +
<ide> 'fs.fchmodSync(fd,100);' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.fchown'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'const fd = fs.openSync("fs.txt", "r+");' +
<add> 'fs.unlinkSync("fs5.txt")';
<add>tests['fs.sync.fchown'] = 'fs.writeFileSync("fs6.txt", "123", "utf8");' +
<add> 'const fd = fs.openSync("fs6.txt", "r+");' +
<ide> `fs.fchownSync(fd, ${uid}, ${gid});` +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.fdatasync'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'const fd = fs.openSync("fs.txt", "r+");' +
<add> 'fs.unlinkSync("fs6.txt")';
<add>tests['fs.sync.fdatasync'] = 'fs.writeFileSync("fs7.txt", "123", "utf8");' +
<add> 'const fd = fs.openSync("fs7.txt", "r+");' +
<ide> 'fs.fdatasyncSync(fd);' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.fstat'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.readFileSync("fs.txt");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.fsync'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'const fd = fs.openSync("fs.txt", "r+");' +
<add> 'fs.unlinkSync("fs7.txt")';
<add>tests['fs.sync.fstat'] = 'fs.writeFileSync("fs8.txt", "123", "utf8");' +
<add> 'fs.readFileSync("fs8.txt");' +
<add> 'fs.unlinkSync("fs8.txt")';
<add>tests['fs.sync.fsync'] = 'fs.writeFileSync("fs9.txt", "123", "utf8");' +
<add> 'const fd = fs.openSync("fs9.txt", "r+");' +
<ide> 'fs.fsyncSync(fd);' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.ftruncate'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'const fd = fs.openSync("fs.txt", "r+");' +
<add> 'fs.unlinkSync("fs9.txt")';
<add>tests['fs.sync.ftruncate'] = 'fs.writeFileSync("fs10.txt", "123", "utf8");' +
<add> 'const fd = fs.openSync("fs10.txt", "r+");' +
<ide> 'fs.ftruncateSync(fd, 1);' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.futimes'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'const fd = fs.openSync("fs.txt", "r+");' +
<add> 'fs.unlinkSync("fs10.txt")';
<add>tests['fs.sync.futimes'] = 'fs.writeFileSync("fs11.txt", "123", "utf8");' +
<add> 'const fd = fs.openSync("fs11.txt", "r+");' +
<ide> 'fs.futimesSync(fd,1,1);' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.lchown'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> `fs.lchownSync("fs.txt", ${uid}, ${gid});` +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.link'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.linkSync("fs.txt", "linkx");' +
<del> 'fs.unlinkSync("linkx");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.lstat'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.lstatSync("fs.txt");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.mkdir'] = 'fs.mkdirSync("fstemp");' +
<del> 'fs.rmdirSync("fstemp")';
<del>tests['fs.sync.mkdtemp'] = 'const fp = fs.mkdtempSync("fstest");' +
<add> 'fs.unlinkSync("fs11.txt")';
<add>tests['fs.sync.lchown'] = 'fs.writeFileSync("fs12.txt", "123", "utf8");' +
<add> `fs.lchownSync("fs12.txt", ${uid}, ${gid});` +
<add> 'fs.unlinkSync("fs12.txt")';
<add>tests['fs.sync.link'] = 'fs.writeFileSync("fs13.txt", "123", "utf8");' +
<add> 'fs.linkSync("fs13.txt", "fs14.txt");' +
<add> 'fs.unlinkSync("fs13.txt");' +
<add> 'fs.unlinkSync("fs14.txt")';
<add>tests['fs.sync.lstat'] = 'fs.writeFileSync("fs15.txt", "123", "utf8");' +
<add> 'fs.lstatSync("fs15.txt");' +
<add> 'fs.unlinkSync("fs15.txt")';
<add>tests['fs.sync.mkdir'] = 'fs.mkdirSync("fstemp0");' +
<add> 'fs.rmdirSync("fstemp0")';
<add>tests['fs.sync.mkdtemp'] = 'const fp = fs.mkdtempSync("fstemp1");' +
<ide> 'fs.rmdirSync(fp)';
<del>tests['fs.sync.open'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.read'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.readFileSync("fs.txt");' +
<del> 'fs.unlinkSync("fs.txt")';
<add>tests['fs.sync.open'] = 'fs.writeFileSync("fs16.txt", "123", "utf8");' +
<add> 'fs.unlinkSync("fs16.txt")';
<add>tests['fs.sync.read'] = 'fs.writeFileSync("fs17.txt", "123", "utf8");' +
<add> 'fs.readFileSync("fs17.txt");' +
<add> 'fs.unlinkSync("fs17.txt")';
<ide> tests['fs.sync.readdir'] = 'fs.readdirSync("./")';
<del>tests['fs.sync.realpath'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.linkSync("fs.txt", "linkx");' +
<del> 'fs.realpathSync.native("linkx");' +
<del> 'fs.unlinkSync("linkx");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.rename'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.renameSync("fs.txt","xyz.txt"); ' +
<del> 'fs.unlinkSync("xyz.txt")';
<del>tests['fs.sync.rmdir'] = 'fs.mkdirSync("fstemp");' +
<del> 'fs.rmdirSync("fstemp")';
<del>tests['fs.sync.stat'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.statSync("fs.txt");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.unlink'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.linkSync("fs.txt", "linkx");' +
<del> 'fs.unlinkSync("linkx");' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.utimes'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.utimesSync("fs.txt",1,1);' +
<del> 'fs.unlinkSync("fs.txt")';
<del>tests['fs.sync.write'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.unlinkSync("fs.txt")';
<add>tests['fs.sync.realpath'] = 'fs.writeFileSync("fs18.txt", "123", "utf8");' +
<add> 'fs.linkSync("fs18.txt", "fs19.txt");' +
<add> 'fs.realpathSync.native("fs19.txt");' +
<add> 'fs.unlinkSync("fs18.txt");' +
<add> 'fs.unlinkSync("fs19.txt")';
<add>tests['fs.sync.rename'] = 'fs.writeFileSync("fs20.txt", "123", "utf8");' +
<add> 'fs.renameSync("fs20.txt","fs21.txt"); ' +
<add> 'fs.unlinkSync("fs21.txt")';
<add>tests['fs.sync.rmdir'] = 'fs.mkdirSync("fstemp2");' +
<add> 'fs.rmdirSync("fstemp2")';
<add>tests['fs.sync.stat'] = 'fs.writeFileSync("fs22.txt", "123", "utf8");' +
<add> 'fs.statSync("fs22.txt");' +
<add> 'fs.unlinkSync("fs22.txt")';
<add>tests['fs.sync.unlink'] = 'fs.writeFileSync("fs23.txt", "123", "utf8");' +
<add> 'fs.linkSync("fs23.txt", "fs24.txt");' +
<add> 'fs.unlinkSync("fs23.txt");' +
<add> 'fs.unlinkSync("fs24.txt")';
<add>tests['fs.sync.utimes'] = 'fs.writeFileSync("fs25.txt", "123", "utf8");' +
<add> 'fs.utimesSync("fs25.txt",1,1);' +
<add> 'fs.unlinkSync("fs25.txt")';
<add>tests['fs.sync.write'] = 'fs.writeFileSync("fs26.txt", "123", "utf8");' +
<add> 'fs.unlinkSync("fs26.txt")';
<ide>
<ide> // On windows, we need permissions to test symlink and readlink.
<ide> // We'll only try to run these tests if we have enough privileges.
<ide> if (common.canCreateSymLink()) {
<del> tests['fs.sync.symlink'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.symlinkSync("fs.txt", "linkx");' +
<del> 'fs.unlinkSync("linkx");' +
<del> 'fs.unlinkSync("fs.txt")';
<del> tests['fs.sync.readlink'] = 'fs.writeFileSync("fs.txt", "123", "utf8");' +
<del> 'fs.symlinkSync("fs.txt", "linkx");' +
<del> 'fs.readlinkSync("linkx");' +
<del> 'fs.unlinkSync("linkx");' +
<del> 'fs.unlinkSync("fs.txt")';
<add> tests['fs.sync.symlink'] = 'fs.writeFileSync("fs27.txt", "123", "utf8");' +
<add> 'fs.symlinkSync("fs27.txt", "fs28.txt");' +
<add> 'fs.unlinkSync("fs27.txt");' +
<add> 'fs.unlinkSync("fs28.txt")';
<add> tests['fs.sync.readlink'] = 'fs.writeFileSync("fs29.txt", "123", "utf8");' +
<add> 'fs.symlinkSync("fs29.txt", "fs30.txt");' +
<add> 'fs.readlinkSync("fs30.txt");' +
<add> 'fs.unlinkSync("fs29.txt");' +
<add> 'fs.unlinkSync("fs30.txt")';
<ide> }
<ide>
<ide> const tmpdir = require('../common/tmpdir'); | 1 |
Python | Python | add tokenizer scoring to ja / ko / zh | 013b66de05ee31e5e05a440ab5b29173530929fa | <ide><path>spacy/lang/ja/__init__.py
<ide> from ...compat import copy_reg
<ide> from ...errors import Errors
<ide> from ...language import Language
<add>from ...scorer import Scorer
<ide> from ...symbols import POS
<ide> from ...tokens import Doc
<add>from ...training import validate_examples
<ide> from ...util import DummyTokenizer, registry
<ide> from ... import util
<ide>
<ide> def _get_sub_tokens(self, sudachipy_tokens):
<ide> )
<ide> return sub_tokens_list
<ide>
<add> def score(self, examples):
<add> validate_examples(examples, "JapaneseTokenizer.score")
<add> return Scorer.score_tokenization(examples)
<add>
<ide> def _get_config(self) -> Dict[str, Any]:
<ide> return {"split_mode": self.split_mode}
<ide>
<ide><path>spacy/lang/ko/__init__.py
<ide> from ...language import Language
<ide> from ...tokens import Doc
<ide> from ...compat import copy_reg
<add>from ...scorer import Scorer
<ide> from ...symbols import POS
<add>from ...training import validate_examples
<ide> from ...util import DummyTokenizer, registry
<ide>
<ide>
<ide> def detailed_tokens(self, text: str) -> Dict[str, Any]:
<ide> lemma = surface
<ide> yield {"surface": surface, "lemma": lemma, "tag": tag}
<ide>
<add> def score(self, examples):
<add> validate_examples(examples, "KoreanTokenizer.score")
<add> return Scorer.score_tokenization(examples)
<add>
<ide>
<ide> class KoreanDefaults(Language.Defaults):
<ide> config = Config().from_str(DEFAULT_CONFIG)
<ide><path>spacy/lang/zh/__init__.py
<ide>
<ide> from ...errors import Warnings, Errors
<ide> from ...language import Language
<add>from ...scorer import Scorer
<ide> from ...tokens import Doc
<add>from ...training import validate_examples
<ide> from ...util import DummyTokenizer, registry
<ide> from .lex_attrs import LEX_ATTRS
<ide> from .stop_words import STOP_WORDS
<ide> def pkuseg_update_user_dict(self, words: List[str], reset: bool = False):
<ide> warn_msg = Warnings.W104.format(target="pkuseg", current=self.segmenter)
<ide> warnings.warn(warn_msg)
<ide>
<add> def score(self, examples):
<add> validate_examples(examples, "ChineseTokenizer.score")
<add> return Scorer.score_tokenization(examples)
<add>
<ide> def _get_config(self) -> Dict[str, Any]:
<ide> return {
<ide> "segmenter": self.segmenter, | 3 |
Text | Text | fix broken link in crypto.md | 3aab64cd5f60ff2cfb6e902846df21942c910884 | <ide><path>doc/api/crypto.md
<ide> See the [list of SSL OP Flags][] for details.
<ide> [RFC 5208]: https://www.rfc-editor.org/rfc/rfc5208.txt
<ide> [encoding]: buffer.html#buffer_buffers_and_character_encodings
<ide> [initialization vector]: https://en.wikipedia.org/wiki/Initialization_vector
<del>[list of SSL OP Flags]: wiki.openssl.org/index.php/List_of_SSL_OP_Flags#Table_of_Options
<add>[list of SSL OP Flags]: https://wiki.openssl.org/index.php/List_of_SSL_OP_Flags#Table_of_Options
<ide> [safe integers]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger
<ide> [scrypt]: https://en.wikipedia.org/wiki/Scrypt
<ide> [stream]: stream.html | 1 |
Text | Text | add npm to arch build instructions | 0e01bde10750e5f6acd6e532d2ff83ab2868d2d9 | <ide><path>docs/build-instructions/linux.md
<ide> Ubuntu LTS 12.04 64-bit is the recommended platform.
<ide>
<ide> ### Arch
<ide>
<del>* `sudo pacman -S gconf base-devel git nodejs libgnome-keyring python2`
<add>* `sudo pacman -S gconf base-devel git nodejs npm libgnome-keyring python2`
<ide> * `export PYTHON=/usr/bin/python2` before building Atom.
<ide>
<ide> ### Slackware | 1 |
Mixed | Javascript | move examples out of code into docs | 642ad4b5cf3636431b840740d0d62a033ac1e5c1 | <ide><path>docs/guides/components.md
<ide> The architecture of the Video.js player is centered around components. The `Play
<ide> * [What is a Component?](#what-is-a-component)
<ide> * [Creating a Component](#creating-a-component)
<ide> * [Component Children](#component-children)
<add> * [Basic Example](#basic-example)
<add> * [Using Options](#using-options)
<add>* [Event Listening](#event-listening)
<add> * [using on](#using-on)
<add> * [Using off](#using-off)
<add> * [Using one](#using-one)
<add> * [Using trigger](#using-trigger)
<ide> * [Default Component Tree](#default-component-tree)
<ide> * [Specific Component Details](#specific-component-details)
<ide> * [Progress Control](#progress-control)
<ide> In addition, there are a couple methods worth recognizing:
<ide> * `videojs.registerComponent(String name, Function Comp)`: Registers component constructors with Video.js.
<ide> * `videojs.extend(Function component, Object properties)`: Provides prototype inheritance. Can be used to extend a component's constructor, returning a new constructor with the given properties.
<ide>
<add>Creation:
<add>
<add>```js
<add>// adding a button to the player
<add>var player = videojs('some-video-id');
<add>var Component = videojs.getComponent('Component');
<add>var button = new Component(player);
<add>
<add>console.log(button.el());
<add>```
<add>
<add>The above code will output
<add>
<add>```html
<add><div class="video-js">
<add> <div class="vjs-button">Button</div>
<add></div>
<add>```
<add>
<add>Adding the new button to the player
<add>
<add>```js
<add>// adding a button to the player
<add>var player = videojs('some-video-id');
<add>var button = player.addChild('button');
<add>
<add>console.log(button.el());
<add>// will have the same html result as the previous example
<add>```
<add>
<ide> ## Component Children
<ide>
<add>Again, refer to [the component API docs](http://docs.videojs.com/docs/api/component.html) for complete details on methods available for managing component structures.
<add>
<add>### Basic Example
<add>
<ide> When child component is added to a parent component, Video.js inserts the element of the child into the element of the parent. For example, adding a component like this:
<ide>
<ide> ```js
<ide> Results in a DOM that looks like this:
<ide> </div>
<ide> ```
<ide>
<del>Again, refer to [the component API docs](http://docs.videojs.com/docs/api/component.html) for complete details on methods available for managing component structures.
<add>### Using Options
<add>
<add>Pass in options for child constructors and options for children of the child.
<add>
<add>```js
<add>var player = videojs('some-vid-id');
<add>var Component = videojs.getComponent('Component');
<add>var myComponent = new Component(player);
<add>var myButton = myComponent.addChild('MyButton', {
<add> text: 'Press Me',
<add> buttonChildExample: {
<add> buttonChildOption: true
<add> }
<add>});
<add>```
<add>
<add>Children can also be added via options when a component is initialized.
<add>
<add>> Note: Include a 'name' key which will be used if two child components of the same
<add>> type that need different options.
<add>
<add>```js
<add>// MyComponent is from the above example
<add>var myComp = new MyComponent(player, {
<add> children: ['button', {
<add> name: 'button',
<add> someOtherOption: true
<add> }, {
<add> name: 'button',
<add> someOtherOption: false
<add> }]
<add>});
<add>```
<add>
<add>## Event Listening
<add>
<add>### Using `on`
<add>
<add>```js
<add>var player = videojs('some-player-id');
<add>var Component = videojs.getComponent('Component');
<add>var myComponent = new Component(player);
<add>var myFunc = function() {
<add> var myComponent = this;
<add> console.log('myFunc called');
<add>};
<add>
<add>myComponent.on('eventType', myFunc);
<add>myComponent.trigger('eventType');
<add>// logs 'myFunc called'
<add>```
<add>
<add>The context of `myFunc` will be `myComponent` unless it is bound. You can add
<add>a listener to another element or component.
<add>
<add>```js
<add>var otherComponent = new Component(player);
<add>
<add>// myComponent/myFunc is from the above example
<add>myComponent.on(otherComponent.el(), 'eventName', myFunc);
<add>myComponent.on(otherComponent, 'eventName', myFunc);
<add>
<add>otherComponent.trigger('eventName');
<add>// logs 'myFunc called' twice
<add>```
<add>
<add>### Using `off`
<add>
<add>```js
<add>var player = videojs('some-player-id');
<add>var Component = videojs.getComponent('Component');
<add>var myComponent = new Component(player);
<add>var myFunc = function() {
<add> var myComponent = this;
<add> console.log('myFunc called');
<add>};
<add>myComponent.on('eventType', myFunc);
<add>myComponent.trigger('eventType');
<add>// logs 'myFunc called'
<add>
<add>myComponent.off('eventType', myFunc);
<add>myComponent.trigger('eventType');
<add>// does nothing
<add>```
<add>
<add>If myFunc gets excluded, *all* listeners for the event type will get removed. If
<add>eventType gets excluded, *all* listeners will get removed from the component.
<add>You can use `off` to remove listeners that get added to other elements or
<add>components using:
<add>
<add> `myComponent.on(otherComponent...`
<add>
<add>In this case both the event type and listener function are **REQUIRED**.
<add>
<add>```js
<add>var otherComponent = new Component(player);
<add>
<add>// myComponent/myFunc is from the above example
<add>myComponent.on(otherComponent.el(), 'eventName', myFunc);
<add>myComponent.on(otherComponent, 'eventName', myFunc);
<add>
<add>otherComponent.trigger('eventName');
<add>// logs 'myFunc called' twice
<add>myComponent.off(ootherComponent.el(), 'eventName', myFunc);
<add>myComponent.off(otherComponent, 'eventName', myFunc);
<add>otherComponent.trigger('eventName');
<add>// does nothing
<add>```
<add>
<add>### Using `one`
<add>
<add>```js
<add>var player = videojs('some-player-id');
<add>var Component = videojs.getComponent('Component');
<add>var myComponent = new Component(player);
<add>var myFunc = function() {
<add> var myComponent = this;
<add> console.log('myFunc called');
<add>};
<add>myComponent.one('eventName', myFunc);
<add>myComponent.trigger('eventName');
<add>// logs 'myFunc called'
<add>
<add>myComponent.trigger('eventName');
<add>// does nothing
<add>```
<add>
<add>You can also add a listener to another element or component that will get
<add>triggered only once.
<add>
<add>```js
<add>var otherComponent = new Component(player);
<add>
<add>// myComponent/myFunc is from the above example
<add>myComponent.one(otherComponent.el(), 'eventName', myFunc);
<add>myComponent.one(otherComponent, 'eventName', myFunc);
<add>
<add>otherComponent.trigger('eventName');
<add>// logs 'myFunc called' twice
<add>
<add>otherComponent.trigger('eventName');
<add>// does nothing
<add>```
<add>
<add>### Using `trigger`
<add>
<add>```js
<add>var player = videojs('some-player-id');
<add>var Component = videojs.getComponent('Component');
<add>var myComponent = new Component(player);
<add>var myFunc = function(data) {
<add> var myComponent = this;
<add> console.log('myFunc called');
<add> console.log(data);
<add>};
<add>myComponent.one('eventName', myFunc);
<add>myComponent.trigger('eventName');
<add>// logs 'myFunc called' and 'undefined'
<add>
<add>myComponent.trigger({'type':'eventName'});
<add>// logs 'myFunc called' and 'undefined'
<add>
<add>myComponent.trigger('eventName', {data: 'some data'});
<add>// logs 'myFunc called' and "{data: 'some data'}"
<add>
<add>myComponent.trigger({'type':'eventName'}, {data: 'some data'});
<add>// logs 'myFunc called' and "{data: 'some data'}"
<add>```
<ide>
<ide> ## Default Component Tree
<ide>
<ide><path>docs/guides/event-target.md
<add># Event Target
<add>
<add>## Table of Contents
<add>
<add>* [Overview](#overview)
<add>* [on() and addEventListener()](#on-and-addeventlistener)
<add>* [off() and removeEventListener](#off-and-removeeventlistener)
<add>* [one()](#one)
<add>* [trigger() and dispatchEvent](#trigger-and-dispatchevent)
<add>
<add>## Overview
<add>
<add>Events in video.js are setup so that they mimic the DOM API that is used on object, but also have helpful shorthand functions with the same functionality.
<add>
<add>## `on()` and `addEventListener()`
<add>
<add>This function is used to add an event listener to an EventTarget.
<add>
<add>```js
<add>var foo = new EventTarget();
<add>var handleBar = function() {
<add> console.log('bar was triggered');
<add>};
<add>
<add>foo.on('bar', handleBar);
<add>
<add>// This causes any `event listeners` for the `bar` event to get called
<add>// see {@link EventTarget#trigger} for more information
<add>foo.trigger('bar');
<add>// logs 'bar was triggered'
<add>```
<add>
<add>## `off()` and `removeEventListener()`
<add>
<add>This function is used to remove an listener function from an EventTarget.
<add>
<add>```js
<add>var foo = new EventTarget();
<add>var handleBar = function() {
<add> console.log('bar was triggered');
<add>};
<add>
<add>// adds an `event listener` for the `bar` event
<add>// see {@link EventTarget#on} for more info
<add>foo.on('bar', handleBar);
<add>
<add>// runs all `event listeners` for the `bar` event
<add>// see {@link EventTarget#trigger} for more info
<add>foo.trigger('bar');
<add>// logs 'bar was triggered'
<add>
<add>foo.off('bar', handleBar);
<add>foo.trigger('bar');
<add>// does nothing
<add>```
<add>
<add>## `one()`
<add>
<add>This function is used to only have an event listener called once and never again.
<add>
<add>Using `on()` and `off()` to mimic `one()` (not recommended)
<add>
<add>```js
<add>var foo = new EventTarget();
<add>var handleBar = function() {
<add> console.log('bar was triggered');
<add> // after the first trigger remove this handler
<add> foo.off('bar', handleBar);
<add>};
<add>
<add>foo.on('bar', handleBar);
<add>foo.trigger('bar');
<add>// logs 'bar was triggered'
<add>
<add>foo.trigger('bar');
<add>// does nothing
<add>```
<add>
<add>Using `one()`
<add>
<add>```js
<add>var foo = new EventTarget();
<add>var handleBar = function() {
<add> console.log('bar was triggered');
<add>};
<add>
<add>// removed after the first trigger
<add>foo.one('bar', handleBar);
<add>foo.trigger('bar');
<add>// logs 'bar was triggered'
<add>
<add>foo.trigger('bar');
<add>// does nothing
<add>```
<add>
<add>## `trigger()` and `dispatchEvent()`
<add>
<add>This function is used to trigger an event on an EventTarget which will cause all listeners to run.
<add>
<add>> Note: if 'click' is in `EventTarget.allowedEvents_`, trigger will attempt to call the
<add>> `onClick` function if it exists.
<add>
<add>```js
<add>var foo = new EventTarget();
<add>var handleBar = function() {
<add> console.log('bar was triggered');
<add>};
<add>
<add>foo.on('bar', handleBar);
<add>foo.trigger('bar');
<add>// logs 'bar was triggered'
<add>
<add>foo.trigger('bar');
<add>// logs 'bar was triggered'
<add>
<add>foo.trigger('foo');
<add>// does nothing
<add>```
<ide><path>docs/guides/player-workflows.md
<ide> This document outlines many considerations for using Video.js for advanced playe
<ide>
<ide> ## Table of Contents
<ide>
<add>* [Accessing a player that has already been created on a page](#accessing-a-player-that-has-already-been-created-on-a-page)
<ide> * [Removing Players](#removing-players)
<ide> * [dispose()](#dispose)
<ide> * [Signs of an Undisposed Player](#signs-of-an-undisposed-player)
<ide> * [Showing and Hiding a Player](#showing-and-hiding-a-player)
<add>* [Changing the volume of a player](#changing-the-volume-of-a-player)
<add>* [Making the player fullscreen](#making-the-player-fullscreen)
<add>* [Using Playback information functions](#using-playback-information-functions)
<add>* [Dealing with the source or the poster on the player](#dealing-with-the-source-or-the-poster-on-the-player)
<add>* [Accesing the Tech on the player](#accesing-the-tech-on-the-player)
<ide> * [Using Video.js with...](#using-videojs-with)
<ide> * [jQuery](#jquery)
<ide> * [React](#react)
<ide> * [Ember](#ember)
<ide> * [Angular](#angular)
<ide>
<add>## Accessing a player that has already been created on a page
<add>
<add>After an instance has been created it can be accessed globally in two ways:
<add>
<add>1. By calling `videojs('example_video_id');`
<add>1. By using it directly via `videojs.players.example_video_id;`
<add>
<ide> ## Removing Players
<ide>
<ide> No matter the term used for it, web applications are becoming common. Not everything is a static, load-once-and-done web page anymore! This means that developers need to be able to manage the full lifecycle of a video player - from creation to destruction. Video.js supports player removal through the `dispose()` method.
<ide> modal.on('hide', function() {
<ide> });
<ide> ```
<ide>
<add>## Changing the volume of a player
<add>
<add>Volume for a player can be changed through the `volume` function on a player. The volume function accepts a number from 0-1. Calling it without an argument will return the current volume.
<add>
<add>Example
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> // get
<add> var howLoudIsIt = myPlayer.volume();
<add> // set
<add> myPlayer.volume(0.5); // Set volume to half
<add>});
<add>```
<add>
<add>Volume can also be muted (without actually changing the volume value) using the `muted` function. Calling it without an argument will return the current status of muted on the player.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> // get, should be false
<add> console.log(myPlayer.muted());
<add> // set to true
<add> myPlayer.muted(true);
<add> // get should be true
<add> console.log(myPlayer.muted());
<add>});
<add>```
<add>
<add>## Making the player fullscreen
<add>
<add>To check if the player is currently fullscreen call the `isFullscreen` function on a player like so.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> // get, should be false
<add> console.log(myPlayer.isFullscreen());
<add>
<add> // set, tell the player it's in fullscreen
<add> myPlayer.isFullscreen(true);
<add>
<add> // get, should be true
<add> console.log(myPlayer.isFullscreen());
<add>});
<add>```
<add>
<add>To request that the player enter fullscreen call `requestFullscreen`.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> myPlayer.requestFullscreen();
<add>});
<add>```
<add>
<add>To exit fullscreen call `exitFullscreen`
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> myPlayer.requestFullscreen();
<add> myPlayer.exitFullscreen();
<add>});
<add>```
<add>
<add>## Using Playback information functions
<add>
<add>`play` can be used to start playback on a player that has a source.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> myPlayer.play();
<add>});
<add>```
<add>
<add>`pause` can be used to pause playback on a player that is playing.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> myPlayer.play();
<add> myPlayer.pause();
<add>});
<add>```
<add>
<add>`paused` can be used to determine if a player is currently paused.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>
<add>myPlayer.ready(function() {
<add> // true
<add> console.log(myPlayer.paused());
<add> // false
<add> console.log(!myPlayer.paused());
<add>
<add> myPlayer.play();
<add> // false
<add> console.log(myPlayer.paused());
<add> // true
<add> console.log(!myPlayer.paused());
<add>
<add> myPlayer.pause();
<add> // true
<add> console.log(myPlayer.paused());
<add> // false
<add> console.log(!myPlayer.paused());
<add>});
<add>```
<add>
<add>`currentTime` will give you the currentTime (in seconds) that playback is currently occuring at.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> // set current time to 2 minutes into the video
<add> myPlayer.currentTime(120);
<add>
<add> // get the current time, should be 120 seconds
<add> var whereYouAt = myPlayer.currentTime();
<add>});
<add>```
<add>
<add>`duration` will give you the total duration of the video that is playing
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> var lengthOfVideo = myPlayer.duration();
<add>});
<add>```
<add>
<add>`remainingTime` will give you the seconds that are remaing in the video.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> myPlayer.currentTime(10);
<add>
<add> // should be 10 seconds less than duration
<add> console.log(myPlayer.remainingTime());
<add>});
<add>```
<add>
<add>`buffered` will give you a timeRange object representing the current ranges of time that are ready to be played at a future time.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> var bufferedTimeRange = myPlayer.buffered();
<add>
<add> // number of different ranges of time have been buffered.
<add> // Usually 1
<add> var numberOfRanges = bufferedTimeRange.length,
<add>
<add> // Time in seconds when the first range starts.
<add> // Usually 0
<add> var firstRangeStart = bufferedTimeRange.start(0),
<add>
<add> // Time in seconds when the first range ends
<add> var firstRangeEnd = bufferedTimeRange.end(0),
<add>
<add> // Length in seconds of the first time range
<add> var firstRangeLength = firstRangeEnd - firstRangeStart;
<add>});
<add>```
<add>
<add>`bufferedPercent` will give you the the current percentage of the video that is buffered.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> // example 0.11 aka 11%
<add> var howMuchIsDownloaded = myPlayer.bufferedPercent();
<add>});
<add>```
<add>
<add>## Dealing with the source or the poster on the player
<add>
<add>Passing a source to the player via the API. (this can also be done using options)
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>```
<add>
<add>**Source Object (or element):** A javascript object containing information
<add>about the source file. Use this method if you want the player to determine if
<add>it can support the file using the type information.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src({type: "video/mp4", src: "http://www.example.com/path/to/video.mp4"});
<add>```
<add>
<add>**Array of Source Objects:** To provide multiple versions of the source so
<add>that it can be played using HTML5 across browsers you can use an array of
<add>source objects. Video.js will detect which version is supported and load that
<add>file.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src([
<add> {type: "video/mp4", src: "http://www.example.com/path/to/video.mp4"},
<add> {type: "video/webm", src: "http://www.example.com/path/to/video.webm"},
<add> {type: "video/ogg", src: "http://www.example.com/path/to/video.ogv"}
<add>]);
<add>```
<add>
<add>Changing or setting the poster via the API. (this can also be done with options)
<add>
<add>```js
<add>var myPlayer = videojs('example_video_1');
<add>
<add>// set
<add>myPlayer.poster('http://example.com/myImage.jpg');
<add>
<add>// get
<add>console.log(myPlayer.poster());
<add>// 'http://example.com/myImage.jpg'
<add>```
<add>
<add>## Accesing the Tech on the player
<add>
<add>The tech on the player can only be accesed by pasing `{IWillNotUseThisInPlugins: true}` into the `tech()`
<add>function on the player.
<add>
<add>```js
<add>var myPlayer = videojs('some-player-id');
<add>
<add>myPlayer.src("http://www.example.com/path/to/video.mp4");
<add>myPlayer.ready(function() {
<add> // function call throws an error if we
<add> // dont add {IWillNotUseThisInPlugins: true}
<add> var tech = myPlayer.tech({IWillNotUseThisInPlugins: true});
<add>});
<add>```
<add>
<ide> ## Using Video.js with...
<ide>
<ide> Coming soon...
<ide><path>docs/guides/plugins.md
<ide> If you've built something cool with Video.js, you can easily share it with the r
<ide> You may have already done this step. Code up something interesting and then wrap it in a function. At the most basic level, that's all a video.js plugin is. By convention, plugins take a hash of options as their first argument:
<ide>
<ide> ```js
<del> function examplePlugin(options) {
<del> this.on('play', function(e) {
<del> console.log('playback has started!');
<del> });
<del> };
<add>function examplePlugin(options) {
<add> this.on('play', function(e) {
<add> console.log('playback has started!');
<add> });
<add>};
<ide> ```
<ide>
<ide> When it's activated, `this` will be the Video.js player your plugin is attached to. You can use anything you'd like in the [Video.js API](./api.md) when you're writing a plugin: change the `src`, mess up the DOM, or listen for and emit your own events.
<ide> When it's activated, `this` will be the Video.js player your plugin is attached
<ide> It's time to give the rest of the world the opportunity to be awed by your genius. When your plugin is loaded, it needs to let Video.js know this amazing new functionality is now available:
<ide>
<ide> ```js
<del> videojs.plugin('examplePlugin', examplePlugin);
<add>videojs.plugin('examplePlugin', examplePlugin);
<ide> ```
<ide>
<ide> From this point on, your plugin will be added to the Video.js prototype and will show up as a property on every instance created. Make sure you choose a unique name that doesn't clash with any of the properties already in Video.js. Which leads us to...
<ide> From this point on, your plugin will be added to the Video.js prototype and will
<ide> There are two ways to initialize a plugin. If you're creating your video tag dynamically, you can specify the plugins you'd like to initialize with it and any options you want to pass to them:
<ide>
<ide> ```js
<del> videojs('vidId', {
<del> plugins: {
<del> examplePlugin: {
<del> exampleOption: true
<del> }
<del> }
<del> });
<add>videojs('vidId', {
<add> plugins: {
<add> examplePlugin: {
<add> exampleOption: true
<add> }
<add> }
<add>});
<ide> ```
<ide>
<ide> If you've already initialized your video tag, you can activate a plugin at any time by calling its setup function directly:
<ide>
<ide> ```js
<del> var video = videojs('cool-vid');
<del> video.examplePlugin({ exampleOption: true });
<add>var video = videojs('cool-vid');
<add>video.examplePlugin({ exampleOption: true });
<ide> ```
<ide>
<ide> That's it. Head on over to the [Video.js wiki](https://github.com/videojs/video.js/wiki/Plugins) and add your plugin to the list so everyone else can check it out.
<ide><path>docs/guides/videojs.md
<add># Usage examples for the functions on videojs
<add>
<add>## Table of Contents
<add>
<add>* [videojs()](#videojs)
<add>* [options](#options)
<add>* [getComponent()](#getcomponent)
<add>* [registerComponent](#registercomponent)
<add>* [getTech()](#gettech)
<add>* [registerTech](#registertech)
<add>* [extend()](#extend)
<add>* [mergeOptions()](#mergeoptions)
<add>* [bind()](#bind)
<add>* [plugin()](#plugin)
<add>* [xhr](#xhr)
<add>
<add>## `videojs()`
<add>
<add>```js
<add>var myPlayer = videojs('my_video_id');
<add>```
<add>
<add>## `options`
<add>
<add>```js
<add>videojs.options.autoplay = true
<add>// -> all players will autoplay by default
<add>```
<add>
<add>## `getComponent()`
<add>
<add>```js
<add>var VjsButton = videojs.getComponent('Button');
<add>// Create a new instance of the component
<add>var myButton = new VjsButton(myPlayer);
<add>```
<add>
<add>## `registerComponent()`
<add>
<add>```js
<add>// Get a component to subclass
<add>var VjsButton = videojs.getComponent('Button');
<add>// Subclass the component (see 'extend' doc for more info)
<add>var MySpecialButton = videojs.extend(VjsButton, {});
<add>// Register the new component
<add>VjsButton.registerComponent('MySepcialButton', MySepcialButton);
<add>// (optionally) add the new component as a default player child
<add>myPlayer.addChild('MySepcialButton');
<add>```
<add>
<add>## `getTech()`
<add>
<add>```js
<add>var Html5 = videojs.getTech('Html5');
<add>// Create a new instance of the component
<add>var html5 = new Html5(options);
<add>```
<add>
<add>## `registerTech()`
<add>
<add>```js
<add>// get the Html5 Tech
<add>var Html5 = videojs.getTech('Html5');
<add>var MyTech = videojs.extend(Html5, {});
<add>// Register the new Tech
<add>VjsButton.registerTech('Tech', MyTech);
<add>var player = videojs('myplayer', {
<add> techOrder: ['myTech', 'html5']
<add>});
<add>```
<add>
<add>## `extend()`
<add>
<add>```js
<add>// Create a basic javascript 'class'
<add>function MyClass(name) {
<add> // Set a property at initialization
<add> this.myName = name;
<add>}
<add>// Create an instance method
<add>MyClass.prototype.sayMyName = function() {
<add> alert(this.myName);
<add>};
<add>// Subclass the exisitng class and change the name
<add>// when initializing
<add>var MySubClass = videojs.extend(MyClass, {
<add> constructor: function(name) {
<add> // Call the super class constructor for the subclass
<add> MyClass.call(this, name)
<add> }
<add>});
<add>// Create an instance of the new sub class
<add>var myInstance = new MySubClass('John');
<add>myInstance.sayMyName(); // -> should alert "John"
<add>```
<add>
<add>## `mergeOptions()`
<add>
<add>```js
<add>var defaultOptions = {
<add> foo: true,
<add> bar: {
<add> a: true,
<add> b: [1,2,3]
<add> }
<add>};
<add>var newOptions = {
<add> foo: false,
<add> bar: {
<add> b: [4,5,6]
<add> }
<add>};
<add>var result = videojs.mergeOptions(defaultOptions, newOptions);
<add>// result.foo = false;
<add>// result.bar.a = true;
<add>// result.bar.b = [4,5,6];
<add>```
<add>
<add>## `bind()`
<add>
<add>```js
<add>var someClass = function() {};
<add>var someObj = new someClass();
<add>videojs.bind(someObj, function() {
<add> // this will be the context of someObj here
<add>});
<add>```
<add>
<add>## `plugin()`
<add>
<add>**See the [plugin guide](plugins.md) in the docs for a more detailed example**
<add>
<add>```js
<add>// Make a plugin that alerts when the player plays
<add>videojs.plugin('myPlugin', function(myPluginOptions) {
<add> myPluginOptions = myPluginOptions || {};
<add>
<add> var player = this;
<add> var alertText = myPluginOptions.text || 'Player is playing!'
<add>
<add> player.on('play', function() {
<add> alert(alertText);
<add> });
<add>});
<add>// USAGE EXAMPLES
<add>// EXAMPLE 1: New player with plugin options, call plugin immediately
<add>var player1 = videojs('idOne', {
<add> myPlugin: {
<add> text: 'Custom text!'
<add> }
<add>});
<add>// Click play
<add>// --> Should alert 'Custom text!'
<add>// EXAMPLE 3: New player, initialize plugin later
<add>var player3 = videojs('idThree');
<add>// Click play
<add>// --> NO ALERT
<add>// Click pause
<add>// Initialize plugin using the plugin function on the player instance
<add>player3.myPlugin({
<add> text: 'Plugin added later!'
<add>});
<add>// Click play
<add>// --> Should alert 'Plugin added later!'
<add>```
<add>
<add>## `xhr()`
<add>
<add>```js
<add>videojs.xhr({
<add> body: someJSONString,
<add> uri: "/foo",
<add> headers: {
<add> "Content-Type": "application/json"
<add> }
<add>}, function (err, resp, body) {
<add> // check resp.statusCode
<add>});
<add>```
<ide><path>src/js/button.js
<ide> class Button extends ClickableComponent {
<ide> /**
<ide> * Enable the `Button` element so that it can be activated or clicked. Use this with
<ide> * {@link Button#disable}.
<del> *
<del> * @return {Component}
<del> * Returns itself; method is chainable.
<ide> */
<ide> enable() {
<ide> super.enable();
<ide> class Button extends ClickableComponent {
<ide> /**
<ide> * Enable the `Button` element so that it cannot be activated or clicked. Use this with
<ide> * {@link Button#enable}.
<del> *
<del> * @return {Component}
<del> * Returns itself; method is chainable.
<ide> */
<ide> disable() {
<ide> super.disable();
<ide><path>src/js/component.js
<ide> import mergeOptions from './utils/merge-options.js';
<ide> * in the DOM. They can be children of other components, and can have
<ide> * children themselves.
<ide> *
<del> * Creating a button component.
<del> * ``` js
<del> * // adding a button to the player
<del> * var player = videojs('some-video-id');
<del> * var Component = videojs.getComponent('Component');
<del> * var button = new Component(player);
<del> *
<del> * console.log(button.el());
<del> * ```
<del> *
<del> * Above code will log this html.
<del> * ```html
<del> * <div class="video-js">
<del> * <div class="vjs-button">Button</div>
<del> * </div>
<del> * ```
<del> *
<del> * Adding a button to the player
<del> * ``` js
<del> * // adding a button to the player
<del> * var player = videojs('some-video-id');
<del> * var button = player.addChild('button');
<del> *
<del> * console.log(button.el());
<del> * // will have the same html result as the previous example
<del> * ```
<del> *
<ide> * Components can also use methods from {@link EventTarget}
<ide> */
<ide> class Component {
<ide> class Component {
<ide> * The `Player` that this class should be attached to.
<ide> *
<ide> * @param {Object} [options]
<del> * The key/value store of player options.
<add> * The key/value store of player options.
<add> #
<add> * @param {Object[]} [options.children]
<add> * An array of children objects to intialize this component with. Children objects have
<add> * a name property that will be used if more than one component of the same type needs to be
<add> * added.
<ide> *
<ide> * @param {Component~ReadyCallback} [ready]
<ide> * Function that gets called when the `Component` is ready.
<ide> class Component {
<ide> * > Note: When both `obj` and `options` contain properties whose values are objects.
<ide> * The two properties get merged using {@link module:mergeOptions}
<ide> *
<del> * Example
<del> * ```js
<del> * var player = videojs('some-vid-id');
<del> * var Component = videojs.getComponent('Component');
<del> * var component = new Component(player, {
<del> * optionSet: {
<del> * childOne: {foo: 'bar', asdf: 'fdsa'},
<del> * childTwo: {},
<del> * childThree: {}
<del> * }
<del> * });
<del> *
<del> * const newOptions = {
<del> * optionSet: {
<del> * childOne: {foo: 'baz', abc: '123'}
<del> * childTwo: null,
<del> * childFour: {}
<del> * }
<del> * };
<del> *
<del> * console.log(component.options(newOptions));
<del> * ```
<del> *
<del> * Result
<del> * ```js
<del> * {
<del> * optionSet: {
<del> * childOne: {foo: 'baz', asdf: 'fdsa', abc: '123' },
<del> * childTwo: null,
<del> * childThree: {},
<del> * childFour: {}
<del> * }
<del> * }
<del> * ```
<del> *
<ide> * @param {Object} obj
<ide> * The object that contains new options.
<ide> *
<ide> class Component {
<ide> /**
<ide> * Add a child `Component` inside the current `Component`.
<ide> *
<del> * Example:
<del> * ```js
<del> * var player = videojs('some-vid-id');
<del> * var Component = videojs.getComponent('Component');
<del> * var myComponent = new Component(player);
<del> *
<del> * console.log(myComponent.el());
<del> * // -> <div class='my-component'></div>
<del> * console.log(myComponent.children());
<del> * // [empty array]
<del> *
<del> * var myButton = myComponent.addChild('MyButton');
<del> *
<del> * console.log(myComponent.el());
<del> * // -> <div class='my-component'><div class="my-button">myButton<div></div>
<del> * console.log(myComponent.children());
<del> * // -> myButton === myComponent.children()[0];
<del> * ```
<del> *
<del> * Pass in options for child constructors and options for children of the child.
<del> * ```js
<del> * var player = videojs('some-vid-id');
<del> * var Component = videojs.getComponent('Component');
<del> * var myComponent = new Component(player);
<del> * var myButton = myComponent.addChild('MyButton', {
<del> * text: 'Press Me',
<del> * buttonChildExample: {
<del> * buttonChildOption: true
<del> * }
<del> * });
<del> * ```
<ide> *
<ide> * @param {string|Component} child
<ide> * The name or instance of a child to add.
<ide> class Component {
<ide>
<ide> /**
<ide> * Add and initialize default child `Component`s based upon options.
<del> *
<del> * Example.
<del> * ```js
<del> * var MyComponent = videojs.extend(videojs.getComponent('Component'));
<del> * // when an instance of MyComponent is created, all children in options
<del> * // will be added to the instance by their name strings and options
<del> * MyComponent.prototype.options_ = {
<del> * children: [
<del> * 'myChildComponent'
<del> * ],
<del> * myChildComponent: {
<del> * myChildOption: true
<del> * }
<del> * };
<del> *
<del> * // Or when creating the component
<del> * var player = videojs('some-player-id');
<del> * var myComp = new MyComponent(player, {
<del> * children: [
<del> * 'myChildComponent'
<del> * ],
<del> * myChildComponent: {
<del> * myChildOption: true
<del> * }
<del> * });
<del> * ```
<del> *
<del> * The children option can also be an array of child options objects
<del> * (that also include a 'name' key). This will get used if you have two child
<del> * components of the same type that need different options.
<del> * ```js
<del> * // MyComponent is from the above example
<del> * var myComp = new MyComponent(player, {
<del> * children: ['button', {
<del> * name: 'button',
<del> * someOtherOption: true
<del> * }, {
<del> * name: 'button',
<del> * someOtherOption: false
<del> * }]
<del> * });
<del> * ```
<ide> */
<ide> initChildren() {
<ide> const children = this.options_.children;
<ide> class Component {
<ide> /**
<ide> * Add an `event listener` to this `Component`s element.
<ide> *
<del> * ```js
<del> * var player = videojs('some-player-id');
<del> * var Component = videojs.getComponent('Component');
<del> * var myComponent = new Component(player);
<del> * var myFunc = function() {
<del> * var myComponent = this;
<del> * console.log('myFunc called');
<del> * };
<del> *
<del> * myComponent.on('eventType', myFunc);
<del> * myComponent.trigger('eventType');
<del> * // logs 'myFunc called'
<del> * ```
<del> *
<del> * The context of `myFunc` will be `myComponent` unless it is bound. You can add
<del> * a listener to another element or component.
<del> * ```js
<del> * var otherComponent = new Component(player);
<del> *
<del> * // myComponent/myFunc is from the above example
<del> * myComponent.on(otherComponent.el(), 'eventName', myFunc);
<del> * myComponent.on(otherComponent, 'eventName', myFunc);
<del> *
<del> * otherComponent.trigger('eventName');
<del> * // logs 'myFunc called' twice
<del> * ```
<del> *
<ide> * The benefit of using this over the following:
<ide> * - `VjsEvents.on(otherElement, 'eventName', myFunc)`
<ide> * - `otherComponent.on('eventName', myFunc)`
<del> * Is that the listeners will get cleaned up when either component gets disposed.
<del> * It will also bind `myComponent` as the context of `myFunc`.
<del> * > NOTE: If you remove the element from the DOM that has used `on` you need to
<del> * clean up references using:
<ide> *
<del> * `myComponent.trigger(el, 'dispose')`
<del> *
<del> * This will also allow the browser to garbage collect it. In special
<del> * cases such as with `window` and `document`, which are both permanent,
<del> * this is not necessary.
<add> * 1. Is that the listeners will get cleaned up when either component gets disposed.
<add> * 1. It will also bind `myComponent` as the context of `myFunc`.
<add> * > NOTE: If you remove the element from the DOM that has used `on` you need to
<add> * clean up references using: `myComponent.trigger(el, 'dispose')`
<add> * This will also allow the browser to garbage collect it. In special
<add> * cases such as with `window` and `document`, which are both permanent,
<add> * this is not necessary.
<ide> *
<ide> * @param {string|Component|string[]} [first]
<ide> * The event name, and array of event names, or another `Component`.
<ide> class Component {
<ide> }
<ide>
<ide> /**
<del> * Remove an event listener from this `Component`s element.
<del> * ```js
<del> * var player = videojs('some-player-id');
<del> * var Component = videojs.getComponent('Component');
<del> * var myComponent = new Component(player);
<del> * var myFunc = function() {
<del> * var myComponent = this;
<del> * console.log('myFunc called');
<del> * };
<del> * myComponent.on('eventType', myFunc);
<del> * myComponent.trigger('eventType');
<del> * // logs 'myFunc called'
<del> *
<del> * myComponent.off('eventType', myFunc);
<del> * myComponent.trigger('eventType');
<del> * // does nothing
<del> * ```
<del> *
<del> * If myFunc gets excluded, ALL listeners for the event type will get removed. If
<del> * eventType gets excluded, ALL listeners will get removed from the component.
<del> * You can use `off` to remove listeners that get added to other elements or
<del> * components using:
<del> *
<del> * `myComponent.on(otherComponent...`
<del> *
<del> * In this case both the event type and listener function are **REQUIRED**.
<del> *
<del> * ```js
<del> * var otherComponent = new Component(player);
<del> *
<del> * // myComponent/myFunc is from the above example
<del> * myComponent.on(otherComponent.el(), 'eventName', myFunc);
<del> * myComponent.on(otherComponent, 'eventName', myFunc);
<del> *
<del> * otherComponent.trigger('eventName');
<del> * // logs 'myFunc called' twice
<del> * myComponent.off(ootherComponent.el(), 'eventName', myFunc);
<del> * myComponent.off(otherComponent, 'eventName', myFunc);
<del> * otherComponent.trigger('eventName');
<del> * // does nothing
<del> * ```
<add> * Remove an event listener from this `Component`s element. If the second argument is
<add> * exluded all listeners for the type passed in as the first argument will be removed.
<ide> *
<ide> * @param {string|Component|string[]} [first]
<ide> * The event name, and array of event names, or another `Component`.
<ide> class Component {
<ide>
<ide> /**
<ide> * Add an event listener that gets triggered only once and then gets removed.
<del> * ```js
<del> * var player = videojs('some-player-id');
<del> * var Component = videojs.getComponent('Component');
<del> * var myComponent = new Component(player);
<del> * var myFunc = function() {
<del> * var myComponent = this;
<del> * console.log('myFunc called');
<del> * };
<del> * myComponent.one('eventName', myFunc);
<del> * myComponent.trigger('eventName');
<del> * // logs 'myFunc called'
<del> *
<del> * myComponent.trigger('eventName');
<del> * // does nothing
<del> *
<del> * ```
<del> *
<del> * You can also add a listener to another element or component that will get
<del> * triggered only once.
<del> * ```js
<del> * var otherComponent = new Component(player);
<del> *
<del> * // myComponent/myFunc is from the above example
<del> * myComponent.one(otherComponent.el(), 'eventName', myFunc);
<del> * myComponent.one(otherComponent, 'eventName', myFunc);
<del> *
<del> * otherComponent.trigger('eventName');
<del> * // logs 'myFunc called' twice
<del> *
<del> * otherComponent.trigger('eventName');
<del> * // does nothing
<del> * ```
<ide> *
<ide> * @param {string|Component|string[]} [first]
<ide> * The event name, and array of event names, or another `Component`.
<ide> class Component {
<ide> /**
<ide> * Trigger an event on an element.
<ide> *
<del> * ```js
<del> * var player = videojs('some-player-id');
<del> * var Component = videojs.getComponent('Component');
<del> * var myComponent = new Component(player);
<del> * var myFunc = function(data) {
<del> * var myComponent = this;
<del> * console.log('myFunc called');
<del> * console.log(data);
<del> * };
<del> * myComponent.one('eventName', myFunc);
<del> * myComponent.trigger('eventName');
<del> * // logs 'myFunc called' and 'undefined'
<del> *
<del> * myComponent.trigger({'type':'eventName'});
<del> * // logs 'myFunc called' and 'undefined'
<del> *
<del> * myComponent.trigger('eventName', {data: 'some data'});
<del> * // logs 'myFunc called' and "{data: 'some data'}"
<del> *
<del> * myComponent.trigger({'type':'eventName'}, {data: 'some data'});
<del> * // logs 'myFunc called' and "{data: 'some data'}"
<del> * ```
<del> *
<ide> * @param {EventTarget~Event|Object|string} event
<ide> * The event name, and Event, or an event-like object with a type attribute
<ide> * set to the event name.
<ide><path>src/js/control-bar/progress-control/seek-bar.js
<ide> class SeekBar extends Slider {
<ide> /**
<ide> * Get percentage of video played
<ide> *
<del>
<del> * @return {Number} Percentage played
<add> * @return {number}
<add> * The percentage played
<ide> */
<ide> getPercent() {
<ide> const percent = this.player_.currentTime() / this.player_.duration();
<ide><path>src/js/control-bar/volume-menu-button.js
<ide> class VolumeMenuButton extends PopupButton {
<ide>
<ide> /**
<ide> * Create the VolumeMenuButton popup
<add> *
<add> * @return {Popup}
<add> * The popup that was created
<ide> */
<ide> createPopup() {
<ide> const popup = new Popup(this.player_, {
<ide><path>src/js/event-target.js
<ide> EventTarget.prototype.allowedEvents_ = {};
<ide> * Adds an `event listener` to an instance of an `EventTarget`. An `event listener` is a
<ide> * function that will get called when an event with a certain name gets triggered.
<ide> *
<del> * ```js
<del> * var foo = new EventTarget();
<del> * var handleBar = function() {
<del> * console.log('bar was triggered');
<del> * };
<del> *
<del> * foo.on('bar', handleBar);
<del> *
<del> * // This causes any `event listeners` for the `bar` event to get called
<del> * // see {@link EventTarget#trigger} for more information
<del> * foo.trigger('bar');
<del> * // logs 'bar was triggered'
<del> * ```
<del> *
<ide> * @param {string|string[]} type
<ide> * An event name or an array of event names.
<ide> *
<ide> EventTarget.prototype.addEventListener = EventTarget.prototype.on;
<ide> * This makes it so that the `event listener` will no longer get called when the
<ide> * named event happens.
<ide> *
<del> * ```js
<del> * var foo = new EventTarget();
<del> * var handleBar = function() {
<del> * console.log('bar was triggered');
<del> * };
<del> *
<del> * // adds an `event listener` for the `bar` event
<del> * // see {@link EventTarget#on} for more info
<del> * foo.on('bar', handleBar);
<del> *
<del> * // runs all `event listeners` for the `bar` event
<del> * // see {@link EventTarget#trigger} for more info
<del> * foo.trigger('bar');
<del> * // logs 'bar was triggered'
<del> *
<del> * foo.off('bar', handleBar);
<del> * foo.trigger('bar');
<del> * // does nothing
<del> * ```
<del> *
<ide> * @param {string|string[]} type
<ide> * An event name or an array of event names.
<ide> *
<ide> EventTarget.prototype.removeEventListener = EventTarget.prototype.off;
<ide> * first trigger it will get removed. This is like adding an `event listener`
<ide> * with {@link EventTarget#on} that calls {@link EventTarget#off} on itself.
<ide> *
<del> * Using {@link EventTarget#on} and {@link EventTarget#off} to mimic {@link EventTarget#one}
<del> * ```js
<del> * var foo = new EventTarget();
<del> * var handleBar = function() {
<del> * console.log('bar was triggered');
<del> * // after the first trigger remove this handler
<del> * foo.off('bar', handleBar);
<del> * };
<del> *
<del> * foo.on('bar', handleBar);
<del> * foo.trigger('bar');
<del> * // logs 'bar was triggered'
<del> *
<del> * foo.trigger('bar');
<del> * // does nothing
<del> * ```
<del> *
<del> * Using {@link EventTarget#one}
<del> * ```js
<del> * var foo = new EventTarget();
<del> * var handleBar = function() {
<del> * console.log('bar was triggered');
<del> * };
<del> *
<del> * // removed after the first trigger
<del> * foo.one('bar', handleBar);
<del> * foo.trigger('bar');
<del> * // logs 'bar was triggered'
<del> *
<del> * foo.trigger('bar');
<del> * // does nothing
<del> * ```
<del> *
<ide> * @param {string|string[]} type
<ide> * An event name or an array of event names.
<ide> *
<ide> EventTarget.prototype.one = function(type, fn) {
<ide> * 'click' is in `EventTarget.allowedEvents_`, so, trigger will attempt to call
<ide> * `onClick` if it exists.
<ide> *
<del> * ```js
<del> * var foo = new EventTarget();
<del> * var handleBar = function() {
<del> * console.log('bar was triggered');
<del> * };
<del> *
<del> * foo.on('bar', handleBar);
<del> * foo.trigger('bar');
<del> * // logs 'bar was triggered'
<del> *
<del> * foo.trigger('bar');
<del> * // logs 'bar was triggered'
<del> *
<del> * foo.trigger('foo');
<del> * // does nothing
<del> * ```
<del> *
<ide> * @param {string|EventTarget~Event|Object} event
<ide> * The name of the event, an `Event`, or an object with a key of type set to
<ide> * an event name.
<ide><path>src/js/extend.js
<ide> import log from './utils/log';
<ide> import {isObject} from './utils/obj';
<ide>
<del>/*
<add>/**
<ide> * @file extend.js
<del> *
<add> * @module extend
<add> */
<add>
<add>/**
<ide> * A combination of node inherits and babel's inherits (after transpile).
<ide> * Both work the same but node adds `super_` to the subClass
<ide> * and Bable adds the superClass as __proto__. Both seem useful.
<add> *
<add> * @param {Object} subClass
<add> * The class to inherit to
<add> *
<add> * @param {Object} superClass
<add> * The class to inherit from
<add> *
<add> * @private
<ide> */
<ide> const _inherits = function(subClass, superClass) {
<ide> if (typeof superClass !== 'function' && superClass !== null) {
<ide> const _inherits = function(subClass, superClass) {
<ide> }
<ide> };
<ide>
<del>/*
<add>/**
<ide> * Function for subclassing using the same inheritance that
<ide> * videojs uses internally
<del> * ```js
<del> * var Button = videojs.getComponent('Button');
<del> * ```
<del> * ```js
<del> * var MyButton = videojs.extend(Button, {
<del> * constructor: function(player, options) {
<del> * Button.call(this, player, options);
<del> * },
<del> * onClick: function() {
<del> * // doSomething
<del> * }
<del> * });
<del> * ```
<add> *
<add> * @param {Object} superClass
<add> * The class to inherit from
<add> *
<add> * @param {Object} [subClassMethods={}]
<add> * The class to inherit to
<add> *
<add> * @return {Object}
<add> * The new object with subClassMethods that inherited superClass.
<ide> */
<ide> const extendFn = function(superClass, subClassMethods = {}) {
<ide> let subClass = function() {
<ide><path>src/js/player.js
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `progress` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechProgress_
<add> * @method Player#handleTechProgress_
<ide> * @fires Player#progress
<ide> * @listens Tech#progress
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `abort` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechAbort_
<add> * @method Player#handleTechAbort_
<ide> * @fires Player#abort
<ide> * @listens Tech#abort
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `suspend` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechSuspend_
<add> * @method Player#handleTechSuspend_
<ide> * @fires Player#suspend
<ide> * @listens Tech#suspend
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `emptied` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechEmptied_
<add> * @method Player#handleTechEmptied_
<ide> * @fires Player#emptied
<ide> * @listens Tech#emptied
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `stalled` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechStalled_
<add> * @method Player#handleTechStalled_
<ide> * @fires Player#stalled
<ide> * @listens Tech#stalled
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `stalled` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechLoadedmetadata_
<add> * @method Player#handleTechLoadedmetadata_
<ide> * @fires Player#loadedmetadata
<ide> * @listens Tech#loadedmetadata
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `loadeddata` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechLoaddeddata_
<add> * @method Player#handleTechLoaddeddata_
<ide> * @fires Player#loadeddata
<ide> * @listens Tech#loadeddata
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `timeupdate` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechTimeUpdate_
<add> * @method Player#handleTechTimeUpdate_
<ide> * @fires Player#timeupdate
<ide> * @listens Tech#timeupdate
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `ratechange` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechRatechange_
<add> * @method Player#handleTechRatechange_
<ide> * @fires Player#ratechange
<ide> * @listens Tech#ratechange
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `volumechange` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechVolumechange_
<add> * @method Player#handleTechVolumechange_
<ide> * @fires Player#volumechange
<ide> * @listens Tech#volumechange
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> * Retrigger the `texttrackchange` event that was triggered by the {@link Tech}.
<ide> *
<ide> * @private
<del> * @method Player.prototype.handleTechTexttrackchange_
<add> * @method Player#handleTechTexttrackchange_
<ide> * @fires Player#texttrackchange
<ide> * @listens Tech#texttrackchange
<ide> */
<ide> const TECH_EVENTS_RETRIGGER = [
<ide> /**
<ide> * An instance of the `Player` class is created when any of the Video.js setup methods
<ide> * are used to initialize a video.
<del> * ```js
<del> * var myPlayer = videojs('example_video_1');
<del> * ```
<del> *
<del> * In the following example, the `data-setup` attribute tells the Video.js library to
<del> * create a player instance when the library is ready.
<del> * ```html
<del> * <video id="example_video_1" data-setup='{}' controls>
<del> * <source src="my-source.mp4" type="video/mp4">
<del> * </video>
<del> * ```
<ide> *
<ide> * After an instance has been created it can be accessed globally in two ways:
<ide> * 1. By calling `videojs('example_video_1');`
<ide> class Player extends Component {
<ide> /**
<ide> * Destroys the video player and does any necessary cleanup.
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * myPlayer.dispose();
<del> * });
<del> * ```
<ide> * This is especially helpful if you are dynamically adding and removing videos
<ide> * to/from the DOM.
<ide> *
<ide> class Player extends Component {
<ide> * `IWillNotUseThisInPlugins` property having a true value. This is try and prevent misuse
<ide> * of techs by plugins.
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * // function call throws an error if we
<del> * // dont add {IWillNotUseThisInPlugins: true}
<del> * var tech = myPlayer.tech({IWillNotUseThisInPlugins: true});
<del> * });
<del> * ```
<del> *
<ide> * @param {Object} safety
<ide> * An object that must contain `{IWillNotUseThisInPlugins: true}`
<ide> *
<ide> class Player extends Component {
<ide>
<ide> /**
<ide> * start media playback
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * myPlayer.play();
<del> * });
<del> * ```
<ide> *
<ide> * @return {Player}
<ide> * A reference to the player object this function was called on
<ide> class Player extends Component {
<ide> /**
<ide> * Pause the video playback
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * myPlayer.play();
<del> * myPlayer.pause();
<del> * });
<del> * ```
<del> *
<ide> * @return {Player}
<ide> * A reference to the player object this function was called on
<ide> */
<ide> class Player extends Component {
<ide> /**
<ide> * Check if the player is paused or has yet to play
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> *
<del> * myPlayer.ready(function() {
<del> * // true
<del> * console.log(myPlayer.paused());
<del> * // false
<del> * console.log(!myPlayer.paused());
<del> *
<del> * myPlayer.play();
<del> * // false
<del> * console.log(myPlayer.paused());
<del> * // true
<del> * console.log(!myPlayer.paused());
<del> *
<del> * myPlayer.pause();
<del> * // true
<del> * console.log(myPlayer.paused());
<del> * // false
<del> * console.log(!myPlayer.paused());
<del> * });
<del> *
<del> * ```
<del> *
<ide> * @return {boolean}
<ide> * - false: if the media is currently playing
<ide> * - true: if media is not currently playing
<ide> class Player extends Component {
<ide> /**
<ide> * Get or set the current time (in seconds)
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * // set current time to 2 minutes into the video
<del> * myPlayer.currentTime(120);
<del> *
<del> * // get the current time, should be 120 seconds
<del> * var whereYouAt = myPlayer.currentTime();
<del> * });
<del> * ```
<del> *
<ide> * @param {number|string} [seconds]
<ide> * The time to seek to in seconds
<ide> *
<ide> class Player extends Component {
<ide> * Normally gets the length in time of the video in seconds;
<ide> * in all but the rarest use cases an argument will NOT be passed to the method
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * var lengthOfVideo = myPlayer.duration();
<del> * });
<del> * ```
<ide> * > **NOTE**: The video must have started loading before the duration can be
<ide> * known, and in the case of Flash, may not be known until the video starts
<ide> * playing.
<ide> class Player extends Component {
<ide> * Calculates how much time is left in the video. Not part
<ide> * of the native video API.
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * myPlayer.currentTime(10);
<del> *
<del> * // should be 10 seconds less than duration
<del> * console.log(myPlayer.remainingTime());
<del> * });
<del> * ```
<del> *
<ide> * @return {number}
<ide> * The time remaining in seconds
<ide> */
<ide> class Player extends Component {
<ide> * that have been downloaded. If you just want the percent of the
<ide> * video that's been downloaded, use bufferedPercent.
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * var bufferedTimeRange = myPlayer.buffered();
<del> *
<del> * // number of different ranges of time have been buffered.
<del> * // Usually 1
<del> * var numberOfRanges = bufferedTimeRange.length,
<del> *
<del> * // Time in seconds when the first range starts.
<del> * // Usually 0
<del> * var firstRangeStart = bufferedTimeRange.start(0),
<del> *
<del> * // Time in seconds when the first range ends
<del> * var firstRangeEnd = bufferedTimeRange.end(0),
<del> *
<del> * // Length in seconds of the first time range
<del> * var firstRangeLength = firstRangeEnd - firstRangeStart;
<del> * });
<del> * ```
<del> *
<ide> * @see [Buffered Spec]{@link http://dev.w3.org/html5/spec/video.html#dom-media-buffered}
<ide> *
<ide> * @return {TimeRange}
<ide> class Player extends Component {
<ide> * Get the percent (as a decimal) of the video that's been downloaded.
<ide> * This method is not a part of the native HTML video API.
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * // example 0.11 aka 11%
<del> * var howMuchIsDownloaded = myPlayer.bufferedPercent();
<del> * });
<del> * ```
<del> *
<ide> * @return {number}
<ide> * A decimal between 0 and 1 representing the percent
<ide> * that is bufferred 0 being 0% and 1 being 100%
<ide> class Player extends Component {
<ide> /**
<ide> * Get or set the current volume of the media
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * // get
<del> * var howLoudIsIt = myPlayer.volume();
<del> * // set
<del> * myPlayer.volume(0.5); // Set volume to half
<del> * });
<del> * ```
<del> *
<ide> * @param {number} [percentAsDecimal]
<ide> * The new volume as a decimal percent:
<ide> * - 0 is muted/0%/off
<ide> class Player extends Component {
<ide>
<ide> /**
<ide> * Get the current muted state, or turn mute on or off
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * // get, should be false
<del> * console.log(myPlayer.muted());
<del> * // set to true
<del> * myPlayer.muted(true);
<del> * // get should be true
<del> * console.log(myPlayer.muted());
<del> * });
<del> * ```
<ide> *
<ide> * @param {boolean} [muted]
<ide> * - true to mute
<ide> class Player extends Component {
<ide> * Check if the player is in fullscreen mode or tell the player that it
<ide> * is or is not in fullscreen mode.
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * // get, should be false
<del> * console.log(myPlayer.isFullscreen());
<del> *
<del> * // set, tell the player it's in fullscreen
<del> * myPlayer.isFullscreen(true);
<del> *
<del> * // get, should be true
<del> * console.log(myPlayer.isFullscreen());
<del> * });
<del> * ```
<ide> * > NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official
<ide> * property and instead document.fullscreenElement is used. But isFullscreen is
<ide> * still a valuable property for internal player workings.
<ide> class Player extends Component {
<ide>
<ide> /**
<ide> * Increase the size of the video to full screen
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * myPlayer.requestFullscreen();
<del> * });
<del> * ```
<ide> * In some browsers, full screen is not supported natively, so it enters
<ide> * "full window mode", where the video fills the browser window.
<ide> * In browsers and devices that support native full screen, sometimes the
<ide> class Player extends Component {
<ide> /**
<ide> * Return the video to its normal size after having been in full screen mode
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * myPlayer.ready(function() {
<del> * myPlayer.requestFullscreen();
<del> * myPlayer.exitFullscreen();
<del> * });
<del> * ```
<del> *
<ide> * @fires Player#fullscreenchange
<ide> *
<ide> * @return {Player}
<ide> class Player extends Component {
<ide> * the current playback technology (HTML5/Flash) can support the source you
<ide> * provide. Currently only MP4 files can be used in both HTML5 and Flash.
<ide> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src("http://www.example.com/path/to/video.mp4");
<del> * ```
<del> *
<del> * **Source Object (or element):* * A javascript object containing information
<del> * about the source file. Use this method if you want the player to determine if
<del> * it can support the file using the type information.
<del> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src({type: "video/mp4", src: "http://www.example.com/path/to/video.mp4"});
<del> * ```
<del> *
<del> * **Array of Source Objects:* * To provide multiple versions of the source so
<del> * that it can be played using HTML5 across browsers you can use an array of
<del> * source objects. Video.js will detect which version is supported and load that
<del> * file.
<del> *
<del> * ```js
<del> * var myPlayer = videojs('some-player-id');
<del> *
<del> * myPlayer.src([
<del> * {type: "video/mp4", src: "http://www.example.com/path/to/video.mp4"},
<del> * {type: "video/webm", src: "http://www.example.com/path/to/video.webm"},
<del> * {type: "video/ogg", src: "http://www.example.com/path/to/video.ogv"}
<del> * ]);
<del> * ```
<del> *
<ide> * @param {Tech~SourceObject|Tech~SourceObject[]} [source]
<ide> * One SourceObject or an array of SourceObjects
<ide> *
<ide> class Player extends Component {
<ide> /**
<ide> * Get or set the poster image source url
<ide> *
<del> * EXAMPLE
<del> * ```js
<del> * var myPlayer = videojs('example_video_1');
<del> *
<del> * // set
<del> * myPlayer.poster('http://example.com/myImage.jpg');
<del> *
<del> * // get
<del> * console.log(myPlayer.poster());
<del> * // 'http://example.com/myImage.jpg'
<del> * ```
<del> *
<ide> * @fires Player#posterchange
<ide> *
<ide> * @param {string} [src]
<ide> Player.prototype.options_ = {
<ide> * Returns whether or not the player is in the "ended" state.
<ide> *
<ide> * @return {Boolean} True if the player is in the ended state, false if not.
<del> * @method Player.prototype.ended
<add> * @method Player#ended
<ide> */
<ide> 'ended',
<ide> /**
<ide> * Returns whether or not the player is in the "seeking" state.
<ide> *
<ide> * @return {Boolean} True if the player is in the seeking state, false if not.
<del> * @method Player.prototype.seeking
<add> * @method Player#seeking
<ide> */
<ide> 'seeking',
<ide> /**
<ide> * Returns the TimeRanges of the media that are currently available
<ide> * for seeking to.
<ide> *
<ide> * @return {TimeRanges} the seekable intervals of the media timeline
<del> * @method Player.prototype.seekable
<add> * @method Player#seekable
<ide> */
<ide> 'seekable',
<ide> /**
<ide> Player.prototype.options_ = {
<ide> *
<ide> * @see https://html.spec.whatwg.org/multipage/embedded-content.html#network-states
<ide> * @return {number} the current network activity state
<del> * @method Player.prototype.networkState
<add> * @method Player#networkState
<ide> */
<ide> 'networkState',
<ide> /**
<ide> Player.prototype.options_ = {
<ide> *
<ide> * @see https://html.spec.whatwg.org/multipage/embedded-content.html#dom-media-readystate
<ide> * @return {number} the current playback rendering state
<del> * @method Player.prototype.readyState
<add> * @method Player#readyState
<ide> */
<ide> 'readyState'
<ide> ].forEach(function(fn) {
<ide><path>src/js/plugins.js
<ide> */
<ide> import Player from './player.js';
<ide>
<del>/**
<del> *
<del> */
<ide> /**
<ide> * The method for registering a video.js plugin. {@link videojs:videojs.registerPlugin].
<ide> *
<ide><path>src/js/poster-image.js
<ide> class PosterImage extends ClickableComponent {
<ide> /**
<ide> * Set the source of the `PosterImage` depending on the display method.
<ide> *
<del> * @param {String} url
<add> * @param {string} url
<ide> * The URL to the source for the `PosterImage`.
<ide> */
<ide> setSrc(url) {
<ide><path>src/js/setup.js
<ide> /**
<del> * Functions for setting up a player without user insteraction based on the data-setup
<del> * `attribute` of the video tag.
<add> * @file setup.js - Functions for setting up a player without
<add> * user interaction based on the data-setup `attribute` of the video tag.
<ide> *
<del> * @file setup.js
<ide> * @module setup
<ide> */
<ide> import * as Events from './utils/events.js';
<ide> const autoSetup = function() {
<ide> /**
<ide> * Wait until the page is loaded before running autoSetup. This will be called in
<ide> * autoSetup if `hasLoaded` returns false.
<add> *
<add> * @param {number} wait
<add> * How long to wait in ms
<add> *
<add> * @param {videojs} [vjs]
<add> * The videojs library function
<ide> */
<ide> function autoSetupTimeout(wait, vjs) {
<ide> if (vjs) {
<ide><path>src/js/tech/flash-rtmp.js
<ide> function FlashRtmpDecorator(Flash) {
<ide> /**
<ide> * Regular expression used to check if the source is an rtmp source.
<ide> *
<del> * @property
<del> * @type {RegExp}
<add> * @property {RegExp} Flash.RTMP_RE
<ide> */
<ide> Flash.RTMP_RE = /^rtmp[set]?:\/\//i;
<ide>
<ide><path>src/js/tech/flash.js
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> /**
<ide> * Get the value of `rtmpConnection` from the swf.
<ide> *
<del> * @method Flash.prototype.rtmpConnection
<add> * @method Flash#rtmpConnection
<ide> * @return {string}
<ide> * The current value of `rtmpConnection` on the swf.
<ide> */
<ide>
<ide> /**
<ide> * Get the value of `rtmpStream` from the swf.
<ide> *
<del> * @method Flash.prototype.rtmpStream
<add> * @method Flash#rtmpStream
<ide> * @return {string}
<ide> * The current value of `rtmpStream` on the swf.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * - auto: allow the media and metadata for the media to be downloaded before
<ide> * interaction
<ide> *
<del> * @method Flash.prototype.preload
<add> * @method Flash#preload
<ide> * @return {string}
<ide> * The value of `preload` from the swf. Will be 'none', 'metadata',
<ide> * or 'auto'.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> /**
<ide> * Get the value of `defaultPlaybackRate` from the swf.
<ide> *
<del> * @method Flash.prototype.defaultPlaybackRate
<add> * @method Flash#defaultPlaybackRate
<ide> * @return {number}
<ide> * The current value of `defaultPlaybackRate` on the swf.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * - if playbackRate is set to 2, media will play twice as fast.
<ide> * - if playbackRate is set to 0.5, media will play half as fast.
<ide> *
<del> * @method Flash.prototype.playbackRate
<add> * @method Flash#playbackRate
<ide> * @return {number}
<ide> * The value of `playbackRate` from the swf. A number indicating
<ide> * the current playback speed of the media, where 1 is normal speed.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * Get the value of `autoplay` from the swf. `autoplay` indicates
<ide> * that the media should start to play as soon as the page is ready.
<ide> *
<del> * @method Flash.prototype.autoplay
<add> * @method Flash#autoplay
<ide> * @return {boolean}
<ide> * - The value of `autoplay` from the swf.
<ide> * - True indicates that the media ashould start as soon as the page loads.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * that the media should return to the start of the media and continue playing once
<ide> * it reaches the end.
<ide> *
<del> * @method Flash.prototype.loop
<add> * @method Flash#loop
<ide> * @return {boolean}
<ide> * - The value of `loop` from the swf.
<ide> * - True indicates that playback should seek back to start once
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> /**
<ide> * Get the value of `mediaGroup` from the swf.
<ide> *
<del> * @method Flash.prototype.mediaGroup
<add> * @method Flash#mediaGroup
<ide> * @return {string}
<ide> * The current value of `mediaGroup` on the swf.
<ide> */
<ide>
<ide> /**
<ide> * Get the value of `controller` from the swf.
<ide> *
<del> * @method Flash.prototype.controller
<add> * @method Flash#controller
<ide> * @return {string}
<ide> * The current value of `controller` on the swf.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * Get the value of `controls` from the swf. `controls` indicates
<ide> * whether the native flash controls should be shown or hidden.
<ide> *
<del> * @method Html5.prototype.controls
<add> * @method Flash#controls
<ide> * @return {boolean}
<ide> * - The value of `controls` from the swf.
<ide> * - True indicates that native controls should be showing.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and
<ide> * so on.
<ide> *
<del> * @method Flash.prototype.volume
<add> * @method Flash#volume
<ide> * @return {number}
<ide> * The volume percent as a decimal. Value will be between 0-1.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * Get the value of the `muted` from the swf. `muted` indicates the current
<ide> * audio level should be silent.
<ide> *
<del> * @method Flash.prototype.muted
<add> * @method Flash#muted
<ide> * @return {boolean}
<ide> * - True if the audio should be set to silent
<ide> * - False otherwise
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * media. `muted` and `defaultMuted` can have different values. `muted` indicates the
<ide> * current state.
<ide> *
<del> * @method Flash.prototype.defaultMuted
<add> * @method Flash#defaultMuted
<ide> * @return {boolean}
<ide> * - The value of `defaultMuted` from the swf.
<ide> * - True indicates that the media should start muted.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * - 2: NETWORK_LOADING
<ide> * - 3: NETWORK_NO_SOURCE
<ide> *
<del> * @method Flash.prototype.networkState
<add> * @method Flash#networkState
<ide> * @return {number}
<ide> * The value of `networkState` from the swf. This will be a number
<ide> * from the list in the description.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * - 3: HAVE_FUTURE_DATA
<ide> * - 4: HAVE_ENOUGH_DATA
<ide> *
<del> * @method Flash.prototype.readyState
<add> * @method Flash#readyState
<ide> * @return {number}
<ide> * The value of `readyState` from the swf. This will be a number
<ide> * from the list in the description.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * - 3: HAVE_FUTURE_DATA
<ide> * - 4: HAVE_ENOUGH_DATA
<ide> *
<del> * @method Flash.prototype.readyState
<add> * @method Flash#readyState
<ide> * @return {number}
<ide> * The value of `readyState` from the swf. This will be a number
<ide> * from the list in the description.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> /**
<ide> * Get the value of `initialTime` from the swf.
<ide> *
<del> * @method Flash.prototype.initialTime
<add> * @method Flash#initialTime
<ide> * @return {number}
<ide> * The `initialTime` proprety on the swf.
<ide> */
<ide>
<ide> /**
<ide> * Get the value of `startOffsetTime` from the swf.
<ide> *
<del> * @method Flash.prototype.startOffsetTime
<add> * @method Flash#startOffsetTime
<ide> * @return {number}
<ide> * The `startOffsetTime` proprety on the swf.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * Get the value of `paused` from the swf. `paused` indicates whether the swf
<ide> * is current paused or not.
<ide> *
<del> * @method Flash.prototype.paused
<add> * @method Flash#paused
<ide> * @return {boolean}
<ide> * The value of `paused` from the swf.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * Get the value of `ended` from the swf. `ended` indicates whether
<ide> * the media has reached the end or not.
<ide> *
<del> * @method Flash.prototype.ended
<add> * @method Flash#ended
<ide> * @return {boolean}
<ide> * - True indicates that the media has ended.
<ide> * - False indicates that the media has not ended.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * Get the value of `videoWidth` from the swf. `videoWidth` indicates
<ide> * the current width of the media in css pixels.
<ide> *
<del> * @method Flash.prototype.videoWidth
<add> * @method Flash#videoWidth
<ide> * @return {number}
<ide> * The value of `videoWidth` from the swf. This will be a number
<ide> * in css pixels.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> /**
<ide> * Set the value of `rtmpConnection` on the swf.
<ide> *
<del> * @method Flash.prototype.setRtmpConnection
<add> * @method Flash#setRtmpConnection
<ide> * @param {string} rtmpConnection
<ide> * New value to set the `rtmpConnection` property to.
<ide> */
<ide>
<ide> /**
<ide> * Set the value of `rtmpStream` on the swf.
<ide> *
<del> * @method Flash.prototype.setRtmpStream
<add> * @method Flash#setRtmpStream
<ide> * @param {string} rtmpStream
<ide> * New value to set the `rtmpStream` property to.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * - auto: allow the media and metadata for the media to be downloaded before
<ide> * interaction
<ide> *
<del> * @method Flash.prototype.setPreload
<add> * @method Flash#setPreload
<ide> * @param {string} preload
<ide> * The value of `preload` to set on the swf. Should be 'none', 'metadata',
<ide> * or 'auto'.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> /**
<ide> * Set the value of `defaultPlaybackRate` on the swf.
<ide> *
<del> * @method Flash.prototype.setDefaultPlaybackRate
<add> * @method Flash#setDefaultPlaybackRate
<ide> * @param {number} defaultPlaybackRate
<ide> * New value to set the `defaultPlaybackRate` property to.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * - if playbackRate is set to 2, media will play twice as fast.
<ide> * - if playbackRate is set to 0.5, media will play half as fast.
<ide> *
<del> * @method Flash.prototype.setPlaybackRate
<add> * @method Flash#setPlaybackRate
<ide> * @param {number} playbackRate
<ide> * New value of `playbackRate` on the swf. A number indicating
<ide> * the current playback speed of the media, where 1 is normal speed.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * Set the value of `autoplay` on the swf. `autoplay` indicates
<ide> * that the media should start to play as soon as the page is ready.
<ide> *
<del> * @method Flash.prototype.setAutoplay
<add> * @method Flash#setAutoplay
<ide> * @param {boolean} autoplay
<ide> * - The value of `autoplay` from the swf.
<ide> * - True indicates that the media ashould start as soon as the page loads.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * that the media should return to the start of the media and continue playing once
<ide> * it reaches the end.
<ide> *
<del> * @method Flash.prototype.setLoop
<add> * @method Flash#setLoop
<ide> * @param {boolean} loop
<ide> * - True indicates that playback should seek back to start once
<ide> * the end of a media is reached.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> /**
<ide> * Set the value of `mediaGroup` on the swf.
<ide> *
<del> * @method Flash.prototype.setMediaGroup
<add> * @method Flash#setMediaGroup
<ide> * @param {string} mediaGroup
<ide> * New value of `mediaGroup` to set on the swf.
<ide> */
<ide>
<ide> /**
<ide> * Set the value of `controller` on the swf.
<ide> *
<del> * @method Flash.prototype.setController
<add> * @method Flash#setController
<ide> * @param {string} controller
<ide> * New value the current value of `controller` on the swf.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * Get the value of `controls` from the swf. `controls` indicates
<ide> * whether the native flash controls should be shown or hidden.
<ide> *
<del> * @method Flash.prototype.controls
<add> * @method Flash#controls
<ide> * @return {boolean}
<ide> * - The value of `controls` from the swf.
<ide> * - True indicates that native controls should be showing.
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and
<ide> * so on.
<ide> *
<del> * @method Flash.prototype.setVolume
<add> * @method Flash#setVolume
<ide> * @param {number} percentAsDecimal
<ide> * The volume percent as a decimal. Value will be between 0-1.
<ide> */
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * Set the value of the `muted` on the swf. `muted` indicates that the current
<ide> * audio level should be silent.
<ide> *
<del> * @method Flash.prototype.setMuted
<add> * @method Flash#setMuted
<ide> * @param {boolean} muted
<ide> * - True if the audio should be set to silent
<ide> * - False otherwise
<ide> for (let i = 0; i < _readOnly.length; i++) {
<ide> * media. `muted` and `defaultMuted` can have different values. `muted` indicates the
<ide> * current state.
<ide> *
<del> * @method Flash.prototype.setDefaultMuted
<add> * @method Flash#setDefaultMuted
<ide> * @param {boolean} defaultMuted
<ide> * - True indicates that the media should start muted.
<ide> * - False indicates that the media should not start muted.
<ide><path>src/js/tech/html5.js
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `paused` from the media element. `paused` indicates whether the media element
<ide> * is currently paused or not.
<ide> *
<del> * @method Html5.prototype.paused
<add> * @method Html5#paused
<ide> * @return {boolean}
<ide> * The value of `paused` from the media element.
<ide> *
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `currentTime` from the media element. `currentTime` indicates
<ide> * the current second that the media is at in playback.
<ide> *
<del> * @method Html5.prototype.currentTime
<add> * @method Html5#currentTime
<ide> * @return {number}
<ide> * The value of `currentTime` from the media element.
<ide> *
<ide> Html5.resetMediaElement = function(el) {
<ide> * object that represents the parts of the media that are already downloaded and
<ide> * available for playback.
<ide> *
<del> * @method Html5.prototype.buffered
<add> * @method Html5#buffered
<ide> * @return {TimeRange}
<ide> * The value of `buffered` from the media element.
<ide> *
<ide> Html5.resetMediaElement = function(el) {
<ide> * the current playback volume of audio for a media. `volume` will be a value from 0
<ide> * (silent) to 1 (loudest and default).
<ide> *
<del> * @method Html5.prototype.volume
<add> * @method Html5#volume
<ide> * @return {number}
<ide> * The value of `volume` from the media element. Value will be between 0-1.
<ide> *
<ide> Html5.resetMediaElement = function(el) {
<ide> * that the volume for the media should be set to silent. This does not actually change
<ide> * the `volume` attribute.
<ide> *
<del> * @method Html5.prototype.muted
<add> * @method Html5#muted
<ide> * @return {boolean}
<ide> * - True if the value of `volume` should be ignored and the audio set to silent.
<ide> * - False if the value of `volume` should be used.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `poster` from the media element. `poster` indicates
<ide> * that the url of an image file that can/will be shown when no media data is available.
<ide> *
<del> * @method Html5.prototype.poster
<add> * @method Html5#poster
<ide> * @return {string}
<ide> * The value of `poster` from the media element. Value will be a url to an
<ide> * image.
<ide> Html5.resetMediaElement = function(el) {
<ide> * - auto: allow the media and metadata for the media to be downloaded before
<ide> * interaction
<ide> *
<del> * @method Html5.prototype.preload
<add> * @method Html5#preload
<ide> * @return {string}
<ide> * The value of `preload` from the media element. Will be 'none', 'metadata',
<ide> * or 'auto'.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `autoplay` from the media element. `autoplay` indicates
<ide> * that the media should start to play as soon as the page is ready.
<ide> *
<del> * @method Html5.prototype.autoplay
<add> * @method Html5#autoplay
<ide> * @return {boolean}
<ide> * - The value of `autoplay` from the media element.
<ide> * - True indicates that the media should start as soon as the page loads.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `controls` from the media element. `controls` indicates
<ide> * whether the native media controls should be shown or hidden.
<ide> *
<del> * @method Html5.prototype.controls
<add> * @method Html5#controls
<ide> * @return {boolean}
<ide> * - The value of `controls` from the media element.
<ide> * - True indicates that native controls should be showing.
<ide> Html5.resetMediaElement = function(el) {
<ide> * that the media should return to the start of the media and continue playing once
<ide> * it reaches the end.
<ide> *
<del> * @method Html5.prototype.loop
<add> * @method Html5#loop
<ide> * @return {boolean}
<ide> * - The value of `loop` from the media element.
<ide> * - True indicates that playback should seek back to start once
<ide> Html5.resetMediaElement = function(el) {
<ide> * MediaError that may have occured during playback. If error returns null there is no
<ide> * current error.
<ide> *
<del> * @method Html5.prototype.error
<add> * @method Html5#error
<ide> * @return {MediaError|null}
<ide> * The value of `error` from the media element. Will be `MediaError` if there
<ide> * is a current error and null otherwise.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `seeking` from the media element. `seeking` indicates whether the
<ide> * media is currently seeking to a new position or not.
<ide> *
<del> * @method Html5.prototype.seeking
<add> * @method Html5#seeking
<ide> * @return {boolean}
<ide> * - The value of `seeking` from the media element.
<ide> * - True indicates that the media is currently seeking to a new position.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `seekable` from the media element. `seekable` returns a
<ide> * `TimeRange` object indicating ranges of time that can currently be `seeked` to.
<ide> *
<del> * @method Html5.prototype.seekable
<add> * @method Html5#seekable
<ide> * @return {TimeRange}
<ide> * The value of `seekable` from the media element. A `TimeRange` object
<ide> * indicating the current ranges of time that can be seeked to.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `ended` from the media element. `ended` indicates whether
<ide> * the media has reached the end or not.
<ide> *
<del> * @method Html5.prototype.ended
<add> * @method Html5#ended
<ide> * @return {boolean}
<ide> * - The value of `ended` from the media element.
<ide> * - True indicates that the media has ended.
<ide> Html5.resetMediaElement = function(el) {
<ide> * media. `muted` and `defaultMuted` can have different values. `muted` indicates the
<ide> * current state.
<ide> *
<del> * @method Html5.prototype.defaultMuted
<add> * @method Html5#defaultMuted
<ide> * @return {boolean}
<ide> * - The value of `defaultMuted` from the media element.
<ide> * - True indicates that the media should start muted.
<ide> Html5.resetMediaElement = function(el) {
<ide> * - if playbackRate is set to 2, media will play twice as fast.
<ide> * - if playbackRate is set to 0.5, media will play half as fast.
<ide> *
<del> * @method Html5.prototype.playbackRate
<add> * @method Html5#playbackRate
<ide> * @return {number}
<ide> * The value of `playbackRate` from the media element. A number indicating
<ide> * the current playback speed of the media, where 1 is normal speed.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `played` from the media element. `played` returns a `TimeRange`
<ide> * object representing points in the media timeline that have been played.
<ide> *
<del> * @method Html5.prototype.played
<add> * @method Html5#played
<ide> * @return {TimeRange}
<ide> * The value of `played` from the media element. A `TimeRange` object indicating
<ide> * the ranges of time that have been played.
<ide> Html5.resetMediaElement = function(el) {
<ide> * - 2: NETWORK_LOADING
<ide> * - 3: NETWORK_NO_SOURCE
<ide> *
<del> * @method Html5.prototype.networkState
<add> * @method Html5#networkState
<ide> * @return {number}
<ide> * The value of `networkState` from the media element. This will be a number
<ide> * from the list in the description.
<ide> Html5.resetMediaElement = function(el) {
<ide> * - 3: HAVE_FUTURE_DATA
<ide> * - 4: HAVE_ENOUGH_DATA
<ide> *
<del> * @method Html5.prototype.readyState
<add> * @method Html5#readyState
<ide> * @return {number}
<ide> * The value of `readyState` from the media element. This will be a number
<ide> * from the list in the description.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `videoWidth` from the video element. `videoWidth` indicates
<ide> * the current width of the video in css pixels.
<ide> *
<del> * @method Html5.prototype.videoWidth
<add> * @method Html5#videoWidth
<ide> * @return {number}
<ide> * The value of `videoWidth` from the video element. This will be a number
<ide> * in css pixels.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Get the value of `videoHeight` from the video element. `videoHeigth` indicates
<ide> * the current height of the video in css pixels.
<ide> *
<del> * @method Html5.prototype.videoHeight
<add> * @method Html5#videoHeight
<ide> * @return {number}
<ide> * The value of `videoHeight` from the video element. This will be a number
<ide> * in css pixels.
<ide> Html5.resetMediaElement = function(el) {
<ide> * audio level as a percentage in decimal form. This means that 1 is 100%, 0.5 is 50%, and
<ide> * so on.
<ide> *
<del> * @method Html5.prototype.setVolume
<add> * @method Html5#setVolume
<ide> * @param {number} percentAsDecimal
<ide> * The volume percent as a decimal. Valid range is from 0-1.
<ide> *
<ide> Html5.resetMediaElement = function(el) {
<ide> * Set the value of `muted` on the media element. `muted` indicates the current
<ide> * audio level should be silent.
<ide> *
<del> * @method Html5.prototype.setMuted
<add> * @method Html5#setMuted
<ide> * @param {boolean} muted
<ide> * - True if the audio should be set to silent
<ide> * - False otherwise
<ide> Html5.resetMediaElement = function(el) {
<ide> * Set the value of `src` on the media element. `src` indicates the current
<ide> * {@link Tech~SourceObject} for the media.
<ide> *
<del> * @method Html5.prototype.setSrc
<add> * @method Html5#setSrc
<ide> * @param {Tech~SourceObject} src
<ide> * The source object to set as the current source.
<ide> *
<ide> Html5.resetMediaElement = function(el) {
<ide> * Set the value of `poster` on the media element. `poster` is the url to
<ide> * an image file that can/will be shown when no media data is available.
<ide> *
<del> * @method Html5.prototype.setPoster
<add> * @method Html5#setPoster
<ide> * @param {string} poster
<ide> * The url to an image that should be used as the `poster` for the media
<ide> * element.
<ide> Html5.resetMediaElement = function(el) {
<ide> * - auto: allow the media and metadata for the media to be downloaded before
<ide> * interaction
<ide> *
<del> * @method Html5.prototype.setPreload
<add> * @method Html5#setPreload
<ide> * @param {string} preload
<ide> * The value of `preload` to set on the media element. Must be 'none', 'metadata',
<ide> * or 'auto'.
<ide> Html5.resetMediaElement = function(el) {
<ide> * Set the value of `autoplay` on the media element. `autoplay` indicates
<ide> * that the media should start to play as soon as the page is ready.
<ide> *
<del> * @method Html5.prototype.setAutoplay
<add> * @method Html5#setAutoplay
<ide> * @param {boolean} autoplay
<ide> * - True indicates that the media should start as soon as the page loads.
<ide> * - False indicates that the media should not start as soon as the page loads.
<ide> Html5.resetMediaElement = function(el) {
<ide> * that the media should return to the start of the media and continue playing once
<ide> * it reaches the end.
<ide> *
<del> * @method Html5.prototype.setLoop
<add> * @method Html5#setLoop
<ide> * @param {boolean} loop
<ide> * - True indicates that playback should seek back to start once
<ide> * the end of a media is reached.
<ide> Html5.resetMediaElement = function(el) {
<ide> * - if playbackRate is set to 2, media will play twice as fast.
<ide> * - if playbackRate is set to 0.5, media will play half as fast.
<ide> *
<del> * @method Html5.prototype.setPlaybackRate
<add> * @method Html5#setPlaybackRate
<ide> * @return {number}
<ide> * The value of `playbackRate` from the media element. A number indicating
<ide> * the current playback speed of the media, where 1 is normal speed.
<ide> Html5.resetMediaElement = function(el) {
<ide> * A wrapper around the media elements `pause` function. This will call the `HTML5`
<ide> * media elements `pause` function.
<ide> *
<del> * @method Html5.prototype.pause
<add> * @method Html5#pause
<ide> * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-pause}
<ide> */
<ide> 'pause',
<ide> Html5.resetMediaElement = function(el) {
<ide> * A wrapper around the media elements `load` function. This will call the `HTML5`s
<ide> * media element `load` function.
<ide> *
<del> * @method Html5.prototype.load
<add> * @method Html5#load
<ide> * @see [Spec]{@link https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-load}
<ide> */
<ide> 'load'
<ide><path>src/js/tech/tech.js
<ide> import document from 'global/document';
<ide> /**
<ide> * An Object containing a structure like: `{src: 'url', type: 'mimetype'}` or string
<ide> * that just contains the src url alone.
<del> *
<del> * ``` js
<del> * var SourceObject = {
<del> * src: 'http://example.com/some-video.mp4',
<del> * type: 'video/mp4'
<del> * };
<del> * var SourceString = 'http://example.com/some-video.mp4';
<del> * ```
<add> * * `var SourceObject = {src: 'http://ex.com/video.mp4', type: 'video/mp4'};`
<add> * `var SourceString = 'http://example.com/some-video.mp4';`
<ide> *
<ide> * @typedef {Object|string} Tech~SourceObject
<ide> *
<ide> Tech.prototype.featuresNativeTextTracks = false;
<ide> * Source handlers are scripts for handling specific formats.
<ide> * The source handler pattern is used for adaptive formats (HLS, DASH) that
<ide> * manually load video data and feed it into a Source Buffer (Media Source Extensions)
<del> *
<del> * ```js
<del> * Tech.withSourceHandlers.call(MyTech);
<del> * ```
<add> * Example: `Tech.withSourceHandlers.call(MyTech);`
<ide> *
<ide> * @param {Tech} _Tech
<ide> * The tech to add source handler functions to.
<ide><path>src/js/tracks/text-track-list-converter.js
<ide> /**
<del> * Utilities for capturing text track state and re-creating tracks
<del> * based on a capture.
<add> * @file text-track-list-converter.js Utilities for capturing text track state and
<add> * re-creating tracks based on a capture.
<ide> *
<del> * @file text-track-list-converter.js
<ide> * @module text-track-list-converter
<ide> */
<ide>
<ide><path>src/js/tracks/track-list.js
<ide> class TrackList extends EventTarget {
<ide> /**
<ide> * Events that can be called with on + eventName. See {@link EventHandler}.
<ide> *
<del> * @property
<add> * @property {Object} TrackList#allowedEvents_
<ide> * @private
<ide> */
<ide> TrackList.prototype.allowedEvents_ = {
<ide><path>src/js/utils/events.js
<ide> /**
<del> * @file events.js
<del> * @module events
<del> *
<del> * Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)
<add> * @file events.js. An Event System (John Resig - Secrets of a JS Ninja http://jsninja.com/)
<ide> * (Original book version wasn't completely usable, so fixed some things and made Closure Compiler compatible)
<ide> * This should work very similarly to jQuery's events, however it's based off the book version which isn't as
<ide> * robust as jquery's, so there's probably some differences.
<add> *
<add> * @module events
<ide> */
<ide>
<ide> import * as Dom from './dom.js';
<ide><path>src/js/video.js
<ide> if (typeof HTMLVideoElement === 'undefined' &&
<ide> * Doubles as the main function for users to create a player instance and also
<ide> * the main library object.
<ide> * The `videojs` function can be used to initialize or retrieve a player.
<del> * ```js
<del> * var myPlayer = videojs('my_video_id');
<del> * ```
<del> *
<add> *
<ide> * @param {string|Element} id
<ide> * Video element or video element ID
<ide> *
<ide> videojs.VERSION = require('../../package.json').version;
<ide> * The global options object. These are the settings that take effect
<ide> * if no overrides are specified when the player is created.
<ide> *
<del> * ```js
<del> * videojs.options.autoplay = true
<del> * // -> all players will autoplay by default
<del> * ```
<del> *
<ide> * @type {Object}
<ide> */
<ide> videojs.options = Player.prototype.options_;
<ide> videojs.players = Player.players;
<ide>
<ide> /**
<ide> * Get a component class object by name
<del> * ```js
<del> * var VjsButton = videojs.getComponent('Button');
<del> * // Create a new instance of the component
<del> * var myButton = new VjsButton(myPlayer);
<del> * ```
<ide> *
<ide> * @borrows Component.getComponent as videojs.getComponent
<ide> */
<ide> videojs.getComponent = Component.getComponent;
<ide>
<ide> /**
<del> * Register a component so it can referred to by name
<del> * Used when adding to other
<del> * components, either through addChild
<del> * `component.addChild('myComponent')`
<del> * or through default children options
<del> * `{ children: ['myComponent'] }`.
<del> * ```js
<del> * // Get a component to subclass
<del> * var VjsButton = videojs.getComponent('Button');
<del> * // Subclass the component (see 'extend' doc for more info)
<del> * var MySpecialButton = videojs.extend(VjsButton, {});
<del> * // Register the new component
<del> * VjsButton.registerComponent('MySepcialButton', MySepcialButton);
<del> * // (optionally) add the new component as a default player child
<del> * myPlayer.addChild('MySepcialButton');
<del> * ```
<add> * Register a component so it can referred to by name. Used when adding to other
<add> * components, either through addChild `component.addChild('myComponent')` or through
<add> * default children options `{ children: ['myComponent'] }`.
<add> *
<ide> * > NOTE: You could also just initialize the component before adding.
<ide> * `component.addChild(new MyComponent());`
<ide> *
<ide> videojs.registerComponent = (name, comp) => {
<ide>
<ide> /**
<ide> * Get a Tech class object by name
<del> * ```js
<del> * var Html5 = videojs.getTech('Html5');
<del> * // Create a new instance of the component
<del> * var html5 = new Html5(options);
<del> * ```
<ide> *
<ide> * @borrows Tech.getTech as videojs.getTech
<ide> */
<ide> videojs.getTech = Tech.getTech;
<ide> * Register a Tech so it can referred to by name.
<ide> * This is used in the tech order for the player.
<ide> *
<del> * ```js
<del> * // get the Html5 Tech
<del> * var Html5 = videojs.getTech('Html5');
<del> * var MyTech = videojs.extend(Html5, {});
<del> * // Register the new Tech
<del> * VjsButton.registerTech('Tech', MyTech);
<del> * var player = videojs('myplayer', {
<del> * techOrder: ['myTech', 'html5']
<del> * });
<del> * ```
<del> *
<ide> * @borrows Tech.registerTech as videojs.registerTech
<ide> */
<ide> videojs.registerTech = Tech.registerTech;
<ide> videojs.TOUCH_ENABLED = browser.TOUCH_ENABLED;
<ide> /**
<ide> * Subclass an existing class
<ide> * Mimics ES6 subclassing with the `extend` keyword
<del> * ```js
<del> * // Create a basic javascript 'class'
<del> * function MyClass(name) {
<del> * // Set a property at initialization
<del> * this.myName = name;
<del> * }
<del> * // Create an instance method
<del> * MyClass.prototype.sayMyName = function() {
<del> * alert(this.myName);
<del> * };
<del> * // Subclass the exisitng class and change the name
<del> * // when initializing
<del> * var MySubClass = videojs.extend(MyClass, {
<del> * constructor: function(name) {
<del> * // Call the super class constructor for the subclass
<del> * MyClass.call(this, name)
<del> * }
<del> * });
<del> * // Create an instance of the new sub class
<del> * var myInstance = new MySubClass('John');
<del> * myInstance.sayMyName(); // -> should alert "John"
<del> * ```
<ide> *
<ide> * @borrows extend:extendFn as videojs.extend
<ide> */
<ide> videojs.extend = extendFn;
<ide> * Performs a deep merge like lodash.merge but **only merges plain objects**
<ide> * (not arrays, elements, anything else)
<ide> * Other values will be copied directly from the second object.
<del> * ```js
<del> * var defaultOptions = {
<del> * foo: true,
<del> * bar: {
<del> * a: true,
<del> * b: [1,2,3]
<del> * }
<del> * };
<del> * var newOptions = {
<del> * foo: false,
<del> * bar: {
<del> * b: [4,5,6]
<del> * }
<del> * };
<del> * var result = videojs.mergeOptions(defaultOptions, newOptions);
<del> * // result.foo = false;
<del> * // result.bar.a = true;
<del> * // result.bar.b = [4,5,6];
<del> * ```
<ide> *
<ide> * @borrows merge-options:mergeOptions as videojs.mergeOptions
<ide> */
<ide> videojs.mergeOptions = mergeOptions;
<ide> /**
<ide> * Change the context (this) of a function
<ide> *
<del> * ``` js
<del> * videojs.bind(newContext, function() {
<del> * this === newContext
<del> * });
<del> * ```
<del> *
<ide> * > NOTE: as of v5.0 we require an ES5 shim, so you should use the native
<ide> * `function() {}.bind(newContext);` instead of this.
<ide> *
<ide> videojs.bind = Fn.bind;
<ide> * Plugins are only initialized when options for the plugin are included
<ide> * in the player options, or the plugin function on the player instance is
<ide> * called.
<del> * **See the plugin guide in the docs for a more detailed example**
<del> * ```js
<del> * // Make a plugin that alerts when the player plays
<del> * videojs.plugin('myPlugin', function(myPluginOptions) {
<del> * myPluginOptions = myPluginOptions || {};
<del> *
<del> * var player = this;
<del> * var alertText = myPluginOptions.text || 'Player is playing!'
<del> *
<del> * player.on('play', function() {
<del> * alert(alertText);
<del> * });
<del> * });
<del> * // USAGE EXAMPLES
<del> * // EXAMPLE 1: New player with plugin options, call plugin immediately
<del> * var player1 = videojs('idOne', {
<del> * myPlugin: {
<del> * text: 'Custom text!'
<del> * }
<del> * });
<del> * // Click play
<del> * // --> Should alert 'Custom text!'
<del> * // EXAMPLE 3: New player, initialize plugin later
<del> * var player3 = videojs('idThree');
<del> * // Click play
<del> * // --> NO ALERT
<del> * // Click pause
<del> * // Initialize plugin using the plugin function on the player instance
<del> * player3.myPlugin({
<del> * text: 'Plugin added later!'
<del> * });
<del> * // Click play
<del> * // --> Should alert 'Plugin added later!'
<del> * ```
<ide> *
<ide> * @borrows plugin:plugin as videojs.plugin
<ide> */
<ide> videojs.plugin = plugin;
<ide>
<ide> /**
<ide> * Adding languages so that they're available to all players.
<del> * ```js
<del> * videojs.addLanguage('es', { 'Hello': 'Hola' });
<del> * ```
<add> * Example: `videojs.addLanguage('es', { 'Hello': 'Hola' });`
<ide> *
<ide> * @param {string} code
<ide> * The language code or dictionary property
<ide> videojs.trigger = Events.trigger;
<ide> /**
<ide> * A cross-browser XMLHttpRequest wrapper. Here's a simple example:
<ide> *
<del> * ```js
<del> * videojs.xhr({
<del> * body: someJSONString,
<del> * uri: "/foo",
<del> * headers: {
<del> * "Content-Type": "application/json"
<del> * }
<del> * }, function (err, resp, body) {
<del> * // check resp.statusCode
<del> * });
<del> * ```
<del> *
<ide> * @param {Object} options
<ide> * settings for the request.
<ide> * | 23 |
Javascript | Javascript | avoid negative lookahead in regular expression | 86b44349dec8db499935927260821cdee211ece4 | <ide><path>src/isomorphic/children/ReactChildren.js
<ide> var twoArgumentPooler = PooledClass.twoArgumentPooler;
<ide> var fourArgumentPooler = PooledClass.fourArgumentPooler;
<ide>
<ide>
<del>var userProvidedKeyEscapeRegex = /\/(?!\/)/g;
<add>var userProvidedKeyEscapeRegex = /\/+/g;
<ide> function escapeUserProvidedKey(text) {
<del> return ('' + text).replace(userProvidedKeyEscapeRegex, '//');
<add> return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
<ide> }
<ide>
<ide> | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.