text:
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `python -m synthtool`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>

# [Cloud AutoML: Node.js Client](https://github.com/googleapis/nodejs-automl)

[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/automl.svg)](https://www.npmjs.org/package/@google-cloud/automl)

🔔 **AutoML API NodeJS Client is now available in Vertex AI. Please visit**
[node-js-aiplatform](https://github.com/googleapis/nodejs-ai-platform) **for the new NodeJS Vertex AI client.**
Vertex AI is our next generation AI Platform, with many new features that are unavailable in the current platform.
[Migrate your resources to Vertex AI](https://cloud.google.com/vertex-ai/docs/start/migrating-to-vertex-ai) to get
the latest machine learning features, simplify end-to-end journeys, and productionize models with MLOps.

Cloud AutoML API client for Node.js

A comprehensive list of changes in each version may be found in
[the CHANGELOG](https://github.com/googleapis/nodejs-automl/blob/main/CHANGELOG.md).

* [Cloud AutoML Node.js Client API Reference][client-docs]
* [Cloud AutoML Documentation][product-docs]
* [github.com/googleapis/nodejs-automl](https://github.com/googleapis/nodejs-automl)

Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].

[explained]: https://cloud.google.com/apis/docs/client-libraries-explained

**Table of contents:**

* [Quickstart](#quickstart)
  * [Before you begin](#before-you-begin)
  * [Installing the client library](#installing-the-client-library)
  * [Using the client library](#using-the-client-library)
* [Samples](#samples)
* [Versioning](#versioning)
* [Contributing](#contributing)
* [License](#license)

## Quickstart

### Before you begin

1.  [Select or create a Cloud Platform project][projects].
1.  [Enable billing for your project][billing].
1.  [Enable the Cloud AutoML API][enable_api].
1.  [Set up authentication with a service account][auth] so you can access the
    API from your local workstation.

### Installing the client library

```bash
npm install @google-cloud/automl
```

### Using the client library

```javascript
const automl = require('@google-cloud/automl');
const fs = require('fs');

// Create client for prediction service.
const client = new automl.PredictionServiceClient();

/**
 * TODO(developer): Uncomment the following line before running the sample.
 */
// const projectId = `The GCLOUD_PROJECT string, e.g. "my-gcloud-project"`;
// const computeRegion = `region-name, e.g. "us-central1"`;
// const modelId = `id of the model, e.g. "ICN723541179344731436"`;
// const filePath = `local text file path of content to be classified, e.g. "./resources/flower.png"`;
// const scoreThreshold = `value between 0.0 and 1.0, e.g. "0.5"`;

// Get the full path of the model.
const modelFullId = client.modelPath(projectId, computeRegion, modelId);

// Read the file content for prediction.
const content = fs.readFileSync(filePath, 'base64');

const params = {};

if (scoreThreshold) {
  params.score_threshold = scoreThreshold;
}

// Set the payload by giving the content and type of the file.
const payload = {};
payload.image = {imageBytes: content};

// params is additional domain-specific parameters.
// currently there is no additional parameters supported.
const [response] = await client.predict({
  name: modelFullId,
  payload: payload,
  params: params,
});
console.log('Prediction results:');
response.payload.forEach(result => {
  console.log(`Predicted class name: ${result.displayName}`);
  console.log(`Predicted class score: ${result.classification.score}`);
});

```

## Samples

Samples are in the [`samples/`](https://github.com/googleapis/nodejs-automl/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.

| Sample                      | Source Code                       | Try it |
| --------------------------- | --------------------------------- | ------ |
| Batch_predict | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/batch_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/batch_predict.js,samples/README.md) |
| Delete_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/delete_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/delete_dataset.js,samples/README.md) |
| Delete_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/delete_model.js,samples/README.md) |
| Deploy_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/deploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/deploy_model.js,samples/README.md) |
| Export_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/export_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/export_dataset.js,samples/README.md) |
| Get_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/get_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/get_dataset.js,samples/README.md) |
| Get_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/get_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/get_model.js,samples/README.md) |
| Get_model_evaluation | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/get_model_evaluation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/get_model_evaluation.js,samples/README.md) |
| Get_operation_status | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/get_operation_status.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/get_operation_status.js,samples/README.md) |
| Import_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/import_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/import_dataset.js,samples/README.md) |
| Language_entity_extraction_create_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/language_entity_extraction_create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/language_entity_extraction_create_dataset.js,samples/README.md) |
| Language_entity_extraction_create_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/language_entity_extraction_create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/language_entity_extraction_create_model.js,samples/README.md) |
| Language_entity_extraction_predict | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/language_entity_extraction_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/language_entity_extraction_predict.js,samples/README.md) |
| Language_sentiment_analysis_create_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/language_sentiment_analysis_create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/language_sentiment_analysis_create_dataset.js,samples/README.md) |
| Language_sentiment_analysis_create_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/language_sentiment_analysis_create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/language_sentiment_analysis_create_model.js,samples/README.md) |
| Language_sentiment_analysis_predict | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/language_sentiment_analysis_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/language_sentiment_analysis_predict.js,samples/README.md) |
| Language_text_classification_create_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/language_text_classification_create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/language_text_classification_create_dataset.js,samples/README.md) |
| Language_text_classification_create_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/language_text_classification_create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/language_text_classification_create_model.js,samples/README.md) |
| Language_text_classification_predict | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/language_text_classification_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/language_text_classification_predict.js,samples/README.md) |
| List_datasets | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/list_datasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/list_datasets.js,samples/README.md) |
| List_model_evaluations | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/list_model_evaluations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/list_model_evaluations.js,samples/README.md) |
| List_models | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/list_models.js,samples/README.md) |
| List_operation_status | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/list_operation_status.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/list_operation_status.js,samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| Translate_create_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/translate_create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/translate_create_dataset.js,samples/README.md) |
| Translate_create_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/translate_create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/translate_create_model.js,samples/README.md) |
| Translate_predict | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/translate_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/translate_predict.js,samples/README.md) |
| Undeploy_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/undeploy_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/undeploy_model.js,samples/README.md) |
| Vision_classification_create_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/vision_classification_create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/vision_classification_create_dataset.js,samples/README.md) |
| Vision_classification_create_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/vision_classification_create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/vision_classification_create_model.js,samples/README.md) |
| Vision_classification_deploy_model_node_count | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/vision_classification_deploy_model_node_count.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/vision_classification_deploy_model_node_count.js,samples/README.md) |
| Vision_classification_predict | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/vision_classification_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/vision_classification_predict.js,samples/README.md) |
| Vision_object_detection_create_dataset | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/vision_object_detection_create_dataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/vision_object_detection_create_dataset.js,samples/README.md) |
| Vision_object_detection_create_model | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/vision_object_detection_create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/vision_object_detection_create_model.js,samples/README.md) |
| Vision_object_detection_deploy_model_node_count | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/vision_object_detection_deploy_model_node_count.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/vision_object_detection_deploy_model_node_count.js,samples/README.md) |
| Vision_object_detection_predict | [source code](https://github.com/googleapis/nodejs-automl/blob/main/samples/vision_object_detection_predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-automl&page=editor&open_in_editor=samples/vision_object_detection_predict.js,samples/README.md) |

The [Cloud AutoML Node.js Client API Reference][client-docs] documentation
also contains samples.

## Supported Node.js Versions

Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
Libraries are compatible with all current _active_ and _maintenance_ versions of
Node.js.
If you are using an end-of-life version of Node.js, we recommend that you update
as soon as possible to an actively supported LTS version.

Google's client libraries support legacy versions of Node.js runtimes on a
best-efforts basis with the following warnings:

* Legacy versions are not tested in continuous integration.
* Some security patches and features cannot be backported.
* Dependencies cannot be kept up-to-date.

Client libraries targeting some end-of-life versions of Node.js are available, and
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
The dist-tags follow the naming convention `legacy-(version)`.
For example, `npm install @google-cloud/automl@legacy-8` installs client libraries
for versions compatible with Node.js 8.

## Versioning

This library follows [Semantic Versioning](http://semver.org/).

This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
unless absolutely necessary (e.g. because of critical security issues) or with
an extensive deprecation period. Issues and requests against **stable** libraries
are addressed with the highest priority.

More Information: [Google Cloud Platform Launch Stages][launch_stages]

[launch_stages]: https://cloud.google.com/terms/launch-stages

## Contributing

Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-automl/blob/main/CONTRIBUTING.md).

Please note that this `README.md`, the `samples/README.md`,
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
are generated from a central template. To edit one of these files, make an edit
to its templates in
[directory](https://github.com/googleapis/synthtool).

## License

Apache Version 2.0

See [LICENSE](https://github.com/googleapis/nodejs-automl/blob/main/LICENSE)

[client-docs]: https://cloud.google.com/nodejs/docs/reference/automl/latest
[product-docs]: https://cloud.google.com/automl/docs/
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=automl.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started


text:
class Profile < ActiveRecord::Base
  belongs_to :user

  validates_presence_of :user_id
end

redpajama_set_name: RedPajamaGithub


text:
#import <Foundation/Foundation.h>
#import "SCStompManager.h"

@interface SCStompStorageItem : NSObject

@property (nonatomic, copy) ReceiptHandler handler;

- (instancetype) initWithHandler:(ReceiptHandler)handler;

@end


text:
```html
<amp-embed
  width="100"
  height="283"
  type="lentainform"
  data-publisher="amp-demo"
  data-widget="12345"
  data-container="demo-container"
>
</amp-embed>
```

## Configuration

For details on the configuration semantics, please contact the ad network or refer to their documentation.

### Required parameters

-   `data-publisher`
-   `data-widget`
-   `data-container`

### Optional parameters

-   `data-url`
-   `data-options`


text:
#region

using System;
using System.Collections.Generic;
using System.IO;
using System.Web.Script.Serialization;
using LegendaryClient.Logic.SQLite;

#endregion

namespace LegendaryClient.Logic.JSON
{
    public static class Items
    {
        public static List<items> PopulateItems()
        {
            var itemList = new List<items>();

            string itemJson =
                File.ReadAllText(Path.Combine(Client.ExecutingDirectory, "Assets", "data", "en_US", "item.json"));
            var serializer = new JavaScriptSerializer();
            var deserializedJson = serializer.Deserialize<Dictionary<string, object>>(itemJson);
            var itemData = deserializedJson["data"] as Dictionary<string, object>;

            if (itemData == null)
                return itemList;

            foreach (var item in itemData)
            {
                var singularItemData = item.Value as Dictionary<string, object>;
                if (singularItemData == null)
                    continue;

                var newItem = new items
                {
                    id = Convert.ToInt32(item.Key),
                    name = singularItemData["name"] as string,
                    description = singularItemData["description"] as string
                };

                var goldData = singularItemData["gold"] as Dictionary<string, object>;
                if (goldData != null)
                {
                    newItem.price = Convert.ToInt32(goldData["total"]);
                    newItem.sellprice = Convert.ToInt32(goldData["sell"]);
                }

                var imageData = singularItemData["image"] as Dictionary<string, object>;
                if (imageData != null)
                    newItem.iconPath = imageData["full"] as string;

                itemList.Add(newItem);
            }

            return itemList;
        }
    }
}


text:
This is a set of Swift playgrounds that accompany my logging blog post. You should be able to copy the code right into an Xcode playground and see the results in the console. Feel free to experiment with these code snippets at your leisure!

Happy logging!

## Naive Logger Implementation

1. [Print Statements](https://gist.github.com/cmvandrevala/2856247ead69b337268bda107eb4e19e)
2. [Logger Class](https://gist.github.com/cmvandrevala/54ba49cc612cb3b36c473951247461e7)
3. [Multiple Log Statements](https://gist.github.com/cmvandrevala/f4ac1fec05133005078186776283a230)
4. [Inevitable Cluttered Code](https://gist.github.com/cmvandrevala/8a7bad103a4c6a0b1f64f30f8ff03e74)

## Observer Pattern

1. [Observer Pattern with Unchanging Messages](https://gist.github.com/cmvandrevala/0b623657daae99ae8bfbf3dbfdd7e17d)
2. [Observer Pattern with Dynamic Messages](https://gist.github.com/cmvandrevala/82a0123045ab2f1db205a0f65c7166c6)

## Chain of Responsibility Pattern

1. [Chain Pattern with Unchanging Messages](https://gist.github.com/cmvandrevala/ed1ac3b814af4414da43779dc3197cf2)
2. [Chain Pattern with Dynamic Messages](https://gist.github.com/cmvandrevala/ace57a97636d876519b68848cc01dbc3)


text:
#ifndef MULTILABELOBJECTFACTORY_H_INCLUDED
#define MULTILABELOBJECTFACTORY_H_INCLUDED

#include "mitkCoreObjectFactoryBase.h"

#include <mitkAbstractFileIO.h>

namespace mitk
{
  class MultilabelObjectFactory : public CoreObjectFactoryBase
  {
  public:
    mitkClassMacro(MultilabelObjectFactory, CoreObjectFactoryBase);
    itkFactorylessNewMacro(Self) itkCloneMacro(Self) Mapper::Pointer
      CreateMapper(mitk::DataNode *node, MapperSlotId slotId) override;
    void SetDefaultProperties(mitk::DataNode *node) override;
    const char *GetFileExtensions() override;
    mitk::CoreObjectFactoryBase::MultimapType GetFileExtensionsMap() override;
    const char *GetSaveFileExtensions() override;
    mitk::CoreObjectFactoryBase::MultimapType GetSaveFileExtensionsMap() override;

  protected:
    MultilabelObjectFactory();
    ~MultilabelObjectFactory() override;
    void CreateFileExtensionsMap();
    MultimapType m_FileExtensionsMap;
    MultimapType m_SaveFileExtensionsMap;

  private:
    itk::ObjectFactoryBase::Pointer m_LabelSetImageIOFactory;
    itk::ObjectFactoryBase::Pointer m_LabelSetImageWriterFactory;

    std::vector<mitk::AbstractFileIO *> m_FileIOs;
  };
}

#endif


text:
<?php

/**
 * LoginForm class.
 * LoginForm is the data structure for keeping
 * user login form data. It is used by the 'login' action of 'SiteController'.
 */
class LoginForm extends CFormModel
{
	public $username;
	public $password;
	public $rememberMe;
	public $verifyCode;

	//http://www.yiiframework.com/wiki/339/show-captcha-after-n-unsuccessfull-attempts/
	private $_identity;

	/**
	 * Declares the validation rules.
	 * The rules state that username and password are required,
	 * and password needs to be authenticated.
	 */
	public function rules()
	{
		return array(
			// username and password are required
			array('username, password', 'required'),
			// rememberMe needs to be a boolean
			array('rememberMe', 'boolean'),
			// password needs to be authenticated
			array('password', 'authenticate'),

			///array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements()),
			array('username,password,verifyCode','required','on'=>'captchaRequired'),
			//array('verifyCode', 'captcha', 'allowEmpty'=>!CCaptcha::checkRequirements()),
			array('verifyCode', 'captcha', 'allowEmpty'=>!extension_loaded('gd')),
		);
	}

	/**
	 * Declares attribute labels.
	 */
	public function attributeLabels()
	{
		return array(
			'rememberMe'=>'Recordar Sesion',
			'username'	=> 'Cuenta del usuario',
			'password ' => 'Contrasena del usuario',
			'verifyCode' => 'Codigo de Verificacion',
		);
	}

	/**
	 * Authenticates the password.
	 * This is the 'authenticate' validator as declared in rules().
	 */
	public function authenticate($attribute,$params)
	{
		if(!$this->hasErrors())
		{
			//$this->_identity=new UserIdentity($this->username,$this->password);
			$this->_identity=new CrugeUser ($this->username,$this->password);
			if(!$this->_identity->authenticate())
				$this->addError('password','Nombre de usuario o contrasena invalida.');
			else{
				$usuario = Usuarios::model()->find("iduser = ? ",array($this->_identity->id));
				Yii::app()->user->setState("nombre",$usuario->nom_usu." ".$usuario->ape_usu);
				Yii::app()->user->setState("id_usu",$usuario->id_usu);
			}
		}
	}

	/**
	 * Logs in the user using the given username and password in the model.
	 * @return boolean whether login is successful
	 */
	public function login()
	{
		if($this->_identity===null)
		{
			$this->_identity=new UserIdentity($this->username,$this->password);
			$this->_identity->authenticate();
		}
		if($this->_identity->errorCode===UserIdentity::ERROR_NONE)
		{
			$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days
			Yii::app()->user->login($this->_identity,$duration);
			return true;
		}
		else
			return false;
	}
}


text:
module Puppet::Parser::Functions
  newfunction(:dirname, :type => :rvalue, :doc => <<-DOC
    @summary
      Returns the dirname of a path.

    @return [String] the given path's dirname
    DOC
             ) do |arguments|

    if arguments.empty?
      raise(Puppet::ParseError, 'dirname(): No arguments given')
    end
    if arguments.size > 1
      raise(Puppet::ParseError, "dirname(): Too many arguments given (#{arguments.size})")
    end
    unless arguments[0].is_a?(String)
      raise(Puppet::ParseError, 'dirname(): Requires string as argument')
    end
    # undef is converted to an empty string ''
    if arguments[0].empty?
      raise(Puppet::ParseError, 'dirname(): Requires a non-empty string as argument')
    end

    return File.dirname(arguments[0])
  end
end

# vim: set ts=2 sw=2 et :


text:
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/rel-m-rel-xr-osx64-bld/build/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
 */

#ifndef __gen_nsIDOMNotifyPaintEvent_h__
#define __gen_nsIDOMNotifyPaintEvent_h__

#ifndef __gen_nsIDOMEvent_h__
#include "nsIDOMEvent.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIDOMPaintRequestList; /* forward declaration */

/* starting interface:    nsIDOMNotifyPaintEvent */
#define NS_IDOMNOTIFYPAINTEVENT_IID_STR "792e5779-7c39-4817-91a7-fdb3fba6428f"

#define NS_IDOMNOTIFYPAINTEVENT_IID \
  {0x792e5779, 0x7c39, 0x4817, \
    { 0x91, 0xa7, 0xfd, 0xb3, 0xfb, 0xa6, 0x42, 0x8f }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMNotifyPaintEvent : public nsIDOMEvent {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMNOTIFYPAINTEVENT_IID)

  /* readonly attribute nsIDOMClientRectList clientRects; */
  NS_SCRIPTABLE NS_IMETHOD GetClientRects(nsIDOMClientRectList * *aClientRects) = 0;

  /* readonly attribute nsIDOMClientRect boundingClientRect; */
  NS_SCRIPTABLE NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect * *aBoundingClientRect) = 0;

  /* readonly attribute nsIDOMPaintRequestList paintRequests; */
  NS_SCRIPTABLE NS_IMETHOD GetPaintRequests(nsIDOMPaintRequestList * *aPaintRequests) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMNotifyPaintEvent, NS_IDOMNOTIFYPAINTEVENT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOMNOTIFYPAINTEVENT \
  NS_SCRIPTABLE NS_IMETHOD GetClientRects(nsIDOMClientRectList * *aClientRects); \
  NS_SCRIPTABLE NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect * *aBoundingClientRect); \
  NS_SCRIPTABLE NS_IMETHOD GetPaintRequests(nsIDOMPaintRequestList * *aPaintRequests);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOMNOTIFYPAINTEVENT(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetClientRects(nsIDOMClientRectList * *aClientRects) { return _to GetClientRects(aClientRects); } \
  NS_SCRIPTABLE NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect * *aBoundingClientRect) { return _to GetBoundingClientRect(aBoundingClientRect); } \
  NS_SCRIPTABLE NS_IMETHOD GetPaintRequests(nsIDOMPaintRequestList * *aPaintRequests) { return _to GetPaintRequests(aPaintRequests); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOMNOTIFYPAINTEVENT(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetClientRects(nsIDOMClientRectList * *aClientRects) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClientRects(aClientRects); } \
  NS_SCRIPTABLE NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect * *aBoundingClientRect) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBoundingClientRect(aBoundingClientRect); } \
  NS_SCRIPTABLE NS_IMETHOD GetPaintRequests(nsIDOMPaintRequestList * *aPaintRequests) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPaintRequests(aPaintRequests); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsDOMNotifyPaintEvent : public nsIDOMNotifyPaintEvent
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIDOMNOTIFYPAINTEVENT

  nsDOMNotifyPaintEvent();

private:
  ~nsDOMNotifyPaintEvent();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDOMNotifyPaintEvent, nsIDOMNotifyPaintEvent)

nsDOMNotifyPaintEvent::nsDOMNotifyPaintEvent()
{
  /* member initializers and constructor code */
}

nsDOMNotifyPaintEvent::~nsDOMNotifyPaintEvent()
{
  /* destructor code */
}

/* readonly attribute nsIDOMClientRectList clientRects; */
NS_IMETHODIMP nsDOMNotifyPaintEvent::GetClientRects(nsIDOMClientRectList * *aClientRects)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDOMClientRect boundingClientRect; */
NS_IMETHODIMP nsDOMNotifyPaintEvent::GetBoundingClientRect(nsIDOMClientRect * *aBoundingClientRect)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDOMPaintRequestList paintRequests; */
NS_IMETHODIMP nsDOMNotifyPaintEvent::GetPaintRequests(nsIDOMPaintRequestList * *aPaintRequests)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#endif /* __gen_nsIDOMNotifyPaintEvent_h__ */


text:
class CQueryResults : public CWnd
{
protected:
	DECLARE_DYNCREATE(CQueryResults)
public:
	CLSID const& GetClsid()
	{
		static CLSID const clsid
			= { 0x26c03863, 0xd33, 0x11d2, { 0xae, 0xe9, 0x0, 0xa0, 0xc9, 0xb7, 0x1d, 0xc4 } };
		return clsid;
	}
	virtual BOOL Create(LPCTSTR lpszClassName,
		LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect,
		CWnd* pParentWnd, UINT nID,
		CCreateContext* pContext = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); }

    BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle,
		const RECT& rect, CWnd* pParentWnd, UINT nID,
		CFile* pPersist = NULL, BOOL bStorage = FALSE,
		BSTR bstrLicKey = NULL)
	{ return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
		pPersist, bStorage, bstrLicKey); }

// Attributes
public:
	CString GetFullListName();
	void SetFullListName(LPCTSTR);
	CString GetFilterListName();
	void SetFilterListName(LPCTSTR);
	LPDISPATCH GetDataSource();
	void SetDataSource(LPDISPATCH);
	CString GetQuery();
	void SetQuery(LPCTSTR);
	CString GetFilter();
	void SetFilter(LPCTSTR);
	CString GetSort();
	void SetSort(LPCTSTR);
	long GetElement();
	void SetElement(long);
	CString GetSelectionName();
	void SetSelectionName(LPCTSTR);
	CString GetCaption();
	void SetCaption(LPCTSTR);

// Operations
public:
	void Push();
	BOOL Pop();
	void Update();
	long AmountSelected();
	void Clear();
	long RowAmount();
	long FilteredAmount();
	void ApplyAttributeChanges();
	void CancelAttributeChanges();
	void AddAttribute(LPCTSTR logname, LPCTSTR option);
	void RemoveAttribute(LPCTSTR logname, LPCTSTR option);
	short CheckAttribute(LPCTSTR logname, LPCTSTR option);
	void Calculate();
	void AboutBox();
};


text:
'use strict';

/**
 * Created by chkui on 2017/6/21.
 */
var context = require('../config/context'),
    naming = require('./naming');
var __env = void 0;

/**
 * 初始化环境变量
 */
var init = function init() {
    __env = context.init(naming.getEnv());
};
/**
 * 获取指定参数
 */
var getParam = function getParam(key) {
    return __env[key];
};

var setParam = function setParam(key, value) {
    __env[key] = value;
    return true;
};

var getEnv = function getEnv() {
    return __env;
};

var env = { init: init, getParam: getParam, setParam: setParam, getEnv: getEnv };
module.exports = env;


text:
@implementation NSArray (CDExtensions)

- (NSArray *)reversedArray;
{
    return [[self reverseObjectEnumerator] allObjects];
}

@end

#pragma mark -

@implementation NSArray (CDTopoSort)

- (NSArray *)topologicallySortedArray;
{
    NSMutableDictionary *nodesByName = [[NSMutableDictionary alloc] init];

    for (id <CDTopologicalSort> object in self) {
        CDTopoSortNode *node = [[CDTopoSortNode alloc] initWithObject:object];
        [node addDependanciesFromArray:[object dependancies]];

        if (nodesByName[node.identifier] != nil)
            NSLog(@"Warning: Duplicate identifier (%@) in %s", node.identifier, __cmd);
        nodesByName[node.identifier] = node;
    }

    NSMutableArray *sortedArray = [NSMutableArray array];

    NSArray *allNodes = [[nodesByName allValues] sortedArrayUsingSelector:@selector(ascendingCompareByIdentifier:)];
    for (CDTopoSortNode *node in allNodes) {
        if (node.color == CDNodeColor_White)
            [node topologicallySortNodes:nodesByName intoArray:sortedArray];
    }

    return sortedArray;
}

@end

#pragma mark -

@implementation NSMutableArray (CDTopoSort)

- (void)sortTopologically;
{
    NSArray *sortedArray = [self topologicallySortedArray];
    assert([self count] == [sortedArray count]);

    [self removeAllObjects];
    [self addObjectsFromArray:sortedArray];
}

@end


text:
<html>
    <body>
        <canvas class="topleft" id="canvas"></canvas>
        <script type="text/javascript">
            var canvas = document.getElementById("canvas");
            //make the canvas fullscreen
            canvas.width = window.innerWidth;
            canvas.height = window.innerHeight;

            canvas.oncontextmenu = function (e) {
              e.preventDefault();
            };

            //show Emscripten environment where the canvas is
            var Module = {};
            Module.canvas = canvas;
        </script>
        <script type="text/javascript" src="midasminer.js"></script>
    </body>
</html>


text:
<?php

namespace KoolKode\WebDav\Handler;

use KoolKode\Event\EventDispatcherInterface;
use KoolKode\Http\HttpRequest;
use KoolKode\Http\HttpResponse;
use KoolKode\Http\Uri;
use KoolKode\Http\Exception\BadRequestException;
use KoolKode\WebDav\StorageInterface;
use KoolKode\WebDav\WebDav;
use KoolKode\WebDav\Event\PopulateOptionsEvent;

/**
 * @author Martin Schröder
 */
class DeleteHandler implements HandlerInterface
{
    public function initialize(EventDispatcherInterface $dispatcher): void
    {
        $dispatcher->connect(function (PopulateOptionsEvent $event) {
            if ($event->resource->getPath() != '/') {
                $event->addAllowedMethod(WebDav::METHOD_DELETE);
            }
        });
    }

    public function handle(string $path, Uri $baseUri, HttpRequest $request, StorageInterface $storage): ?HttpResponse
    {
        if (!$request->isDelete()) {
            return null;
        }

        $resource = $storage->findResource($path);

        if ($resource->isCollection() && $request->hasHeader('Depth')) {
            $depth = $request->getHeader('Depth', 'infinity');

            if ($depth != 'infinity') {
                throw new BadRequestException();
            }
        }

        $storage->beginTransaction();

        try {
            $storage->deleteResource($resource);
        } catch (\Exception $e) {
            $storage->rollBack();

            throw $e;
        }

        $storage->commit();

        return new HttpResponse(WebDav::CODE_NO_CONTENT);
    }
}


text:
<?php
namespace Chamilo\Core\Repository\ContentObject\Office365Video\Integration\Chamilo\Core\Repository\ContentObject\Assignment\Package;

class Activator extends \Chamilo\Configuration\Package\Action\Activator
{
}


text:
require 'haml/engine'

module Haml
  # The class that keeps track of the global options for Haml within Rails.
  module Template
    extend self

    @options = {}
    # The options hash for Haml when used within Rails.
    # See {file:HAML_REFERENCE.md#haml_options the Haml options documentation}.
    #
    # @return [{Symbol => Object}]
    attr_accessor :options

    # Enables integration with the Rails 2.2.5+ XSS protection,
    # if it's available and enabled.
    #
    # @return [Boolean] Whether the XSS integration was enabled.
    def try_enabling_xss_integration
      return false unless ActionView::Base.respond_to?(:xss_safe?) && ActionView::Base.xss_safe?

      Haml::Template.options[:escape_html] = true

      Haml::Util.module_eval {def rails_xss_safe?; true; end}

      require 'haml/helpers/xss_mods'
      Haml::Helpers.send(:include, Haml::Helpers::XssMods)

      Haml::Precompiler.module_eval do
        def precompiled_method_return_value_with_haml_xss
          "(#{precompiled_method_return_value_without_haml_xss}).html_safe!"
        end
        alias_method :precompiled_method_return_value_without_haml_xss, :precompiled_method_return_value
        alias_method :precompiled_method_return_value, :precompiled_method_return_value_with_haml_xss
      end

      true
    end
  end
end

if defined?(RAILS_ENV) && RAILS_ENV == "production"
  Haml::Template.options[:ugly] = true
end

# Decide how we want to load Haml into Rails.
# Patching was necessary for versions <= 2.0.1,
# but we can make it a normal handler for higher versions.
if defined?(ActionView::TemplateHandler) || defined?(ActionView::Template::Handler)
  require 'haml/template/plugin'
else
  require 'haml/template/patch'
end

# Enable XSS integration. Use Rails' after_initialize method if possible
# so that integration will be checked after the rails_xss plugin is loaded
# (for Rails 2.3.* where it's not enabled by default).
if defined?(Rails.configuration.after_initialize)
  Rails.configuration.after_initialize {Haml::Template.try_enabling_xss_integration}
else
  Haml::Template.try_enabling_xss_integration
end

if Haml::Util.rails_root
  # Update init.rb to the current version
  # if it's out of date.
  #
  # We can probably remove this as of v1.9,
  # because the new init file is sufficiently flexible
  # to not need updating.
  rails_init_file = File.join(Haml::Util.rails_root, 'vendor', 'plugins', 'haml', 'init.rb')
  haml_init_file = Haml::Util.scope('init.rb')
  begin
    if File.exists?(rails_init_file)
      require 'fileutils'
      FileUtils.cp(haml_init_file, rails_init_file) unless FileUtils.cmp(rails_init_file, haml_init_file)
    end
  rescue SystemCallError
    warn <<END
HAML WARNING:
#{rails_init_file} is out of date and couldn't be automatically updated.
Please run `haml --rails #{File.expand_path(Haml::Util.rails_root)}' to update it.
END
  end
end


text:
#pragma once

#include "ADefinitions.h"
class Endln {};
///Wrapper about Arduino HardwareSerial class
class Log
{
	bool _is_initialized;
public:
	Log()
	{
		_is_initialized=false;
	}
	///Initializes serial interface
	/**
	\param baud symbol rate in bauds
	*/
	void begin(unsigned long baud)
	{
		Serial.begin(baud);
		_is_initialized=true;
	}
	///Overload << operator with end of line command
	friend Log& operator<<(Log &out,Endln &value)
	{
		if(out.IsInitialized())
			Serial.println();
		return out;
	}
	///Overload << operator for general values
	template<class T>
	friend Log& operator<<(Log &out,T value)
	{
		if(out.IsInitialized())
			Serial.print(value);
		return out;
	}
private:
	bool IsInitialized()
	{
		return _is_initialized;
	}

};
extern Log out;
extern Endln endln;


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:paddingStart="16dp"
                android:paddingEnd="16dp"
                android:minHeight="32dp"
                android:layout_gravity="center_vertical">

    <android.support.v7.widget.AppCompatImageButton
        android:id="@+id/btn_delete"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_marginStart="8dp"
        android:scaleType="fitCenter"
        android:layout_alignParentEnd="true"
        android:layout_centerVertical="true"
        android:background="@android:color/transparent"
        android:src="@drawable/ic_clear_white_24dp"
        android:tint="@color/colorPrimary"
        tools:ignore="ContentDescription"/>

    <TextView
        android:id="@+id/txt_rule"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_toStartOf="@id/btn_delete"
        android:layout_centerVertical="true"
        android:maxLines="5"
        android:textSize="16sp"
        android:typeface="monospace"
        tools:text=".*文本.*ability"/>

</RelativeLayout>


text:
import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isPromise, isFunction, extend } from '@vue/shared';
import { injectHook } from 'vue';

//App
const ON_LAUNCH = 'onLaunch';

const eventChannels = {};
const eventChannelStack = [];
let id = 0;
function initEventChannel(events, cache = true) {
    id++;
    const eventChannel = new my.EventChannel(id, events);
    if (cache) {
        eventChannels[id] = eventChannel;
        eventChannelStack.push(eventChannel);
    }
    return eventChannel;
}
function getEventChannel(id) {
    if (id) {
        const eventChannel = eventChannels[id];
        delete eventChannels[id];
        return eventChannel;
    }
    return eventChannelStack.shift();
}
const navigateTo = {
    args(fromArgs) {
        const id = initEventChannel(fromArgs.events).id;
        if (fromArgs.url) {
            fromArgs.url =
                fromArgs.url +
                    (fromArgs.url.indexOf('?') === -1 ? '?' : '&') +
                    '__id__=' +
                    id;
        }
    },
    returnValue(fromRes) {
        fromRes.eventChannel = getEventChannel();
    },
};

my.appLaunchHooks = [];
function onAppLaunch(hook) {
    const app = getApp({ allowDefault: true });
    if (app && app.$vm) {
        return injectHook(ON_LAUNCH, hook, app.$vm.$);
    }
    my.appLaunchHooks.push(hook);
}

function getBaseSystemInfo() {
  return my.getSystemInfoSync()
}

function validateProtocolFail(name, msg) {
    console.warn(`${name}: ${msg}`);
}
function validateProtocol(name, data, protocol, onFail) {
    if (!onFail) {
        onFail = validateProtocolFail;
    }
    for (const key in protocol) {
        const errMsg = validateProp(key, data[key], protocol[key], !hasOwn(data, key));
        if (isString(errMsg)) {
            onFail(name, errMsg);
        }
    }
}
function validateProtocols(name, args, protocol, onFail) {
    if (!protocol) {
        return;
    }
    if (!isArray(protocol)) {
        return validateProtocol(name, args[0] || Object.create(null), protocol, onFail);
    }
    const len = protocol.length;
    const argsLen = args.length;
    for (let i = 0; i < len; i++) {
        const opts = protocol[i];
        const data = Object.create(null);
        if (argsLen > i) {
            data[opts.name] = args[i];
        }
        validateProtocol(name, data, { [opts.name]: opts }, onFail);
    }
}
function validateProp(name, value, prop, isAbsent) {
    if (!isPlainObject(prop)) {
        prop = { type: prop };
    }
    const { type, required, validator } = prop;
    // required!
    if (required && isAbsent) {
        return 'Missing required args: "' + name + '"';
    }
    // missing but optional
    if (value == null && !required) {
        return;
    }
    // type check
    if (type != null) {
        let isValid = false;
        const types = isArray(type) ? type : [type];
        const expectedTypes = [];
        // value is valid as long as one of the specified types match
        for (let i = 0; i < types.length && !isValid; i++) {
            const { valid, expectedType } = assertType(value, types[i]);
            expectedTypes.push(expectedType || '');
            isValid = valid;
        }
        if (!isValid) {
            return getInvalidTypeMessage(name, value, expectedTypes);
        }
    }
    // custom validator
    if (validator) {
        return validator(value);
    }
}
const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol');
function assertType(value, type) {
    let valid;
    const expectedType = getType(type);
    if (isSimpleType(expectedType)) {
        const t = typeof value;
        valid = t === expectedType.toLowerCase();
        // for primitive wrapper objects
        if (!valid && t === 'object') {
            valid = value instanceof type;
        }
    }
    else if (expectedType === 'Object') {
        valid = isObject(value);
    }
    else if (expectedType === 'Array') {
        valid = isArray(value);
    }
    else {
        {
            valid = value instanceof type;
        }
    }
    return {
        valid,
        expectedType,
    };
}
function getInvalidTypeMessage(name, value, expectedTypes) {
    let message = `Invalid args: type check failed for args "${name}".` +
        ` Expected ${expectedTypes.map(capitalize).join(', ')}`;
    const expectedType = expectedTypes[0];
    const receivedType = toRawType(value);
    const expectedValue = styleValue(value, expectedType);
    const receivedValue = styleValue(value, receivedType);
    // check if we need to specify expected value
    if (expectedTypes.length === 1 &&
        isExplicable(expectedType) &&
        !isBoolean(expectedType, receivedType)) {
        message += ` with value ${expectedValue}`;
    }
    message += `, got ${receivedType} `;
    // check if we need to specify received value
    if (isExplicable(receivedType)) {
        message += `with value ${receivedValue}.`;
    }
    return message;
}
function getType(ctor) {
    const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
    return match ? match[1] : '';
}
function styleValue(value, type) {
    if (type === 'String') {
        return `"${value}"`;
    }
    else if (type === 'Number') {
        return `${Number(value)}`;
    }
    else {
        return `${value}`;
    }
}
function isExplicable(type) {
    const explicitTypes = ['string', 'number', 'boolean'];
    return explicitTypes.some((elem) => type.toLowerCase() === elem);
}
function isBoolean(...args) {
    return args.some((elem) => elem.toLowerCase() === 'boolean');
}

const HOOK_SUCCESS = 'success';
const HOOK_FAIL = 'fail';
const HOOK_COMPLETE = 'complete';
const globalInterceptors = {};
const scopedInterceptors = {};
function wrapperHook(hook) {
    return function (data) {
        return hook(data) || data;
    };
}
function queue(hooks, data) {
    let promise = false;
    for (let i = 0; i < hooks.length; i++) {
        const hook = hooks[i];
        if (promise) {
            promise = Promise.resolve(wrapperHook(hook));
        }
        else {
            const res = hook(data);
            if (isPromise(res)) {
                promise = Promise.resolve(res);
            }
            if (res === false) {
                return {
                    then() { },
                    catch() { },
                };
            }
        }
    }
    return (promise || {
        then(callback) {
            return callback(data);
        },
        catch() { },
    });
}
function wrapperOptions(interceptors, options = {}) {
    [HOOK_SUCCESS, HOOK_FAIL, HOOK_COMPLETE].forEach((name) => {
        const hooks = interceptors[name];
        if (!isArray(hooks)) {
            return;
        }
        const oldCallback = options[name];
        options[name] = function callbackInterceptor(res) {
            queue(hooks, res).then((res) => {
                return (isFunction(oldCallback) && oldCallback(res)) || res;
            });
        };
    });
    return options;
}
function wrapperReturnValue(method, returnValue) {
    const returnValueHooks = [];
    if (isArray(globalInterceptors.returnValue)) {
        returnValueHooks.push(...globalInterceptors.returnValue);
    }
    const interceptor = scopedInterceptors[method];
    if (interceptor && isArray(interceptor.returnValue)) {
        returnValueHooks.push(...interceptor.returnValue);
    }
    returnValueHooks.forEach((hook) => {
        returnValue = hook(returnValue) || returnValue;
    });
    return returnValue;
}
function getApiInterceptorHooks(method) {
    const interceptor = Object.create(null);
    Object.keys(globalInterceptors).forEach((hook) => {
        if (hook !== 'returnValue') {
            interceptor[hook] = globalInterceptors[hook].slice();
        }
    });
    const scopedInterceptor = scopedInterceptors[method];
    if (scopedInterceptor) {
        Object.keys(scopedInterceptor).forEach((hook) => {
            if (hook !== 'returnValue') {
                interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
            }
        });
    }
    return interceptor;
}
function invokeApi(method, api, options, ...params) {
    const interceptor = getApiInterceptorHooks(method);
    if (interceptor && Object.keys(interceptor).length) {
        if (isArray(interceptor.invoke)) {
            const res = queue(interceptor.invoke, options);
            return res.then((options) => {
                return api(wrapperOptions(interceptor, options), ...params);
            });
        }
        else {
            return api(wrapperOptions(interceptor, options), ...params);
        }
    }
    return api(options, ...params);
}

function handlePromise(promise) {
    if (__UNI_FEATURE_PROMISE__) {
        return promise
            .then((data) => {
            return [null, data];
        })
            .catch((err) => [err]);
    }
    return promise;
}

function formatApiArgs(args, options) {
    const params = args[0];
    if (!options ||
        (!isPlainObject(options.formatArgs) && isPlainObject(params))) {
        return;
    }
    const formatArgs = options.formatArgs;
    const keys = Object.keys(formatArgs);
    for (let i = 0; i < keys.length; i++) {
        const name = keys[i];
        const formatterOrDefaultValue = formatArgs[name];
        if (isFunction(formatterOrDefaultValue)) {
            const errMsg = formatterOrDefaultValue(args[0][name], params);
            if (isString(errMsg)) {
                return errMsg;
            }
        }
        else {
            // defaultValue
            if (!hasOwn(params, name)) {
                params[name] = formatterOrDefaultValue;
            }
        }
    }
}
function beforeInvokeApi(name, args, protocol, options) {
    if ((process.env.NODE_ENV !== 'production')) {
        validateProtocols(name, args, protocol);
    }
    if (options && options.beforeInvoke) {
        const errMsg = options.beforeInvoke(args);
        if (isString(errMsg)) {
            return errMsg;
        }
    }
    const errMsg = formatApiArgs(args, options);
    if (errMsg) {
        return errMsg;
    }
}
function wrapperSyncApi(name, fn, protocol, options) {
    return (...args) => {
        const errMsg = beforeInvokeApi(name, args, protocol, options);
        if (errMsg) {
            throw new Error(errMsg);
        }
        return fn.apply(null, args);
    };
}
function defineSyncApi(name, fn, protocol, options) {
    return wrapperSyncApi(name, fn, (process.env.NODE_ENV !== 'production') ? protocol : undefined, options);
}

const API_UPX2PX = 'upx2px';
const Upx2pxProtocol = [
    {
        name: 'upx',
        type: [Number, String],
        required: true,
    },
];

const EPS = 1e-4;
const BASE_DEVICE_WIDTH = 750;
let isIOS = false;
let deviceWidth = 0;
let deviceDPR = 0;
function checkDeviceWidth() {
    const { platform, pixelRatio, windowWidth } = getBaseSystemInfo();
    deviceWidth = windowWidth;
    deviceDPR = pixelRatio;
    isIOS = platform === 'ios';
}
const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => {
    if (deviceWidth === 0) {
        checkDeviceWidth();
    }
    number = Number(number);
    if (number === 0) {
        return 0;
    }
    let width = newDeviceWidth || deviceWidth;
    let result = (number / BASE_DEVICE_WIDTH) * width;
    if (result < 0) {
        result = -result;
    }
    result = Math.floor(result + EPS);
    if (result === 0) {
        if (deviceDPR === 1 || !isIOS) {
            result = 1;
        }
        else {
            result = 0.5;
        }
    }
    return number < 0 ? -result : result;
}, Upx2pxProtocol);

const API_ADD_INTERCEPTOR = 'addInterceptor';
const API_REMOVE_INTERCEPTOR = 'removeInterceptor';
const AddInterceptorProtocol = [
    {
        name: 'method',
        type: [String, Object],
        required: true,
    },
];
const RemoveInterceptorProtocol = AddInterceptorProtocol;

function mergeInterceptorHook(interceptors, interceptor) {
    Object.keys(interceptor).forEach((hook) => {
        if (isFunction(interceptor[hook])) {
            interceptors[hook] = mergeHook(interceptors[hook], interceptor[hook]);
        }
    });
}
function removeInterceptorHook(interceptors, interceptor) {
    if (!interceptors || !interceptor) {
        return;
    }
    Object.keys(interceptor).forEach((hook) => {
        if (isFunction(interceptor[hook])) {
            removeHook(interceptors[hook], interceptor[hook]);
        }
    });
}
function mergeHook(parentVal, childVal) {
    const res = childVal
        ? parentVal
            ? parentVal.concat(childVal)
            : isArray(childVal)
                ? childVal
                : [childVal]
        : parentVal;
    return res ? dedupeHooks(res) : res;
}
function dedupeHooks(hooks) {
    const res = [];
    for (let i = 0; i < hooks.length; i++) {
        if (res.indexOf(hooks[i]) === -1) {
            res.push(hooks[i]);
        }
    }
    return res;
}
function removeHook(hooks, hook) {
    if (!hooks) {
        return;
    }
    const index = hooks.indexOf(hook);
    if (index !== -1) {
        hooks.splice(index, 1);
    }
}
const addInterceptor = defineSyncApi(API_ADD_INTERCEPTOR, (method, interceptor) => {
    if (typeof method === 'string' && isPlainObject(interceptor)) {
        mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), interceptor);
    }
    else if (isPlainObject(method)) {
        mergeInterceptorHook(globalInterceptors, method);
    }
}, AddInterceptorProtocol);
const removeInterceptor = defineSyncApi(API_REMOVE_INTERCEPTOR, (method, interceptor) => {
    if (typeof method === 'string') {
        if (isPlainObject(interceptor)) {
            removeInterceptorHook(scopedInterceptors[method], interceptor);
        }
        else {
            delete scopedInterceptors[method];
        }
    }
    else if (isPlainObject(method)) {
        removeInterceptorHook(globalInterceptors, method);
    }
}, RemoveInterceptorProtocol);
const interceptors = {};

const API_ON = '$on';
const OnProtocol = [
    {
        name: 'event',
        type: String,
        required: true,
    },
    {
        name: 'callback',
        type: Function,
        required: true,
    },
];
const API_ONCE = '$once';
const OnceProtocol = OnProtocol;
const API_OFF = '$off';
const OffProtocol = [
    {
        name: 'event',
        type: [String, Array],
    },
    {
        name: 'callback',
        type: Function,
    },
];
const API_EMIT = '$emit';
const EmitProtocol = [
    {
        name: 'event',
        type: String,
        required: true,
    },
];

const E = function () {
    // Keep this empty so it's easier to inherit from
    // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
};
E.prototype = {
    on: function (name, callback, ctx) {
        var e = this.e || (this.e = {});
        (e[name] || (e[name] = [])).push({
            fn: callback,
            ctx: ctx,
        });
        return this;
    },
    once: function (name, callback, ctx) {
        var self = this;
        function listener() {
            self.off(name, listener);
            callback.apply(ctx, arguments);
        }
        listener._ = callback;
        return this.on(name, listener, ctx);
    },
    emit: function (name) {
        var data = [].slice.call(arguments, 1);
        var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
        var i = 0;
        var len = evtArr.length;
        for (i; i < len; i++) {
            evtArr[i].fn.apply(evtArr[i].ctx, data);
        }
        return this;
    },
    off: function (name, callback) {
        var e = this.e || (this.e = {});
        var evts = e[name];
        var liveEvents = [];
        if (evts && callback) {
            for (var i = 0, len = evts.length; i < len; i++) {
                if (evts[i].fn !== callback && evts[i].fn._ !== callback)
                    liveEvents.push(evts[i]);
            }
        }
        // Remove event from queue to prevent memory leak
        // Suggested by https://github.com/lazd
        // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
        liveEvents.length ? (e[name] = liveEvents) : delete e[name];
        return this;
    },
};
var Emitter = E;

const emitter = new Emitter();
const $on = defineSyncApi(API_ON, (name, callback) => {
    emitter.on(name, callback);
    return () => emitter.off(name, callback);
}, OnProtocol);
const $once = defineSyncApi(API_ONCE, (name, callback) => {
    emitter.once(name, callback);
    return () => emitter.off(name, callback);
}, OnceProtocol);
const $off = defineSyncApi(API_OFF, (name, callback) => {
    if (!name) {
        emitter.e = {};
        return;
    }
    if (!Array.isArray(name))
        name = [name];
    name.forEach((n) => emitter.off(n, callback));
}, OffProtocol);
const $emit = defineSyncApi(API_EMIT, (name, ...args) => {
    emitter.emit(name, ...args);
}, EmitProtocol);

const SYNC_API_RE = /^\$|getLocale|setLocale|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
const CONTEXT_API_RE = /^create|Manager$/;
// Context例外情况
const CONTEXT_API_RE_EXC = ['createBLEConnection'];
// 同步例外情况
const ASYNC_API = ['createBLEConnection'];
const CALLBACK_API_RE = /^on|^off/;
function isContextApi(name) {
    return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
}
function isSyncApi(name) {
    return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
}
function isCallbackApi(name) {
    return CALLBACK_API_RE.test(name) && name !== 'onPush';
}
function shouldPromise(name) {
    if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
        return false;
    }
    return true;
}
/* eslint-disable no-extend-native */
if (!Promise.prototype.finally) {
    Promise.prototype.finally = function (onfinally) {
        const promise = this.constructor;
        return this.then((value) => promise.resolve(onfinally && onfinally()).then(() => value), (reason) => promise.resolve(onfinally && onfinally()).then(() => {
            throw reason;
        }));
    };
}
function promisify(name, api) {
    if (!shouldPromise(name)) {
        return api;
    }
    if (!isFunction(api)) {
        return api;
    }
    return function promiseApi(options = {}) {
        if (isFunction(options.success) ||
            isFunction(options.fail) ||
            isFunction(options.complete)) {
            return wrapperReturnValue(name, invokeApi(name, api, options));
        }
        return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
            invokeApi(name, api, extend({}, options, {
                success: resolve,
                fail: reject,
            }));
        })));
    };
}

const CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
function initWrapper(protocols) {
    function processCallback(methodName, method, returnValue) {
        return function (res) {
            return method(processReturnValue(methodName, res, returnValue));
        };
    }
    function processArgs(methodName, fromArgs, argsOption = {}, returnValue = {}, keepFromArgs = false) {
        if (isPlainObject(fromArgs)) {
            // 一般 api 的参数解析
            const toArgs = (keepFromArgs === true ? fromArgs : {}); // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
            if (isFunction(argsOption)) {
                argsOption = argsOption(fromArgs, toArgs) || {};
            }
            for (const key in fromArgs) {
                if (hasOwn(argsOption, key)) {
                    let keyOption = argsOption[key];
                    if (isFunction(keyOption)) {
                        keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
                    }
                    if (!keyOption) {
                        // 不支持的参数
                        console.warn(`支付宝小程序 ${methodName} 暂不支持 ${key}`);
                    }
                    else if (isString(keyOption)) {
                        // 重写参数 key
                        toArgs[keyOption] = fromArgs[key];
                    }
                    else if (isPlainObject(keyOption)) {
                        // {name:newName,value:value}可重新指定参数 key:value
                        toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
                    }
                }
                else if (CALLBACKS.indexOf(key) !== -1) {
                    const callback = fromArgs[key];
                    if (isFunction(callback)) {
                        toArgs[key] = processCallback(methodName, callback, returnValue);
                    }
                }
                else {
                    if (!keepFromArgs && !hasOwn(toArgs, key)) {
                        toArgs[key] = fromArgs[key];
                    }
                }
            }
            return toArgs;
        }
        else if (isFunction(fromArgs)) {
            fromArgs = processCallback(methodName, fromArgs, returnValue);
        }
        return fromArgs;
    }
    function processReturnValue(methodName, res, returnValue, keepReturnValue = false) {
        if (isFunction(protocols.returnValue)) {
            // 处理通用 returnValue
            res = protocols.returnValue(methodName, res);
        }
        return processArgs(methodName, res, returnValue, {}, keepReturnValue);
    }
    return function wrapper(methodName, method) {
        if (!hasOwn(protocols, methodName)) {
            return method;
        }
        const protocol = protocols[methodName];
        if (!protocol) {
            // 暂不支持的 api
            return function () {
                console.error(`支付宝小程序 暂不支持${methodName}`);
            };
        }
        return function (arg1, arg2) {
            // 目前 api 最多两个参数
            let options = protocol;
            if (isFunction(protocol)) {
                options = protocol(arg1);
            }
            arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
            const args = [arg1];
            if (typeof arg2 !== 'undefined') {
                args.push(arg2);
            }
            const returnValue = my[options.name || methodName].apply(my, args);
            if (isSyncApi(methodName)) {
                // 同步 api
                return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
            }
            return returnValue;
        };
    };
}

const getLocale = () => {
    // 优先使用 $locale
    const app = getApp({ allowDefault: true });
    if (app && app.$vm) {
        return app.$vm.$locale;
    }
    return my.getSystemInfoSync().language || 'zh-Hans';
};
const setLocale = (locale) => {
    const app = getApp();
    if (!app) {
        return false;
    }
    const oldLocale = app.$vm.$locale;
    if (oldLocale !== locale) {
        app.$vm.$locale = locale;
        onLocaleChangeCallbacks.forEach((fn) => fn({ locale }));
        return true;
    }
    return false;
};
const onLocaleChangeCallbacks = [];
const onLocaleChange = (fn) => {
    if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
        onLocaleChangeCallbacks.push(fn);
    }
};
if (typeof global !== 'undefined') {
    global.getLocale = getLocale;
}

const baseApis = {
    $on,
    $off,
    $once,
    $emit,
    upx2px,
    interceptors,
    addInterceptor,
    removeInterceptor,
    onAppLaunch,
    getLocale,
    setLocale,
    onLocaleChange,
};
function initUni(api, protocols) {
    const wrapper = initWrapper(protocols);
    const UniProxyHandlers = {
        get(target, key) {
            if (hasOwn(target, key)) {
                return target[key];
            }
            if (hasOwn(api, key)) {
                return promisify(key, api[key]);
            }
            if (hasOwn(baseApis, key)) {
                return promisify(key, baseApis[key]);
            }
            // event-api
            // provider-api?
            return promisify(key, wrapper(key, my[key]));
        },
    };
    return new Proxy({}, UniProxyHandlers);
}

function initGetProvider(providers) {
    return function getProvider({ service, success, fail, complete, }) {
        let res;
        if (providers[service]) {
            res = {
                errMsg: 'getProvider:ok',
                service,
                provider: providers[service],
            };
            isFunction(success) && success(res);
        }
        else {
            res = {
                errMsg: 'getProvider:fail:服务[' + service + ']不存在',
            };
            isFunction(fail) && fail(res);
        }
        isFunction(complete) && complete(res);
    };
}

function addSafeAreaInsets(fromRes, toRes) {
    if (fromRes.safeArea) {
        const safeArea = fromRes.safeArea;
        toRes.safeAreaInsets = {
            top: safeArea.top,
            left: safeArea.left,
            right: fromRes.windowWidth - safeArea.right,
            bottom: fromRes.windowHeight - safeArea.bottom,
        };
    }
}

const redirectTo = {};

const getProvider = initGetProvider({
    oauth: ['alipay'],
    share: ['alipay'],
    payment: ['alipay'],
    push: ['alipay'],
});
function setStorageSync(key, data) {
    return my.setStorageSync({
        key,
        data,
    });
}
function getStorageSync(key) {
    const result = my.getStorageSync({
        key,
    });
    // 支付宝平台会返回一个 success 值,但是目前测试的结果这个始终是 true。当没有存储数据的时候,其它平台会返回空字符串。
    return result.data !== null ? result.data : '';
}
function removeStorageSync(key) {
    return my.removeStorageSync({
        key,
    });
}
function startGyroscope(args) {
    if (hasOwn(args, 'interval')) {
        console.warn('支付宝小程序 startGyroscope暂不支持interval');
    }
    args.success &&
        args.success({
            errMsg: 'startGyroscope:ok',
        });
    args.complete &&
        args.complete({
            errMsg: 'startGyroscope:ok',
        });
}
function createExecCallback(execCallback) {
    return function wrapperExecCallback(res) {
        this.actions.forEach((action, index) => {
            (action._$callbacks || []).forEach((callback) => {
                callback(res[index]);
            });
        });
        if (isFunction(execCallback)) {
            execCallback(res);
        }
    };
}
function addCallback(callback) {
    if (isFunction(callback)) {
        const action = this.actions[this.actions.length - 1];
        if (action) {
            (action._$callbacks || (action._$callbacks = [])).push(callback);
        }
    }
}
function createSelectorQuery() {
    const query = my.createSelectorQuery();
    const oldExec = query.exec;
    const oldScrollOffset = query.scrollOffset;
    const oldBoundingClientRect = query.boundingClientRect;
    query.exec = function exec(callback) {
        return oldExec.call(this, createExecCallback(callback).bind(this));
    };
    query.scrollOffset = function scrollOffset(callback) {
        const ret = oldScrollOffset.call(this);
        addCallback.call(this, callback);
        return ret;
    };
    query.boundingClientRect = function boundingClientRect(callback) {
        const ret = oldBoundingClientRect.call(this);
        addCallback.call(this, callback);
        return ret;
    };
    if (!query.fields) {
        query.fields = function ({ rect, size, scrollOffset }, callback) {
            if (rect || size) {
                this.boundingClientRect();
            }
            if (scrollOffset) {
                this.scrollOffset();
            }
            addCallback.call(this, callback);
            return this;
        };
    }
    if (!query.in) {
        query.in = function () {
            return this;
        };
    }
    return query;
}
function createIntersectionObserver(component, options) {
    if (options && options.observeAll) {
        options.selectAll = options.observeAll;
        delete options.observeAll;
    }
    return my.createIntersectionObserver(options);
}

var shims = /*#__PURE__*/Object.freeze({
    __proto__: null,
    getProvider: getProvider,
    setStorageSync: setStorageSync,
    getStorageSync: getStorageSync,
    removeStorageSync: removeStorageSync,
    startGyroscope: startGyroscope,
    createSelectorQuery: createSelectorQuery,
    createIntersectionObserver: createIntersectionObserver
});

function handleNetworkInfo(fromRes, toRes) {
    const nextworkType = fromRes.networkType;
    switch (nextworkType) {
        case 'NOTREACHABLE':
            toRes.networkType = 'none';
            break;
        case 'WWAN':
            // TODO ?
            toRes.networkType = '3g';
            break;
        default:
            toRes.networkType = fromRes.networkType.toLowerCase();
            break;
    }
}
function handleSystemInfo(fromRes, toRes) {
    addSafeAreaInsets(fromRes, toRes);
    let platform = fromRes.platform ? fromRes.platform.toLowerCase() : 'devtools';
    if (!~['android', 'ios'].indexOf(platform)) {
        platform = 'devtools';
    }
    toRes.platform = platform;
}
function returnValue(methodName, res = {}) {
    // 通用 returnValue 解析
    if (res.error || res.errorMessage) {
        res.errMsg = `${methodName}:fail ${res.errorMessage || res.error}`;
        delete res.error;
        delete res.errorMessage;
    }
    else {
        res.errMsg = `${methodName}:ok`;
    }
    return res;
}
const request = {
    name: my.canIUse('request') ? 'request' : 'httpRequest',
    args(fromArgs) {
        const method = fromArgs.method || 'GET';
        if (!fromArgs.header) {
            // 默认增加 header 参数,方便格式化 content-type
            fromArgs.header = {};
        }
        const headers = {
            'content-type': 'application/json',
        };
        Object.keys(fromArgs.header).forEach((key) => {
            headers[key.toLocaleLowerCase()] = fromArgs.header[key];
        });
        return {
            header() {
                return {
                    name: 'headers',
                    value: headers,
                };
            },
            data(data) {
                // 钉钉小程序在content-type为application/json时需上传字符串形式data,使用my.dd在真机运行钉钉小程序时不能正确判断
                if (my.canIUse('saveFileToDingTalk') &&
                    method.toUpperCase() === 'POST' &&
                    headers['content-type'].indexOf('application/json') === 0 &&
                    isPlainObject(data)) {
                    return {
                        name: 'data',
                        value: JSON.stringify(data),
                    };
                }
                return {
                    name: 'data',
                    value: data,
                };
            },
            method: 'method',
            responseType: false,
        };
    },
    returnValue: {
        status: 'statusCode',
        headers: 'header',
    },
};
const setNavigationBarColor = {
    name: 'setNavigationBar',
    args: {
        frontColor: false,
        animation: false,
    },
};
const setNavigationBarTitle = {
    name: 'setNavigationBar',
};
function showModal({ showCancel = true } = {}) {
    if (showCancel) {
        return {
            name: 'confirm',
            args: {
                cancelColor: false,
                confirmColor: false,
                cancelText: 'cancelButtonText',
                confirmText: 'confirmButtonText',
            },
            returnValue(fromRes, toRes) {
                toRes.confirm = fromRes.confirm;
                toRes.cancel = !fromRes.confirm;
            },
        };
    }
    return {
        name: 'alert',
        args: {
            confirmColor: false,
            confirmText: 'buttonText',
        },
        returnValue(fromRes, toRes) {
            toRes.confirm = true;
            toRes.cancel = false;
        },
    };
}
function showToast({ icon = 'success' } = {}) {
    const args = {
        title: 'content',
        icon: 'type',
        duration: false,
        image: false,
        mask: false,
    };
    if (icon === 'loading') {
        return {
            name: 'showLoading',
            args,
        };
    }
    return {
        name: 'showToast',
        args,
    };
}
const showActionSheet = {
    name: 'showActionSheet',
    args: {
        itemList: 'items',
        itemColor: false,
    },
    returnValue: {
        index: 'tapIndex',
    },
};
const showLoading = {
    args: {
        title: 'content',
        mask: false,
    },
};
const uploadFile = {
    args: {
        name: 'fileName',
    },
    // 从测试结果看,是有返回对象的,文档上没有说明。
};
const downloadFile = {
    returnValue: {
        apFilePath: 'tempFilePath',
    },
};
const getFileInfo = {
    args: {
        filePath: 'apFilePath',
    },
};
const compressImage = {
    args(fromArgs, toArgs) {
        toArgs.compressLevel = 4;
        if (fromArgs && fromArgs.quality) {
            toArgs.compressLevel = Math.floor(fromArgs.quality / 26);
        }
        if (fromArgs.src) {
            toArgs.apFilePaths = [fromArgs.src];
        }
    },
    returnValue(fromRes, toRes) {
        const apFilePaths = fromRes.apFilePaths;
        if (apFilePaths && apFilePaths.length) {
            toRes.tempFilePath = apFilePaths[0];
        }
    },
};
const chooseVideo = {
    // 支付宝小程序文档中未找到(仅在getSetting处提及),但实际可用
    returnValue: {
        apFilePath: 'tempFilePath',
    },
};
const connectSocket = {
    args: {
        method: false,
        protocols: false,
    },
    // TODO 有没有返回值还需要测试下
};
const chooseImage = {
    returnValue(result) {
        var _a, _b;
        const hasTempFilePaths = hasOwn(result, 'tempFilePaths') && result.tempFilePaths;
        if (hasOwn(result, 'apFilePaths') && !hasTempFilePaths) {
            result.tempFilePaths = [];
            (_a = result.apFilePaths) === null || _a === void 0 ? void 0 : _a.forEach((apFilePath) => { var _a; return (_a = result.tempFilePaths) === null || _a === void 0 ? void 0 : _a.push(apFilePath); });
        }
        if (!hasOwn(result, 'tempFiles') && hasTempFilePaths) {
            result.tempFiles = [];
            (_b = result.tempFilePaths) === null || _b === void 0 ? void 0 : _b.forEach((tempFilePath) => { var _a; return (_a = result.tempFiles) === null || _a === void 0 ? void 0 : _a.push({ path: tempFilePath }); });
        }
        return {};
    },
};
const previewImage = {
    args(fromArgs, toArgs) {
        // 支付宝小程序的 current 是索引值,而非图片地址。
        const currentIndex = Number(fromArgs.current);
        if (isNaN(currentIndex)) {
            if (fromArgs.current && isArray(fromArgs.urls)) {
                const index = fromArgs.urls.indexOf(fromArgs.current);
                toArgs.current = ~index ? index : 0;
            }
        }
        else {
            toArgs.current = currentIndex;
        }
        return {
            indicator: false,
            loop: false,
        };
    },
};
const saveFile = {
    args: {
        tempFilePath: 'apFilePath',
    },
    returnValue: {
        apFilePath: 'savedFilePath',
    },
};
const getSavedFileInfo = {
    args: {
        filePath: 'apFilePath',
    },
};
const getSavedFileList = {
    returnValue(fromRes, toRes) {
        toRes.fileList = fromRes.fileList.map((file) => {
            return {
                filePath: file.apFilePath,
                createTime: file.createTime,
                size: file.size,
            };
        });
    },
};
const removeSavedFile = {
    args: {
        filePath: 'apFilePath',
    },
};
const getLocation = {
    args: {
        type: false,
        altitude: false,
    },
};
const openLocation = {
    args: {
    // TODO address 参数在阿里上是必传的
    },
};
const getNetworkType = {
    returnValue: handleNetworkInfo,
};
const onNetworkStatusChange = {
    returnValue: handleNetworkInfo,
};
const stopAccelerometer = {
    name: 'offAccelerometerChange',
};
const stopCompass = {
    name: 'offCompassChange',
};
const scanCode = {
    name: 'scan',
    args: {
        onlyFromCamera: 'hideAlbum',
    },
    returnValue: {
        code: 'result',
    },
};
const setClipboardData = {
    name: 'setClipboard',
    args: {
        data: 'text',
    },
};
const getClipboardData = {
    name: 'getClipboard',
    returnValue: {
        text: 'data',
    },
};
const pageScrollTo = {
    args: {
        duration: false,
    },
};
const login = {
    name: 'getAuthCode',
    returnValue: {
        authCode: 'code',
    },
};
const getUserInfo = {
    name: my.canIUse('getOpenUserInfo') ? 'getOpenUserInfo' : 'getAuthUserInfo',
    returnValue(fromRes, toRes) {
        if (my.canIUse('getOpenUserInfo')) {
            let response;
            try {
                response = JSON.parse(fromRes.response).response;
            }
            catch (e) { }
            if (response) {
                toRes.userInfo = response;
                toRes.userInfo.avatarUrl = response.avatar;
                delete response.avatar;
            }
        }
        else {
            toRes.userInfo = {
                openId: '',
                nickName: fromRes.nickName,
                avatarUrl: fromRes.avatar,
            };
        }
    },
};
const requestPayment = {
    name: 'tradePay',
    args: {
        orderInfo: 'tradeNO',
    },
};
const getBLEDeviceServices = {
    returnValue(fromRes, toRes) {
        toRes.services = fromRes.services.map((item) => {
            return {
                uuid: item.serviceId,
                isPrimary: item.isPrimary,
            };
        });
    },
};
const createBLEConnection = {
    name: 'connectBLEDevice',
    args: {
        timeout: false,
    },
};
const closeBLEConnection = {
    name: 'disconnectBLEDevice',
};
const onBLEConnectionStateChange = {
    name: 'onBLEConnectionStateChanged',
};
const makePhoneCall = {
    args: {
        phoneNumber: 'number',
    },
};
const stopGyroscope = {
    name: 'offGyroscopeChange',
};
const getSystemInfo = {
    returnValue: handleSystemInfo,
};
const getSystemInfoSync = {
    returnValue: handleSystemInfo,
};
// 文档没提到,但是实测可用。
const canvasToTempFilePath = {
    returnValue(fromRes, toRes) {
        // 真机的情况下会有 tempFilePath 这个值,因此需要主动修改。
        toRes.tempFilePath = fromRes.apFilePath;
    },
};
const setScreenBrightness = {
    args: {
        value: 'brightness',
    },
};
const getScreenBrightness = {
    returnValue: {
        brightness: 'value',
    },
};
const showShareMenu = {
    name: 'showSharePanel',
};
const hideHomeButton = {
    name: 'hideBackHome',
};
const saveImageToPhotosAlbum = {
    name: 'saveImage',
    args: {
        filePath: 'url',
    },
};
const saveVideoToPhotosAlbum = {
    args: {
        filePath: 'src',
    },
};
const chooseAddress = {
    name: 'getAddress',
    returnValue(fromRes, toRes) {
        const info = fromRes.result || {};
        toRes.userName = info.fullname;
        toRes.countyName = info.country;
        toRes.provinceName = info.prov;
        toRes.cityName = info.city;
        toRes.detailInfo = info.address;
        toRes.telNumber = info.mobilePhone;
        toRes.errMsg = toRes.errMsg + ' ' + fromRes.resultStatus;
    },
};

var protocols = /*#__PURE__*/Object.freeze({
    __proto__: null,
    returnValue: returnValue,
    request: request,
    setNavigationBarColor: setNavigationBarColor,
    setNavigationBarTitle: setNavigationBarTitle,
    showModal: showModal,
    showToast: showToast,
    showActionSheet: showActionSheet,
    showLoading: showLoading,
    uploadFile: uploadFile,
    downloadFile: downloadFile,
    getFileInfo: getFileInfo,
    compressImage: compressImage,
    chooseVideo: chooseVideo,
    connectSocket: connectSocket,
    chooseImage: chooseImage,
    previewImage: previewImage,
    saveFile: saveFile,
    getSavedFileInfo: getSavedFileInfo,
    getSavedFileList: getSavedFileList,
    removeSavedFile: removeSavedFile,
    getLocation: getLocation,
    openLocation: openLocation,
    getNetworkType: getNetworkType,
    onNetworkStatusChange: onNetworkStatusChange,
    stopAccelerometer: stopAccelerometer,
    stopCompass: stopCompass,
    scanCode: scanCode,
    setClipboardData: setClipboardData,
    getClipboardData: getClipboardData,
    pageScrollTo: pageScrollTo,
    login: login,
    getUserInfo: getUserInfo,
    requestPayment: requestPayment,
    getBLEDeviceServices: getBLEDeviceServices,
    createBLEConnection: createBLEConnection,
    closeBLEConnection: closeBLEConnection,
    onBLEConnectionStateChange: onBLEConnectionStateChange,
    makePhoneCall: makePhoneCall,
    stopGyroscope: stopGyroscope,
    getSystemInfo: getSystemInfo,
    getSystemInfoSync: getSystemInfoSync,
    canvasToTempFilePath: canvasToTempFilePath,
    setScreenBrightness: setScreenBrightness,
    getScreenBrightness: getScreenBrightness,
    showShareMenu: showShareMenu,
    hideHomeButton: hideHomeButton,
    saveImageToPhotosAlbum: saveImageToPhotosAlbum,
    saveVideoToPhotosAlbum: saveVideoToPhotosAlbum,
    chooseAddress: chooseAddress,
    redirectTo: redirectTo,
    navigateTo: navigateTo
});

var index = initUni(shims, protocols);

export { index as default };


text:
class AutocompleteProviderListener;
class PrefRegistrySimple;

namespace network {
class SimpleURLLoader;
}

// Autocomplete provider for searches based on the current URL.
//
// The controller will call Start() when the user focuses the omnibox. After
// construction, the autocomplete controller repeatedly calls Start() with some
// user input, each time expecting to receive an updated set of matches.
//
// TODO(jered): Consider deleting this class and building this functionality
// into SearchProvider after dogfood and after we break the association between
// omnibox text and suggestions.
class ZeroSuggestProvider : public BaseSearchProvider {
 public:
  // The result type that can be processed by ZeroSuggestProvider.
  // Public for testing purposes and for use in LocalHistoryZeroSuggestProvider.
  enum class ResultType {
    kNone = 0,

    // The remote endpoint is queried for zero-prefix suggestions. The endpoint
    // is sent the user's authentication state, but not the current papge URL.
    kRemoteNoURL = 1,

    // The emote endpoint is queried for zero-prefix suggestions. The endpoint
    // is sent both the user's authentication state and the current page URL.
    kRemoteSendURL = 2,
  };

  // Returns the type of results that should be generated for the given context;
  // however, it does not check whether or not a suggest request can be made.
  // Those checks must be done using BaseSearchProvider::CanSendRequest() and
  // BaseSearchProvider::CanSendPageURLInRequest() for the kRemoteNoURL and
  // kRemoteSendURL variants respectively.
  // This method is static to avoid depending on the provider state.
  static ResultType ResultTypeToRun(const AutocompleteProviderClient* client,
                                    const AutocompleteInput& input);

  // Called in Start() or StartPrefetch(), confirms whether zero-prefix
  // suggestions are allowed in the given context and logs eligibility UMA
  // metrics. Must be called exactly once. Otherwise the meaning of the the
  // metrics it logs would change.
  // This method is static to avoid depending on the provider state.
  static bool AllowZeroPrefixSuggestions(
      const AutocompleteProviderClient* client,
      const AutocompleteInput& input);

  // Creates and returns an instance of this provider.
  static ZeroSuggestProvider* Create(AutocompleteProviderClient* client,
                                     AutocompleteProviderListener* listener);

  // Registers a preference used to cache the zero suggest response.
  static void RegisterProfilePrefs(PrefRegistrySimple* registry);

  // AutocompleteProvider:
  void StartPrefetch(const AutocompleteInput& input) override;
  void Start(const AutocompleteInput& input, bool minimal_changes) override;
  void Stop(bool clear_cached_results,
            bool due_to_user_inactivity) override;
  void DeleteMatch(const AutocompleteMatch& match) override;
  void AddProviderInfo(ProvidersInfo* provider_info) const override;

  // Sets |field_trial_triggered_| to false.
  void ResetSession() override;

  // Returns the list of experiment stats corresponding to |matches_|. Will be
  // logged to SearchboxStats as part of a GWS experiment, if any.
  const SearchSuggestionParser::ExperimentStatsV2s& experiment_stats_v2s()
      const {
    return experiment_stats_v2s_;
  }

  ResultType GetResultTypeRunningForTesting() const {
    return result_type_running_;
  }

 private:
  ZeroSuggestProvider(AutocompleteProviderClient* client,
                      AutocompleteProviderListener* listener);

  ~ZeroSuggestProvider() override;

  ZeroSuggestProvider(const ZeroSuggestProvider&) = delete;
  ZeroSuggestProvider& operator=(const ZeroSuggestProvider&) = delete;

  // BaseSearchProvider:
  bool ShouldAppendExtraParams(
      const SearchSuggestionParser::SuggestResult& result) const override;
  void RecordDeletionResult(bool success) override;

  // Called when the non-prefetch network request has completed.
  // `input` and `result_type` are bound to this callback. The former is the
  // input for which the request was made and the latter indicates the result
  // type being received in this callback.
  void OnURLLoadComplete(const AutocompleteInput& input,
                         ResultType result_type,
                         const network::SimpleURLLoader* source,
                         std::unique_ptr<std::string> response_body);
  // Called when the prefetch network request has completed.
  // `input` and `result_type` are bound to this callback. The former is the
  // input for which the request was made and the latter indicates the result
  // type being received in this callback.
  void OnPrefetchURLLoadComplete(const AutocompleteInput& input,
                                 ResultType result_type,
                                 const network::SimpleURLLoader* source,
                                 std::unique_ptr<std::string> response_body);

  // Returns an AutocompleteMatch for a navigational suggestion |navigation|.
  AutocompleteMatch NavigationToMatch(
      const SearchSuggestionParser::NavigationResult& navigation);

  // Called either in Start() with |results| populated from the cached response,
  // where |matches_| are empty; or in OnURLLoadComplete() with |results|
  // populated from the remote response, where |matches_| may not be empty.
  //
  // Uses |results| and |input| to populate |matches_| and its associated
  // metadata. Also logs how many results were received. Note that an empty
  // result set will clear |matches_|.
  void ConvertSuggestResultsToAutocompleteMatches(
      const SearchSuggestionParser::Results& results,
      const AutocompleteInput& input);

  // The result type that is currently being retrieved and processed for
  // non-prefetch requests.
  // Set in Start() and used in Stop() for logging purposes.
  ResultType result_type_running_{ResultType::kNone};

  // Loader used to retrieve results for non-prefetch requests.
  std::unique_ptr<network::SimpleURLLoader> loader_;

  // Loader used to retrieve results for prefetch requests.
  std::unique_ptr<network::SimpleURLLoader> prefetch_loader_;

  // The list of experiment stats corresponding to |matches_|.
  SearchSuggestionParser::ExperimentStatsV2s experiment_stats_v2s_;

  // For callbacks that may be run after destruction.
  base::WeakPtrFactory<ZeroSuggestProvider> weak_ptr_factory_{this};
};

#endif  // COMPONENTS_OMNIBOX_BROWSER_ZERO_SUGGEST_PROVIDER_H_


text:
.class public Lcom/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager;
.super Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;
.source "RuimPhoneBookInterfaceManager.java"

# static fields
.field static final LOG_TAG:Ljava/lang/String; = "CDMA"

# direct methods
.method public constructor <init>(Lcom/android/internal/telephony/cdma/CDMAPhone;)V
    .locals 0
    .parameter "phone"

    .prologue
    .line 37
    invoke-direct {p0, p1}, Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;-><init>(Lcom/android/internal/telephony/PhoneBase;)V

    .line 39
    return-void
.end method

# virtual methods
.method public dispose()V
    .locals 0

    .prologue
    .line 42
    invoke-super {p0}, Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->dispose()V

    .line 43
    return-void
.end method

.method protected finalize()V
    .locals 3

    .prologue
    .line 47
    :try_start_0
    invoke-super {p0}, Lcom/android/internal/telephony/IccPhoneBookInterfaceManager;->finalize()V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    .line 51
    :goto_0
    const-string v1, "CDMA"

    const-string v2, "RuimPhoneBookInterfaceManager finalized"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 52
    return-void

    .line 48
    :catch_0
    move-exception v0

    .line 49
    .local v0, throwable:Ljava/lang/Throwable;
    const-string v1, "CDMA"

    const-string v2, "Error while finalizing:"

    invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0
.end method

.method public getAdnRecordsSize(I)[I
    .locals 6
    .parameter "efid"

    .prologue
    .line 55
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "getAdnRecordsSize: efid="

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {p0, v3}, Lcom/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager;->logd(Ljava/lang/String;)V

    .line 56
    iget-object v4, p0, Lcom/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager;->mLock:Ljava/lang/Object;

    monitor-enter v4

    .line 57
    :try_start_0
    invoke-virtual {p0}, Lcom/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager;->checkThread()V

    .line 58
    const/4 v3, 0x3

    new-array v3, v3, [I

    iput-object v3, p0, Lcom/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager;->recordSize:[I

    .line 61
    new-instance v2, Ljava/util/concurrent/atomic/AtomicBoolean;

    const/4 v3, 0x0

    invoke-direct {v2, v3}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V

    .line 62
    .local v2, status:Ljava/util/concurrent/atomic/AtomicBoolean;
    iget-object v3, p0, Lcom/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager;->mBaseHandler:Landroid/os/Handler;

    const/4 v5, 0x1

    invoke-virtual {v3, v5, v2}, Landroid/os/Handler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v1

    .line 64
    .local v1, response:Landroid/os/Message;
    iget-object v3, p0, Lcom/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager;->phone:Lcom/android/internal/telephony/PhoneBase;

    invoke-virtual {v3}, Lcom/android/internal/telephony/PhoneBase;->getIccFileHandler()Lcom/android/internal/telephony/IccFileHandler;

    move-result-object v0

    .line 66
    .local v0, fh:Lcom/android/internal/telephony/IccFileHandler;
    if-eqz v0, :cond_0

    .line 67
    invoke-virtual {v0, p1, v1}, Lcom/android/internal/telephony/IccFileHandler;->getEFLinearRecordSize(ILandroid/os/Message;)V

    .line 68
    invoke-virtual {p0, v2}, Lcom/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager;->waitForResult(Ljava/util/concurrent/atomic/AtomicBoolean;)V

    .line 70
    :cond_0
    monitor-exit v4
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 72
    iget-object v3, p0, Lcom/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager;->recordSize:[I

    return-object v3

    .line 70
    .end local v0           #fh:Lcom/android/internal/telephony/IccFileHandler;
    .end local v1           #response:Landroid/os/Message;
    .end local v2           #status:Ljava/util/concurrent/atomic/AtomicBoolean;
    :catchall_0
    move-exception v3

    :try_start_1
    monitor-exit v4
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw v3
.end method

.method protected logd(Ljava/lang/String;)V
    .locals 3
    .parameter "msg"

    .prologue
    .line 76
    const-string v0, "CDMA"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "[RuimPbInterfaceManager] "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 77
    return-void
.end method

.method protected loge(Ljava/lang/String;)V
    .locals 3
    .parameter "msg"

    .prologue
    .line 80
    const-string v0, "CDMA"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "[RuimPbInterfaceManager] "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 81
    return-void
.end method