text:
#pragma checksum "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4ac745e835ea247821de1e47d6f3159624dc95bf"
// <auto-generated/>
#pragma warning disable 1591
[assembly: global::Microsoft.AspNetCore.Razor.Hosting.RazorCompiledItemAttribute(typeof(AspNetCore.Areas_AdminPanel_Views_Post_Create), @"mvc.1.0.view", @"/Areas/AdminPanel/Views/Post/Create.cshtml")]
[assembly:global::Microsoft.AspNetCore.Mvc.Razor.Compilation.RazorViewAttribute(@"/Areas/AdminPanel/Views/Post/Create.cshtml", typeof(AspNetCore.Areas_AdminPanel_Views_Post_Create))]
namespace AspNetCore
{
    #line hidden
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Mvc;
    using Microsoft.AspNetCore.Mvc.Rendering;
    using Microsoft.AspNetCore.Mvc.ViewFeatures;
#line 1 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\_ViewImports.cshtml"
using CMS.Web.UI;

#line default
#line hidden
#line 2 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\_ViewImports.cshtml"
using CMS.ViewModel;

#line default
#line hidden
#line 3 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\_ViewImports.cshtml"
using CMS.ViewModel.Admin;

#line default
#line hidden
#line 1 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
using CMS.Entities.Contracts;

#line default
#line hidden
    [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"4ac745e835ea247821de1e47d6f3159624dc95bf", @"/Areas/AdminPanel/Views/Post/Create.cshtml")]
    [global::Microsoft.AspNetCore.Razor.Hosting.RazorSourceChecksumAttribute(@"SHA1", @"369ee60ab6ec03a3b9b8d00722199dab25ffd12d", @"/Areas/AdminPanel/Views/_ViewImports.cshtml")]
    public class Areas_AdminPanel_Views_Post_Create : global::Microsoft.AspNetCore.Mvc.Razor.RazorPage<PostViewModel>
    {
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_0 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("href", new global::Microsoft.AspNetCore.Html.HtmlString("~/lib/summernote/summernote-bs4.css"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_1 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("rel", new global::Microsoft.AspNetCore.Html.HtmlString("stylesheet"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_2 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("href", new global::Microsoft.AspNetCore.Html.HtmlString("~/lib/chosen/component-chosen.css"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_3 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("form-control "), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_4 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "text", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_5 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("placeholder", new global::Microsoft.AspNetCore.Html.HtmlString("عنوان"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_6 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("selected", new global::Microsoft.AspNetCore.Html.HtmlString("selected"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_7 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("value", "", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_8 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("form-control custom-select"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_9 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("input-file"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_10 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("id", new global::Microsoft.AspNetCore.Html.HtmlString("my-file"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_11 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "file", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_12 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("form-control"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_13 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("maxlength", new global::Microsoft.AspNetCore.Html.HtmlString("300"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_14 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", new global::Microsoft.AspNetCore.Html.HtmlString("text"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_15 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("placeholder", new global::Microsoft.AspNetCore.Html.HtmlString(" چکیده متن"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_16 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("multiple", new global::Microsoft.AspNetCore.Html.HtmlString("multiple"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_17 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("data-placeholder", new global::Microsoft.AspNetCore.Html.HtmlString("انتخاب تگ ها ..."), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_18 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("id", new global::Microsoft.AspNetCore.Html.HtmlString("tagList"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_19 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("class", new global::Microsoft.AspNetCore.Html.HtmlString("form-control form-control-chosen"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_20 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("placeholder", new global::Microsoft.AspNetCore.Html.HtmlString("متن"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_21 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("type", "checkbox", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_22 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("id", new global::Microsoft.AspNetCore.Html.HtmlString("registerForm"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_23 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("method", "post", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_24 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("asp-action", "Create", global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_25 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("enctype", new global::Microsoft.AspNetCore.Html.HtmlString("multipart/form-data"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        private static readonly global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute __tagHelperAttribute_26 = new global::Microsoft.AspNetCore.Razor.TagHelpers.TagHelperAttribute("src", new global::Microsoft.AspNetCore.Html.HtmlString("~/admin/js/uploader.js"), global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
        #line hidden
        #pragma warning disable 0169
        private string __tagHelperStringValueBuffer;
        #pragma warning restore 0169
        private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext;
        private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner();
        private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __backed__tagHelperScopeManager = null;
        private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager
        {
            get
            {
                if (__backed__tagHelperScopeManager == null)
                {
                    __backed__tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(StartTagHelperWritingScope, EndTagHelperWritingScope);
                }
                return __backed__tagHelperScopeManager;
            }
        }
        private global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper;
        private global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper;
        private global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper;
        private global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper;
        private global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper;
        private global::Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper;
        private global::Microsoft.AspNetCore.Mvc.TagHelpers.OptionTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper;
        private global::Microsoft.AspNetCore.Mvc.TagHelpers.TextAreaTagHelper __Microsoft_AspNetCore_Mvc_TagHelpers_TextAreaTagHelper;
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(53, 68, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "af2c2717dde3489393d053be27c8f0e5", async() => {
            }
            );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(121, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            BeginContext(123, 66, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "c7096af5b39342bbb302d45dc020fadc", async() => {
            }
            );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(189, 4, true);
            WriteLiteral("\r\n\r\n");
            EndContext();
#line 6 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"

    ViewData["Title"] = "ایجاد پست جدید";

#line default
#line hidden
            BeginContext(243, 589, true);
            WriteLiteral(@"

            صفحه ارسال محتوا

            فایل های مرتبط

            English Content

");
            EndContext();
#line 29 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
 if (TempData["result"] != null && TempData["result"].ToString() == "success") //move to edit page
{

#line default
#line hidden
            BeginContext(935, 246, true);
            WriteLiteral("
\r\n        پست با موفقیت ارسال گردید . برای سایر کارها میتوانید از نوار راهبری بالا برای دسترسی به آنها استفاده نمایید.\r\n
\r\n");
            EndContext();
#line 34 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
}
else if (TempData["result"] != null && TempData["result"].ToString() == "failed")
{

#line default
#line hidden
            BeginContext(1270, 190, true);
            WriteLiteral("
\r\n        متاسفانه خطایی رخ داده است ! لطفا مجددا تلاش نمائید.\r\n
\r\n");
            EndContext();
#line 40 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
}

#line default
#line hidden
            BeginContext(1463, 90, true);
            WriteLiteral("\r\n
\r\n
\r\n\r\n        ");
            EndContext();
            BeginContext(1553, 4974, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("form", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "d4076b6e0b0246aeb88bb749af53d9c8", async() => {
                BeginContext(1664, 119, true);
                WriteLiteral("\r\n
\r\n
\r\n                    ");
                EndContext();
                BeginContext(1783, 77, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "4425aa85fdd44b419007246f5f480551", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper);
#line 48 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Title);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
                __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.InputTypeName = (string)__tagHelperAttribute_4.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_4);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1860, 22, true);
                WriteLiteral("\r\n                    ");
                EndContext();
                BeginContext(1882, 40, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("span", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "3a28974848704e4aa794a42c5d38e8bb", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper);
#line 49 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Title);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-validation-for", __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(1922, 28, true);
                WriteLiteral("\r\n
\r\n\r\n");
                EndContext();
                BeginContext(2263, 73, true);
                WriteLiteral("
\r\n                    ");
                EndContext();
                BeginContext(2336, 210, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("select", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "516aab29df0f48d5b0f0d6529dc92dcc", async() => {
                    BeginContext(2432, 26, true);
                    WriteLiteral("\r\n                        ");
                    EndContext();
                    BeginContext(2458, 57, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("option", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "db14b19f778f46a98e4949f1e3ff8ccc", async() => {
                        BeginContext(2495, 11, true);
                        WriteLiteral("انتخاب گروه");
                        EndContext();
                    }
                    );
                    __Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.OptionTagHelper>();
                    __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper);
                    __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6);
                    __Microsoft_AspNetCore_Mvc_TagHelpers_OptionTagHelper.Value = (string)__tagHelperAttribute_7.Value;
                    __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_7);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(2515, 22, true);
                    WriteLiteral("\r\n                    ");
                    EndContext();
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper);
#line 57 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.CategoryId);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 57 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items = Model.AllCategories;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-items", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_8);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2546, 22, true);
                WriteLiteral("\r\n                    ");
                EndContext();
                BeginContext(2568, 45, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("span", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "a69ede7db7144777b08e9f9276584f50", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper);
#line 60 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.CategoryId);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-validation-for", __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2613, 150, true);
                WriteLiteral("\r\n
\r\n\r\n
\r\n\r\n
\r\n                        ");
                EndContext();
                BeginContext(2763, 77, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "604f3021cf354bc1abcb12915f223e31", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper);
#line 66 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.PostImageUpload);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_9);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_10);
                __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.InputTypeName = (string)__tagHelperAttribute_11.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_11);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2840, 145, true);
                WriteLiteral("\r\n                        انتخاب تصویر برای پست...\r\n                        ");
                EndContext();
                BeginContext(2985, 50, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("span", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "fb326fdd5f0b4eca8d0be53e8b48e748", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper);
#line 68 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.PostImageUpload);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-validation-for", __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(3035, 245, true);
                WriteLiteral("\r\n
\r\n

\r\n\r\n
\r\n\r\n\r\n
\r\n
\r\n
\r\n                    ");
                EndContext();
                BeginContext(3280, 117, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("textarea", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "3cdf3dc0da77470c84d5ab1b8d578490", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_TextAreaTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.TextAreaTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_TextAreaTagHelper);
#line 78 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_TextAreaTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Description);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_TextAreaTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_12);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_13);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_14);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_15);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(3397, 22, true);
                WriteLiteral("\r\n                    ");
                EndContext();
                BeginContext(3419, 46, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("span", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "09690d70034e494e8d7aa503323ffc89", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper);
#line 79 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Description);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-validation-for", __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(3465, 88, true);
                WriteLiteral("\r\n
\r\n\r\n
\r\n                    ");
                EndContext();
                BeginContext(3553, 205, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("select", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "9f2561e6203343eab8b50c5daf9a0368", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.SelectTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper);
#line 83 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.SelectedTags);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 83 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items = Model.AllTags;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-items", __Microsoft_AspNetCore_Mvc_TagHelpers_SelectTagHelper.Items, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_16);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_17);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_18);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_19);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(3758, 393, true);
                WriteLiteral(@"

                        برای افزودن تگ های بیشتر به لیست
                        اینجا
                        کلیک کنید

                    ");
                EndContext();
                BeginContext(4151, 47, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("span", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "c28c51a18e3a4c0496fef305fae96a31", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.ValidationMessageTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper);
#line 91 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.SelectedTags);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-validation-for", __Microsoft_AspNetCore_Mvc_TagHelpers_ValidationMessageTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(4198, 91, true);
                WriteLiteral("\r\n
\r\n
\r\n\r\n
\r\n");
                EndContext();
                BeginContext(4329, 53, true);
                WriteLiteral("
\r\n");
                EndContext();
                BeginContext(4462, 20, true);
                WriteLiteral("                    ");
                EndContext();
                BeginContext(4482, 54, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("textarea", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "ecb36faf75e24063bb9e0c3924022d33", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_TextAreaTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.TextAreaTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_TextAreaTagHelper);
#line 99 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_TextAreaTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.Body);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_TextAreaTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_20);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(4536, 1694, true);
                WriteLiteral(@"

راهنما

                                    لطفا توجه فرمائید:

                                    لطفا برای تصویر مربوط به پست ، از فرمت های
                                    JPeg  و PNG
                                    استفاده نمایید .

                                    حجم تصویر باید کمتر از 1 مگابایت باشد .

                                    لطفا از تصاویر دارای کیفیت مناسب استفاده نمایید  زیرا تصویر ارسالی پس از ثبت فشرده و بهینه میگردد.

");
                WriteLiteral(@"
                                    پس از ذخیره این صفحه میتوانید فایل های مرتبط و مورد نیاز خود را برای این پست آپلود نمایید.

                                    پس از آپلود آدرس لینک ها در این پنل نیز نمایش داده میشود و میتوانید در ویرایشگر نیز از آدرس آنها استفاده نمایید.

                    ");
                EndContext();
                BeginContext(6230, 47, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "e719d6f86d9747b1b9429bc6fd117605", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.InputTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper);
#line 135 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For = ModelExpressionProvider.CreateModelExpression(ViewData, __model => __model.IsPublished);

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("asp-for", __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.For, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __Microsoft_AspNetCore_Mvc_TagHelpers_InputTagHelper.InputTypeName = (string)__tagHelperAttribute_21.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_21);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(6277, 243, true);
                WriteLiteral("\r\n                     انتشار نهایی در سایت انجام شود\r\n
\r\n                <button id=\"btnSubmit\" type=\"submit\" class=\"btn btn-info \"> ذخیره اطلاعات </button>\r\n
\r\n\r\n        ");
                EndContext();
            }
            );
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.FormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper);
            __Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_TagHelpers_RenderAtEndOfFormTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_22);
#line 45 "D:\Codes\CMS\CMS\CMS.Web.UI\Areas\AdminPanel\Views\Post\Create.cshtml"
__Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Antiforgery = true;

#line default
#line hidden
            __tagHelperExecutionContext.AddTagHelperAttribute("asp-antiforgery", __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Antiforgery, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Method = (string)__tagHelperAttribute_23.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_23);
            __Microsoft_AspNetCore_Mvc_TagHelpers_FormTagHelper.Action = (string)__tagHelperAttribute_24.Value;
            __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_24);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_25);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(6527, 370, true);
            WriteLiteral(@"

    <button type=""button"" class=""close"" onclick=""Custombox.modal.close();"">
        ×Close
    </button>

افزودن تگ جدید

");
            EndContext();
            BeginContext(6956, 24, true);
            WriteLiteral("
\r\n
\r\n\r\n\r\n");
            EndContext();
            DefineSection("Scripts", async() => {
                BeginContext(6997, 6, true);
                WriteLiteral("\r\n    ");
                EndContext();
                BeginContext(7003, 46, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("script", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "51548394055848ad8290a763f399e6e0", async() => {
                }
                );
                __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
                __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_26);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(7049, 2, true);
                WriteLiteral("\r\n");
                EndContext();
            }
            );
        }
        #pragma warning restore 1998
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.ViewFeatures.IModelExpressionProvider ModelExpressionProvider { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.IUrlHelper Url { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.IViewComponentHelper Component { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.Rendering.IJsonHelper Json { get; private set; }
        [global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
        public global::Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<PostViewModel> Html { get; private set; }
    }
}
#pragma warning restore 1591

repository: hosseinats/BaseCoreCMS

repo_name: hosseinats/BaseCoreCMS

extension: cs


text:
import {Component, OnInit} from '@angular/core';
import {LoginService} from '../../services/login/login.service';
import {LoginModel} from '../../models/LoginModel';
import {AbstractControl, FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NotificationService} from '@shared/notifications/notification.service';
import {Router} from '@angular/router';

@Component({
  selector: 'app-login',
  templateUrl: './login.component.html',
  styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit {

  loginForm: FormGroup;
  submitting = false;

  ADMIN_USER = 'administrador';
  ADMIN_PASSWORD = 'tplate';

  constructor(private service: LoginService,
              private notificationService: NotificationService,
              public formBuilder: FormBuilder,
              private router: Router) {
  }

  ngOnInit(): void {

    this.loginForm = this.formBuilder.group({
      username: [this.ADMIN_USER, [Validators.required]],
      password: [this.ADMIN_PASSWORD, [Validators.required]]
    });

  }

  login(): void {
    this.submitting = true;
    const model: LoginModel = this.loginForm.value as LoginModel;
    this.service.login(model)
      .subscribe(
        (msg) => {
          this.notificationService.showSuccess(msg);
          this.router.navigate(['/dashboard']);
          this.submitting = false;
        },
        (msg) => {
          this.notificationService.showError(msg);
          this.submitting =false;
        }
      );
  }

  get getFormControls(): { [p: string]: AbstractControl }  {
    return this.loginForm.controls;
  }

}

license: MIT

license_type: permissive

branch_name: refs/heads/master

extension: ts


text:
using System;
using Newtonsoft.Json;

/* Data structures are defined in this file
 */

namespace MLTwitter
{
	[Serializable]
	internal class TWBearerToken
	{
		[JsonProperty("token_type")]
		public string TokenType { get; private set; }

		[JsonProperty("access_token")]
		public string AccessToken { get; private set; }
	}

	[Serializable]
	public class TWMediaUploadInitResponse
	{
		[JsonProperty("media_id_string")]
		public string MediaId { get; private set; }

		[JsonProperty("expires_after_secs")]
		public int ExpirationSeconds { get; private set; }
	}

	[Serializable]
	public class TWMediaUploadFinalizeResponse
	{
		[JsonProperty("media_id_string")]
		public string MediaId { get; private set; }

		[JsonProperty("expires_after_secs")]
		public int ExpirationSeconds { get; private set; }

		[JsonProperty("processing_info")]
		public TWMediaUploadProcessingInfo ProcessingInfo { get; private set; }

		[JsonProperty("image")]
		public TWMediaUploadImage Image { get; private set; }
	}

	[Serializable]
	public class TWMediaUploadStatusResponse
	{
		[JsonProperty("media_id_string")]
		public string MediaId { get; private set; }

		[JsonProperty("expires_after_secs")]
		public int ExpirationSeconds { get; private set; }

		[JsonProperty("processing_info")]
		public TWMediaUploadProcessingInfo ProcessingInfo { get; private set; }
	}

	[Serializable]
	public class TWMediaUploadImage
	{
		[JsonProperty("image_type")]
		public string ImageType { get; private set; }

		[JsonProperty("w")]
		public int Width { get; private set; }

		[JsonProperty("h")]
		public int Height { get; private set; }
	}

	[Serializable]
	public class TWMediaUploadProcessingInfo
	{
		[JsonProperty("state")]
		public string State { get; private set; }

		[JsonProperty("check_after_secs")]
		public int CheckSeconds { get; private set; }

		[JsonProperty("progress_percent")]
		public int Percentage { get; private set; }

		[JsonProperty("error")]
		public TWMediaUploadError Error { get; private set; }
	}

	[Serializable]
	public class TWMediaUploadError
	{
		[JsonProperty("code")]
		public int Code { get; private set; }

		[JsonProperty("name")]
		public string Name { get; private set; }

		[JsonProperty("message")]
		public string Message { get; private set; }
	}

	[Serializable]
	public class TWUser
	{
		[JsonProperty("name")]
		public string Name { get; private set; }

		[JsonProperty("screen_name")]
		public string ScreenName { get; private set; }

		[JsonProperty("profile_image_url_https")]
		public string ProfileImageUrl { get; private set; }

		[JsonProperty("status")]
		public TWStatus Status { get; private set; }
	}

	[Serializable]
	public class TWStatus
	{
		[JsonProperty("text")]
		public string Text { get; private set; }

		[JsonProperty("created_at"), JsonConverter(typeof(TWDateTimeConvereter))]
		public DateTime DateTime { get; private set; }

		[JsonProperty("extended_entities")]
		public TWEntities ExtendedEntities { get; private set; }
	}

	[Serializable]
	public class TWEntities
	{
		[JsonProperty("media")]
		public TWMediaObject[] Media { get; private set; }
	}

	[Serializable]
	public class TWMediaObject
	{
		[JsonProperty("display_url")]
		public string Url { get; private set; }

		[JsonProperty("type")]
		public string Type { get; private set; }

		[JsonProperty("video_info")]
		public TWVideoInfo VideoInfo { get; private set; }
	}

	[Serializable]
	public class TWVideoInfo
	{
		[JsonProperty("variants")]
		public TWVideoVariant[] Variants { get; private set; }
	}

	[Serializable]
	public class TWVideoVariant
	{
		[JsonProperty("content_type")]
		public string ContentType { get; private set; }

		[JsonProperty("url")]
		public string Url { get; private set; }
	}
}


text:
package structs

import (
	"github.com/Viking2012/goraynor/src/quantilr"
	"gonum.org/v1/gonum/stat/distuv"
)

type ProductContainer struct {
	ProductID       string
	DecileModel     distuv.Categorical
	CustomerRecords []CustomerContainer
}

type CustomerContainer struct {
	CustomerID   string
	PriceRecords []PriceRecord
	LifeSpan     int16
	DecileCounts []quantilr.DecilePair
}

branch_name: refs/heads/main

extension: go


text:
@article{millage2021self,
  title={Self-financed marine protected areas},
  author={Millage, Katherine DeRuyter and Villase{\~n}or-Derbez, Juan Carlos and Bradley, Darcy and Burgess, Matthew G and Lenihan, Hunter S and Costello, Christopher},
  journal={Environmental Research Letters},
  year={2021},
  publisher={IOP Publishing}
}

repository: jcvdav/villasenor-derbez

repo_name: jcvdav/villasenor-derbez

gha_license_id: MIT

gha_language: HTML

extension: bib


text:
#ifndef _Interpolation_hpp_
#define _Interpolation_hpp_

#include "SDK/gsl/interpolation/gsl_interp.h"
#include <vector>

namespace Sim
{

namespace Math
{

struct InterpolationTableBounds
{
	InterpolationTableBounds(const double * xIn, const double * yIn, const size_t sizeIn) : x(xIn), y(yIn), size(sizeIn) {;}
	const double * x;
	const double * y;
	const size_t	size;
};

class InterpolationTable
{
public:
	template<size_t arraySize>
	InterpolationTable(const double (&xIn)[arraySize], const double (&yIn)[arraySize])
	{
		x.resize(arraySize);
		std::copy(x, xIn, xIn + arraySize);
		y.resize(arraySize);
		std::copy(y, yIn, yIn + arraySize);
	}
	inline InterpolationTableBounds getBounds() const { return InterpolationTableBounds(&*x.begin(), &*x.end(), x.size()); }
private:
	std::vector<double> x;
	std::vector<double> y;
};

template<size_t size>
class FixedInterpolationTable
{
public:
	FixedInterpolationTable(const double (&xIn)[size], const double (&yIn)[size])
	{
		std::copy(xIn, xIn + size, x);
		std::copy(yIn, yIn + size, y);
	}
	inline InterpolationTableBounds getBounds() const { return InterpolationTableBounds(x, y, size); }
private:
	double x[size];
	double y[size];
};

enum InterpType
{
	INTERP_TYPE_LINEAR,
	INTERP_TYPE_MAX
};

static const gsl_interp_type * interpTypes[INTERP_TYPE_MAX] = {
	gsl_interp_linear/*,
	gsl_interp_polynomial,
	gsl_interp_cspline,
	gsl_interp_cspline_periodic,
	gsl_interp_akima,
	gsl_interp_akima_periodic*/
};

template<class Table>
class Interpolator
{
public:
	template<size_t arraySize>
	Interpolator(InterpType interpType, double (&xIn)[arraySize], double (&yIn)[arraySize]) : type_(interpTypes[interpType]), table_(xIn, yIn)
	{
		InterpolationTableBounds bounds = table_.getBounds() ;
		if(type_->alloc != NULL)
			data_ = type_->alloc(bounds.size);
		type_->init(data_, bounds.x, bounds.y, bounds.size);
	}
	~Interpolator()
	{
		if(type_->free != NULL)
			type_->free(data_);
	}
	double interpolate(double x) const
	{
		double y;
		InterpolationTableBounds bounds = table_.getBounds() ;
		type_->eval(data_, bounds.x, bounds.y, bounds.size, x, NULL, &y);
		return y;
	}
private:
	const Table				table_;
	const gsl_interp_type * const type_;
	void *					data_;
};

}

}

#endif _Interpolation_hpp_

license: Unlicense

repository: KonstantinStepanovich/SIM

repo_name: KonstantinStepanovich/SIM

extension: hpp


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace DailyHabits.Services.Habits.Model
{
    public abstract class HabitModel
	{
		public string Name { get; set; }
		public string Icon { get; set; }

		public string BaseColor { get; set; }
		public string InitialColor { get; set; }
		public string FinalColor { get; set; }

		public int Target { get; set; }
	}
}

repository: TomaszRewak/DailyHabits

repo_name: TomaszRewak/DailyHabits

gha_language: JavaScript


text:
// History: Jan 04 14 Thibaut Colar Creation

// Package gollections provides some"Generic" collections for go.
// Those collections are feature rich with many useful methods.
package gollections

import (
	"bytes"
	"errors"
	"fmt"
	"reflect"
)

// Custom "Generic" (Sorta) slice
// Note: Satisfies sort.Interface so can use sort, search as long as Compare is
// implemented
type Slice struct {

	// internal slice that hold the items
	slice []interface{}
	// value of pointer to slice
	sliceValPtr reflect.Value

	// Returns whether two items are equal
	// Default imlementation uses reflect.DeepEqual (==)
	Equals func(a, b interface{}) bool

	// Optional comparator function, must return 0 if a==b; -1 if a < b; 1 if a>b
	// **Nil by default**
	// **MUST** be defined for sorting to work.
	Compare func(a, b interface{}) int
}

// Initialize a new empty slice
func NewSlice() *Slice {
	s := &Slice{}
	s.sliceValPtr = reflect.ValueOf(&s.slice)
	s.Equals = func(a, b interface{}) bool { return reflect.DeepEqual(a, b) }
	return s
}

// Return true if f returns true for all of the items in the list.
func (s *Slice) All(f func(interface{}) bool) bool {
	for _, e := range s.slice {
		if !f(e) {
			return false
		}
	}
	return true
}

// Return true if c returns true for any(at least 1) of the items in the list
func (s *Slice) Any(f func(interface{}) bool) bool {
	for _, e := range s.slice {
		if f(e) {
			return true
		}
	}
	return false
}

// Append a single value (in place)
// Return the slice pointer to allow method chaining.
func (s *Slice) Append(elem interface{}) *Slice {
	s.slice = append(s.slice, elem)
	return s
}

// Append several values (in place)
// Return the slice pointer to allow method chaining.
func (s *Slice) AppendAll(elems ...interface{}) *Slice {
	s.slice = append(s.slice, elems...)
	return s
}

// Append another Slice to this slice
// Return the slice pointer to allow method chaining.
func (s *Slice) AppendSlice(slice *Slice) *Slice {
	s.slice = append(s.slice, slice.slice...)
	return s
}

// Current slice capacity
func (s *Slice) Cap() int {
	return cap(s.slice)
}

// Clear (empty) the list
// Return the slice pointer to allow method chaining.
func (s *Slice) Clear() *Slice {
	// Note: A nil slice in go is valid and can then be used just as if empty
	s.slice = nil
	return s
}

// Create and return a clone of this slice
func (s *Slice) Clone() *Slice {
	clone := NewSlice()
	clone.slice = append(clone.slice, s.slice)
	return clone
}

// Clone part of this slice into a new Slice
// From and To are both inclusive
func (s *Slice) CloneRange(from, to int) *Slice {
	var err error
	if from, err = s.handleIndex(from); err != nil {
		panic(err.Error())
	}
	if to, err = s.handleIndex(to); err != nil {
		panic(err.Error())
	}
	clone := NewSlice()
	clone.slice = append(clone.slice, s.slice[from:to+1]...)
	return clone
}

// Does the slice contain the given element (by equality)
// Note, this uses simple iteration, use sort methods if needing more performance
func (s *Slice) Contains(elem interface{}) bool {
	return s.IndexOf(elem) != -1
}

// Does the slice contain all the given values
func (s *Slice) ContainsAll(elems ...interface{}) bool {
	for _, elem := range elems {
		if !s.Contains(elem) {
			return false
		}
	}
	return true
}

// Does the slice contain at least one of the given values
func (s *Slice) ContainsAny(elems ...interface{}) bool {
	for _, elem := range elems {
		if s.Contains(elem) {
			return true
		}
	}
	return false
}

// Apply the function to the whole slice (in order)
// If the function returns true (stop), iteration will stop
func (s *Slice) Each(f func(int, interface{}) (stop bool)) {
	s.EachRange(0, len(s.slice)-1, f)
}

// Apply the function to the slice range
// From and To are both inclusive
// if from is < to it will iterate in reversed order
// If the function returns true (stop), iteration will stop
func (s *Slice) EachRange(from, to int, f func(int, interface{}) (stop bool)) {
	var err error
	if from, err = s.handleIndex(from); err != nil {
		panic(err.Error())
	}
	if to, err = s.handleIndex(to); err != nil {
		panic(err.Error())
	}
	// Figure if we are to step forward or backwards
	step := 1
	steps := to - from
	if from > to {
		step = -1
		steps = -steps
	}
	var stop bool
	// Iterate
	for i := 0; i != steps+1; i++ {
		stop = f(from, s.slice[from])
		if stop {
			break
		}
		from += step
	}
}

// Apply the function to the whole slice (reverse order)
// If the function returns true (stop), iteration will stop
func (s *Slice) Eachr(f func(int, interface{}) (stop bool)) {
	s.EachRange(len(s.slice)-1, 0, f)
}

// Fill(append to) the slice with 'count' times the 'elem' value (in place)
// Return the slice pointer to allow method chaining.
func (s *Slice) Fill(elem interface{}, count int) *Slice {
	for i := 0; i != count; i++ {
		s.Append(elem)
	}
	return s
}

// Apply a function to find an element in the slice (iteratively)
// Returns the index if found, or -1 if no matches.
// The function is expected to return true when the index is found.
func (s *Slice) Find(f func(int, interface{}) (found bool)) (index int) {
	for i, e := range s.slice {
		if f(i, e) {
			return i
		}
	}
	return -1
}

// Apply a function to find all element in the slice for which the function returns true
// Returns a new Slice made of the matches.
func (s *Slice) FindAll(f func(int, interface{}) (found bool)) *Slice {
	results := NewSlice()
	for i, e := range s.slice {
		if f(i, e) {
			results.slice = append(results.slice, e)
		}
	}
	return results
}

// Set value of ptr to this slice first element
// Return an error if slice is empty
func (s *Slice) First(ptr interface{}) {
	if _, err := s.handleIndex(0); err != nil {
		panic(err.Error())
	}
	s.Get(0, ptr)
}

// Set value of ptr to slice[idx]
// If idx is negative then idx element from the end -> slice[len(slice)+idx]
// ie Get(-1) would return the last element
func (s *Slice) Get(idx int, ptr interface{}) {
	s.GetVal(idx, PtrToVal(ptr))
}

// Set value of ptr(Ptr is the Value of a pointer to the var to set) to slice[idx]
// When called repeatedly GetVal() can be ~30% faster than Get
// since it saves repeating the reflection call.
// Note: See PtrToVal()
func (s *Slice) GetVal(idx int, ptrVal reflect.Value) {
	var err error
	if idx, err = s.handleIndex(idx); err != nil {
		panic(err.Error())
	}
	ptrVal.Set(reflect.Indirect(s.sliceValPtr).Index(idx).Elem())
}

// Return the (lowest) index of given element (using Equals() method)
// Return -1 if the lement is part of the slice
// Note, this uses simple iteration, use sort methods if meeding more performance
func (s *Slice) IndexOf(elem interface{}) int {
	for i, e := range s.slice {
		if s.Equals(e, elem) {
			return i
		}
	}
	return -1
}

// Insert the element before index idx
// Can use negative index
// Return the slice pointer to allow method chaining.
func (s *Slice) Insert(idx int, elem interface{}) *Slice {
	var err error
	if idx, err = s.handleIndex(idx); err != nil {
		panic(err.Error())
	}
	s.slice = append(s.slice, 0)
	copy(s.slice[idx+1:], s.slice[idx:])
	s.slice[idx] = elem
	return s
}

// Insert All the element before index idx
// Can use negative index
// Return the slice pointer to allow method chaining.
func (s *Slice) InsertAll(idx int, elems ...interface{}) *Slice {
	var err error
	if idx, err = s.handleIndex(idx); err != nil {
		panic(err.Error())
	}
	// Expand the slice by elems size
	s.slice = append(s.slice, make([]interface{}, len(elems))...)
	// Shift "in place" elements to the right of index to the right
	copy(s.slice[idx+len(elems):], s.slice[idx:])
	// fill in the space with the elements to be inserted
	copy(s.slice[idx:], elems)
	return s
}

// Insert All the element of the slice before index idx
// Can use negative index
// Return the slice pointer to allow method chaining.
func (s *Slice) InsertSlice(idx int, slice *Slice) *Slice {
	s.InsertAll(idx, slice.slice...)
	return s
}

// Is this slice empty
func (s *Slice) IsEmpty() bool {
	return len(s.slice) == 0
}

// Create a string by jining all the elements with the given seprator
// Note: Use fmt.Sprintf("%v", e) to get each element as a string
func (s *Slice) Join(sep string) string {
	var buf bytes.Buffer
	for i, e := range s.slice {
		if i != 0 {
			buf.WriteString(sep)
		}
		buf.WriteString(fmt.Sprintf("%v", e))
	}
	return buf.String()
}

// Set value of ptr to this slice last element
// Will panic if slice is empty
func (s *Slice) Last(ptr interface{}) {
	if _, err := s.handleIndex(-1); err != nil {
		panic(err.Error())
	}
	s.Get(-1, ptr)
}

// Length of this slice
// Also used for impl of sort.Interface
func (s *Slice) Len() int {
	return len(s.slice)
}

// Check if element at index a < b (used as impl of sort.Interface)
// S.Compare must be defined !
func (s *Slice) Less(a, b int) bool {
	if s.Compare == nil {
		panic("Slice.Compare function was not implemented !")
	}
	var err error
	if a, err = s.handleIndex(a); err != nil {
		panic(err.Error())
	}
	if b, err = s.handleIndex(b); err != nil {
		panic(err.Error())
	}
	return s.Compare(s.slice[a], s.slice[b]) == -1
}

// Set ptr to the minimum value in the slice (pamic if slice is empty)
// NOTE: Compare function **MUST** be implemented
// This uses simple iteration (0n time) and does not modify the slice
// Alternatively use sort.Sort(slice).Get(0, ptr) when performance is needed
func (s *Slice) Min(ptr interface{}) {
	if s.IsEmpty() {
		panic("Can't find Min of empty slice !")
	}
	minIdx := 0
	for i := 1; i < len(s.slice); i++ {
		if s.Less(i, minIdx) {
			minIdx = i
		}
	}
	s.Get(minIdx, ptr)
}

// Set ptr to the maximum value in the slice (pamic if slice is empty)
// NOTE: Compare function **MUST** be implemented
// This uses simple iteration (0n time) and does not modify the slice
// Alternatively use sort.Sort(slice).Get(-1, ptr) when performance is needed
func (s *Slice) Max(ptr interface{}) {
	if s.IsEmpty() {
		panic("Can't find Max of empty slice !")
	}
	maxIdx := 0
	for i := 1; i < len(s.slice); i++ {
		if s.Less(maxIdx, i) {
			maxIdx = i
		}
	}
	s.Get(maxIdx, ptr)
}

// Set ptr to the last element
// Will panic if slice is empty
func (s *Slice) Peek(ptr interface{}) {
	s.Last(ptr)
}

// Pop (return & remove) and set ptr to the last element
// Will panic if slice is empty
func (s *Slice) Pop(ptr interface{}) {
	s.Last(ptr)
	// remove last elem of slice
	s.slice = s.slice[:len(s.slice)-1]
}

// Push an elem at the end of the slice (same as Append)
func (s *Slice) Push(elem interface{}) {
	s.Append(elem)
}

// Reduce is used to iterate through every item in the list to reduce the list
// into a single value called the reduction.
// The initial value (startVal) of the reduction is passed in as the init parameter
// then passed to the closure along with each item (which returns the updated reduction)
// See Tests / Examples in the test file for more info
func (s *Slice) Reduce(startVal interface{}, f func(reduction interface{}, index int, elem interface{}) interface{}) interface{} {
	reduction := startVal
	for i, e := range s.slice {
		reduction = f(reduction, i, e)
	}
	return reduction
}

// Remove the element at the given index (in place)
// Return the slice pointer to allow method chaining.
func (s *Slice) RemoveAt(idx int) *Slice {
	copy(s.slice[idx:], s.slice[idx+1:]) // shift elements past index to the left
	s.slice = s.slice[:len(s.slice)-1]   // lose last element
	return s
}

// Remove, in place, the first element found by value equality (found by IndexFrom method)
// Return the slice pointer to allow method chaining.
func (s *Slice) RemoveElem(elem interface{}) *Slice {
	idx := s.IndexOf(elem)
	if idx >= 0 {
		s.RemoveAt(idx)
	}
	return s
}

// Remove, in place, all elements by value equality (using Equals function)
// Return the slice pointer to allow method chaining.
func (s *Slice) RemoveElems(elem interface{}) *Slice {
	s.RemoveFunc(func(idx int, e interface{}) bool {
		return s.Equals(elem, e)
	})
	return s
}

// Remove, in place, the elements that match the function (where the function return true)
func (s *Slice) RemoveFunc(f func(idx int, elem interface{}) bool) *Slice {
	for i := 0; i < len(s.slice); i++ {
		if f(i, s.slice[i]) {
			s.RemoveAt(i)
			i--
		}
	}
	return s
}

// Remove the elements within the given index range
// Return the slice pointer to allow method chaining.
func (s *Slice) RemoveRange(from, to int) *Slice {
	var err error
	if from, err = s.handleIndex(from); err != nil {
		panic(err.Error())
	}
	if to, err = s.handleIndex(to); err != nil {
		panic(err.Error())
	}
	copy(s.slice[from:], s.slice[to:])         // shift elements
	s.slice = s.slice[:len(s.slice)-(to-from)] // lose last elements
	return s
}

// Reverse in place, the slice in place (first element becomes last etc...)
// Return the slice pointer to allow method chaining.
func (s *Slice) Reverse() *Slice {
	start := 0
	end := len(s.slice) - 1
	for end > start { // Otherwise 0 or 1 element left, nothing to swap
		s.slice[start], s.slice[end] = s.slice[end], s.slice[start]
		end--
		start++
	}
	return s
}

// Set the element at the given index
// Return the slice pointer to allow method chaining.
func (s *Slice) Set(idx int, elem interface{}) *Slice {
	s.slice[idx] = elem
	return s
}

// Returns pointer to the raw underlying slice ([]interface{})
func (s *Slice) Slice() *[]interface{} {
	return &s.slice
}

// impl String interface
func (s *Slice) String() string {
	return fmt.Sprintf("Slice[%d] %v", len(s.slice), s.slice)
}

// Swap 2 elements (used as impl of sort.Interface)
// Panics if the indexes are out of bounds
func (s *Slice) Swap(a, b int) {
	var err error
	if a, err = s.handleIndex(a); err != nil {
		panic(err.Error())
	}
	if b, err = s.handleIndex(b); err != nil {
		panic(err.Error())
	}

	s.slice[a], s.slice[b] = s.slice[b], s.slice[a]
}

// Export our "generic" slice to a typed slice (say []int)
// Ptr needs to be a pointer to a slice
// Note that it can't be a simple cast and instead the data needs to be copied
// so it's definitely a VERY costly operation.
func (s *Slice) To(ptr interface{}) {
	s.ToRange(0, len(s.slice)-1, ptr)
}

// Same as To() but only get a subset(range) of the slice
// From and To are both inclusive
// Note that from and to can use negative index to indicate "from the end"
func (s *Slice) ToRange(from, to int, ptr interface{}) {
	var err error
	if from, err = s.handleIndex(from); err != nil {
		panic(err.Error())
	}
	if to, err = s.handleIndex(to); err != nil {
		panic(err.Error())
	}

	// Value of the pointer to the target
	obj := reflect.Indirect(reflect.ValueOf(ptr))
	// We can't just convert from interface{} to whatever the target is (diff memory layout),
	// so we need to create a New slice of the proper type and copy the values individually
	t := reflect.TypeOf(ptr).Elem()
	slice := reflect.MakeSlice(t, to-from+1, to-from+1)
	// Copying the data, val is an adressable Pointer of the actual target type
	val := reflect.Indirect(reflect.New(t.Elem()))
	for i := from; i <= to; i++ {
		v := reflect.ValueOf(s.slice[i])
		val.Set(v)
		slice.Index(i - from).Set(v)
	}
	// Ok now assign our slice to the target pointer
	obj.Set(slice)
}

// Validate the index is in the slice bounds
// Also turm negative indexes into index from the end of the slice (-1 = last)
func (s *Slice) handleIndex(idx int) (int, error) {
	if idx < 0 {
		idx = len(s.slice) + idx
	}
	if idx >= len(s.slice) || idx < 0 {
		return idx, errors.New(fmt.Sprintf("Invalid slice index: %d", idx))
	}
	return idx, nil
}

// Get the reflect.Value of the element pointed to by ptr
// Will panic if tr is not a pointer
func PtrToVal(ptr interface{}) reflect.Value {
	return reflect.ValueOf(ptr).Elem()
}

repository: tcolar/gollections

repo_name: tcolar/gollections


text:
# SPDX-License-Identifier: Apache-2.0

board_set_flasher_ifnset(intel_s1000)
board_set_debugger_ifnset(intel_s1000)

if(CONFIG_SMP)
board_finalize_runner_args(intel_s1000
  "--xt-ocd-dir=/opt/tensilica/xocd-12.0.4/xt-ocd"
  "--ocd-topology=topology_all_flyswatter2.xml"
  "--ocd-jtag-instr=all_gdb.txt"
  "--gdb-flash-file=load_elf.txt"
)
else()
board_finalize_runner_args(intel_s1000
  "--xt-ocd-dir=/opt/tensilica/xocd-12.0.4/xt-ocd"
  "--ocd-topology=topology_dsp0_flyswatter2.xml"
  "--ocd-jtag-instr=dsp0_gdb.txt"
  "--gdb-flash-file=load_elf.txt"
)
endif()

repository: platformio/zephyr

repo_name: platformio/zephyr

gha_language: C

extension: cmake


text:
package server

import (
	"context"
	"strconv"
	"strings"

	"github.com/pkg/errors"
	"github.com/pressly/screenshot/lib/headless"
	pb "github.com/pressly/screenshot/rpc/screenshot"
)

type server struct {
	chrome *headless.Chrome
}

func New() (*server, error) {
	chrome, err := headless.New(context.TODO())
	if err != nil {
		return nil, errors.Wrap(err, "failed to init headless")
	}

	return &server{chrome: chrome}, nil
}

type resolution struct {
	width  float64
	height float64
}

// parseResolution parses a string of format 800x600, and converts it to
// resolution. If s is empty, an initilized zero value resolution is returned.
func parseResolution(s string) (*resolution, error) {
	if s == "" {
		return &resolution{}, nil
	}

	parts := strings.Split(s, "x")
	if len(parts) < 2 {
		return nil, errors.Errorf("failed to parse resolution: %s", s)
	}
	width, err := strconv.ParseFloat(parts[0], 64)
	if err != nil {
		return nil, errors.Wrapf(err, "failed to parse width: %s", parts[0])
	}
	height, err := strconv.ParseFloat(parts[1], 64)
	if err != nil {
		return nil, errors.Wrapf(err, "failed to parse height: %s", parts[1])
	}
	return &resolution{
		width:  width,
		height: height,
	}, nil
}

func (s *server) Close() {
	s.chrome.Close()
}

func (s *server) Image(ctx context.Context, req *pb.RequestImage) (*pb.Resp, error) {
	// create context
	ctx, cancel := context.WithCancel(ctx)
	defer cancel()

	window, err := parseResolution(req.Window)
	if err != nil {
		return nil, errors.Wrap(err, "failed to parse window resolution")
	}

	image, err := s.chrome.NewImage(ctx, req.Url, float64(req.X), float64(req.Y), window.width, window.height)
	if err != nil {
		return nil, errors.Wrapf(err, "failed to parse window: %s", req.Window)
	}

	return &pb.Resp{
		Resp: image,
	}, nil
}

repository: etsangsplk/screenshot

repo_name: etsangsplk/screenshot


text:
@article{suddard-bangsund_organic_2016,
 abstract = {A new series of organic salts with selective near-infrared (NIR) harvesting to 950 nm is reported, and anion selection and blending is demonstrated to allow for fine tuning of the open-circuit voltage. Extending photoresponse deeper into the NIR is a significant challenge facing small molecule organic photovoltaics, and recent demonstrations have been limited by open-circuit voltages much lower than the theoretical and practical limits. This work presents molecular design strategies that enable facile tuning of energy level alignment and open-circuit voltages in organic salt-based photovoltaics. Anions are also shown to have a strong influence on exciton diffusion length. These insights provide a clear route toward achieving high efficiency transparent and panchromatic photovoltaics, and open up design opportunities to rapidly tailor molecules for new donor–acceptor systems.},
 author = {Suddard-Bangsund, John and Traverse, Christopher J. and Young, Margaret and Patrick, Tyler J. and Zhao, Yimu and Lunt, Richard R.},
 doi = {10.1002/aenm.201501659},
 file = {Snapshot:/Users/jsb/Zotero/storage/FNMB86IR/abstract.html:text/html;Suddard-Bangsund et al_2016_Adv. Energy Mater._Organic Salts as a Route to Energy Level Control in Low Bandgap, High.pdf:C\:\\Users\\JSB\\Google Drive\\Papers-Zotfile\ØLEDDegradation\\Suddard-Bangsund et al_2016_Adv. Energy Mater._Organic Salts as a Route to Energy Level Control in Low Bandgap, High.pdf:application/pdf;Suddard-Bangsund et al_2016_Adv. Energy Mater._Organic Salts as a Route to Energy Level Control in Low Bandgap, High.pdf:C\:\\Users\\JSB\\Google Drive\\Papers-Zotfile\\CV\\Suddard-Bangsund et al_2016_Adv. Energy Mater._Organic Salts as a Route to Energy Level Control in Low Bandgap, High.pdf:application/pdf},
 issn = {1614-6840},
 journal = {Advanced Energy Materials},
 keywords = {energy level tuning, near-infrared solar harvesting, open-circuit voltage, organic salts, transparent solar cells},
 language = {en},
 month = {jan},
 number = {1},
 pages = {n/a--n/a},
 title = {Organic Salts as a Route to Energy Level Control in Low Bandgap, High Open-Circuit Voltage Organic and Transparent Solar Cells that Approach the Excitonic Voltage Limit},
 url = {http://onlinelibrary.wiley.com/doi/10.1002/aenm.201501659/abstract},
 urldate = {2016-01-22},
 volume = {6},
 year = {2016}
}

repository: jsbangsund/academic-kickstart

repo_name: jsbangsund/academic-kickstart